Professional Documents
Culture Documents
Mainframe
Mainframe
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:
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:
REPLACE for an existing plan if we change something,
ADD for a new plan.
It is always a good idea to use REPLACE option.
Stored Procedures
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.
QA
General RDBMS Concepts
1. What is DB2?
DB2 is a subsystem of the MVS Operating system. It is a Database
Management System (DBMS) for that operating system.
2. What is an Access path?
Access path is the path used to get to the data specified in the SQL.
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?
The database descriptor, DBD is the DB2 component that limits access to the
database whenever objects are created, altered or dropped.
5. What is meant by the attachment facility?
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?
AUTO COMMIT is a SPUFI option that commits the effects of SQL statements
automatically if they are successfully executed.
7. What is a base table?
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.
Page 3 of 117
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).
20.What is a data page?
A data page is a unit of retrievable data, either 4K or 32K (depending on how
the table is defined), containing user or catalog information.
Page 5 of 117
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?
It is a process that is used to ensure data integrity. It also prevents
concurrent users from accessing inconsistent data. The data (row) is locked
until a commit is executed to release the updated data.
35.What is a "non-leaf" page?
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?
Denormalizing DB2 tables reduces the need for processing intensive relational
joins and reduces the number of foreign keys.
37.What is lock contention?
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?
It is an alternate name that can be used by everyone to refer to a table or
view in the same or a remote DB2 subsystem.
40.What is the difference between an alias and a synonym?
They are basically the same except that a synonym can only be used by the
creator and stored in the SYSIBM.SYSSYNONYMS catalog table.
41.What will the DB2 optimizer do?
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.
It is a CICS table that is defined to a DB2/CICS region. It contains control
characteristics which are assembled via the DSNRCT macros. It also matches
the CICS transaction ID to its associated DB2 authorization ID and plan ID
Page 7 of 117
Page 8 of 117
Page 9 of 117
SYSIBM.SYSPACKAUTH.
61.How about system privileges held by a user?
SYSIBM.SYSUSERAUTH.
62.Where could you look if you had a question about whether a
column has been defined as an index?
SYSIBM.SYSINDEXES.
63.Once you create a view, where would information about it reside?
SYSIBM.SYSVIEWS.
64.If you need to know when a plan was bound and who did it last,
where is the information?
SYSIBM.SYSPLAN.
65.How about getting package information?
SYSIBM.SYSPACKAGE.
66.Whats normalization, type of normalization?
Eliminate repeating groups
Eliminate redundant data
Eliminate column not dependent on key
Isolate independent, multiple relationships
Isolate semantically related multiple relationships.
Each column must be a fact about the key, the whole key and nothing but
the key.
Application Programming
67.Explain how to prepare a DB2 program for execution.
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?
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 plan is an executable module containing the access path logic produced by
the DB2 optimizer. It can be composed of one or more DBRMs and packages.
Before a DB2 for z/OS program (with static SQL) can be run, it must have a
plan associated with it.
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.
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.
71.What information is used as input to the bind process?
1. The DBRMs from the pre-compile step
2. the SYSIBM.SYSSTMT table of the DB2 catalog.
72.What is a Database Request Module(DBRM)?
A DBRM is a DB2 component created by the DB2 pre-compiler containing the
SQL source statements extracted from the application program. DBRMs are
input to the bind process.
73.What is PLAN VALIDATION TIME?
Page 11 of 117
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.
84.What is an indicator variable?
It is an integer variable (2-byte binary) used to show whether its associated
host variable has been assigned a null value.
85.What is NULL INDICATOR?
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.
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.
87.How to work with NULL INDICATOR for SELECT statement?
We have to supply in working storage section regular field with pic s9(4)
comp. Before SELECT statement we have to INITIALIZE NULL INDICATOR,
after SELECT statement if SQLCODE=0 we simply check value of WS-NULLIND filed.
88.How to work with NULL INDICATOR for UPDATE statement?
If we want to SET field-name to NULL we have to MOVE -1 to WS-NULL-IND
and then UPDATE statement. If want to SET field-name to NOT NULL we have
to MOVE +0 to WS-NULL-IND, MOVE value TO HV-FIELD-NAME and then
UPDATE statement.
89.When can we be sure that our SELECT statement retrieves not
more than one row?
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.
SQLERR(3) indicates the number of rows updated, inserted or deleted by
DB2.
92.What is SQL code?
After each SQL statement is executed system puts their special value.
93.What is the term used to describe COBOL fields defined in working
storage or the linkage section that correspond to the columns in a
DB2 table?
They are called host variables. When they are used in a SQL statement, a
colon precedes them.
94. What happen if cursor is not closed?
DB2 will do itself when the job terminates.
95.How many times can we open and close the cursor?
We can close and reopen the cursor as many times as we need.
96.What is DSNTIAR?
This is the program which creates messages in case of invalid SQLCODE.
97.What is SQLERRM?
It is a field from SQLCA where we can see the error messages.
98.Can we UPDATE the record during CUSOR positioning?
Yes. In DECLARE statement we have to put FOR UPDATE OF clause and on
UPDATE command we have to put WHERE CURRENT OF cursor-name clause.
In this case update will be performed for the last FETCHED row.
99.Can we DELETE the record during CURSOR positioning?
Yes. On DELETE command we have WHERE CURRENT OF cursor-name clause.
In this case DELETE will be performed for the last FETCHED row.
100.
Page 14 of 117
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).
103.
It is a write to disk that may occur before or long after a commit. The write is
controlled by the buffer manager.
106. Usually which is more important for DB2 System performance
CPU processing or I/O access?
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?
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.
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
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.
DDL statements are CREATE, ALTER, TRUNCATE.
DML statements are SELECT, INSERT, DELETE and UPDATE.
109.
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.
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?
Dynamic. Static SQL statements are hard-coded in the program.
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.
DECLARE defines the cursor using a SELECT statement.
OPEN opens the cursor. This would be the slowest process since the data is
built.
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?
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
Page 18 of 117
UNION ALL. With the ALL option, all rows from the 2 tables will be retained.
Without it, duplicate rows will be discarded.
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.
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.
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
+802
-803
-805
-811
-904
-911
-913
-922
Page 21 of 117
DB2 Utilities
CHECK
COPY
To create a backup
It will create an image copy of a table-space or a dataset within
a table-space. There are 2 types of image copies: full and
incremental. A full image copy copies all pages in a table-space
or dataset. An incremental image copy copies only pages that
have been modified since the last use of the COPY utility.
Copy can not be done when tables are in Check pending or
Recovery pending status.
Options - FULL YES (when table space is in Copy Pending
Status)
LOAD
MODIFY
REPLACE
RESUME YES
ENFORCE NO (to bypass referential constraint
check)
to delete references to unneeded image copies from the DB2
Catalog
MERGECOPY -
QUIESCE
RECOVER
Page 22 of 117
REPAIR
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
STOSPACE
This updates the DB2 catalog columns to tell how much space
is allocated for storage groups and related table-space and
indexes.
Page 23 of 117
JCL
Short Notes:
JCL is column specific
//
Must be used for each statement in first two columns
//*
Marks complete line as comments
/*
Marks end of an in-stream input file
A comma (,) at end of any line means that a continuation of the statement will follow
on next line.
Statements are of the form
NAME STATEMEN PARAMETERS (statement is also called operation)
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.
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
Marks beginning of a new job (end of previous job).
Specifies global requirements
Job name
Account number
first
Name / Description
CLASS
REGION
|
|
TIME
COND
MSGCLASS
Class of output.
MSGLEVEL
NOTIFY
Page 24 of 117
TYPRUN
USER
PASSWOD
ADDRSPC
BYTES
CARDS
GROUP
LINES
PAGES
PERFORM
Programmers name
PRTY
RD
RESTART
SECLABEL
USER
Exec statement
Marks beginning of a new step (end of previous step)
Specifies program to executes, its parameters are set up and the requirements for
the step.
Stepname
PGM
PROC
IMPLICI PROCNAME
PARM
REGION
TIME
Page 25 of 117
COND
DSNAME (DSN)
DUMMY
DISP
Intl
Normal
Abnormal
(NEW/OLD/SHR/MOD
PASS/KEEP/DELETE/CATLG/UNCATLG
KEEP/DELETE/CATLG/UNCATLG)
UNIT
VOLUME (VOL)
SPACE
(TRK/CYL/BLK/BYTES)
(Primary, Secondary, Directory blocks)
(RLSE) what should be done when job ends.
DCB
dataset.
SYSOUT
OUTPUT
FCB
printing.
CHARS
Fonts on printer.
COPIES
DEST
DDNAME
Page 26 of 117
DATACLAS
MGMTCLAS
STORCLAS
AMP
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
Page 27 of 117
PATHMODE
PATHOPTS
PROTECT
QNAME
RECFM
RECORG
REFDD
RETPD
SECMODEL
SEGMEN
SPACE
SPIN
SORCLAS
SUBSYS
SYSOUT
TERM
UCS
UNIT
VOLUME
JOBLIB
Specifies the sequence of Datasets to search to find required load modules in
the current job.
Series of DD statements to specify the Datasets.
Must be included before the first EXEC statement, if required.
System concatenation is always searched after JOBLIB.
STEPLIB
It applies only for the particular step.
Specifies the sequence of Datasets to search to find required load modules in
the current step.
Series of DD statements to specify the Datasets.
Must immediately follow the EXEC st., if it is required.
IF it is specified and any load module required is no found in this
concatenation, then JOBLIB will no be searched. System concatenation will be
searched directly.
JCLLIB
List of Datasets to search for PROC, INCLUDE and etc.
Must be specified before the EXEC stmt.
ORDER=A.B.DSN
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
DD* is not allowed.
Variables specified on PROC Stmt must be used. Otherwise JCLERROR.
PEND marks the end of in-stream proc. PEND should be before the EXEC
stmt right after the JOB stmt.
Variables
& symbol is used to denote a variable.
. is the delimiter of variable, if specified.
Use .. in case of the substituted value of the variable must be immediately
followed a DOT.
Use && to place an ampersand.
/*JOBPARM taken by JES for the whole job and should appear before the first EXEC
stmt.
/*ROUTE where to route printing
COND is not recommended. Use IF THEN / ELSE / ENDIF.
Referback
*.name or *.ddname
*.stepname.name or *.stepname.ddname
*.stepname.procstepname.name *.stepname.procstepname.ddname
OUTPUT Stmt
BURST - tears the paper in to individual pages.
CHARS Font
CLASS MSGCLAS
ADDRESS
BUILDING
BURST
CHARS
CKPTLINE
CKPTPAGE
CKPTSEC
CLASS
COMPACT
CONTROL
COPIES
DATACK
DEFAULT
DEPT
DEST
DPAGELBL
Page 29 of 117
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
S0C1 Operation Exception
Cause Reading or writing unopened file
Missing DD card
Branch to an invalid operation
Action Interrupt at 00048 look for missing DD.
Interrupt at 0004F inconsistent JCL. Check for system name in program.
Interrupt at 00002 called a module that was not present in the load module.
Read or write issued before file was opened.
S0C4 Protection Exception
Cause Check BLKSIZE and LRECL
Action Check for missing SELECT
Check for un-initialized index or subscript
Interrupt at 004814 attempt to read unopened file or missing DD
S0C5 Addressing Exception
S0C6 Specification Exception
Cause Check for subscript or index maximum value exceeded.
An un-initialized or overlaid register
Page 30 of 117
QA
01.Describe the required JCL statements in a job.
JOB statement; EXEC statement; DD card
02.What are the functions of the JOB card?
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?
Indicate RESTART on the JOB statement and the name of the job step to
begin execution.
04.What is the TIME keyword and where is it used?
It indicates the maximum CPU time allocated for a particular job or job step.
If TIME is in the JOB card, it relates to the entire job; if in the EXEC
statement, it relates to the job step.
05.What are the functions of the EXEC statement?
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?
The PARM keyword passes data to the executing program
07.What are the functions of the DD statement?
The DD statement assigns a DD name; identifies a dataset name; may specify
the volume the dataset is stored on; the format of the records in the data set;
whether a data set is old or new and the record length and block size of newly
created data sets.
08.What are the 3 parts of DISP parameter?
Start-Status, End-Status Normal, End-Status Abend
09.Describe the three values of the DISP (disposition) parameter for an
existing dataset.
SHR means the dataset is shared by multiple jobs.
OLD means only one job can access the dataset.
MOD means data written to the dataset is appended.
10.What does the second and third sub parameter of the DISP parameter
mean?
The second would be what to do with the dataset after the step normally ends
while the third would be what to do with the dataset after the step abends.
11.If the third sub parameter of the DISP parameter is left out, what
would be the default?
It would default to the second sub parameter.
12.What are the 4 keywords used with DCB?
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).
13.Explain the SYSOUT parameter.
Specifies the output device you want your output written to.
14.How do you concatenate datasets?
Specify more than one dataset on the same DD statement like so:
//ddname DD dsn=dataset1,disp=shr
// DD dsn=dataset2,disp=shr
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?
Dataset 3 is skipped as a result of coding the DUMMY parameter in the
middle.
16.If you want to include run instructions/documentation in your job,
what do you do?
Enter the instructions as comments by preferencing them with //*
17.What does RLSE mean on the following: SPACE=(TRK,(25,25),RLSE)?
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)?
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)
20.What are the DD names of the DD statements used to specify where
the load modules are stored for a job step?
//STEPLIB DD DSN=... right after the EXEC PGM= card
For the entire job?
//JOBLIB DD DSN=... right after the JOB card
21.If both are coded, which one takes effect?
The load module found in the load library coded on the STEPLIB statement.
22.How do you suppress reading or writing a dataset without making
program changes?
By coding the DUMMY parameter on the DD statement of the dataset.
23.What utility do you use to copy a sequential dataset?
IEBGENER or IDCAMS with the REPRO option. "SORT" will also do the job with
the exception of a sorted output dataset.
Page 33 of 117
Page 34 of 117
Page 35 of 117
Page 36 of 117
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
56.Explain a SOC7 abend code.
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?
The space allocated when the dataset is first created.
59.What is the difference between primary and secondary allocations for
a dataset?
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.
62.What does a disposition of (NEW,CATLG,KEEP) mean?
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.
63.How do you access a file that had a disposition of KEEP?
Need to supply volume serial no. VOL=SER=xxxx.
64.What does a disposition of (MOD,DELETE,DELETE) mean ?
The MOD will cause the dataset to be created (if it does not exist), and then
the two DELETEs will cause the dataset to be deleted whether the step
abends or not. This disposition is used to clear out a dataset at the beginning
of a job.
Page 38 of 117
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?
Caused by invalid data in a numeric field.
75.What is a S0C4 error ?
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.
SB37 - end of vol. and no further volumes specified.
SD37 - no secondary allocation was specified.
SE37 - Max. of 16 extents already allocated.
77.Why do you want to specify the REGION parameter in a JCL step?
To override the REGION defined at the JOB card level.
REGION specifies the max region size. REGION=0K or 0M or omitting REGION
means no limit will be applied.
78.What does the TIME parameter signify ? What does TIME=1440
mean?
TIME parameter can be used to overcome S322 abends for programs that
genuinely need more CPU time. TIME=1440 means no CPU time limit is to be
applied to this step.
79.How do you check the syntax of a JCL without running it?
TYPERUN=SCAN on the JOB card or use JSCAN.
80.What does IEBGENER do?
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.
81.How do you send the output of a COBOL program to a member of a
PDS?
Code the DSN as pds(member) with a DISP of SHR. The disp applies to the
pds and not to a specific member.
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).
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? )
//SYSIN DD*
input data
input data
/*
84.Can you code instream data in a PROC ?
No.
85.How do you overcome this limitation ?
One way is to code SYSIN DD DUMMY in the PROC, and then override this
from the JCL with instream data.
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
To run a DB2 program,
//STEP001 EXEC PGM=IKJEFT01
//SYSTSIN DD *
DSN SYSTEM(....)
RUN PROGRAM(MYPROG)
PLAN(.....) LIB(....) PARMS(...)
/*
87.What is STEPLIB, JOBLIB? What is it used for?
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.
88.What is order of searching of the libraries in a JCL?
First any private libraries as specified in the STEPLIB or JOBLIB, then the
system libraries such as SYS1.LINKLIB. The system libraries are specified in
the linklist.
89.What happens if both JOBLIB & STEPLIB is specified ?
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.
91.How to change default proclib ?
//ABCD JCLLIB ORDER=(ME.MYPROCLIB,SYS1.PROCLIB)
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.
93.What are the valid DSORG values ?
PS - QSAM, PO - Partitioned, IS - ISAM
94.What are the differences between JES2 & JES3 ?
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:
Sequence number area:
Indicator area
Area-A
Area-B
(1-6)
(7)
(8-11)
(12-72)
Page 43 of 117
Linkage section.
Procedure division
(Using).
Ending
Stop run
Exit
goback
Manipulation
ACCEPT (date, day, time, day-of-week)
INITIALIZE
MOVE (CORRESPONDING)
INSPECT
SET
STRING
UNSTRING
Arithmetic
ADD
SUBTRACT
MULTIPLY
DIVIDE
COMPUTE
Input-Output
ACCEPT
DISPLAY
OPEN
CLOSE
START
READ
WRITE
REWRITE
DELETE
Ordering
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
IF
EVALUATE
GO TO DEPENDING ON
Scope delimiters
END-*
QA
1. Name the 4 divisions of a program.
Identification, Environment, Data, Procedure
2. What is the Procedure Division?
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.
A subscript is a positive integer defined in working-storage. It's best to define
it as S9(4) COMP. A subscript is changed using ADD, SUBTRACT, MOVE or
PERFORM VARYING.
4. Explain the difference between an internal and an external sort?
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
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.
15.What kind of restrictions we have for SEARCH ALL?
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?
We have to sully field in working-storage.
01 WS-INX-SAVE USAGE IS INDEX.
In procedure division we can use SET WS-INX-SAVE TO INX.
17.Can we use one index for two tables?
No, index exists for one table only.
18.Can we convert index to subscript and vice versa?
Yes, with SET statement.
Example: SET INX TO SUB.
19.How many dimensional can be used?
For Cobol 3 is the max. for Cobol-II 7 is the max.
20.My program has an array defined to have 10 items. Due to a bug , I
find that even if he program access the 11th item in the array, the
program does not abend. Whats wrong with it?
Must use the compiler option SSRANGE, if u want array bounds checking.
Default is NOSSRANGE.
21.What kind of SORT do you know?
Internal (within the COBOL program) and external (using JCL).
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.
23.What should be coded in external SORT?
Page 47 of 117
// 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)
24.How can we invoke another program from our COBOL program?
Using the CALL statement.
25.What types of call statements are there?
Dynamic and Static CALL.
26.What is the difference between dynamic and static call?
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
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.
27.If you made some changes to the subprogram for static CALL what
are all the steps do u have to implement?
We have to recompile subprogram and recompile main program ( because
they have one load module).
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.
29.What is more efficient- static or dynamic call and why?
Page 48 of 117
Page 49 of 117
Page 50 of 117
Page 51 of 117
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.
64.What is binary storage and when would you use it?
A field that's defined as COMP. It's storage depends on the number of
characters defined:
for 1-4, it uses 2 bytes or a halfword
for 5-9, it uses 4 bytes or a fullword
for 10-18, it uses 8 bytes (2 fullwords)
It's used when maximum efficiency is important such as defining subscripts.
65.What command do you use to make records available for sorting
when using an internal sort?
RELEASE.
66.What command is used to make records available after they have
been sorted?
RETURN.
67.When do you specify the INPUT or OUTPUT PROCEDURE instead of
USING and GIVING in the COBOL SORT statement?
INPUT and OUTPUT PROCEDURE is used when the data needs to be
manipulated before or after the sort.
68.What are the coding requirements of a called program?
The PROGRAM ID name of the called program must be identical to the
program name specified on the CALL ..USING statement of the calling
program. The LINKAGE SECTION must define the data items passed between
the programs. The PROCEDURE DIVISION header must have a USING clause
to identify the data items in the LINKAGE SECTION.
69.What is an OCCURS clause?
The OCCURS clause specifies the number of repeated occurrences of data
items with the same format in a table.
70.How can a SOC7 be avoided?
By first testing the field with the IF data item IS NUMERIC statement before
conducting computations or comparisons.
71.List the steps involved in a program with control break processing.
Page 53 of 117
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.
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?
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?
BLOCK CONTAINS 0 RECORDS in the file's FD statement.
If you do not code this, what will happen?
For a QSAM file, it does not end up using the blocksize specified in the JCL but
assumes that the records are not blocked (a block contains 1 record).
81.What are the 3 advantages of a READ INTO as opposed to a READ?
1-If an abend occurs, the record can be located in working-storage.
2-a program will avoid a possible abend if it checks a data field in the working
storage copy of a record after an end-of-file occurs (the record, at this point,
would not be available in the buffer).
3-at the time of abend, you might be able to look at the actual data in the
record read (by locating it in the buffer) as well as having a copy in workingstorage that may have been modified.
82.Name the differences between COBOL and COBOL II?
COBOL II offers the following features:
in-line PERFORMs: permits 'do' constructions,
explicit scope terminators,
the EVALUATE statement: permits 'case' constructions,
SET field TO TRUE statement,
TEST BEFORE and TEST AFTER in the PERFORM statement: permits 'do while'
and 'do until' constructions,
'above the 16 Meg line' processing.
Page 55 of 117
Page 56 of 117
Page 57 of 117
VSAM
Short Notes
VSAM is a high-performance access method used in MVS, OS/390 and VSE/ESA
operating systems. Although more than 30 years old, IBM's VSAM remains popular
because of its simplicity and high performance. Installations have been using VSAM
data sets to hold more and more of their data to the point where many have reached
the 4-gigabyte architectural limit for the size of VSAM data sets. This has been
particularly true for users of KSDSs, as determined by several surveys conducted
worldwide. IBM has recently enhanced VSAM to support record-level sharing and file
sizes larger than 4 gigabytes.
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.
Types of VSAM Data Sets
ESDS
KSDS
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
cannot change
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
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
space can be
reused for a
record of the
same length
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
VSAM Characteristics
VSAM is not simply a set of access-method routines. It is a powerful facility for
handling data within a user installation. Among its major features are:
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
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.
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.
Record Level Sharing
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.
VSAM Striping
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
Transactional VSAM is an enhancement to VSAM Record Level Sharing (RLS). VSAM
RLS provided record-level shared access to VSAM data sets via CF-based locking and
caching. Batch jobs accessing recoverable VSAM data sets could read them, but not
update while CICS had them open in RLS mode. By adding logging and two-phase
commit and backout protocols at the file system level, Transactional VSAM allows
batch jobs to share recoverable VSAM data sets for both read and update access while
CICS is still using them.
QA
1. What are the 3 types of VSAM files?
1-ESDS (Entry sequenced dataset). DB2 uses a special type of ESDS.
2-RRDS (Relative record dataset). Records are accessed using a relative
number.
3-KSDS (Key sequenced dataset) is the most common type encountered. The
record sequence is determined by a unique key field.
2. How do you create a VSAM file?
You use the IDCAMS utility with the DEFINE CLUSTER option.
Page 60 of 117
Page 61 of 117
Yes
11.Syntax of AMS modal commands ?
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.
12.What is Control Interval, Control Area ?
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 ?
Coded in the DEFINE as FREESPACE(ci ca) where ci is the percentage of each
control interval to be left free for insertions, ca is the percentage of control
intervals in each control area to be left empty.
14.How do you decide on optimum values for CI, FREESPACE etc..?
CI size should be based on record length, type of processing. Usually CI is 4K.
If record length is larger(>1K), chose 6K or 8K.
FREESPACE should be large if more number of insertions are envisaged. Usual
values are (20 20) when heavy updates are expected. CI size can be
calculated.
15.Would you specify FREESPACE for an ESDS?
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 ?
SHAREOPTS is a parameter in the DEFINE and specifies how an object can be
shared among users. It is coded as SHAREOPTS(a b), where a is the cross
region share option ie how two or more jobs on a single system can share the
file, while b is the cross system share option ie how two or more jobs on
different MVSes can share the file. Usual value is (2 3).
17.What is the meaning of each of the values in SHAREOPTS(2 3)?
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).
18.How do you define a KSDS ?
DEFINE CLUSTER(cluster name) with the INDEXED parameter. Also specify
the ds name for the DATA component & the ds INDEX component. Other
important parms are RECORDSIZE, KEYS, SHAREOPTIONS.
19.How do you define an ALTINDX ? How do you use ALTINDXs in batch,
CICS pgms ?
DEFINE ALTERNATEINDEX. Important paramters are RELATE where you
specify the base cluster name, KEYS, RECORDSIZE, SHAREOPTIONS,
UNIQUEKEY (or NONUNIQUEKEY), DATA (ds name for the data component),
INDEX(ds name for the index component).
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.
Then BLDINDEX. Parameters are INDATASET(ds name of base cluster),
OUTDATASET(ds name of AIX).
Using alternate indexes in batch pgms:
In the JCL, you must have DD stmts for the cluster and for the path(s). In the
cobol pgm, SELECT .. ASSIGN TO ddname for base cluster RECORD KEY IS...
ALTERNATE RECORD KEY IS..
Using alternate indexes in CICS pgms:
FCT entries must be created for both base cluster & the path. To read using
the alternate index, use the dd name of the path in CICS file control
commands.
Page 63 of 117
Page 64 of 117
Page 65 of 117
SDLC
QA
1. What is the TGT? How is this listing produced and why is it useful?
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.
3. How does SDLC differ on mainframe vs. client server?
Mainframes uses a top-down structured methodology (now called the
waterfall approach). Client-server focuses on prototyping, iterative
development and object-oriented analysis and design(OOA/OOD).
4. What are the phases of a system development life cycle?
Analysis, design, development, test, implementation and maintenance.
5. Describe structured methodology
Phases of the system development life cycle are carried out in a sequential
top-down approach. You cannot move onto the next phase until you have
completed the previous one. All requirements must be identified before the
analysis phase. Implementation must satisfy the requirements. Documents
are presented upon completion of most phases.
Page 66 of 117
Page 67 of 117
Page 68 of 117
Page 69 of 117
IMS
QA
1. What are the parameters needed for an IMS call (Call-Level
Interface)?
CALL 'CBLTDLI' USING function
DB-PCB
IO-AREA
SSA(s)
Do you always need every parameter? Which ones don't you need, and why?
No. You don't need SSAs on a DLET,
REPL, or unqualified GU.
2. What are the parameters needed for an EXEC DL/I command (HighLevel Interface)?
EXEC DL/I function USING DB-PCB
SEGMENT (Segment Type)
WHERE (Expression)
INTO/FROM (I-O Area)
Special Options
END-EXEC.
3. What is the return code you get after a successful IMS call?
Spaces.
4. What is the return code you get after an unsuccessful ISRT?
II.
5. What is the return code you get after an unsuccessful "Get" (GU, GN,
GNP)?
GE (not found) or GB (end of database reached).
6. When would you get one versus the other?
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.
7. What is the difference between a PSB and a PCB?
A PSB (Program Specification Block) contains all the access paths of all the
databases a program can access.
A PCB (Program Communication Block) contains a single access path to a
single database.
A PSB contains one or more PCBs.
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.
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.
10.Which would you choose and why?
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).
12.What is parentage? Why is it important?
Parentage is a pointer to the segment retrieved after a successful GU or GN
call. It is important because subsequent GNP calls use the parentage pointer
to retrieve all segments of the type requested that belong to that parent.
13.What is the difference between maintaining database position and
maintaining parentage?
Parentage is affected only by successful GU and GN calls. Also, certain
command codes can affect parentage, but not position.
14.Is it sufficient to check the IMS return code after a call in a CICS
program?
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.
15.Is database position maintained between tasks in a pseudoconversational CICS program?
No.
16.How do you get around this problem?
Make the program conversational (generally a bad idea).
A better idea is to store the concatenated key to the segment between tasks,
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?
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.
20.How does IMS know that the PSB you are using is the correct one for
the program?
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.
22.If a batch program aborts or is terminated before completion, what
happens to the IMS updates you have already made?
They are lost.
23.How can you prevent this from happening?
Your program can take checkpoints (IMS CHKP call) which will commit all the
updates prior to the checkpoint.
24.Is it advisable to use checkpoints in a CICS program? If not, why not?
No. A checkpoint will not update CICS's dynamic log (for dynamic transaction
back out), and CICS and IMS will be out of sync.
25.What should you use instead?
Page 72 of 117
Page 73 of 117
Page 74 of 117
Page 75 of 117
value.
48.What is a logical relationship?
A logical relationship is one in which a segment from one database is related
to another. If properly setup in the DBD and PSB, a program can access the
segment in the other database as if it were a dependent segment of the
current database.
49. What is the difference between a unidirectional and a bidirectional
logical relationship?
A unidirectional logical relationship is one in which a logical relationship exists
only between database A and database B.
A bidirectional logical relationship is one in which a logical relationship exists
between database B and database A as well.
50.Must every IMS database have a primary key to its root segment?
Yes.
51.In what order are nonkeyed segments stored on the database?
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?
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.
54.Does a GNP call affect parentage?
No.
55.What is a load PSB?
A load PSB is a PSB used for the purposes of loading an empty database.
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.
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?
The DLET or REPL will fail as if the "Get Hold" command had never been
issued.
60. Does the High-Level Programming Interface require a "Get Hold"
before a DLET or REPL? If not, how is it done?
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?
Any field, which is defined in the DBD, is automatically a search field.
63. Can search expressions be combined with index expressions or other
search expressions? If yes, how?
Yes. One expression can follow another, with the ampersand (&) connecting
the two expressions.
64.Why is it important to be careful when using search fields?
Since search fields are nonkeyed, they can be inefficient (this is a particular
concern in online programs). Also, the records may not be retrieved in the
order in which you need them (i.e., if you use a ">" operator, you may not
get the segments in size order).
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.
67.Can an index be accessed directly? How? Why would you want to do
this?
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.
69. What are the tradeoffs involved in adding a secondary index versus
using a search field?
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?
CESN and CSSN
2. What is the difference between CESN and CSSN?
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
3. What is the difference between a conversational and pseudoconversational program?
A conversational program sends a map or message and continues executing
as it waits for a response.
A pseudo-conversational program does not wait for a response, it ends after
SENDing a map or message together with a RETURN command.
4. what is pseudo conversational mean?
The programming technique in which the task will not wait for the terminal
user response but frees the resources after sending the message is called
pseudo-conversational technique. Terminating the task every time the
application needs a response from the user and then starting the next
transaction when the user presses any attention key is pseudoconversational.
5. What is the effect of including the TRANSID in the RETURN command?
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).
6. How do we start a CICS transaction from a TSO batch job? Can we
pass data to the transaction started this way through means other
than extra-partitioned dataset?
There is a program written to start a CICS txn from the TSO command level
and from a TSO batch program. It accepts two parameters, the CICS region
and the CICS command. The program at present is proto-typed to accept
only 40 bytes of input but this can be enhanced. Data can be passed (40
bytes) to the txn from the tso-CICS interface program.
7. How can you start a CICS transaction other than keying in the
transaction id at the terminal?
Page 79 of 117
Page 80 of 117
Page 81 of 117
Page 82 of 117
Page 83 of 117
Page 84 of 117
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.
55.What CICS command do you need to obtain the user logon-id?
The ASSIGN with the USERID option.
56.How about the current time and date? How do you read it?
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.)
57.What is a resident program?
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?
EIBCPOSN - Most recent physical cursor address in the map
EIBTRNID - Transaction ID
EIBTRMID - Terminal ID
EIBTASKN - Task number
EIBCALEN - Length of the communication area
EIBDATE - Task start date
EIBTIME - Task starting time
EIBAID - Most recent AID key pressed
EIBRCODE - CICS response code as a result of the last executed CICS
command
59.What information can be obtained from the EIBRCODE?
It tells the application program if the last CICS command was executed
successfully and if not why.
60.What is the function of the HANDLE CONDITION command?
To specify the paragraph label to which control is to be passed if the "handled
condition" occurs.
Page 86 of 117
Page 87 of 117
Page 88 of 117
Page 89 of 117
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.
92.Is there any way of releasing a resource previously enqueued by a
task other than by issuing a DEQ command?
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?
The Logical Unit of Work (LUW) is terminated.
Everything on the Deferred Work Element (DWE) chain is cleaned up.
If Dynamic Transaction Backout (DTB) is on, everything is committed.
GETMAIN areas are freed.
File locks are released.
I/O areas and linkage sections are released.
Browsers are terminated.
Working storage is not affected.
95.What is a Logical Unit of Work?
It is all the processing that takes place between 2 "sync points".
96. The DFHCOMMAREA is used to pass information from one application
to another. What are some other ways that this function can be
accomplished?
You can also pass information in the following ways :
1-Temporary Storage Queue
2-Intrapartition TDQ
3-Task Work Area
4-TCTUA
5-using a "file"
97.How do you define a Task Work Area?
By defining it in the PCT (Program Control Table).
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.
100. What information do you get when an ASSIGN STARTCODE is
issued?
You will be able to determine if the application was started by :
1-a transient data trigger level (QD),
2-a START command (S, SD),
3-user (U) or terminal input (TD), or
4-Distributed Program Link (D, DS).
101. Which CICS command must be issued by the application in order to
gain access to the Common Work Area (CWA)?
The ADDRESS command with the CWA option.
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?
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?
By issuing an UNLOCK command with the FILE or DATASET option. A
SYNCPOINT will also release the exclusive lock.
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.
107. What is a deadlock?
Deadlock (also known as a "deadly embrace") occurs when a task is waiting
for a resource held by another task which, in turn, is waiting for a resource
held by the first task.
Page 92 of 117
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.
115.
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.
Use the WRITEQ TS command with the ITEM option followed by the item
number together with the REWRITE option.
122.
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?
An INVREQ will take place.
How could you prevent such an error?
After the first READ with UPDATE, and prior to the second one, you could do
one of these:
1-Issue an UNLOCK
2-Execute a DELETE
3-Execute a REWRITE
4-Execute a SYNCPOINT.
129.
Name one condition that would result in the inability to execute
a backward browse.
If you issue a STARTBR with a generic key, a backward browse will not work.
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.
132.
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
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.
146. Which key, if depressed by the terminal operator, will set the screen
size to its default size?
CLEAR key.
147. What has happened if you abend with an "APCT"?
The program tried to execute a program that was either :
1-not defined in the PPT or active RDO group
2-Disabled
148. What happens to the exception (HANDLE CONDITION, HANDLE
ABEND, HANDLE AID) condition settings in a called routine once
control has been transferred to the called routine?
Once in the called routine, all condition settings are deactivated.
149. State 3 types of PERFORM statements that loop.
PERFORM VARYING; PERFORM UNTIL and PERFORM x TIMES
150. What is meant by OPEN I-O?
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?
It is not possible to schedule a txn to run between two particular timings in
CICS. Only the program has to check for that. At the end of the given time
interval, a new task will be started regardless of the state of the first task.
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.
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?
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.
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?
If the is TDQ intra partition queue and it is defined as logically recoverable
then all writes/reads to the queue will be serialized, for that LUW because the
first task that writes into the queue will get exclusive control of the logically
recoverable resource. ATI will also take place after the task that is currently
writing on to the td queue does a syncpoint or ends.
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.
When a transaction abends for which dynamic transaction backup is specified.
TDQs and TSQs that have been identified as recoverable will be backed out.
However only logically recoverable intra partition destinations will be restored
by DTB.
Extra partition TDQs can not be recovered. Similarly, DTB recovers
temporary storage data written to or released from the auxiliary storage. IT
doe not recover the temporary data storage data in main storage.
159.
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.
160.
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.
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.
167.
What is SAA?
System Application Architecture (SAA) is a set of interfaces, conventions and
protocols in order to establish an enhanced level of consistency, portability
and connectivity of data, applications and communications in a multi system
environment.
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?
PLAN-A of PGM-A is still in effect because a CICS SYNCPOINT was not done
before transferring control to PGM-B.
Easytrieve
QA
1. What does GOTO JOB statement do?
Execution control is transferred immediately to the first executable statement
of the current JOB activity. If the GOTO specifies a statement label, execution
control is transferred immediately to the first executable CA-Easytrieve plus
statement following that label; processing continues at that location. The
specified label must be located in the same activity or procedure.
2. What does STOP statement do?
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]
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?
It defines the Title lines to appear on the report.
{field name}
{Literal-2}
TITLE [Literal-1]
{+Literal-3}
{-Literal-3}
{COL Literal-4}
Abend Codes
User codes
U0001 - CHECK FOR WRONG BLOCKSIZE.
U0002 - IMS PROBLEM - CALL OPERATION TO CHECK ON STATUS. IMS CRASHED.
U0016 - IN UCC11 STEP - TRYING TO RESTART NON-RESTARTABLE STEP.
IF JOB HAS STARTED AND HAS SORTWORKS IN THE STEP ABENDING
TRY INCREASING THE SORTWORKS & RESTARTING THE JOB.
U0016 * PROBABLE SORT CAPACITY EXCEEDED. (MAX TO BOT OF JOBLOG)
* IF EXECUTING SORT W/ PARM=MAXSORT AND JOB ABENDS WITH SORTOUXX
DEVICE MIXING PROHIBITED, CHANGE THE SORTOU00 DD DSN'S TO
UNIT=CTAPE AND RESTART. THIS ABEND CAN OCCUR UNTIL DASD
CONVERSION IS COMPLETE, ABOUT THE 1ST OF NOV. 92.
U0016 * BLOCKSIZE ON INPUT FILE SHOULD BE OMITTED.
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.
U0102 - PROBABLE IMS PROBLEM, TRY RESTARTING.
- 10/31/92 U0102 IMSLOGR DD STATEMENT MISSING - WHEN EXECUTING
CICSBTPH. DELETED STEPLIB DD PER KOSKI TO RUN. YOU COULD
SUGGEST THIS TO DEV.
U0109 - CHECK FOR SQL CODE.
U0175 - DEADLOCK / CONTENTION.
U0200 - CHECK SQL CODE IN ABENDED JOB.
U0261 - INCORRECT PARM IN DL/I CALL.
U0271 - I/O ERROR DETECTED WHILE PURGING BUFFERS DURING CKPOINT
OPERATION
U0852 - DATABASE POINTERS OUT OF SYNC - CALL DBA ON CALL - TRY RESTART
FIRST.
U0999 - GENERALLY A RACF ABEND, BUT CHECK FOR OTHER MESSAGES IN
OUTPUT.
SG90214P FLAGS A U999, BUT IS ACTUALLY A B37 IN SAS STEP:
SASB#001 EXEC SAS,SORT=300,WORK='999,999',OPTIONS= ETC.
INCREASE SPACE SHOWN BELOW IN WORK PARM.
SASB#001 EXEC SAS,SORT=300,WORK='1500,1500',OPTIONS= ETC.
U0853 - DATA BASE ROOT PROBLEM/ (CC14533P RUNNING)?? TRY RESTARTING.
U1003 - ???
U1035 - DCB=DBLKSIZE=___ NOT SPECIFIED ON A DUMMY DD STMT
U1100 - CONTENTION.
U1234 - ???
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
System codes
S0C5
*
*
*
*
*
- 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
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
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.
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
U0437 -
U0456 -
U0688 U1904 -