Mainframe FAQ
Mainframe FAQ
A
IN
FR
A
M
ES
.co
DB2................................................................................................................................................................ 2
Short Notes: .......................................................................................................................................... 2
Stored Procedures ............................................................................................................................... 2
QA .............................................................................................................................................................. 2
General RDBMS Concepts............................................................................................................. 2
Application Programming............................................................................................................ 10
SQL...................................................................................................................................................... 16
SQL CODES ...................................................................................................................................... 20
DB2 Utilities ..................................................................................................................................... 22
JCL ............................................................................................................................................................... 24
Short Notes: ........................................................................................................................................ 24
System Exceptions ........................................................................................................................ 30
QA ............................................................................................................................................................ 31
COBOL........................................................................................................................................................ 43
Short Notes .......................................................................................................................................... 43
QA ............................................................................................................................................................ 45
VSAM .......................................................................................................................................................... 58
Short Notes .......................................................................................................................................... 58
QA ............................................................................................................................................................ 60
SDLC ........................................................................................................................................................... 66
QA ............................................................................................................................................................ 66
IMS .............................................................................................................................................................. 70
QA ............................................................................................................................................................ 70
CICS ............................................................................................................................................................ 79
QA ............................................................................................................................................................ 79
Easytrieve ............................................................................................................................................... 102
QA .......................................................................................................................................................... 102
Abend Codes.......................................................................................................................................... 103
User codes .......................................................................................................................................... 103
System codes .................................................................................................................................... 106
Return codes...................................................................................................................................... 111
File status codes............................................................................................................................... 112
SQL return codes ............................................................................................................................. 112
Miscellaneous codes and messages .......................................................................................... 113
CICS abend codes............................................................................................................................ 113
IMS abend codes.............................................................................................................................. 115
Page 1 of 117
Interview Preparation
DB2
Short Notes:
Bind parameters:
A
M
ES
.co
PLAN NAME
ACTION ON PLAN (REPLACE/ADD)
RETAIN EXECUTION AUTHORITY (YES/NO)PLAN VALIDATION TIME (RUN/BIND)
MEMBERS
ISOLATION LEVEL(RR/CS)
RESOUCE ACQUISITION TIME (ALLOCATE/USE)
RESOUCE RELEASE TIME ( DEALLOCATE/COMMIT)
EXPLAIN PATH SELECTION (YES/NO)
QUALIFIER
Options on ACTION ON PLAN parameter:
A
IN
FR
QA
A stored procedure is a group of SQL statements that form a logical unit and perform
a particular task. Stored procedures are used to encapsulate a set of operations or
queries to execute on a database server. For example, operations on an employee
database (hire, fire, promote, lookup) could be coded as stored procedures executed
by application code. Stored procedures can be compiled and executed with different
parameters and results, and they may have any combination of input, output, and
input/output parameters.
IB
Page 2 of 117
3. What is an object?
It is anything that is managed by DB2 (i.e., alias, column, stogroup,
database, table-space, table, view, index, synonym), but not the data itself.
4. What is the DataBase Descriptor?
ES
.co
The database descriptor, DBD is the DB2 component that limits access to the
database whenever objects are created, altered or dropped.
The attachment facility is an interface between DB2 and TSO, IMS/VS, CICS,
or batch address spaces. It allows application programs to access DB2.
6. What is meant by AUTO COMMIT?
A
M
AUTO COMMIT is a SPUFI option that commits the effects of SQL statements
automatically if they are successfully executed.
A
IN
FR
A base table is a real table - a table that physically exists in that there are
physical stored records.
8. What is the function of buffer manager?
The buffer manager is the DB2 component responsible for physically
transferring data between an external medium and (virtual) storage
(performs the actual I/O operations). It minimizes the amount of physical I/O
actually performed with sophisticated buffering techniques(i.e., read-ahead
buffering and look-aside buffering).
9.
IB
There are four buffer pools: BP0, BP1, BP2, and BP32.
11. On the create table space, what does the CLOSE parameter do?
CLOSE physically closes the table space when no one is working on the
object. DB2 (release 2.3) will logically close table spaces.
12. What is a clustering index?
It is a type of index that (1) locates table rows and (2) determines how rows
are grouped together in the table space.
Page 3 of 117
ES
.co
It is cursor stability that tells DB2 that database values read by this
application are protected only while they are being used. (Changed values
are protected until this application reaches the commit point). As soon as a
program moves from one row to another, other programs may read or the
first row.
15.What is concurrency and how is it controlled?
A
M
Concurrency is when more than one program can access the same data at the
same time. You control concurrency by establishing locks so that no program
can access uncommitted data that has been changed by another program.
16.What is meant by isolation level?
A
IN
FR
Isolation level describes the method used to lock and unlock DB2 space. It is
one of the parameters you specify when you do a BIND.
17.Describe the different isolation levels in order of concurrency.
CS (Cursor stability) DB2 keeps the lock on the row until the next row is
fetched or the unit of work is committed.
RR (Repeatable Read) - DB2 keeps the lock on all the rows that an
application references during the unit of work.
UR (Uncommitted Read) - has fastest data access. Can be used to access
uncommitted data.
RS Locks the rows that are part of the result set.
IB
IN Intent None. Owner of the lock can read any data in the table.
IS Intent Share. Owner of the lock can read any data in the table, if the S
lock can be obtained on the target rows.
S Share. Owner of the lock can read any data in the table, but will not
obtain any row locks.
IX Intent eXclusive. Owner of the lock can read or change any data in the
table, if the X lock is obtained on the rows to be changed, and U or S lock can
be obtained on the rows to be read.
SIX Share With. Owner of the lock can read any data in the table and
intent eXclusive change rows if it can obtain an X lock on the target rows.
U Update. Owner of the lock can read and change any data in the table, if
an X lock on the table can be obtained.
X eXclusive. Owner of the lock can read or change any data in the table. No
row locks are obtained.
Z Super exclusive. No other application can access the table.
Page 4 of 117
S Share. Row is being read by one application and is available for read only
by concurrent applications.
19. What is the function of the Data Manager?
The Data Manager is a DB2 component that manages the physical databases.
It invokes other system components, as necessary, to perform detailed
functions such as locking, logging, and physical I/O operations (such as
search, retrieval, update, and index maintenance).
ES
.co
A
M
DSNDB07 is where DB2 does its sorting. It includes DB2s sort work area and
external storage.
A
IN
FR
IB
The new foreign key value must reference or have a matching primary key
value in the related table.
25.What is a Check Constraint? How is it enforced?
The DBA can implement these to place specific data value restrictions on
certain columns using the CONSTRAINT clause.
They consists of 2 components:
1-a CONSTRAINT name
2-a check condition
Page 5 of 117
ES
.co
It is a set of row identifiers (RIDs) or pointers that are logically ordered based
on the values of indexed columns.
A
M
Indexes provide faster data access and can enforce uniqueness on the row in
a table. An index key is a column or set of columns in a table used to
determine the order of index entries.
A
IN
FR
When an entire index (or a portion thereof) is scanned to locate rows, we call
this an index scan. This type of access can be used, for example, to select all
rows of a table in some order and avoid a sort for a query.
29.What is a recovery log?
IB
It will grant privileges to a list of one or more users. If the GRANT is used in
conjunction with PUBLIC, then all users will be granted privileges. It can also
be done by objects and types.
33.What is an image copy?
Page 6 of 117
incremental image copies (to copy only those pages that have been modified
since the last image copy).
34.What does locking mean?
ES
.co
This is a page that contains keys and page numbers of other pages in the
index. Non-leaf pages never point to actual data.
36.Is there any advantage to denormalizing DB2 tables?
A
M
Denormalizing DB2 tables reduces the need for processing intensive relational
joins and reduces the number of foreign keys.
A
IN
FR
To maintain the integrity of DB2 objects the DBD permits access to only on
object at a time. Lock contention happens if several objects are required by
contending application processes simultaneously.
38.What is SPUFI?
SPUFI stands for SQL processing using file input. It is the DB2 interactive
menu-driven tool used by developers to create database objects.
39.What is an Alias?
They are basically the same except that a synonym can only be used by the
creator and stored in the SYSIBM.SYSSYNONYMS catalog table.
IB
It is a DB2 component that processes SQL statements and selects the access
paths.
42.What is a Resource Control Table (RCT)? Describe its
characteristics.
Page 7 of 117
ES
.co
47.What is a table-space?
A
M
A
IN
FR
IB
Page 8 of 117
ES
.co
A
M
It is a set of tables (name starts with SYSIBM.) that contain information about
all the DB2 objects (tables, views, plans, packages, etc.).
55.In which column of which DB2 catalog would you find the length
of the rows for all tables?
A
IN
FR
IB
Page 9 of 117
SYSIBM.SYSPACKAUTH.
61.How about system privileges held by a user?
SYSIBM.SYSUSERAUTH.
ES
.co
64.If you need to know when a plan was bound and who did it last,
where is the information?
A
M
SYSIBM.SYSPLAN.
A
IN
FR
Application Programming
IB
1-The PRE-COMPILER first checks for syntax errors and creates a source
module and a DBRM (database request module). The source module contains
no SQL code (converted to CALL statements) while DBRM contains
information about each pre-compiled SQL statement.
2-The source code is processed by the COMPILER and converted to object
code.
3-The object code goes in the LINKAGE-EDITOR creating a load module.
4-Finally, the BIND process creates an application plan (using all previous
DBRMs).
It validates the SQL statements in the DBRM(s) for valid table, view and
column names, verifies that the OWNER (authid) is authorized to perform the
functions in the program, selects all access paths and indexes and creates or
replaces the plan.
Page 10 of 117
68.What is a Plan?
A plan is a DB2 object (produced during the bind process) that associates one
or more database request modules with a plan name.
69.What is the difference between plan and Package?
ES
.co
Both contain optimized code for SQL statements - a package for a single
program, module or subroutine contained in the date base request module
(DBRM) library. A plan may contain multiple packages and pointers to
packages.
A
M
Plans are created by the BIND command. The plan is stored in the DB2
directory and accessed when its program is run. Information about the plan is
stored in the DB2 catalog.
A package is a single, bound DBRM with optimized access paths. By using
packages, the table access logic is "packaged" at a lower level of granularity
than a plan -- at the package (or program) level.
A
IN
FR
To execute a package, you first must include it in the package list of a plan.
Packages are not directly executed, they are only indirectly executed when
the plan in which they are contained executes -- as discussed previously,
UDFs and triggers are exceptions to this rule. A plan can consist of one or
more DBRMs, one or more packages or, a combination of packages and
DBRMs.
70.What is a DB2 Bind?
Bind is a process that builds access paths to the DB2 tables. A bind uses
DBRMs from the pre-compile step as the input and produces an application
plan. It also checks the users authority and validates the SQL statements in
the DBRMs.
IB
Page 11 of 117
ES
.co
A
M
A
IN
FR
EXEC SQL
INCLUDE SQLCA
END-EXEC.
A REBIND REPLACE
IB
A clustering index which determines the physical order the rows of the table
are stored in, which is usually the sequential order the data is most frequently
accessed.
A unique index forces the table's rows to have unique values.
81.When do you use a VIEW?
To access only the columns that you are authorized to read and to access one
or more columns from one or more tables.
82.What is a ROLLBACK?
Page 12 of 117
The rollback returns the data to its original values since the last commit.
83.Is a NULL value equal to a space, a zero or low-values?
Neither one. A NULL value has no value. An indicator variable would have a
value of -1 if a SELECT retrieved a NULL value.
ES
.co
Its a regular working storage section field with pic s9(4) comp, where system
puts negative value if we have NULL in the particular field, and ignore it when
we have NOT NULL in the particular field.
A
M
86.Can we have NULL INDICATOR for all fields that allow NULL in one
statement?
No, we must have NULL INDICATOR for each particular field.
A
IN
FR
IB
These are the fields from WORKING-STORAGE SECTION in which system puts
data extracted from DB2. It can be created using DCLGEN. Host variables are
preceded by :.
91.What is the SQL Communications Area?
Page 13 of 117
It is a data area defined in working storage, which tells your program whether
SQL statements were executed successfully.
It contains SQLCODE, which indicates whether the SQL statement was
successful or unsuccessful.
SQLWARN0 which if set to W means that at least one of the SQL warning
flags is set.
ES
.co
After each SQL statement is executed system puts their special value.
A
M
A
IN
FR
97.What is SQLERRM?
IB
Page 14 of 117
102.
103.
ES
.co
They are SQL statements that are embedded within an application program
and are prepared during the program preparation process before it is
executed. After it is prepared, the statement itself does not change (although
values of host variables specified within the statement may change).
A
M
104.
105.
A
IN
FR
One can invoke the RECOVER INDOUBT command to commit or rollback any
changes associated with an in-doubt thread.
What is an asynchronous write?
It is a write to disk that may occur before or long after a commit. The write is
controlled by the buffer manager.
I/O operations are usually most critical for DB2 performance (or any other
database for that matter).
107.
Whats the reason for a program being run for a long time?
IB
There can be hundreds of reasons why a program is taking a long time to run.
What we will attempt to do here is document the most common reasons.
1. An index is not being used. Running the "EXPLAIN" utility will show
whether or not and index is being used for a particular SQL statement. If one
exists but is not being used, maybe a reorg. of the table is needed. If the
cluster ratio of the index is low (less than 95%), DB2's optimizer may elect to
use a table scan rather than the index. One way of testing this before doing a
reorg. is to use Platinum's PDA and change the cluster ratio to 100%, rebind
the package, and run the EXPLAIN utility to see if DB2's optimizer chooses the
index.
Page 15 of 117
2. A massive delete has occurred. Even though a process has deleted several
rows of data, if a reorg. has not been done afterwards, those rows still
physically exist in the table. DB2 has to check a delete indicator to see if the
row should be included in processing. Only a reorg. will physically delete
these rows.
ES
.co
3. Processing two different data sources that are ordered differently. Here is a
typical example:
A program is using a VSAM file that has its primary key of social security
number in terminal digit (TD) order and is using a DB2 table ordered by social
security number in straight order. If, for example, the "trigger" file is the DB2
table, for every access made to the VSAM file an I/O might have to occur.
VSAM will be jumping all over the file because processing is not by the order
of the data.
SQL
A
M
108. What do the initials DDL and DML stand for and what is their
meaning?
DDL is data definition language and DML is data manipulation language.
A
IN
FR
At first system performs inner sub select, if it finds a value then outer sub
select uses this value.
DB2 substitutes the value resulting from the sub query directly into the
WHERE or HAVING clause of the main select.
IB
111. What is the main difference between simple and correlated sub
selects?
Correlated sub select performs for many times, simple sub select-for one
time.
How does correlated sub select work?
Systems takes a row in outer sub select, takes a value and passes its value to
inner sub select and perform this select as simple sub select, gets the result
and this goes to outer. Now outer performs. Than it takes a second row, takes
Page 16 of 117
a value, passes it to inner sub select, performs this select again as a simple
sub select, returns value to outer until all rows for this column will be taken.
112.
At first system performs inner sub select. It inner sub select retrieves at least
one row then outer sub select performs.
113. SQL statements that are defined and processed while the
program is executing is considered static or dynamic SQL?
ES
.co
114. How do you retrieve multiple rows from a table and list the
SQL statements required?
DB2 sequentially retrieves multiple rows through the use of a CURSOR.
A
M
OPEN opens the cursor. This would be the slowest process since the data is
built.
A
IN
FR
FETCH retrieves each row one at a time until there are no more rows
(SQLCODE = +100).
CLOSE closes the cursor.
115.
Use the WITH HOLD option in the DECLARE statement when the cursor is
declared.
116. What option is used in the DECLARE statement to enhance data
retrieval performance?
IB
Use the OPTIMIZE FOR 1 ROW to disable list pre-fetch for online applications
that display data on a page-to-page basis. When list pre-fetch is used, DB2
acquires a list of RIDs from the matching index entries, sorts the RIDs, and
then accesses data pages using the RID list. The overhead associated with list
pre-fetch usually causes performance degradation in an online, paging
environment.
Otherwise, use OPTIMIZE FOR n ROWS, where n is the estimated maximum
number of rows that will be retrieved. This influences the access path
selection chosen by the DB2 optimizer.
117. What is the use of the WHENEVER clause? What conditions can
it check?
The WHENEVER clause checks the values associated with an error in SQLCA
each time a SQL statement is executed
WHENEVER NOT FOUND - checks for data not found
Page 17 of 117
119.
ES
.co
A
M
A
IN
FR
122. What is the SQL syntax used to delete all COBOL skills from the
SKILLS column on the KIT table?
EXEC SQL
DELETE FROM KIT
WHERE SKILLS = 'COBOL'
END-EXEC
123. What is the SQL syntax used to change all COBOL skills to DB2
in the SKILLS column on the KIT table?
IB
EXEC SQL
UPDATE KIT
SET SKILLS = 'DB2'
WHERE SKILLS = 'COBOL'
END-EXEC
124. What is the SELECT statement used to multiply the percentage
column by 100 before it returns a value?
SELECT PERCENTAGE * 100
125. How do you specify a WHERE clause that retrieves GRADES >=
90 and GRADES <= 100?
Page 18 of 117
ES
.co
UNION. The only requirement is that the 2 tables be "similar" (having the
same number of columns with the same data types and lengths).
A
M
128.
UNION ALL. With the ALL option, all rows from the 2 tables will be retained.
Without it, duplicate rows will be discarded.
What is the difference between JOIN and UNION?
A
IN
FR
129.
JOIN combines results from more than one table using one SELECT
statement. UNION combines results from more than one SELECT statement.
130.
When the system takes one row from one table and adds each row from
another table, then takes second row and adds each row from second table
and so on. We can get it only on JOIN when we did not make a bridge.
132.
IB
SQL statements that are prepared and executed within a program, while it is
executing. The SQL source is contained in host variables rather than being
"hard coded" into the program. The SQL statement may change from
execution to execution.
133.
What is a predicate?
Page 19 of 117
SQL CODES
134.
135.
ES
.co
A
IN
FR
A
M
1. An image copy needs to be taken. DB2 turns the copy pending flag on if
the DB2 load utility has been run with the parameter "log no". Since "log no"
does not log transactions to the system log, DB2 requires an image copy be
performed. This gives DB2 a starting place in case recovery needs to be run
at some later time. If an image copy was not taken, the rows inserted with
the load utility (with "log no") would be lost.
2. Contention with another program. DB2 allows concurrency. This means
more than one process can update a table at the same time. But long running
update programs can change this. If an update program is started, every time
an update happens a lock is placed on the CI (or row if row level locking is
being used). DB2 only has a certain amount of locks. Once this maximum
threshold of locks is used, DB2 escalates to a table-space lock. This means
only the process that caused the escalation can use the table. All other
processes will receive a -904.
3. A DB2 utility is being executed. Certain DB2 utilities require exclusive
control of the table. If a process is started while one of these is executing, a 904 is issued.
CODE
+100
-102
-117
IB
-180/-181
-199
-204
-205/-206
+304
-305
-311
-501
-502
-503
-530
-532/-536
-545
Causes
Row not found
String constant is too long
The number of values you are trying to INSERT does not match the
number of columns.
Bad data in Date/Time/Timestamp
Illegal use of specified keyword
Object not defined in DB2
Column Specified does not exist
Value can not be assigned to the host variable because it is out of
range.
Null indicator missing
VARCHAR Insert or update failed (-LEN field was not set right with the
data length.
Cursor not opened for FETCH
Trying to open an already opened cursor
Updating column which needs to be specified in FOR UPDATE OF
Referential integrity prevents the INSERT/UPDATE
Referential integrity (DELETE RESTRICT rule) prevents the DELETE
Check constraint prevents the INSERT/UPDATE
Page 20 of 117
IB
A
IN
FR
A
M
ES
.co
+802
-803
-805
-811
-904
-911
-913
-922
Page 21 of 117
DB2 Utilities
-
COPY
To create a backup
CHECK
ES
.co
LOAD
A
M
A
IN
FR
MODIFY
MERGECOPY -
IB
QUIESCE
REPLACE
RESUME YES
ENFORCE NO (to bypass referential constraint
check)
to delete references to unneeded image copies from the DB2
Catalog
It can merge several incremental copies of a table-space to
make a single incremental copy, and it can merge incremental
copies with a full image copy to make a new full image copy.
to create point of recovery based on DB2 log
REBIND
RECOVER
Page 22 of 117
ES
.co
It will repair invalid data with valid data and/or reset (using the
SET option) status flag conditions (NOCOPYPEND,
NOCHECKPEND and NORCVRPEND).The data may be your own
data or data you would not normally access: space map pages
and index entries.
REPORT
RUNSTATS
A
M
REPAIR
This updates the DB2 catalog columns to tell how much space
is allocated for storage groups and related table-space and
indexes.
IB
STOSPACE
A
IN
FR
Page 23 of 117
JCL
Short Notes:
ES
.co
A comma (,) at end of any line means that a continuation of the statement will follow
on next line.
Statements are of the form
A
M
The first space (which is not within a string) in PARAMETERS will end the
PARAMETERS, unless preceded by a COMMA. Rest of the information on that line will
be treated as comments.
Continuation portion must begin between 4th and 16th column.
A
IN
FR
An empty line (begins with a // and all spaces) will mark end of input to JES2. no
further input is taken. Hence it marks end of job(s) that user wishes to submit to
JES2.
JOB STATEMENT
Account number
first
Name / Description
CLASS
IB
REGION
|
|
TIME
COND
MSGCLASS
Class of output.
MSGLEVEL
NOTIFY
Page 24 of 117
TYPRUN
USER
PASSWOD
ADDRSPC
BYTES
ES
.co
CARDS
GROUP
LINES
PAGES
Programmers name
RD
RESTART
SECLABEL
USER
A
IN
FR
PRTY
A
M
PERFORM
Exec statement
Stepname
IB
PGM
PROC
IMPLICI PROCNAME
PARM
REGION
TIME
Page 25 of 117
COND
DD statement
DSNAME (DSN)
DUMMY
DISP
(NEW/OLD/SHR/MOD
PASS/KEEP/DELETE/CATLG/UNCATLG
KEEP/DELETE/CATLG/UNCATLG)
UNIT
SPACE
DCB
dataset.
A
IN
FR
VOLUME (VOL)
A
M
Intl
Normal
Abnormal
ES
.co
(TRK/CYL/BLK/BYTES)
(Primary, Secondary, Directory blocks)
(RLSE) what should be done when job ends.
(Data Control Block) --- defines the characteristics of a
LRECL
BLKSIZE
RECFM
DSOG (PO/PS)
MODELDCB (for GDG only and first parameter)
SYSOUT
IB
OUTPUT
FCB
printing.
CHARS
Fonts on printer.
COPIES
DEST
DDNAME
Page 26 of 117
MGMTCLAS
STORCLAS
AMP
ES
.co
IB
A
IN
FR
A
M
DD Statement
*
ACCODE
AMP
AVGREC
BLKSIZE
BURST
CHARS
CHKPT
CNTL
COPIES
DATA
DATACLAS
DCB
DDNAME
DEST
DISO
DLM
DSID
DSNAME
DSNTYPE
DUMMY
DYNAM
EXPDT
FCB
FLASH
FREE
HOLD
KEYLEN
KEYOFF
LABEL
LIKE
LRECL
MGMTCLAS
MODIFY
OUTLIM
OUTPUT
PATH
PATHDISP
DATACLAS
Page 27 of 117
A
M
ES
.co
PATHMODE
PATHOPTS
PROTECT
QNAME
RECFM
RECORG
REFDD
RETPD
SECMODEL
SEGMEN
SPACE
SPIN
SORCLAS
SUBSYS
SYSOUT
TERM
UCS
UNIT
VOLUME
JOBLIB
STEPLIB
A
IN
FR
JCLLIB
IB
INCLUDE
Specifies the member to include in current position in the JCL. Included
member can be part of JCL, not necessarily a step or a PROC.
SET
Sets a variable to a value.
Page 28 of 117
SET SYS=PROD These variables are used in parsing and not in run time. It is
performed before the execution of the JCL.
PROC
ES
.co
Variables
A
M
/*JOBPARM taken by JES for the whole job and should appear before the first EXEC
stmt.
Referback
A
IN
FR
*.name or *.ddname
*.stepname.name or *.stepname.ddname
*.stepname.procstepname.name *.stepname.procstepname.ddname
OUTPUT Stmt
IB
ADDRESS
BUILDING
BURST
CHARS
CKPTLINE
CKPTPAGE
CKPTSEC
CLASS
COMPACT
CONTROL
COPIES
DATACK
DEFAULT
DEPT
DEST
DPAGELBL
Page 29 of 117
m
ES
.co
A
M
A
IN
FR
FCB
FLASH
FORMDEF
FORMS
GROUPID
INDEX
JESDS
LINDEX
LINECT
MODIFY
NAME
NOTIFY
OUTDISP
PAGEDEF
PIMSG
PRMODE
PRTY
ROOM
SYSAREA
THRESHLD
TITLE
TRC
UCS
USERDATA
USERDATA
WRITER
System Exceptions
IB
Page 30 of 117
A
M
Divide by Zero
Field too small for calculated quotient.
ES
.co
122, 222
A
IN
FR
QA
The JOB statement identifies characteristics about the job such as job name,
accounting information, restart instructions, job class, holds a job for later
execution and set time limits.
03.How do you start a job at a specific job step rather then at the
beginning?
IB
Indicate RESTART on the JOB statement and the name of the job step to
begin execution.
Page 31 of 117
The EXEC statement identifies the beginning of each job step; states the
program to be executed; the name of the job step; gives conditions for
bypassing or executing a job step; sets CPU time limits and passes
parameters to the program
06.What is the purpose of the PARM keyword in the EXEC statement?
ES
.co
A
M
A
IN
FR
IB
DCB stands for data control block. The keywords associated with the DCB
parameter are LRECL(record length), RECFM(record format), BLKSIZE(block
size) and DSORG(sequential or portioned data set).
Page 32 of 117
// DD dsn=dataset3,disp=shr
15.Given the example shown below:
//ddname DD dsn=dataset1,disp=shr
// DD dummy
// DD dsn=dataset3,disp=shr
What happens here?
ES
.co
A
M
The system will release any unused tracks after allocating the requested
space.
18.Explain what will happen to a dataset with this DISP parameter upon
completion of the job: DISP=(NEW,CATLG,DELETE)?
A
IN
FR
If the job runs successfully, the dataset will be created and cataloged. If the
job abends, the dataset will be deleted.
19.What is the default DISP parameters values?
DISP=(NEW,DELETE,DELETE)
IB
The load module found in the load library coded on the STEPLIB statement.
Page 33 of 117
ES
.co
A group of datasets with the same base name that have chronological
occurrences called generations. Each generation is referenced by it's base
dataset name followed by the generation number. Example:
SYS3.MASTER.G0101V00 and SYS3.MASTER.G0102V00 where SYS3.MASTER
is the base name followed by a chronological generation number.
26.Define GDG?
A
M
A
IN
FR
IB
Page 34 of 117
ES
.co
30.If a job abends and a (+1) generation that was created previously
will be used in the next subsequent step(s), what do you do before
you restart?
Change your JCL to refer to this as a (0) generation because it is now the
current generation.
This is assuming that the (+1) generation created was the most current and
there was no (+2) created etc.
A
M
31.If you defined a GDG with a limit of 90, what happens when the 91st
generation is created?
Generation one rolls off and is automatically deleted.
32.Identify the 2 uses of the TYPRUN parameter on the JOB statement?
A
IN
FR
TYPRUN=HOLD will submit the job in the queue but suspend it's execution
until it is released.
TYPRUN=SCAN allows the JCL in the job to be checked for syntax errors
without executing the job.
33.What is a procedure?
A JCL stream called by the executing job by specifying it's name on the EXEC
statement.
A PROC is used when the same set of JCL statements are used repeatedly
with little or no change.
IB
Page 35 of 117
ES
.co
Default values are specified by assigning values in the procedure on the PROC
statement. Specific values are assigned on the EXEC statement of the calling
procedure.
A
M
A
IN
FR
IEBGENER with the output directed to SYSOUT=*. This assumes that the
MSGCLASS parameter on the JOB statement is pointing to a proper output
class.
42.What parameter do you use to execute the next job step even though
the preceding job step was unsuccessful?
IB
43.What parameter do you use to execute the next job step only if the
preceding job step was unsuccessful?
COND=ONLY coded in subsequent steps.
Page 36 of 117
ES
.co
A S222 abend code means the job was cancelled by the operator. A S322
means that the job needs more time to run.
A
M
DCB conflict; often LRECL specified does not match the record length of the
file in the COBOL program
A
IN
FR
You lack the authority to read or update the dataset. Talk to the security
administrator so your ID has the necessary authority.
IB
54.How do you change the return code? How is this different from a user
abend?
In the COBOL program, move a 4-digit number to RETURN-CODE before
issuing the GOBACK statement. This is different from a user abend because it
Page 37 of 117
does not abend, but issues a non-zero return code which can be used to
affect subsequent steps.
55.What are some of the causes for SOC4 abend code?
A missing DD statement; an un-initialized subscript or index and accessing an
occurrence beyond the scope of the table
ES
.co
It's a data exception which occurs when attempting to use a numeric field
that contains alphanumeric data.
57.How to eliminate duplicate records using External Sort?
It can be done by using the SUM FILEDS = NONE option
58.What is primary allocation for a dataset?
A
M
A
IN
FR
Secondary allocation is done when more space is required than what has
already been allocated.
60.How many extents are possible for a sequential file ? For a VSAM file?
16 extents on a volume for a sequential file and 123 for a VSAM file.
61.What does a disposition of (NEW,CATLG,DELETE) mean?
That this is a new dataset and needs to be allocated, to CATLG the dataset if
the step is successful and to delete the dataset if the step abends.
IB
That this is a new dataset and needs to be allocated, to CATLG the dataset if
the step is successful and to KEEP but not CATLG the dataset if the step
abends. Thus if the step abends, the dataset would not be catalogued and we
would need to supply the Vol. ser the next time we refer to it.
Page 38 of 117
67.What is DISP=(NEW,PASS,DELETE)?
ES
.co
66.What do you do if you do not want to keep all the space allocated to a
dataset?
This is a new file and create it, if the step terminates normally, pass it to the
subsequent steps and if step abends, delete it. This dataset will not exist
beyond the JCL.
A
M
68.How do you create a temporary dataset? Where will you use them?
A
IN
FR
71.A PROC has five steps. Step 3 has a condition code. How can you
override/nullify this condition code?
IB
Page 39 of 117
would go through and at the end of the step the system would try to put it in
the system catalog. at this point since an entry already exists the catlg would
fail and give this message. you can fix the problem by deleting/uncataloging
the first data set and going to the volume where the new dataset exists(this
info is in the msglog of the job) and cataloging it.
74.What is 'S0C7' abend?
ES
.co
Storage violation error - can be due to various reasons. e.g.: READING a file
that is not open, invalid address referenced due to subscript error.
76.What are SD37, SB37, SE37 abends?
All indicate dataset out of space.
A
M
A
IN
FR
IB
Used to copy one QSAM file to another. Source dataset should be described
using SYSUT1 ddname. Destination dataset should be decribed using SYSUT2.
IEBGENR can also do some reformatting of data by supplying control cards
via SYSIN.
Page 40 of 117
82.I have multiple jobs (JCLs with several JOB cards) in a member. What
happens if I submit it?
Multiple jobs are submitted (as many jobs as the number of JOB cards).
//SYSIN DD*
input data
input data
/*
84.Can you code instream data in a PROC ?
No.
A
M
ES
.co
83.I have a COBOL program that ACCEPTs some input data. How do you
code the JCL statement for this? ( How do you code in-stream data in
a JCL? )
One way is to code SYSIN DD DUMMY in the PROC, and then override this
from the JCL with instream data.
A
IN
FR
86.How do you run a COBOL batch program from a JCL? How do you run
a COBOL/DB2 program?
To run a non DB2 program,
//STEP001 EXEC PGM=MYPROG
IB
Specifies that the private library (or libraries) specified should be searched
before the default system libraries in order to locate a program to be
executed.
STEPLIB applies only to the particular step, JOBLIB to all steps in the job.
Page 41 of 117
JOBLIB is ignored.
90.When you specify multiple datasets in a JOBLIB or STEPLIB, what
factor determines the order?
The library with the largest block size should be the first one.
ES
.co
92.The disp in the JCL is MOD and the program opens the file in OUTPUT
mode. What happens ? The disp in the JCL is SHR and the pgm opens
the file in EXTEND mode. What happens ?
Records will be written to end of file (append) when a WRITE is done in both
cases.
A
M
IB
A
IN
FR
JES3 allocates datasets for all the steps before the job is scheduled. In JES2,
allocation of datasets required by a step are done only just before the step
executes.
Page 42 of 117
COBOL
Short Notes
Column specification for Cobol programs:
(1-6)
(7)
(8-11)
(12-72)
ES
.co
Environment division.
A
IN
FR
Configuration section.
Source-computer.
object-computer.
Special-names.
A
M
Program-ID.
Author.
Date-written.
Date-compiled.
Input-output section.
File-control.
Select assign
Organization
Access mode
File status
Record key
Alternate Record key
Relative key
I-O control.
Data division.
IB
File section.
FD or SD
Name
Block contains
Record contains
Record varying
Label record
Data record
Recording mode
Working storage section
Page 43 of 117
Linkage section.
Procedure division
(Using).
Ending
Stop run
Exit
goback
A
IN
FR
ADD
SUBTRACT
MULTIPLY
DIVIDE
COMPUTE
A
M
Arithmetic
ES
.co
Manipulation
Input-Output
ACCEPT
DISPLAY
OPEN
CLOSE
START
READ
WRITE
REWRITE
DELETE
Ordering
IB
SORT
MERGE
RELEASE
RETUN
Branching
EXIT
GO TO
PERFORM (varying, until, after varying)
Subprogram
Page 44 of 117
CALL
CANCEL
Tables and indexes
SET
Conditional statements
ES
.co
IF
EVALUATE
GO TO DEPENDING ON
Scope delimiters
END-*
A
M
QA
A
IN
FR
It's a list of instructions that processes the input to derive the desired output.
3. What is the difference between a subscript and an index?
An index is defined with it's associated table using the INDEXED BY phrase. It
is a storage area generated by the compiler. It is 4 bytes in length. You cant
display an index. The SET statement sets up and down an index.
IB
An external sort is performed within a JCL job using a sort utility such as
SYNCSORT. The file is sorted before the COBOL program begins. The COBOL
program processes the sorted file.
The COBOL program performs an internal sort and the file is sorted during
program execution. The internal sort allows the COBOL program to
manipulate the file before and/or after the file is sorted.
Page 45 of 117
ES
.co
A
M
A
IN
FR
Searches on a sorted array. Compare the item to be searched with the item
at the center. If it matches, fine else repeat he process with the left half or
the right half depending on where the item lies.
11.What do you prepare to use: Index or Subscript?
When we need to search relatively bigger table its better to use Index. For
smaller table it doesnt matter. Index works faster.
IB
Page 46 of 117
INITIALIZE statement.
MOVE INIT-VALUE TO each entry
Example:
PERFORM
VARYING SUB FROM 1 BY 1
UNTIL SUB > MAX-NUMB
MOVE INIT-VALUE TO B-ENTRY (SUB)
END-PERFORM.
ES
.co
We can use only one key for comparison, on WHEN option only = sign is
allowed and AND operator (no OR).
16.How can we save value of index?
A
M
A
IN
FR
Must use the compiler option SSRANGE, if u want array bounds checking.
Default is NOSSRANGE.
IB
22.How do u define the sort file in JCL that runs the COBOL program?
Use the SORTWK01, SORTWK02,. DD names in the step. Number of sort
datasets depends on the volume of data being sorted, but a minimum of 3 is
required.
Page 47 of 117
ES
.co
// EXEC PGM=SORT
//SORTWK01 DD UNIT-SYSDA,SPACE=(CYL,50,RLSE)
//SORTWK02 DD UNIT-SYSDA,SPACE=(CYL,50,RLSE)
.
//SORTWK12 DD UNIT-SYSDA,SPACE=(CYL,50,RLSE)
//SORTIN DD DSN=name of the input file
//SORTOUT DD DSN=name of the output file
//SYSIN DD *
SORT FILEDS=(pos, length, type of data, order)
/*
Example: SORT FRIELDS=(15,08,CH,A)
A
M
in load module:
for static CALL: load module of sub program will be included in
the load module of the main program.
For dynamic CALL load module of main and sub programs are
different.
In coding:
For static CALL we code in Procedure division:
CALL PROG2, where PROG2 is exact name of the program
which
we invoke.
For dynamic CALL we have to supply in working-storage field
with pic x(8): 01 WS-PROG-NAME PIC X(08).
IN Procedure division we have to :
MOVE PROG2 TO WS-PROG-NAME
CALL WS-PROG-NAME
A
IN
FR
27.If you made some changes to the subprogram for static CALL what
are all the steps do u have to implement?
IB
28.If you made some changes to the subprogram for dynamic CALL what
are all the steps do u have to implement?
We have to recompile only the subprogram.
Page 48 of 117
Evaluate is like a case statement and can be used to replace nested IFs. the
difference between evaluate and case is that no break is required for
evaluate i.e. control comes out of the evaluate as Soon as one match is
made.
ES
.co
A
M
Scope terminator is used to mark the end of a verb. E.g. EVALAUTEENDEVALUATE , IF..END-IF.
33.What are all the kinds of PERFORM statements are there?
PERFROM, PERFORM/THRU, PERFROM/UNTIL, PERFORM # TIMES,
PERFROM/VARYING.
A
IN
FR
END-PERFORM.
When the body of the PERFORM will not be used on other part of the
program. If the body of the program is a generic type of code (used from
various other places in the paragraph), it would be better to put the code id a
separate paragraph and use PERFORM parameter rather than in in-line
perform.
IB
Page 49 of 117
This level was used for concatenation. We can use now STRING statement
instead of level 66.
39.What is STRING Statement?
A
M
ES
.co
It used to combine a few fields in one, for e.g. Last-name and First-name in
one field: Name.
It used to replace some values or calculating some numbers for one field.
42.How can we get current DATE and TIME from the system?
A
IN
FR
IB
Page 50 of 117
The USING phrase allows the Procedure Division to reference data in the
Linkage Section.
ES
.co
A
M
A COMP-3 field is also known as a packed decimal field. Each 8-bit byte can
hold 2 digits so all COMP-3 fields should be defined as a odd number to
accommodate the 4-bit sign. A COMP-3 field defined as an even number is
essentially 1 + that number to make it odd (which is why it is more efficient
to define them as an odd number to avoid this extra overhead).
A
IN
FR
50.The field with pic S9(07)V99. how many bytes it occupies in COMP
and COMP-3?
In COMP it occupies 4 bytes, in COMP-3 it occupies 5 bytes.
51.What is the difference between a COPY statement and a CALL
statement?
A COPY statement copies pre-written COBOL code into the program while the
CALL statement causes another program to be executed.
Concatenates part or all of the contents of two or more data items or literals
into one single data item.
IB
53. What is the meaning of the data name that your file is assigned to in
the SELECT statement?
It matches the file's DDname in the JCL that executes the program.
Example: In COBOL: SELECT PREP-FILE ASSIGN TO UT-D-PREPFILE.
In JCL: //PREPFILE DD DSN=......
Page 51 of 117
A
M
ES
.co
A
IN
FR
No. This field uses 5 bytes in storage. The fifth byte of the field recognizes the
sign. If the value is positive, it starts with a C, a D if the value is negative and
F for a unsigned value.
IB
61. How many characters are stored per byte if a data item is defined as
PIC X(03)? Why?
3. USAGE IS DISPLAY specifies zoned decimal storage that means one
character is stored for each position defined. Internally, the IBM mainframe
uses EBCDIC (Extended Binary Coded Decimal Interchange Code) to store its
data.
Page 52 of 117
decimal.
63.What's more efficient, a signed or unsigned field when doing
computations?
Signed because it reduces the number of instructions COBOL must execute to
remove the sign after the computation.
ES
.co
RELEASE.
A
M
A
IN
FR
RETURN.
IB
Page 53 of 117
ES
.co
72.List the steps involved when using a line counter to achieve end-ofpage control when printing reports.
A
M
A
IN
FR
PIC $ZZZ,ZZZ.99CR
1-SUB is initialized to 1
2-The until clause is checked to see if X(SUB) = Y
3-If they are equal, the PERFORM is terminated and processing continues with
the next statement following the PERFORM
4-If they are not equal, the paragraph ZZ is performed
5-1 is added to SUB and becomes 2
6-Repeat steps 2-4
7-1 is added to SUB and becomes 3
8-The PERFORM is terminated because SUB > 2
IB
Page 54 of 117
77.When using several ANDs and ORs in the same IF statement, what
order are the conditions evaluated in? How can you override the
order?
The AND conditions are evaluated first, as they appear in the statement, from
left to right; then the OR conditions are evaluated from left to right. To
override these rules, place parenthesis around conditions you want evaluated
first.
ES
.co
78. What is the advantage of using the COMPUTE statement over the 4
arithmetic verbs (ADD, SUBTRACT, MULTIPLY, DIVIDE)?
The COMPUTE statement may contain more than one operation. It performs
more than one operation with a single verb and is advantageous when
performing complex arithmetic.
79.What is a FILLER field?
A
M
FILLER fields are fields that are not specifically referenced in the program but
because they take up space in a data description they are defined to maintain
data alignment when defining fields and their locations.
80. A file's blocking factor may be determined in the program or in the
JCL. What statement do you use to relinquish control to the JCL?
A
IN
FR
IB
Page 55 of 117
ES
.co
A
M
NEXT SENTENCE gives control to the verb following the next period (.) while
CONTINUE gives control to the next verb after the END-IF.
86.What is the significance of 'above the line' and 'below the line'?
A
IN
FR
88. What does the INITIALIZE statement initialize values to? What fields
does it ignore?
IB
Page 56 of 117
ES
.co
False. WHEN conditions are executed top-down, the first condition stated is
evaluated first.
That is why you should arrange the conditions in the order you really
intended.
93.If EOF-FLAG is defined as an 88-level with a value of 'Y' State two
ways to set the field equal to it's value.
A
M
94.The INSPECT statement can replace all blanks with zeroes. What
COBOL II statement achieves the same results?
INITIALIZE data item REPLACING ALPHANUMERIC DATA BY ZEROES
A
IN
FR
IB
If u want to pass values from jcl to Cobol use "parm" parameter in the exec
statement and in the cobol program declare the linkage section for the values
to be passed.If u want to pass values from cobol to other non-cobol programs
this can be done by call by reference or call by value.ex: call pgma using wsname, ws-sex.
Page 57 of 117
VSAM
Short Notes
ES
.co
RRDS (fixed)
VRRDS
LDS
Records are in
order as they
are entered
Records are in
collating
sequence by
key field
Records are in
relative record
number order
Records are in
relative record
number order
No processing
at record level
Direct access
by RBA
Direct access
by key or RBA
Direct access
by relative
record number
Direct access
by relative
record number
Access with
Data-In-Virtual
(DIV)
Alternate
indexes
allowed
Alternate
indexes
allowed
No alternate
indexes
allowed
No alternate
indexes
allowed
No alternate
indexes
allowed
A record's RBA
can change
A record's
relative record
number cannot
change
A record's
relative record
number cannot
change
No processing
at record level
Empty slots in
the data set
are used for
adding records
Free space is
used for
inserting and
lengthening
records
No processing
at record level
A
IN
FR
KSDS
ESDS
A
M
The new architectural limit varies according to the size of the data control interval
(CI). For a 512-byte CI size, the maximum size is 2 terabytes; for a KSDS with a
data CI size of 32 kilobytes, the maximum size is 128 terabytes.
IB
A record's RBA
cannot change
Free space is
Space at the
used for
end of the data
inserting and
set is used for
lengthening
adding records
records
A record
cannot be
deleted, but its
Space given up
No processing
by a deleted or
at record level
shortened
Page 58 of 117
record
becomes free
space
used
record
becomes free
space
Spanned
records
allowed
Spanned
records
allowed
No spanned
records
allowed
No spanned
records
allowed
No spanned
records
allowed
Extended
format allowed
Extended
format or
compression
allowed
Extended
format allowed
Extended
format allowed
Extended
format allowed
ES
.co
VSAM Characteristics
space can be
reused for a
record of the
same length
A format for storing data independently of the type of direct access storage
device on which it is stored
Routines for sequential or direct access and for access by key, relative
address or relative record number
Options for optimizing performance
A multifunction service program (Access Method Services - IDCAMS) for
setting up catalog records and maintaining data sets
A
IN
FR
A
M
VSAM data sets often have to be shared among several different applications in an
OS/390 image or among applications on several different OS/390 system images.
For example, transactions running in different CICS regions may have to access the
same VSAM data set at the same time, or CICS transactions may have to access a
VSAM data set at the same time that a batch job is using the data set. The
requirements for sharing can vary. Sometimes applications only have to read the
data set. Sometimes an application has to update the data set while other
applications are reading it. The most complex case is when all applications have to
update the data set, and all require complete data integrity.
IB
Transactional VSAM Services allows VSAM data set sharing in batch/online and
batch/batch environments. It will be available through an extended Early Support
program at the time OS/390 V2.10 is available. Transactional VSAM supports
recoverable VSAM data sets to allow batch programs and CICS online applications to
concurrently share data for read and write processing. This capability will allow CICS
applications to stay online along with many batch update applications to help meet
the 24x365 data availability requirement. Transactional VSAM requires the use of the
Automatic Restart Manager (ARM). Transactional VSAM services will be restarted on
another system by ARM in the case of a system failure.
VSAM Enhancements
Page 59 of 117
When initially released by IBM in 1973, VSAM supported only two data organizations:
key-sequenced (KSDS) and entry-sequenced (ESDS) data sets. Since that time, IBM
has continually introduced major VSAM enhancements, as follows.
Extended Format Data Sets
Beginning with DFSMS V1.3, you can create and use VSAM KSDSs that can be much
larger than the 4-gigabyte limit imposed on any VSAM data set defined before this
release. DFSMS V1.5 allows non-KSDS file types (ESDS, RRDS, VRRDS and LDS) to
exceed 4 gigabytes.
ES
.co
VSAM Striping
A
M
DFSMS V1.3 introduced VSAM Record Level Sharing (RLS), which uses the coupling
facility hardware to allow VSAM data to be accessed for update from multiple
systems. The coupling facility is used as a store-through cache where records
accessed for update can be stored and where locks can be maintained to ensure
integrity.
A
IN
FR
This enhancement, introduced in OS/390 V2.10, provides the capacity to define any
VSAM data set in extended format (EF) as a striped data set. Any VSAM data set in
extended format may be defined in a manner that allows CIs to be interspersed
among a group of DASD volumes to enable the CIs to be retrieved simultaneously
from all volumes (or stripes).
Transactional VSAM
QA
IB
Page 60 of 117
An alternate index is another file related to the cluster, but sorted using an
alternate key that can have duplicates.
5. How do you create an alternate index?
ES
.co
You use the IDCAMS utility with the DEFINE AIX option after you build the
cluster and then do another IDCAMS with the BLDINDEX option to populate
the alternate index.
6. What parameter in the DEFINE AIX option is used to determine the
maximum number of duplicate keys allowable?
A
M
The RECORDSIZE parameter. There are 2 numbers that follow this: the 1st is
the average and the 2nd is the maximum. The values are equal to 5 +
(cluster key length) + N*(alternate key length), where N is the allowable
number of duplicates.
7. Name a few common VSAM status codes.
A
IN
FR
00-OK
02-READ a duplicate alternate key
10-end of file reached while doing a READ
22-trying to WRITE a duplicate primary key
23-record not found while doing a READ
97-file integrity verified, do an IDCAMS VERIFY
IB
When large blocks of data are used, more main storage is required than when
smaller blocks are used, but large blocks save CPU time and disk space.
Additionally, extra buffers may save elapsed time since the program does not
have to wait for an I/O to complete for it to continue processing.
In the JCL, you specify BUFNI (number of index buffers) and BUFND (number
of data buffers) as sub-parameters of the AMP parameter.
For random access, the BUFNI is one more than the number of index levels
and a BUFND of 2 is fine.
For sequential access, a BUFNI of 1 and a minimum of 5 for BUFND is fine.
For dynamic access, the values of each is the higher of the numbers for either
random or sequential.
9. What is IDCAMS ?
IDCAMS is the Access Method Services program. You run the IDCAMS
program and supply AMS commands thru SYSIN. (examples of AMS
commands are DELETE, DEFINE, REPRO etc..).
10.Can AMS commands be run from the TSO prompt ?
Page 61 of 117
Yes
11.Syntax of AMS modal commands ?
A
M
ES
.co
Note: these can be used only under IDCAMS and not from the TSO prompt.
IF LASTCC(or MAXCC) >(or <,= etc..) value THEN DO command set (such as DELETE, DEFINE etc..)
ELSE DO command set
LASTCC - Condition code from the last function(such as delete) executed
MAXCC - Max condition code that was returned by any of the prev functions
SET is also a valid AMS command. SET LASTCC (or MAXCC) = value
The maximum condition code is 16. A cond code of 4 indicates a warning. A
cond code of 8 is usually encountered on a DELETE of a dataset that is not
present.
Under IDCAMS , multiple functions can be executed, each of which returns a
cond code. What will be the condition code returned to the operating system ?
The maximum condition code generated is returned as the condition code of
the IDCAMS step.
A
IN
FR
Control Interval is analogous to a physical block for QSAM files. It is the unit
of i/o. Must be between 512 bytes to 32 k. Usually either 2K or 4K. A larger
control interval increases performance for sequential processing while the
reverse is true for random access. Under CICS when a record is locked, the
entire CI gets locked.
Control area is a group of control intervals. CA is used during allocation. CA
size is calculated based on the allocation type (cyl, tracks or records) and can
be max of 1 cylinder
13.What is FREESPACE ?
IB
Page 62 of 117
No. Because you cannot insert records in an ESDS, also when you rewrite a
record, it must be of the same length. Thus putting any value for freespace
does not make any sense.
16.What is SHAREOPTS ?
ES
.co
Value of 2 for cross region means that the file can be processed
simultaneously by multiple users provided only one of them is an updater.
Value of 3 for cross system means that any number of jobs can process the
file for input or output (VSAM does nothing to ensure integrity).
A
M
A
IN
FR
Then DEFINE PATH. Important paramters are NAME (ds name for the path),
PATHENTRY (ds name of the alternate index name), UPDATE(or NOUPDATE)
which specifies whether an alt index is updated when a update to the base
cluster takes place.
IB
Page 63 of 117
21.How do you initialize a VSAM file before any operation? a VSAM with
alternate index?
ES
.co
Can write a dummy program that just opens the file for output & then closes
it.
22.What does a file status of 02 on a VSAM indicate?
A
M
A
IN
FR
IB
27.Do all versions of the GDG have to be of the same record length ?
No, the DCB of the model dataset can be overridden when you allocate new
versions.
Page 64 of 117
ES
.co
Relative generation numbers are updated only at the end of the job, not at
the end of a step. To allocate a new generation, we would be using (+1) with
a DISP of (NEW,CATLG,DELETE). To refer to this in a subsequent step in the
same job, we would again use (+1) but with a DISP of SHR or OLD.
31.What more info you should give in the DD statement while defining
the next generation of a GDG?
A
M
Give (+1) as the generation number, give (new,catlg) for disp, give space
parameter, can give the dcb parameter if you want to override the dcb of the
model dataset.
32.Assuming that the DEFINE jcl is not available, how do you get info
about a VSAM files organization ?
A
IN
FR
IB
Run VERIFY.
Page 65 of 117
SDLC
QA
1. What is the TGT? How is this listing produced and why is it useful?
A
IN
FR
A
M
ES
.co
The TGT is the Task Global Table found in every COBOL II compile listing.
It is composed of 2 parts:
1-fixed-length portion which contains the number of fields that appear in
every program (such as the register save area)
2-variable-length portion containing fields of varying lengths
The TGT is produced when the compile options LIST and OFFSET are used.
It contains a wealth of information about the program which can be used for
abend resolution.
Within the variable-length portion of the TGT, you will find these:
INDEX CELLS - contains indexes stored as displacements (for a 1-dimensional
table, to find out what is the table occurence an index is pointing to at abend
time, divide the value of the INDEX CELL by the length of one table occurence
and then add 1).
BASE LOCATORS - there are 3 types:BLF (File section fields), BLW (Workingstorage section fields) and BLL (Linkage section fields).
FCB CELLS - an FCB (File Control Block) and a File Information Block exist for
each VSAM and non-VSAM file. At certain FCB displacements, you will find
these:
X'B3' - the file status code of the last I/O.
X'AC' - the address of the current record.
X'78' - the DCB (non-VSAM files) and ACB (VSAM files) information.
2. What is the system development life cycle?
The development of a new system from beginning to end; it's full life.
IB
Page 66 of 117
ES
.co
A
M
File layouts and database tables are created and populated with data.
Programs are coded and UNIT tested.
JCL jobs and procedures are developed.
A
IN
FR
SYSTEM testing insures all programs in the system work together logically
and effectively.
USER ACCEPTANCE testing allows the users to perform tests on screens,
analyze output and review reports to ensure that their requirements are met.
INTEGRATION testing tests the system in combination with other systems to
make sure it works as part of a complex whole.
10.What is regression testing?
IB
Page 67 of 117
Establish naming conventions for files, programs, screens, reports and jobs.
Develop run documentation for jobs run by the scheduler.
Replace test data with production data for files and tables.
Identify users and necessary security issues.
Move all programs, screens, reports and jobs to production libraries.
Create problem resolution procedures (rerun/restart instructions).
ES
.co
14. What documents are created during the system life cycle and what is
their purpose?
A
M
IB
A
IN
FR
Page 68 of 117
ES
.co
A
M
A
IN
FR
Client/server will save money, increase worker productivity, boost profits, and
achieve competitive advantage. It allows end user to access data and use the
same tools they use every day,typically spreadsheets and word processors.
Client/server architecture has its disadvantages, too. One of the biggest
problems facing client/server technology is its high level of complexity.
Instead of an application being designed in the traditional style, as one
program that handles both the user interface and data access, a client/server
application must be split into separate programs that operate independently
of one another while being able to communicate with each other to carry out
their assigned tasks.
IB
Page 69 of 117
IMS
QA
1. What are the parameters needed for an IMS call (Call-Level
Interface)?
ES
.co
A
M
A
IN
FR
3. What is the return code you get after a successful IMS call?
Spaces.
5. What is the return code you get after an unsuccessful "Get" (GU, GN,
GNP)?
IB
GE is commonly received when doing a qualified GU call for a record that does
not exist.
GB is commonly received when doing a GN call where there are no more
segments of the type requested.
Page 70 of 117
8. Is there any return code other than spaces that still might indicate a
successful retrieval of data on a "Get" call?
GA or GK indicates a change in segment type retrieved which is OK if that is
what you intended.
9. Let's say you needed to update segments in the database, but didn't
know if the segments already existed. If the segment existed, you
were to update the existing segment. If it didn't exist, you were to
create the segment. Name 2 ways to accomplish this.
ES
.co
1-Do GHU. If you get return code GE, ISRT the segment occurrence.
Otherwise, REPL the segment occurrence.
2-Try to ISRT. If you get return code II, do GHU followed by REPL.
A
M
If you're pretty sure the segment exists, use technique 1; otherwise, use
technique 2.
11.How would you retrieve more than one segment along the hierarchic
path to the lowest-level segment?
Use Path Call (command code of D).
A
IN
FR
14.Is it sufficient to check the IMS return code after a call in a CICS
program?
IB
No. The UIBRCODE must be checked first. A value other than low values
indicates a problem with the CICS to DL/I interface, in which case the return
code would be meaningless.
Page 71 of 117
and retrieve the previously accessed segment upon reentry into the program.
17.How would you access an IMS database segment via a secondary
index?
Via a PCB set up for secondary index access. The syntax is exactly the same
as for a primary key read. Only the key name is different.
18.Can you access a segment via a primary and a secondary index in the
same program?
ES
.co
Yes. You need 2 PCBs: one for the primary index access and a one for the
secondary index access.
19.Can you maintain more than one position in the same database at the
same time? How?
Yes. With multiple PCBs for the single database.
A
M
20.How does IMS know that the PSB you are using is the correct one for
the program?
A
IN
FR
It doesn't. IMS does not stop you from using another program's PSB in your
program, but the program may fail if it wasn't set up for the databases and
access paths your program needs.
21.What is the difference between a DBD and a PSB?
A DBD (Database Definition) describes the characteristics of a particular
database (the segment types, primary key, search fields, etc.).
a PSB (Program Specification Block) describes how a particular program views
the databases it accesses, which segments it has access to, which index can
be used for access, whether Replace or Insert is allowed on a particular
segment, etc.
IB
Your program can take checkpoints (IMS CHKP call) which will commit all the
updates prior to the checkpoint.
Page 72 of 117
ES
.co
The PSB will automatically terminate when the tasks ends. If you have a longrunning task, you may want to free up IMS resources before the task ends.
28.What is an ACB?
A
M
A
IN
FR
Not usually. Generally, the ACB is built at execution time by IMS before the
batch program runs. However, the ACB can be prebuilt by the DBA before
execution time-but slightly different JCL must be used to execute the
program.
30.How does a CICS program gain access to the ACB?
When you schedule a PSB (IMS function "PCB"), you are actually accessing
the ACB.
31. What do you have to do to your program when the program's PSB is
changed?
Nothing, unless the change directly affects what you are doing in the program
(secondary index access, etc.).
IB
33.What is the difference between this and a GU call with fully qualified
SSAs?
A GU call will always position you at the first segment which matches the
qualification, whereas successive GN calls will position you to the next
matching segment.
Page 73 of 117
Yes.
ES
.co
A
M
A
IN
FR
38. What information does IMS return in the DL/I Interface Block (HighLevel Interface)?
Translator version, status code, segment name, segment level, key feedback
length.
39.What information does IMS return in the PCB mask (Call-Level
Interface)?
Database name, segment level, status code, processing options, (DL/I
reserved area), segment name, key feedback length, key feedback area.
40.If you use a concatenated key to restore position, will it also restore
parentage? Why should this matter?
No. It matters because a subsequent GNP call may fail or give unexpected
results.
IB
41.How would you retrieve the last segment under a particular parent
segment?
Use a GNP call with a command code of L (Last).
Page 74 of 117
ES
.co
For COBOL :
2-Move UIBPCBAL to 01 level in the LINKAGE SECTION containing as many
S9(08) COMP fields as the PSB has PCBs.
3-Move PCB addresses (from the individual COMP fields described in item 2)
to their appropriate BLL cells in the LINKAGE SECTION.
For COBOL II :
2-Move UIBPCBAL to ADDRESS of 01 level in the LINKAGE SECTION
containing as many S9(08) COMP fields as the PSB has PCBs.
3-Move PCB addresses (from the individual COMP fields described in item 2)
to their appropriate ADDRESS of PCBs in the LINKAGE SECTION.
A
M
A
IN
FR
It means that the PSB does not give the programmer permission to perform
the ISRT. The problem can be solved either by using another PSB that does
have the necessary authority or by getting the DBA to give the PSB a
processing option of "I" on the segment.
44.What is the difference between a GN and a GNP call?
A GN is a general-purpose retrieval call, which can be used for a variety of
successive accesses depending on the SSAs and command codes used.
A GNP is a special-purpose retrieval call which is used to retrieve successive
segments after position on a "parent" segment has been established by a
"GU" or "GN" call (GNP calls do not affect parentage.).
You must first successfully retrieve and lock the segment(s) with a "Get Hold"
call (GHU, GHN, GHNP). (Note: with the High-Level Interface, a "Get" call
(GU, GN, GNP) is acceptable.).
IB
47. What happens when you try to replace key data in a segment? How
do you get around this problem?
The call fails (with a return code of "DA"). You get around this problem by
first deleting the original segment, and then reinserting it with the new key
Page 75 of 117
value.
48.What is a logical relationship?
ES
.co
A
M
Yes.
A
IN
FR
The order varies, depending on the Insert rules defined in the DBD. Options
are:
First (place the most recent ISRT first),
Last (place the most recent ISRT last), or
Here (place the ISRT where the database is currently positioned).
52. Does IMS support variable-length segments? How? Why is this
feature rarely used?
Yes. A 2-byte binary field containing the length of the segment is placed at
the beginning of the segment (the application program must maintain this
field on update). This feature is rarely used because IMS handles repeating
groups by allowing multiple segments and segment types. Only data that is
truly variable in nature (such as comments or other text strings) would be
candidates for variable-length segments.
53. What happens if the I/O area specified in the call does not match the
length of the segment as defined in the DBD?
IB
Data could either be lost (on ISRT or REPL) or it could overlay other data in
your program (on retrieval). You will not get a bad status code from IMS.
Page 76 of 117
56.Can you perform any call except ISRT with a load PSB?
No.
57. Can you use a load PSB against a database that already has some
records in it?
No.
ES
.co
58. What happens if you issue a "Get Hold" command, but no subsequent
DLET or REPL?
Nothing (It is not a problem as far as IMS is concerned).
59. What happens if you issue an IMS call ij between a "Get Hold"
command and a DLET or REPL?
A
M
The DLET or REPL will fail as if the "Get Hold" command had never been
issued.
A
IN
FR
No. Any "Get" command that positions the database at the desired segment is
acceptable.
61.What is a search field?
A search field is a nonkeyed field which is used in your SSA to restrict the
segments that will satisfy the call.
62.How are search fields defined?
Yes. One expression can follow another, with the ampersand (&) connecting
the two expressions.
IB
65. Can you turn a database "upside down" (access a low-level segment
as if it were the root)? How? How do you access the new "root"?
Yes. You need a secondary index to the low-level segment: a DBD which
defines a "logical database" where the parent segment is the "logical child" of
Page 77 of 117
a "physical child" segment, and a PCB which provides access to this logical
database. The application programmer can access the logical database exactly
as if it were a regular database.
66. If a SEARCH field is converted to a secondary index, what changes, if
any, need to be made to the application program?
The SSA must be changed to access the key field rather than the search field.
ES
.co
Yes. By setting up a PCB to go after the index DBD. Accessing the index only
is much quicker: all you need is a count of segments or a list of keys.
68.Where is the database positioned after the DLET requeStatement?
At the segment following the deleted segment.
A
M
69. What are the tradeoffs involved in adding a secondary index versus
using a search field?
IB
A
IN
FR
A Search field requires less processing time on update and takes up less
space.
A Secondary index provides faster retrieval (in most cases).
Page 78 of 117
CICS
QA
1. What are the two CICS Signon transactions?
ES
.co
CESN is with external security manager (ESM) such as RACF. The ESM User id
and password must be provided for the CESN transaction
CSSN is without ESM. The OPNAME and PASSWORD defined in the SNT must
be provided for CSSN transactions
A
M
A
IN
FR
The next time the end user presses an attention key, CICS will start the
transaction specified in the TRANSID option (a new task is initiated).
IB
7. How can you start a CICS transaction other than keying in the
transaction id at the terminal?
Page 79 of 117
ES
.co
By embedding the trans id in the first four positions of a screen sent to the
terminal.
After a user enters a trans-id, CICS goes to the Program Control Table(PCT)
and finds that trans-id in the table. The table entry also contains the name of
the program that executes when that trans-id is entered.
A
M
A
IN
FR
After finding the program in the PCT, CICS goes to the Program Processing
Table. It finds the program name in the table. Associated with the program
name is the location of the program; on disk or in storage. If the program is
already in storage, CICS starts the task. If not, CICS gets the program(load
module), loads it into storage and starts the task. The PPT entry is changed
from on disk to in storage.
10.What is the purpose of PLT?
PLT records are the set of application programs that will be executed
automatically at CICS start-up time
11.What is the system transid CEMT?
CEMT is the master terminal transaction that lets you display and change the
CICS environment
12.What is a mapset?
It is a collection of BMS maps link edited together.
IB
Page 80 of 117
ES
.co
Go find another terminal and after identifying the task associated with your
test transaction, issue this command:
CEMT Set TAsk(tasknumber) FOrcepurge
You can further disable the transaction so no one can use it until the program
is fixed.
17.If a user erases a field (ERASE-EOF), the flag field is reset from LOWVALUES to HEX 80 when a RECEIVE MAP is issued. How can this
present a problem and how can it be avoided?
A
M
The flag field is a redefines of the attribute byte field. When you issue a SEND
MAP, the attribute is set to HEX 80 which will present problems. This can be
avoided by always moving LOW-VALUES to the symbolic map.
18.What is the EIB field that identifies the key pressed by the terminal
user?
EIBAID
A
IN
FR
EIBAID identifies which PF or AID key was pressed by the user. It's stored in
the execute interface block (EIB).
20.What's the difference between accessing linkage section fields using
COBOL and COBOL II?
COBOL uses the ADDRESS command to load the address of a field into a BLL
cell and then issues a SERVICE RELOAD command which identifies the name
of the field the BLL cell is pointing to.
COBOL II uses ADDRESS OF to set the address of the field.
IB
The user enters data and presses a PF key. The program issues a RECEIVE
MAP command which retrieves the data and places it in the format defined by
the symbolic map.
22.A RECEIVE MAP is issued while both HANDLE AID and HANDLE
CONDITION are in effect. A MAPFAIL condition occurs as a result.
Which one is processed if an AID key is pressed?
The HANDLE AID command has priority and is processed and the HANDLE
CONDITION is ignored.
Page 81 of 117
ES
.co
The LINK command passes control to another program at the next lower
logical level and expects to return control back (using a RETURN command) to
the LINKing program.
The XCTL command transfers control to another program at the same logical
level and does not expect control back.
25.What happens to the resources supplied to a transaction when an
XCTL command is executed? How about LINK?
A
M
With an XCTL, the working storage and the procedure division of the program
issuing the XCTL are released. The I/O areas, the GETMAIN areas, and the
chained Linkage Section areas (Commarea from a higher level) remain. All
existing locks and queues also remain in effect.
With a LINK, however, program storage is also saved, since the transaction
expects to return and use it again.
A
IN
FR
27. What will happen if you issue an XCTL or a LINK and the called
program cannot be found? If found, what other problems might
occur?
IB
You will get a PGMIDERR condition. When a program is found, you might
encounter a NOTAUTH condition which means security was not properly set
up for your ID to access that program.
28. What CICS table must be updated before running a CICS program
accessing DB2 data?
The Resource Control Table (RCT) must be updated with the CICS transaction
and its DB2 application plan.
29. In a CICS program that uses DB2, do you use the COMMIT/ROLLBACK
commands or SYNCPOINT commands?
Page 82 of 117
ES
.co
33.What are the two types of interfaces provided by the CICS application
programs?
A
M
A
IN
FR
36.If IC is specified for more than one field than where the cursor will be
positioned?
IB
Page 83 of 117
40. What are the advantages of using EIBAID over HANDLE AID when
determining which key was pressed by the user?
ES
.co
EIBAID follows structured methodology while HANDLE AID forces the use of
sections and GO TOs.
If data from the map is not needed (the user pressed PF3 to exit), you don't
have to issue a RECEIVE MAP command with EIBAID usage but you must with
HANDLE AID.
A
M
The last bit in the 8-bit attribute byte which indicates whether the user has
modified the field with a value of 1.
42. What do you have to do to determine if screen data was sent from a
specific field?
A
IN
FR
You have to check if the MDT is turned on in that field's attribute byte.
43.Name 3 ways the MDT can be turned on.
1-When the user enters data into the field.
2-When the application program moves the DFHBMSFSE (MDT on) to the
attribute byte.
3-By defining it as part of the DFHMDF attribute in the BMS macro definition.
44. A RECEIVE MAP is issued while both HANDLE AID and HANDLE
CONDITION are in effect. A MAPFAIL condition occurs as a result.
Which one is processed if an AID key is pressed?
The HANDLE AID command has priority and is processed and the HANDLE
CONDITION is ignored.
IB
Page 84 of 117
ES
.co
The physical map is a load module defined in the PCT that defines how the
screen looks; headings, field locations, attributes, etc. You have to do a
NEWCOPY every time you do a BMS macro assembly to pick up all map
changes.
The symbolic map is a COBOL copy member that enables you to access the
fields, attribute bytes, field length on the map through your program.
48.What 3 commands can be used to transfer program control?
XCTL, RETURN and LINK.
A
M
PROT and ASKIP make the field protected so that data cannot be entered.
ASKIP causes the cursor to skip over the field and proceed to the next field.
50. What's the difference between specifying FSET on a field and just
turning the MDT bit ON by the program?
A
IN
FR
BRT to highlight the field in error and moving -1 to the field length to position
the cursor to the field for correction.
53. Name 6 other ways to start a CICS transaction other than by keying in
the Transaction ID at the terminal?
IB
Page 85 of 117
The XCTL command transfers control to another application (having the same
Transaction ID).
The START command initiates a new Transaction ID (therefore a new task
number).
The XCTL continues the task on the same terminal while a START can initiate
a task on a different terminal.
ES
.co
56.How about the current time and date? How do you read it?
A
M
Issue an ASKTIME. Using the ABSTIME option, you get a 15-digit packeddecimal number that represents the elapsed milliseconds since midnight, Jan.
1, 1900.
You then issue the FORMATTIME ABSTIME(absolute-time-field) followed by
one of these options and its (working storage field name):
YYDDD - 6-byte julian date in YY/DDD format
TIME - 8-byte time in HH:MM:SS format
YEAR - binary fullword containing the 4-digit year
DAYOFWEEK - binary fullword that corresponds to a 1-digit numbered week
(Sunday is 0 etc.)
A
IN
FR
A program or map loaded into the CICS nucleus so that it is kept permanently
in main storage and not deleted when CICS goes "short on storage".
58.What are some of the information available in the EIB area?
IB
Page 86 of 117
62. How many conditions can you include in a single HANDLE CONDITION
command?
ES
.co
No more than 16 in a single handle condition. If you need more, then you
must code another HANDLE CONDITION command.
63. What is the difference between an HANDLE CONDITION and an
IGNORE command?
A
M
A
IN
FR
IB
66. What's the difference between using HANDLE CONDITION and RESP
to handle exceptional conditions?
The HANDLE CONDITION command must be issued before the CICS command
is executed.
The DFHRESP commands are issued right after the CICS command is
executed.
Page 87 of 117
69.What is the difference between the INTO and the SET option in the
RECEIVE MAP command?
ES
.co
The INTO option moves information in the TIOA (terminal I/O area) into the
reserved specified area, while
the SET option simply returns the address of the TIOA to the specified BLL cell
or "address of" a linkage section.
70.Define the functions of Basic Mapping System (BMS).
A
M
A
IN
FR
When defining a field using DFHMSD if you specify in the ATTRIB option
ASKIP, the cursor will skip the field to the next unprotected field. This is a
skipper field.
72. Suppose you have a field in a map named ACCTID, and you want it
bright. Explain how you can do this during the execution of the
application.
By moving either DFBMBRY (bright only) or DFHBMASB (askip bright) to the
ACCTIDA field in the symbolic map.
73.What are the commands for sending and receiving data to the
terminal?
74.what is the command used to send text to the screen without BMS?
IB
SEND TEXT
Page 88 of 117
77. If you're issuing a SEND MAP command to display edited data, do you
use the MAPONLY or DATAONLY option?
You use the DATAONLY option to display data from the symbolic map.
ES
.co
Constant data from the physical map combined with the variable data from
the symbolic map are both sent, causing an increase in data transmission.
A
M
79. When you are sending your first data screen to the terminal, it is
recommended that you also specify the ERASE option. Why?
If you do not include the ERASE option, the data sent will be combined with
previous material from the terminal. An ERASE will clear the screen first
before sending your data thus doing a fresh screen overlay.
80.What happens if ERASEAUP was used instead of ERASE?
A
IN
FR
The TCT defines the characteristics of each terminal with which CICS can
communicate.
IB
Page 89 of 117
The last bit in the 8-bit attribute byte, which indicates whether the user has
modified the field with a value of 1.
ES
.co
A
M
A
IN
FR
IB
Page 90 of 117
91.In an on-line environment, how can you prevent more than one user
from accessing the same Transient Data Queue at the same time?
By issuing an ENQ against the resource. When processing is completed, a
DEQ should be executed.
ES
.co
You can issue a SYNCPOINT command. You can also RETURN control to CICS,
as CICS automatically releases a resource when a task is terminated.
93.When an application is invoked via the START command with the
FROM option, how does it gain access to the common area?
By issuing a RETRIEVE command, it will access the common area.
94.What happens when a SYNCPOINT is issued?
A
IN
FR
A
M
IB
98.In which CICS table the length of the task work area is stored?
Program Control Table (PCT)
99.What is stored in the Temporary Storage Table?
Page 91 of 117
The TST contains the names of the Temporary Storage Queues that are to be
recovered in the event of an abend.
ES
.co
A
M
102. When a data table is loaded into memory using the LOAD command,
how does the application free that memory when the table is no longer
needed?
By coding the RELEASE command with the PROGRAM option.
103. What is the function of the HOLD option in the LOAD command?
A
IN
FR
When a program is loaded from the CICS DFHRPL concatenation library (CICS
load libraries) into main storage, the HOLD option will result in the program
remaining in memory after the task terminates. When this option is not
specified, main storage is automatically released by CICS.
104. What are the two types of direct access files supported by CICS?
VSAM and BDAM
105. If an application has a KSDS VSAM file READ command with the
UPDATE option and it finds that the update is no longer required, how
does it release the exclusive control of the record read?
IB
106. Is it accurate to say that only the record read was locked? Why?
No. It is the control interval containing the record read (not just the record
itself) is locked.
Page 92 of 117
ES
.co
BY coding a FREEMAIN command with the data. SYNCPOINT will also release
the storage area.
111. How do you release page buffers?
112.
A
M
A
IN
FR
When you have multiple browse operations at the same time on the same file,
the REQID must be coded on the READ Next/Prev command to distinguish one
browse from the other.
113. Which command must the application program issue to terminate
a browse?
An ENDBR command. SYNCPOINT also ends the browse.
114.
To reposition the browse (with VSAM files this can be done just by altering
the RIDFLD) and to change the characteristics specified on the STARTBR
command without ending the browse.
What are the two types of TDQs?
115.
IB
116.
what are the differences between intra and extra partition TDQs?
Intra-partition TDQ - read or write by the program in the same CICS system
Extra-partition TDQ - used by the applications outside of the CICS system.
117. When debugging a CICS application, why would you use the CEBR
transaction?
To view the contents of the TSQ or TDQ.
Page 93 of 117
118.
ES
.co
120.
REWRITE.
Use the WRITEQ TS command with the ITEM option followed by the item
number together with the REWRITE option.
What is the purpose of the BIF DEEDIT command?
A
M
122.
A
IN
FR
123.
IB
125.
126.
If the length of the text specified in the INITIAL option of the
DFHMDF macro exceeds the length specified in the LENGTH option
what will happen?
The excess length will be truncated.
Page 94 of 117
127.
If, when executing a "READ INTO" command, the length of the
actual variable length record exceeds the length specified in the
LENGTH option, what will happen?
You will get a LENGERR.
128.
When a second READ with the UPDATE option is given against
the same file in the same task prior to releasing the file, what will
happen?
ES
.co
A
M
A
IN
FR
130.
You have duplicate keys and you have loaded an alternate
index into RIDFLD. What would happen if you issued a READNEXT
after switching from a direct retrieval READ?
You would get the same record twice.
131.
You are doing a mass delete using a generic key. What could
you do to determine the number of records that have been deleted?
You would use the NUMREC (data area) option with the generic key. Upon
completion of the mass delete, the data area would contain a count of the
number of records that were deleted.
What is the function of the File Control Program?
132.
IB
The FCP provides the application program with the ability to read, browse,
add, delete and update records in a file defined in the FCT.
133.
How should the data area used with the NUMREC option be
defined?
S9(4) COMP which is a 2-byte halfword binary field.
134.
UNLOCK.
Page 95 of 117
You have changed the disposition specified while building a logical message.
ES
.co
137. What command would you use if you wanted to discontinue building
a logical message?
You would issue a PURGE MESSAGE command.
138. What does the BMS ROUTE command do?
It initiates the building of a logical message that will be scheduled for delivery
to one or more terminals.
A
M
139. Can you intermix a SEND TEXT and a SEND MAP when building
portions of a logical message?
No.
A
IN
FR
142. You have a DL/I file and you want to issue a READPREV. Will it work
correctly?
You can only issue a READPREV against a VSAM file.
IB
Yes, but the BROWSE will terminate at the end of each task in the session (it
will not carry over).
144. What are 2 ways to setp up a browse starting with the first record in
the file?
1-set the complete key equal to hex zeros or low-values (the default is
GTEQ).
2-You can specify KEYLENGTH(0) and GENERIC options.
Page 96 of 117
145. In a VSAM file, when you want to do a mass delete, the file has to be
unprotected. How can you specify to the system that a file is
unprotected?
In the FCT, you set LOG=NO.
CLEAR key.
ES
.co
146. Which key, if depressed by the terminal operator, will set the screen
size to its default size?
A
M
A
IN
FR
Opens the file so that it can perform input and output operations (READ,
WRITE, DELETE, REWRITE).
151. Assume that a txn is setup to run at intervals of say 20 mins. Can
we setup CICS to start and run this txn at this 20 mins interval
between say only 10am and 11am? Also assume that while a task for
this txn is still running, the interval of 20 mins elapsed. Will CICS now
start another task and run it as well?
IB
152.
Program A calls Program B and Program B reads an item (first
item) from an extra partition TDQ, then returns to Program A with the
information. Now A again calls B and B reads an item from the same
extra partition TDQ. Does the second TDQ read get the first item or
second item from the original TDQ? If it is the second item is there
any way we can keep the first item from the TDQ intact?
The second read of the TDQ gets the second record. Every read on the TDQ
(from the same program or different program) will get the subsequent record
from the TDQ. The read on the extra partition TDQ is not destructive. If you
Page 97 of 117
want to read the TDQ from the start then we will have to close the TDQ and
reopen it again.
153.
Can a CICS program find out if one or more tasks of a txn is
running or not?
In CICS ver 3.2.1, the EXEC CICS inquire task command can be used to find
out if a particular task is running in the system or not. A list of all running
tasks in the system that can be found by using the EXEC CICS inquire task list
command.
ES
.co
154.
A txn reads an entry in an intra partition TDQ (which has been
defined as recoverable to CICS), but it abends before an EXEC CICS
syncpoint. If the txn comes up later, will the same entry be available
for processing?
A
M
Yes. The record will be recovered and will be available for further processing.
For the intra partition TDQs defined as logically recoverable, all the records
that are read after the syncpoint will be recoverable.
A
IN
FR
155.
Suppose there are multiple concurrent writers in to a TDQ with
ATI (hence 1 reader). If each writer is doing a syncpoint after writing
differing the number of entries in to the TDQ (the number of entries
will depend upon DB2 lock count held by the writing process). Will
there be any contention problem in this scenario?
If the TDQ is intra partition queue and it is defined as logically recoverable
then all writes/reads to the queue will be serialized, for that LUW. If task A
writes on to the queue and if task B needs to write on to the same TDQ, then
Task B will go into a wait state since the queue is under the exclusive control
of task A. During the same time if task C needs to read the READ, task C can
read all records not part of the LUW. Task C will go into wait state as well if it
tries to read the records which belong to the current LUW.
156.
Suppose there are multiple concurrent writers in to a TDQ with
ATI (hence 1 reader). Each writer will write differing the number of
entries in to the TDQ before doing syncpoint. Will there be any
contention problem in this scenario?
IB
157.
Write your JCL to an extra partition TDQ. The JCL should end with /*e. Once
the record is written the batch job will be submitted. Use the enqueue and
dequeue facility when writing on TDQ to serialize the writes to the queue.
158.
Are TDQs and TSQ recoverable resources? What happens to
them when a transaction abends?
Page 98 of 117
Intra partition TDQs and auxiliary TSQs are recoverable in CICS. The
DESTRCV option in the DCT entry of the intra partition should be specified as
logically or physically recoverable (LG or PH). For a TSQ, a TST entry should
be made.
159.
ES
.co
160.
A
IN
FR
A
M
Reusability of a module denotes the usage of the same copy of the loaded
program in the virtual storage by more than one task either concurrently or
one at a time. This is specified by the attributes 'reentrant' and 'serially
reusable' (through the linkage editor options rent and reuse respectively). A
'reentrant module' can be executed by more than one task at a time. This
type of module cannot be modified by itself or by any other module during
execution. 'Serially reusable' module can be executed by only one task at a
time. This type of module must initialize itself and/or restore any instructions
or data in the load module altered during execution. A 'reentrable' module
also becomes a 'serially reusable' module. Just by setting these attributes
does not make the module really reentrable or reusable. It is the
programmer's responsibility to write/generate such code.
What is Asynchronous Processing?
161.
IB
162.
163.
Page 99 of 117
The DTP facility allows a CICS application program in one CICS system to
perform asynchronous communication with another program in another
system.
164.
ES
.co
165.
What are the remote system resources that are available to the
local system?
The resources available are VSAM files, DL/I databases, TDQs and TSQs.
What is Extended Recovery Facility? (XRF)
A
M
166.
167.
A
IN
FR
XRF is an advanced CICS recovery facility where two computer systems, the
CICS system in one processor or computer runs the actual transactions the
CICS system in the other system monitors the transactions run by in the first
system. In case of a system failure of the first system, the second or the
stand-by system takes over and resumes operations. This is a very expensive
process because of the duplication of the hardware and software and could be
used only for very large and complex applications where even small delays
are critical.
What is SAA?
Warm - CICS will start itself with certain system information and resources
carried over from the previous CICS execution, which have been completed
successfully.
IB
In-flight tasks are tasks those that were running while the system abends.
170. In a CICS program, if PGM-A with PLAN-A transferred control to
PGM-B with PLAN-B, which plan would take effect? Why?
IB
A
IN
FR
A
M
ES
.co
PLAN-A of PGM-A is still in effect because a CICS SYNCPOINT was not done
before transferring control to PGM-B.
Easytrieve
QA
ES
.co
A
M
Terminates CA- Easytrieve plus program. You can use it for premature
termination of activities using automatic input. The STOP statement must be
used to terminate JOB activities which have INPUT NULL.
STOP [Execute]
A
IN
FR
The Execute parameter immediately terminates the current activity and any
subsequent activities. If you do not code this parameter, only the current
activity is terminated.
3. what is the purpose of TITLE statement?
IB
Abend Codes
User codes
U0001 - CHECK FOR WRONG BLOCKSIZE.
ES
.co
A
M
A
IN
FR
U0020 - IN UCC11 STEP - DATA SETS USED FOR RESTART DIFFER FROM
PRODUCTION
RUN. TRY CANCELLING ABENDED JOB, DEMAND JOB IN ON HOLD, TYPE=
RES, EDIT JCL, SATISFY HOLD REQUIREMENT TO RESTART. FOR I/P
GDG CHANGE, USE BYPGDG: YES FIELD ON RESTART SCREEN.
U0040 - IN UCC11 STEP - INCORRECT STEP RESTARTED, IMPROPER OR
IMCOMPLETE STEP NAME.
U0046 - PROBABLE PSB PROBLEM - READ VS UPDATE - CALL DBA ON CALL.
U0064 - IN THE UCC11 STEP = CMT NOT CORRECT (GDG PROBLEM). THERE IS NO
GDG BASE RECORD OR JOB IS CALLING ON A (0) GENERATION BUT THERE
ARE NO GENERATIONS CATALOGUED.
ALSO CAN BE DEADLOCK, CHECK SQLCODE, TRY RESTARTING.
IB
ES
.co
A
M
U0456 - PSB IS STOPPED, /STA PROG ALL, STARTS ALL STOPPED PSB'S.
SEE 'CMISCOP.UCC7.SCHEDULE(CA7OS) FOR HOW TO DISPLAY IMS INFO.
U0458 - DATABASE IS STOPPED/CONTACT DBA ON CALL, UNLESS B/U'S ARE
RUNNING.
A
IN
FR
IB
U0852 - DATABASE POINTERS OUT OF SYNC - CALL DBA ON CALL - TRY RESTART
FIRST.
ES
.co
A
M
U1234 - ???
IB
A
IN
FR
U1302 * ALL RECORDS WERE'NT RETURNED FROM SORT, TRY BIGGER REGION.
4096K O
U1311 - POSSIBLE REGION SIZE ERROR - INCREASE REGION SIZE ON EXEC STATE.
4096K O
U1320 - POSSIBLE REGION SIZE ERROR - INCREASE REGION SIZE ON EXEC STATE.
4096K O
U1807 - CHECK FOR SQL CODE
U2478 - SEVERAL JOBS ABENDED W/THIS 03/20/92, CAUSED BY TRANS PUTTING
- MESSAGE ON QUEUING THAT HAD ONE LINE EOT. CAUSED TEMP STORAGE
- TO FILL; RECOVERY TOKEN KEPT CHANGING. JASON BUTLER HAD TO
- DELETE RECORD OFF QUEUING DATA BASE.
U2486 - TO MANY WAITING PST'S (60 LIMIT)
JUST RESTART JOB.
U2860 - POINTER ERROR PER CHUCK WISE (04/15/90). KDF.
U3300 - D/B PROBLEM, IRLM IS FULL, PROBABLY CAUSED BY ANOTHER JOB
RUNNING AND NOT CHECKPOINTING ENOUGH. TRY RESTARTING.
U3300 - (SEA-LAND) JOBNAME FOR THE JOB EXECUTING 'UTILWTOR'IS NOT ON
- THE UTILWTOR TABLE IN PROD.CTLIB.
U3303 - USUALLY DUE TO LOSING A CICS - RESTART THE STEP AFTER REGION UP.
COULD INDICATE A STOPPED DATA BASE PER D. DAVIES.
U3505 - TRYING TO CLOSE A CLOSED FILE OR OPEN AN OPENED FILE.
U3601 - LIBRARY POINTED TO BY IMS DD STATEMENT COUNT NOT BE OPENED
U3602 - BLDL REQUEST FAILED FOR THE SPECIFIED PSB.
U3603 - REQUESTED PSB COULD NOT BE LOADED
U3604 - ERROR WAS DETECTED DURING GSAM INITIALIZATION
U3604 * MISSING DD NAME ON GSAM FILE.
U3610 - THE COUNT FIELD IN THE USERS PARAMETER LIST IS INVALID
U3611 - ADDRESS FOR GSAM,PCB IN USERS PARAMETER LIST INVALID
U3612 - ERROR DETECTED DURING EXTENDED CHECKPOINT CALL PROCESSING
U3613 - ERROR DETECTED DURING USERS CALL TO A GSAM DATABASE
U3614 - ERROR WHILE PURGING GSAM BUFFERS DURING CHECKPOINT
PROCESSING
U3620 - ERROR IN RECURSIVE CALL TO CADDRPE DURING EXTENDED RESTART
U3707 * CICS NOT AVAILABLE
A
IN
FR
System codes
A
M
ES
.co
IB
IB
A
IN
FR
A
M
ES
.co
IB
A
IN
FR
A
M
ES
.co
- ADDRESSING EXCEPTION
INDEXING (SUBSCRIPTING) OUTSIDE THE PGM'S ASSIGNED LIMITS.
UNITIALIZED INDEX.
A MISSING OR MISSPELLED DD.
AN ATTEMPT TO CLOSE A DATASET A SECOND TIME.
AN INPUT/OUTPUT INSTRUCTION TERMINATED BECAUSE OPEN WAS
UNABLE TO COPLETE THE DCB.
S0C6 - SPECIFICATION EXCEPTION
* AN ADDRESS DOES NOT SPECIFY THE BOUNDARY REQUIRED.
S0C7 - DATA EXCEPTION- DATA WAS OF INCORRECT FORMAT FOR THE
INSTRUCTION
ATTEMPTING TO PROCESS IT.
* UNINITIALIZED INDEX OR SUBSCRIPT.
* FIELDS IN DECIMAL ARITHMETIC OVERLAP INCORRECTLY.
* INDEX/SUBSCRIPT VALUE INCORRECT AND INVALID DATA WAS REFERENCED.
* THE DECIMAL MULTIPLICAND HAS TOO MANY HIGH-ORDER SIGNIFICANT
DIGITS.
* DATA FIELD WAS NOT INITIALIZED, BLANKS WERE READ INTO A FIELD
DESIGNED TO BE PROCESSED WITH PACKED DECIMAL INSTRUCTIONS.
S0C8 - FIXED POINT OVERFLOW EXCEPTION
S0C9 - FIXED POINT DIVIDE EXCEPTION. INCREASING REGION TO 0M WORKED
FOR GARY STRAITZ ON A JOB HE WAS RUNNING.
S0CA - DECMIAL OVERFLOW EXCEPTION DESTINATION FIELD TOO SMALL FOR RESULT
S0CB - DECIMAL DIVIDE EXCEPTION, QUOTIENT EXCEEDS SPECIFIED DATA FIELD
SIZE.
S0CC - EXPONENT OVERFLOW EXCEPTION
S0CD - EXPONENT UNDERFLOW EXCEPTION
S0CE - SIGNIFICANCE EXCEPTION
S0CF - FLOATION POINT DIVIDE EXCEPTION DIVIDE BY ZERO
S0F1 S0F2 S0F3 S106 - PGM IS IN PGMLIB BUT POINTERS ARE BAD. HAVE PGMR COMPILE IT IN
TESTLIB AND PUT STEPLIB IN JCL TO PULL FROM TESTLIB.
S106 * ERROR WHILE LOADING MODULE INTO MAIN STORAGE/NEEDS MORE CORE
OR ADD REGION PARM TO JOB CARD
S117 S122 - OPERATOR CANCEL , REQUESTED DUMP
S137 - I/O ERROR ERROR IN LABEL PROCESSING
* MULTI-VOLUME DATASET WITH INCONSISTENT LABELING.
* NO TRAILER LABELS OR TAPE MARKS EXISTS AT END OF DATA.
* LABEL FORMAT INCORRECT.
S14F * CARD INPUT MISSING
S1E7 * DSN DOES NOT MATCH THE DSN ON THE VOLUME REQUESTED
S213 - DSCB NOT FOUND. I/O ERROR IN READING OR WRITING DSCB
(DSCB=DATA SET CONTROL BLOCK)
* THE FORMAT DSCB COULD NOT BE FOUND ON DASD.
* DISP=OLD OR SHR FOR AN OUTPUT DSN.
* SPACE PARM WAS NOT SPECIFIED.
* DISP=MOD BUT THE DATA SET SHOULD REALLY
BE NEW
* DISP=NEW AND UNIT AFFINITY REQUESTED
IB
A
IN
FR
A
M
ES
.co
S0C5
*
*
*
*
*
IB
A
IN
FR
A
M
ES
.co
A
IN
FR
A
M
ES
.co
IB
Return codes
R/C 12 GENERIC ABEND, CHECK OUTPUT FOR SPECIFIC REASON, IE SB37,
CONTENTION.
R/C 12 DO A FIND ON SQL, IF SQLCODE=00000091J THIS IS A DEADLOCK AND
THE JOB SHOULD BE RESTARTED PER THE XT-42 INSTRUCTIONS
IF SQLCODE=00000090M CHECK WITH DATA BASE
ABOUT ENABLE UTILITY AFTER THAT RESTART JOB
PER XT-42
ES
.co
A
IN
FR
A
M
IB
NOTES:
* IN DB2 RELATED JOBS, DO A FIND ON SQL
SQL 100 - ROW NOT FOUND FOR FETCH--CONTACT PROGRAMMER, RETRY WON'T
WORK.
-203 - A REFERENCE TO COLUMN colum-name is AMBIGUOUS
-204 - NAME IS UNDEFINED NANE
-205 - column-name IS NOT A COLUMN OF TABLE table-name
-501 - CURSOR IDENTIFIED IN FETCH OR CLOSE IS NOT OPEN
-502 - CURSOR IDENTIFIED IN OPEN IS ALREADY OPEN
-504 - THE CURSOR NAME cursor-name IS NOT DEFINED
-803 - INSERT/UPDATE VALUES INVALID; CONTACT SYS DEV
-805 - PROGRAM NOT FOUND; PROGRAM NOT BOUND AS PART OK PLAN NAME.
CONTACT SYS DEV.
91J - DEADLOCK, RESTART; LIKE -911.
ES
.co
A
M
A
IN
FR
IB
IB
A
IN
FR
A
M
ES
.co
A
IN
FR
A
M
ES
.co
IB
COMMOM ABENDS/REASONS
ABEND
REASON
---------------------------------------------S000 - 0260
TRYING TO CHKP WITHOUT PRIOR XRST
- 0261
PSB OUT OF SYNC WITH PROGRAM - NOT ENOUGH
GSAMS DEFINED IN PSB.
(IN I004BMP OR I003BMP MAKE SURE PROGRAM
IS COMPILED AS SHRBATCH NOT BATCH)
- 0428
PSB NEEDS TO BE DEFINED IN THE IMS REGION
- 0437
RACF ABEND ON A MESSAGE QUEUEING PROGRAM USING
A PSB NAME THAT MATCHES THE PROGRAM NAME.
(JCL MUST CONTAIN "AGN=AGPAMS4" ON THE EXEC CARD)
- 0456
PSB NEEDS TO BE RESTARTED AFTER PRIOR ABEND
OR PSB NOT FOUND
(FOR TEST CHECK DB15563P FOR TEST PSB JOB
THAT SHOULD RUN AT 10, 12, 2 AND 4)
- 0474
OPERATOR CANCEL
- 0476
PSB ERROR
- PROGRAM NOT COMPILED AS SHRBATCH
- REFERING TO -SC NOT -PCB IN CALL
- 0688
CTL PROGRAM NOT ACTIVE; CHECK IF EXECUTING
WRONG IMS (EX, I002BMP IN CLASS J)
- 0805
PSB NOT SCHEDULED/A DATA BASE IS NOT AVAILABLE
- 0811
BAD DATA BASE POINTERS - CONTACT DBA
- 0844
DATA BASE IS FULL
- 0849
CALL WITH 'GO' ON SEGMENT THAT HAS BEEN
IB
A
IN
FR
A
M
ES
.co
U0456 -
IB
A
IN
FR
U0688 U1904 -
U0437 -
ES
.co
A
M
4036 -