You are on page 1of 117

DB2................................................................................................................................................................ 2 Short Notes: .......................................................................................................................................... 2 Stored Procedures ............................................................................................................................... 2 QA .............................................................................................................................................................. 2 General RDBMS Concepts............................................................................................................. 2 Application Programming............................................................................................................ 10 SQL......................................................................................................................................................

16 SQL CODES ...................................................................................................................................... 20 DB2 Utilities ..................................................................................................................................... 22 JCL ............................................................................................................................................................... 24 Short Notes: ........................................................................................................................................ 24 System Exceptions ........................................................................................................................ 30 QA ............................................................................................................................................................ 31 COBOL........................................................................................................................................................ 43 Short Notes .......................................................................................................................................... 43 QA ............................................................................................................................................................ 45 VSAM .......................................................................................................................................................... 58 Short Notes .......................................................................................................................................... 58 QA ............................................................................................................................................................ 60 SDLC ........................................................................................................................................................... 66 QA ............................................................................................................................................................ 66 IMS .............................................................................................................................................................. 70 QA ............................................................................................................................................................ 70 CICS ............................................................................................................................................................ 79 QA ............................................................................................................................................................ 79 Easytrieve ............................................................................................................................................... 102 QA .......................................................................................................................................................... 102 Abend Codes.......................................................................................................................................... 103 User codes .......................................................................................................................................... 103 System codes .................................................................................................................................... 106 Return codes...................................................................................................................................... 111 File status codes............................................................................................................................... 112 SQL return codes ............................................................................................................................. 112 Miscellaneous codes and messages .......................................................................................... 113 CICS abend codes............................................................................................................................ 113 IMS abend codes.............................................................................................................................. 115

Page 1 of 117

Interview Preparation
DB2
Short Notes:
Bind parameters: 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. What is a buffer pool?

A buffer pool is main storage that is reserved to satisfy the buffering requirements for one or more table spaces or indexes, and is made up of either 4K or 32K pages. 10. How many buffer pools are there in DB2? There are four buffer pools: BP0, BP1, BP2, and BP32. 11. On the create table space, what does the CLOSE parameter do? CLOSE physically closes the table space when no one is working on the object. DB2 (release 2.3) will logically close table spaces. 12. What is a clustering index? It is a type of index that (1) locates table rows and (2) determines how rows are grouped together in the table space.

Page 3 of 117

13. What will the COMMIT accomplish? COMMIT will allow data changes to be permanent. This then permits the data to be accessed by other units of work. When a COMMIT occurs, locks are freed so other applications can reference the just committed data. 14. What is cursor stability? It is cursor stability that tells DB2 that database values read by this application are protected only while they are being used. (Changed values are protected until this application reaches the commit point). As soon as a program moves from one row to another, other programs may read or the first row. 15.What is concurrency and how is it controlled? Concurrency is when more than one program can access the same data at the same time. You control concurrency by establishing locks so that no program can access uncommitted data that has been changed by another program. 16.What is meant by isolation level? Isolation level describes the method used to lock and unlock DB2 space. It is one of the parameters you specify when you do a BIND. 17.Describe the different isolation levels in order of concurrency. CS (Cursor stability) DB2 keeps the lock on the row until the next row is fetched or the unit of work is committed. RR (Repeatable Read) - DB2 keeps the lock on all the rows that an application references during the unit of work. UR (Uncommitted Read) - has fastest data access. Can be used to access uncommitted data. RS Locks the rows that are part of the result set. 18.What are the different kinds of table locks available in DB2? IN Intent None. Owner of the lock can read any data in the table. IS Intent Share. Owner of the lock can read any data in the table, if the S lock can be obtained on the target rows. S Share. Owner of the lock can read any data in the table, but will not obtain any row locks. IX Intent eXclusive. Owner of the lock can read or change any data in the table, if the X lock is obtained on the rows to be changed, and U or S lock can be obtained on the rows to be read. SIX Share With. Owner of the lock can read any data in the table and intent eXclusive change rows if it can obtain an X lock on the target rows. U Update. Owner of the lock can read and change any data in the table, if an X lock on the table can be obtained. X eXclusive. Owner of the lock can read or change any data in the table. No row locks are obtained. Z Super exclusive. No other application can access the table.

Page 4 of 117

S Share. Row is being read by one application and is available for read only by concurrent applications. 19. What is the function of the Data Manager? The Data Manager is a DB2 component that manages the physical databases. It invokes other system components, as necessary, to perform detailed functions such as locking, logging, and physical I/O operations (such as search, retrieval, update, and index maintenance). 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.

21.What does DSNDB07 database do? DSNDB07 is where DB2 does its sorting. It includes DB2s sort work area and external storage. 22.What is a foreign key? A foreign key is a column (or combination of columns) in a table whose values are required to match those of the primary key in some other table. 23.What is Referential Integrity or RI? How is it enforced? Means that foreign keys from one table references the primary key in another. The DBA (database administrator) uses referential constraints when creating tables using the FOREIGN KEY clause. A referential constraint consists of 3 components: 1-a constraint name 2-columns comprising the FOREIGN KEY 3-REFERENCES clause 24.How can a insert of a new foreign key value threaten referential integrity? The new foreign key value must reference or have a matching primary key value in the related table. 25.What is a Check Constraint? How is it enforced? The DBA can implement these to place specific data value restrictions on certain columns using the CONSTRAINT clause. They consists of 2 components: 1-a CONSTRAINT name 2-a check condition

Page 5 of 117

26.What is the EXPLAIN statement? How many ways can this be done? Where does it get stored? The EXPLAIN statement will show the access paths the DB2 optimizer uses to process the SQL statements in a program. There are 2 ways to do an EXPLAIN: 1-interactively using EXPLAIN ALL SET QUERYNO=n FOR SQL statement... ; or 2-as part of the BIND process using the parameter EXPLAIN(YES) The results are stored in userid.PLAN_TABLE (which you should have already created with the pre-assigned columns). 27.What is an Index? It is a set of row identifiers (RIDs) or pointers that are logically ordered based on the values of indexed columns. Indexes provide faster data access and can enforce uniqueness on the row in a table. An index key is a column or set of columns in a table used to determine the order of index entries. 28.What is an Index Scan? When an entire index (or a portion thereof) is scanned to locate rows, we call this an index scan. This type of access can be used, for example, to select all rows of a table in some order and avoid a sort for a query. 29.What is a recovery log? It is a collection of records that describes the sequence of events that occur in DB2. The information is needed for recovery in the event of a failure during execution. 30.What is meant by entity integrity? It is when the primary key is in fact unique and not null. 31.What will the FREE command do to a plan? It will drop (delete) that existing plan. 32.What will the GRANT command do? It will grant privileges to a list of one or more users. If the GRANT is used in conjunction with PUBLIC, then all users will be granted privileges. It can also be done by objects and types. 33.What is an image copy? It is an exact reproduction of all or part of a table-space. DB2 provides utility programs to make full-image copies (to copy the entire table-space) or

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

(CICS attachment facility). 43.Where are plans stored? Each plan is defined uniquely in the SYSIBM.SYSPLAN catalog table. 44.What is a page? It is a unit of retrieval data within a table-space or index space, either 4K or 32K (depending on how the table is defined), containing user or catalog information. 45.What is a page space? It refers either to an un-partitioned table, to an index space, or to a single partition of a partitioned table of index space. 46.What is a storage group (STOGROUP)? It is a named collection of DASD volumes to be used by table-spaces and index spaces of databases. The volumes of a STOGROUP must be of the same device type. 47.What is a table-space? A table-space is a logical group of data files in a database. A typical database contains at least one table-space, and usually two or more. In a database, a table-space plays a role similar to that of a folder on the hard drive of a computer. It is a special ESDS VSAM dataset, which is used to store one or more tables. The physical page can consist of 4K or 32K pages. 48.What are the 3 types of table-spaces? Simple, segmented, and partitioned. 49.How would you move a table-space (using STOGROUP) to a different DASD volume allocated to that table-space? 1-If the table-space used is only allocated to that STOGROUP: ALTER STOGROUP - add volume (new) delete volume (old) REORG TABLE-SPACE or RECOVER TABLE-SPACE 2-Create a new STOGROUP that points to the new volume. ALTER the table-space and REORG or RECOVER the table-space. 50.What is the format of TIMESTAMP? This is a seven-part value that consists of a date (YYMMDD) and time (HHMMSS and microseconds).

Page 8 of 117

51.What is a unit of recovery? This is a sequence of operations within a unit of work (i.e., work done between commit points). 52.After a table has been recovered, which flag is turned on? Is the table available for use? Copy Pending flag is set. No, it is not available for use. 53.How do you reset this flag? By running a DB2 utility, there are 2 ways: CHECK DATA - enforces referential constraints, or REPAIR SET TABLE-SPACE tsname NOCOPYPEND - not recommended 54.What is the DB2 Catalog? It is a set of tables (name starts with SYSIBM.) that contain information about all the DB2 objects (tables, views, plans, packages, etc.). 55.In which column of which DB2 catalog would you find the length of the rows for all tables? In the RECLENGTH column of SYSIBM.SYSTABLES. 56.What information is held in SYSIBM.SYSCOPY? It contains information about image copies made of the table-spaces. What information is contained in a SYSCOPY row? Included is the name of the database, the table-space name, and the image copy type (full, incremental, etc.), as well as the date and time each copy was made. 57.What information can you find in SYSIBM.SYSLINKS? It contains information about the links between tables created by referential constraints. 58.Where would you find information about the type of database authority held by a user? SYSIBM.SYSDBAUTH. 59.How about the type of plan authority held by a user? SYSIBM.SYSPLANAUTH. 60.How about the type of package authority held by a user?

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

It is an option on BIND to specify when authorization checks are done during RUN time or during BIND time. 74.What are data types? They are attributes of columns, literals, and host variables. The data types are SMALLINT, INTEGER, FLOAT, DECIMAL, CHAR, VARCHAR, DATE and TIME. 75.What is Declaration Generator(DCLGEN)? DCLGEN is a facility that is used to generate SQL statements that describe a table or view. These table or view descriptions are then used to check the validity of other SQL statements at precompile time. The table or view declares are used by the DB2I utility DCLGEN to build a host language structure, which is used by the DB2 precompiler to verify that correct column names and data types have been specified in the SQL statement. 76.What commands are used to start and end SQL statements? EXEC SQL and END-EXEC 77.If you have a COBOL-DB2 program what must be in your program? EXEC SQL INCLUDE SQLCA END-EXEC. 78.What kind of BIND is performed when the DBRMs SQL statements havent changed but you want to access a new index or change the locking options? A REBIND is performed. 79.What kind of BIND is performed which allows you to rebind a program using the same application plan name? A REBIND REPLACE 80. Name the 2 types of DB2 indexes A clustering index which determines the physical order the rows of the table are stored in, which is usually the sequential order the data is most frequently accessed. A unique index forces the table's rows to have unique values. 81.When do you use a VIEW? To access only the columns that you are authorized to read and to access one or more columns from one or more tables. 82.What is a ROLLBACK?

Page 12 of 117

The rollback returns the data to its original values since the last commit. 83.Is a NULL value equal to a space, a zero or low-values? Neither one. A NULL value has no value. An indicator variable would have a value of -1 if a SELECT retrieved a NULL value. 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? When in WHERE clause we have a primary key (this is unique identifier of the row). When we use built-in function.

90.What is host variable? These are the fields from WORKING-STORAGE SECTION in which system puts data extracted from DB2. It can be created using DCLGEN. Host variables are preceded by :. 91.What is the SQL Communications Area?

Page 13 of 117

It is a data area defined in working storage, which tells your program whether SQL statements were executed successfully. It contains SQLCODE, which indicates whether the SQL statement was successful or unsuccessful. SQLWARN0 which if set to W means that at least one of the SQL warning flags is set. 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. In which part of the program DECLARE statement comes?

Page 14 of 117

DECLARE is not an executable statement and it can be in PROCEDURE DIVISION, WORKING STORAGE SECTION or in LINKAGE SECTION. 101. What does INCLUDE command do?

It takes the result of DCLGEN, SQLCA and puts it in a COBOL program. 102. What is embedded SQL?

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. What is a two-phase commit?

It is a process that synchronizes the commit and rollback of changes between 2 different environments (like CICS to DB2 or IMS to DB2). 104. What can cause it to fail? How can you resolve this?

If a connection/communication failure or an environment crash in either environment occurs. When such a failure happens, the commit status of the thread established for that connection is in doubt. One can invoke the RECOVER INDOUBT command to commit or rollback any changes associated with an in-doubt thread. 105. What is an asynchronous write?

It is a write to disk that may occur before or long after a commit. The write is controlled by the buffer manager. 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. What is the difference between GROUP BY and ORDERBY?

Group by controls the presentation of the rows, order by controls the presentation of the columns for the results of the SELECT statement 110. How does simple sub select work?

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. How does EXISTS work?

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. How do you maintain a cursor that closes due to a COMMIT?

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

WHENVER SQLERROR - checks for a error code WHENEVER SQLWARN - checks SQLWARN for W It is bad practice to use WHENEVER, since it is analogous to a GO TO DEPENDING ON and does not tell you where the problem occurred. 118. How do you display the names of the columns in a table?

Perform a select query on the SYSCOLUMNS catalog table. 119. How do you specify search conditions on groups?

The HAVING clause allows you to select specific groups (aggregate). 120. How do you find the number of unique values in a column called EMPNO? Indicate COUNT followed by DISTINCT and the column name enclosed in parentheses. SELECT COUNT(DISTINCT EMPNO) 121. How do you determine the average, minimum and maximum value of a column called SKILLS? SELECT AVG(SKILLS), MIN(SKILLS), MAX(SKILLS) 122. What is the SQL syntax used to delete all COBOL skills from the SKILLS column on the KIT table? EXEC SQL DELETE FROM KIT WHERE SKILLS = 'COBOL' END-EXEC 123. What is the SQL syntax used to change all COBOL skills to DB2 in the SKILLS column on the KIT table? EXEC SQL UPDATE KIT SET SKILLS = 'DB2' WHERE SKILLS = 'COBOL' END-EXEC 124. What is the SELECT statement used to multiply the percentage column by 100 before it returns a value? SELECT PERCENTAGE * 100 125. How do you specify a WHERE clause that retrieves GRADES >= 90 and GRADES <= 100? SELECT GRADES BETWEEN 90 AND 100

Page 18 of 117

126. Specify 3 WHERE clauses that retrieves SKILLS = COBOL or COBOL II. WHERE SKILLS = 'COBOL' OR SKILLS = 'COBOL II' WHERE SKILLS = 'COBOL%' WHERE SKILLS IN ('COBOL','COBOL II') 127. Would I join data or specify UNION if I want to merge distinct rows from 2 tables? What is required here? UNION. The only requirement is that the 2 tables be "similar" (having the same number of columns with the same data types and lengths). Would I join data or specify UNION if I want to merge columns from 2 tables? "join" data by specifying in the WHERE clause matching column(s) from one table to another table. 128. How would you retain the duplicate rows?

UNION ALL. With the ALL option, all rows from the 2 tables will be retained. Without it, duplicate rows will be discarded. 129. What is the difference between JOIN and UNION?

JOIN combines results from more than one table using one SELECT statement. UNION combines results from more than one SELECT statement. 130. What is the difference between UNION and UNION ALL?

UNION eliminates duplicates. UNION ALL does not eliminate duplicates. 131. What is a Cartesian product and how can we get it?

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. What is dynamic SQL?

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?

It is an element of a search condition (part of the SELECT statement) that expresses a comparison operation. Example: WHERE STATUS_FLAG IN ('A','B','C') AND PAY_AMOUNT > 91.50

Page 19 of 117

SQL CODES 134. What do you do when you receive a SQLCODE -911 or -913?

This indicates a deadlock or timeout which occurred when accessing locked data. This is resolved by re-executing the SQL statement until the lock is removed. If the lock isn't removed in a timely fashion, a ROLLBACK is issued since the unit of work cannot be completed. 135. Whats the reason for the SQL CODE = -904?

In DB2, a -904 is a "Resource Not Available". There could be several reasons for this, but usually it is one of three: 1. An image copy needs to be taken. DB2 turns the copy pending flag on if the DB2 load utility has been run with the parameter "log no". Since "log no" does not log transactions to the system log, DB2 requires an image copy be performed. This gives DB2 a starting place in case recovery needs to be run at some later time. If an image copy was not taken, the rows inserted with the load utility (with "log no") would be lost. 2. Contention with another program. DB2 allows concurrency. This means more than one process can update a table at the same time. But long running update programs can change this. If an update program is started, every time an update happens a lock is placed on the CI (or row if row level locking is being used). DB2 only has a certain amount of locks. Once this maximum threshold of locks is used, DB2 escalates to a table-space lock. This means only the process that caused the escalation can use the table. All other processes will receive a -904. 3. A DB2 utility is being executed. Certain DB2 utilities require exclusive control of the table. If a process is started while one of these is executing, a 904 is issued. CODE +100 -102 -117 -180/-181 -199 -204 -205/-206 +304 -305 -311 -501 -502 -503 -530 -532/-536 -545 Causes Row not found String constant is too long The number of values you are trying to INSERT does not match the number of columns. Bad data in Date/Time/Timestamp Illegal use of specified keyword Object not defined in DB2 Column Specified does not exist Value can not be assigned to the host variable because it is out of range. Null indicator missing VARCHAR Insert or update failed (-LEN field was not set right with the data length. Cursor not opened for FETCH Trying to open an already opened cursor Updating column which needs to be specified in FOR UPDATE OF Referential integrity prevents the INSERT/UPDATE Referential integrity (DELETE RESTRICT rule) prevents the DELETE Check constraint prevents the INSERT/UPDATE

Page 20 of 117

+802 -803 -805 -811 -904 -911 -913 -922

null indicator was set to -2 because an arithmetic statement didn't work Duplicate key on insert or update DBRM or package not found in plan More than one row retrieved in Select statement Unavailable resource Deadlock. Rollback has been done Deadlock. No Rollback Authorization Failure

Page 21 of 117

DB2 Utilities CHECK To check Data for RI Rows that violate the Referential constraints are copied into the Exception table. 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 To load /add data to a table. It will load data into one or more tables in a table-space or partition. It can also replace the contents of a single partition or of an entire table-space using the REPLACE option (the default is to append data). Requires image copy to remove copy pending & to remove check pending Options REPLACE RESUME YES ENFORCE NO (to bypass referential constraint check) to delete references to unneeded image copies from the DB2 Catalog It can merge several incremental copies of a table-space to make a single incremental copy, and it can merge incremental copies with a full image copy to make a new full image copy. to create point of recovery based on DB2 log It ensures table data consistency and referential integrity. It does this by recording log RBAs in the SYSIBM.SYSCOPY catalog table, which can later be used by the RECOVER utility. It is recommended to run QUIESCE before running a COPY because of this. REBIND RECOVER To update a plan because of index or Data changes To restore from backup

COPY

MODIFY

MERGECOPY -

QUIESCE

Page 22 of 117

This recovers data to the current state or a previous state. The largest unit of data recovery is the table-space; the smallest is a page. Data is recovered from image copies of a table-space and database log change records. REORG to reorganize table based on clustering index It will reorganize a table-space to improve access performance and reorganize indexes so that they are more efficiently clustered. 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. to list available point of recovery for a table To update catalog statistics It will scan table-spaces or indexes gathering information about utilization of space and efficiency of indexes. The information is stored in the DB2 catalog, and is used by the DB2 optimizer to select access paths to data during the bind process. STOSPACE This updates the DB2 catalog columns to tell how much space is allocated for storage groups and related table-space and indexes.

REPORT RUNSTATS

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 | | | Positional parameters. If at all they occur they have in and second place. Installation dependent, to give information about the kind of Job. It defines the priority. Virtual memory allowed.

REGION TIME COND MSGCLASS MSGLEVEL NOTIFY

If the condition satisfies skip the step. Class of output. Controls the output to be printed.

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 String passed to the program. Over rides the region parameter in job statement.

Page 25 of 117

COND

EVEN executes, if the previous step abends. ONLY executes, only if the previous step abends.

Other variables for procs A job can have maximum of 255 steps (after expanding includes and procs). DD statement Specifies a dataset, its characteristics, operation mode, disposition and placement. (asterisk to begin in-stream data)

DSNAME (DSN) DUMMY DISP Intl Normal Abnormal UNIT VOLUME (VOL) SPACE (TRK/CYL/BLK/BYTES) (Primary, Secondary, Directory blocks) (RLSE) what should be done when job ends. (Data Control Block) --- defines the characteristics of a LRECL BLKSIZE RECFM DSOG (PO/PS) MODELDCB (for GDG only and first parameter) SYSOUT OUTPUT FCB printing. CHARS COPIES DEST DDNAME Reference can be made to another DD. *. Normal (defines output chars) What kind of page to use on the printer, layout of (NEW/OLD/SHR/MOD PASS/KEEP/DELETE/CATLG/UNCATLG KEEP/DELETE/CATLG/UNCATLG)

DCB dataset.

Fonts on printer.

Page 26 of 117

DATACLAS MGMTCLAS STORCLAS AMP

Details about DCB How to manage data (migrate) Controls the way in which it is stored. VSAM Datasets BUFND/BUIFNI/BUFSP BUFND - Number of data buffers BUFNI - Number of index buffers.

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

Referencing a record before an open or read Invalid subscript Overflowed table wiping out some instructions. S0C7 Data Exception Cause Wrong Usage definition Spaces in numeric field Bad subscript Group moving not doing required conversions Incorrect linkage conventions Check for improper exit from PERFORM Action Check for Duplicate Close stmt Sort with incorrect catalog proc. Referencing a data item before open or read S0CB Decimal Divide Exception Divide by Zero Field too small for calculated quotient. 122, 222 Time limit exceeded. 122 with dump, 222 without dump

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

24.What utility do you use to delete or catalog a dataset? IEFBR14 IEFBR14 does nothing so the sub-parameter values of the DISP parameter on the DD statement are used to delete or catalog the dataset. 25.Describe a GDG generation data group. A group of datasets with the same base name that have chronological occurrences called generations. Each generation is referenced by it's base dataset name followed by the generation number. Example: SYS3.MASTER.G0101V00 and SYS3.MASTER.G0102V00 where SYS3.MASTER is the base name followed by a chronological generation number. 26.Define GDG? GDGs are created using the utility Idcams. The two main pieces of information that you need to supply in creating a GDG base are the name of the GDG and the number of generations of the GDG that you want the GDG to hold. For example, the following JCL will create a GDG base called MY.GDG.BASE to hold three generations: //STEPX EXEC PGM=IDCAMS //SYSIN DD * DEFINE GDG (NAME(MY.GDG.BASE) LIMIT(3) SCRATCH) /*

27.Is it possible to ALTER GDG, that already defined? How? Yes. To alter the number of generations of an existing GDG that are to be kept, execute the following JCL: //STEPY EXEC PGM=IDCAMS //SYSIN DD * ALTER MY.GDG.BASE LIMIT(4) /*

28.What is the difference between an absolute and a relative generation? GDG datasets can be referred to by using its absolute or relative generation number. Absolute generation or G0000V00 number (by its naming format) would give you the complete GDG dataset name. Relative generation is exactly what it says (0-current,-1-previous,+1-next one to be created). After a job completes or abends, the absolute generation numbers would be resolved.

Page 34 of 117

29.How can you prevent repeatedly changing the generation numbers in a job that executes daily? It reads the current and previous generations and creates a new generation of SYS3.MASTER? By referencing them using their relative generation numbers: Name the current generation: SYS3.MASTER(0) Name the previous generation: SYS3.MASTER(-1) Name the newly created generation: SYS3.MASTER(+1) 30.If a job abends and a (+1) generation that was created previously will be used in the next subsequent step(s), what do you do before you restart? Change your JCL to refer to this as a (0) generation because it is now the current generation. This is assuming that the (+1) generation created was the most current and there was no (+2) created etc. 31.If you defined a GDG with a limit of 90, what happens when the 91st generation is created? Generation one rolls off and is automatically deleted. 32.Identify the 2 uses of the TYPRUN parameter on the JOB statement? TYPRUN=HOLD will submit the job in the queue but suspend it's execution until it is released. TYPRUN=SCAN allows the JCL in the job to be checked for syntax errors without executing the job. 33.What is a procedure? A JCL stream called by the executing job by specifying it's name on the EXEC statement. 34.When would you use a catalogued PROC? A PROC is used when the same set of JCL statements are used repeatedly with little or no change. 35.What is the difference between a catalogued and an in-stream procedure? A catalogued PROC name would be in the EXEC statement, but the actual procedure resides in a different dataset library. This gives added flexibility as far as being able to make changes to just the PROC without touching the job since this PROC can be used in more than one job. An in-stream PROC would be found inside the job itself preceded by the word, PROC, and ends with the word, PEND (the EXEC statement should be after the PEND).

Page 35 of 117

36.What if the step you want to restart is inside a PROC? Code RESTART=Jobstepname.Procstepname, wherein the Jobstepname is found within the job and EXECs the procedure and the Procstepname is found within the PROC. 37.How do you specify where catalogued procedures reside? By using the PROCLIB statement which specifies what libraries to search before executing the PROC (the new way of doing this is by using the JCLLIB ORDER=(lib1,lib2,...) statement). 38.How do you assign default and specific values to a symbolic parameter? Default values are specified by assigning values in the procedure on the PROC statement. Specific values are assigned on the EXEC statement of the calling procedure. 39.When should you use a symbolic parameter? When a parameter in a procedure varies each time the procedure is called. 40.Can you have in-stream data inside a catalogued procedure? How do you resolve this? No. You can read in-stream data by doing an override to the DDname inside the PROC. This override would be coded inside the job itself after the EXEC PROCname statement: //DDname DD * followed by in-stream data in subsequent lines. 41.What utility would you use to print a sequential dataset? IEBGENER with the output directed to SYSOUT=*. This assumes that the MSGCLASS parameter on the JOB statement is pointing to a proper output class. 42.What parameter do you use to execute the next job step even though the preceding job step was unsuccessful? COND=EVEN coded in subsequent steps. 43.What parameter do you use to execute the next job step only if the preceding job step was unsuccessful? COND=ONLY coded in subsequent steps. 44.What parameter do you use to execute a job step only if the preceding job step has zero return codes? COND=(0,NE) coded in subsequent steps.

Page 36 of 117

45.What if the highest permissible condition code is 4, how do you code this? COND=(4,LE) coded in subsequent steps. 46.What is a S322 abend? The executing job has run out of time. 47.What is the difference between a S222 and S322 abend code? A S222 abend code means the job was cancelled by the operator. A S322 means that the job needs more time to run. 48.How do you fix a SB37 abend? Increase the primary and/or secondary space specified on the SPACE parameter of the DD statement for the dataset specified in the error message. 49.What is a S013 abend code? DCB conflict; often LRECL specified does not match the record length of the file in the COBOL program 50.What is a S806 abend code? How do you resolve this? Program module specified in the EXEC PGM= statement could not be found. First, check if a STEPLIB is coded and all concatenated libraries for this program. Second, check the JOBLIB statement and all concatenated libraries for this program. Last, check the system linklist if the program is there. 51.How do you resolve a S80A or S804 abend? Increase the REGION specified on the JOB and/or EXEC statement(s). 52.What is a S913 abend code? How do you resolve this? You lack the authority to read or update the dataset. Talk to the security administrator so your ID has the necessary authority. 53.What is the difference between a system and a user abend? A system abend is issued by the operating system while a user abend is issued by an application program and starts with the letter, U, followed by a number. Usually an application program displays a message before issuing a user abend to help the on-call programmer diagnose the problem. 54.How do you change the return code? How is this different from a user abend? In the COBOL program, move a 4-digit number to RETURN-CODE before issuing the GOBACK statement. This is different from a user abend because it

Page 37 of 117

does not abend, but issues a non-zero return code which can be used to affect subsequent steps. 55.What are some of the causes for SOC4 abend code? A missing DD statement; an un-initialized subscript or index and accessing an occurrence beyond the scope of the table 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

65.What is the DD statement for a output file? Unless allocated earlier, will have the following parameters: DISP=(NEW,CATLG,DELETE), UNIT , SPACE & DCB . 66.What do you do if you do not want to keep all the space allocated to a dataset? Specify the parameter RLSE ( release ) in the SPACE e.g. SPACE=(CYL,(50,50),RLSE) 67.What is DISP=(NEW,PASS,DELETE)? This is a new file and create it, if the step terminates normally, pass it to the subsequent steps and if step abends, delete it. This dataset will not exist beyond the JCL. 68.How do you create a temporary dataset? Where will you use them? Temporary datasets can be created either by not specifying any DSNAME or by specifying the temporary file indicator as in DSN=&&TEMP. We use them to carry the output of one step to another step in the same job. The dataset will not be retained once the job completes. 69.How do you restart a proc from a particular step? In job card, specify RESTART=procstep.stepname where procstep = name of the jcl step that invoked the proc and stepname = name of the proc step where you want execution to start 70.How do you skip a particular step in a proc/JOB? Can use either condition codes or use the jcl control statement IF (only in ESA JCL) 71.A PROC has five steps. Step 3 has a condition code. How can you override/nullify this condition code? Provide the override on the EXEC stmt in the JCL as follows: //STEP001 EXEC procname,COND.stepname=value All parameters on an EXEC stmt in the proc such as COND, PARM have to be overridden like this. 72.How do you override a specific DDNAME/SYSIN in PROC from a JCL? //<stepname.dd> DSN=... 73.What is NOTCAT 2 ? This is an MVS message indicating that a duplicate catalog entry exists. E.g., if you already have a dataset with dsn = xxxx.yyyy and u try to create one with disp new,catlg, you would get this error. the program open and write

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)

Organization of Cobol programs: Identification division. Program-ID. Author. Date-written. Date-compiled. Environment division. Configuration section. Source-computer. object-computer. Special-names. Input-output section. File-control. Select assign Organization Access mode File status Record key Alternate Record key Relative key I-O control. Data division. File section. FD or SD Name Block contains Record contains Record varying Label record Data record Recording mode Working storage section

Page 43 of 117

Linkage section. Procedure division 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 (Using).

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.

5. What is the difference between SEARCH and SEACH ALL?

Page 45 of 117

SEARCH is a serial (linear) search. SEARCH ALL is a binary search & the table must be stored ( ASCENDING/DESCENDING KEY clause to be used & data loaded in the order) before using SEARCH ALL. 6. What should be the sorting order for SEARCH ALL? It can be either in ASCENDING or DESCENDING order. 7. What happened if match is not found for any SEARCH command? If AT END option supplied for this command control passes there, if not, control passed to next sequential instruction. 8. What do you have to prepare for sequential SEARCH? When we describe the table in working storage section we have to have INDEXED BY clause and before SEARCH statement we have to initialize index by SET INX TO INIT-VALUE (for e.g SET INX TO 1). 9. What do you have to prepare for binary SEARCH? When we describe the table in working storage section we have to have INDEXED BY clause and ASCENDING/DESCENDING KEY IS clause. Table must be sorted. 10.What is binary search? Searches on a sorted array. Compare the item to be searched with the item at the center. If it matches, fine else repeat he process with the left half or the right half depending on where the item lies. 11.What do you prepare to use: Index or Subscript? When we need to search relatively bigger table its better to use Index. For smaller table it doesnt matter. Index works faster. 12.How can we change the value of index? SET INX TO VALUE SET INX UP/DOWN BY VALUE PERFORM/VARYING 13.What is hard-coded table? When we create all entrys value for the table in working-storage. Example: 01 WS-FIELDS PIC X(21) VALUE MONTUEWEDSUN. 01 TBL REDEFINES WS-FLDS. 05 TB-ENTRY OCCURS 7 TIMES PIC X(03). 14.How can we initialize table?

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

Practically, dynamic CALL is more efficient because we dont have to recompile all main programs which used the subprogram. 30.What is use of evaluate statement? Evaluate is like a case statement and can be used to replace nested IFs. the difference between evaluate and case is that no break is required for evaluate i.e. control comes out of the evaluate as Soon as one match is made. 31.In an evaluate statement, can be a complex condition given on a when clause? Yes. 32.Whats a scope terminator? Scope terminator is used to mark the end of a verb. E.g. EVALAUTEENDEVALUATE , IF..END-IF. 33.What are all the kinds of PERFORM statements are there? PERFROM, PERFORM/THRU, PERFROM/UNTIL, PERFORM # TIMES, PERFROM/VARYING. 34.How do you do inline PERFORM? PERFORM <UNTIL>. Sentences END-PERFORM. 35.When do you use in-line PERFORM? When the body of the PERFORM will not be used on other part of the program. If the body of the program is a generic type of code (used from various other places in the paragraph), it would be better to put the code id a separate paragraph and use PERFORM parameter rather than in in-line perform. 36.What is the difference between READ and READINTO? READ statements puts record into 01 level under FD, READINTO puts record into working-storage field specified after word INTO. 37.Could you give an example of level 88 (CONDITION NAME)? 01 WS-MARRIAGE-STATUS PIC X(01). 88 MARRIED VALUE M. 88 DIVORCED VALUE D. 88 SINGLE VALUE S.

Page 49 of 117

MOVE TRAN-MARRIAGE-STATUS TO WS-MARRIAGE-STATUS IF SINGLE . 38.What is level 66? This level was used for concatenation. We can use now STRING statement instead of level 66. 39.What is STRING Statement? It used to combine a few fields in one, for e.g. Last-name and First-name in one field: Name. 40.Whats UNSTRING Statement? It breaks one field into a few fields. 41.What is INSPECT Statement? It used to replace some values or calculating some numbers for one field. 42.How can we get current DATE and TIME from the system? Using ACCEPT WS-AREA FROM DATE/TIME. 43.In what format system stores current DATE/TIME? Date is stored in YYMMDD Time is stored in HHMMSS. 44.Which is more efficient the SEARCH ALL or SEARCH statement? The SEARCH ALL is generally more efficient because it performs a binary search that finds the data item using equal to, greater than or less than conditions on the table's values. For this reason, the table must be in ascending or descending sort sequence. SEARCH performs a sequential (serial) search from the beginning of the table to the end or until the data item is found. It's less efficient when searching large tables. 45.Describe the steps required to execute an internal sort. Indicate a SELECT statement for the sort file. Define the sort file in the file section as a SD. In the Procedure Division, enter the sort statement, it's ascending/descending key fields and the input procedure, output procedure, using option and/or giving option. Read the input file and move fields to the sort file. Issue a RELEASE command to release the sort record for sorting. After the input file is processed, read the sort file which is now in sort order using the RETURN command. 46.When is the use of a GO TO acceptable in a structured program?

Page 50 of 117

When you use PERFORM paragraph THRU exit paragraph. It is acceptable to GO TO the exit paragraph. For example: PERFORM PREPKIT THRU PREPKITEXIT. In the PREPKIT paragraph, a GO TO PREPKIT-EXIT statement is acceptable. 47.What is the significance of the USING phrase in the Procedure Division header? The USING phrase allows the Procedure Division to reference data in the Linkage Section. 48.What statement allows the same data area to be defined in different ways? The REDEFINES statement. 49.How do you calculate the number of bytes in a COMP-3 field? A COMP-3 field is also known as a packed decimal field. Each 8-bit byte can hold 2 digits so all COMP-3 fields should be defined as a odd number to accommodate the 4-bit sign. A COMP-3 field defined as an even number is essentially 1 + that number to make it odd (which is why it is more efficient to define them as an odd number to avoid this extra overhead). 50.The field with pic S9(07)V99. how many bytes it occupies in COMP and COMP-3? In COMP it occupies 4 bytes, in COMP-3 it occupies 5 bytes. 51.What is the difference between a COPY statement and a CALL statement? A COPY statement copies pre-written COBOL code into the program while the CALL statement causes another program to be executed. 52.What does the STRING statement do? Concatenates part or all of the contents of two or more data items or literals into one single data item. 53. What is the meaning of the data name that your file is assigned to in the SELECT statement? It matches the file's DDname in the JCL that executes the program. Example: In COBOL: SELECT PREP-FILE ASSIGN TO UT-D-PREPFILE. In JCL: //PREPFILE DD DSN=...... 54.When is it beneficial to use the MOVE CORRESPONDING statement? When you have 2 data groups with many elementary items possessing the same names. All items (except filler) are moved with one statement as opposed to a move statement for each elementary item.

Page 51 of 117

55.What does the COBOL compiler do? Checks the syntax of all program statements; produces a listing of compiler error messages and creates the object module. 56.What are the severity levels of error messages in a compile? W for warnings and issues a 00 completion code E for error and issues a 008 completion code S for severe and issues a 012 completion code 57.Which severity level(s) still produces a object module? W (warning) and E (error). 58.Show internal presentation for field: 01 FLD1 PIC S9(05) COMP-3 VALUE -1234. !0:1!2:3!4:D! 59.Show internal presentation for field: 01 FLD2 PIC S9(05) COMP-3 VALUE +1234. 01 FLD3 PIC S9(05) COMP-3 VALUE -1234. FLD2 occupies 4 bytes, in binary: 0100 1101 0010, in HEX: 4D2 !0:0!0:0!0:4!D:2 FLD3 occupies 4 bytes, in binary +1234 is : 0000 0100 1101 0010, After conversion: 1111 1111 1111 1111 1111 1011 0010 1101 After adding 1 : 1111 1111 1111 1111 1111 1011 0010 1110. In hex: FFFF FB2E 60.A field is defined as PIC S9(3)V99, does the sign require an extra byte in storage? No. This field uses 5 bytes in storage. The fifth byte of the field recognizes the sign. If the value is positive, it starts with a C, a D if the value is negative and F for a unsigned value. 61. How many characters are stored per byte if a data item is defined as PIC X(03)? Why? 3. USAGE IS DISPLAY specifies zoned decimal storage that means one character is stored for each position defined. Internally, the IBM mainframe uses EBCDIC (Extended Binary Coded Decimal Interchange Code) to store its data. 62.Which definition is best for computations? PIC S9(3) COMP-3 or PIC S9(3)? PIC S9(3) COMP-3 is best. COMP-3 takes up less storage; 2 bytes as opposed to 3. It's packed decimal which means 2 bytes are stored for each position defined. COMP-3 requires less processing. COBOL converts PIC S9(3) zoned decimal numeric data to packed decimal PIC S9(3) COMP-3 prior to performing computations. Afterwards, it converts the results back to zoned

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

1-Sort the file by the control field 2-Read the first record 3-Move the control field to a hold area in WORKING-STORAGE 4-Read and process records as long as the control field is equal to the hold area. 5-Once the control field is no longer equal to the hold area, move the new control field to the hold area 6-Repeat steps 4 and 5 until the end of file is reached 72.List the steps involved when using a line counter to achieve end-ofpage control when printing reports. 1-Determine the maximum number of lines to be printed on a page 2-Define a line counter in WORKING-STORAGE as 9(2) COMP initialized to zero 3-After each WRITE statement, increment the line counter by one (or more, if you use AFTER ADVANCING 2...) 4-Test the line counter to see if it's reached the determined maximum lines per page. If it has, print a heading on a new page and reset the line counter. 73.A data item defined as S9(8)V99 contains the value 00123456, what is the PICTURE clause if the report displays the data item as $ 1,234.56CR? PIC $ZZZ,ZZZ.99CR 74.Describe how the following statement is processed: PERFORM ZZ VARYING SUB FROM 1 BY 1 UNTIL X(SUB) = Y OR SUB > 2 1-SUB is initialized to 1 2-The until clause is checked to see if X(SUB) = Y 3-If they are equal, the PERFORM is terminated and processing continues with the next statement following the PERFORM 4-If they are not equal, the paragraph ZZ is performed 5-1 is added to SUB and becomes 2 6-Repeat steps 2-4 7-1 is added to SUB and becomes 3 8-The PERFORM is terminated because SUB > 2 75. Given the following statement PERFORM ZZ-RTN THRU ZZ-EXIT, describe the paragraph ZZ-EXIT and it's purpose. The paragraph looks as follows: ZZ-EXIT. EXIT. EXIT is a COBOL reserved word that performs no operation. It provides a end point for the PERFORM..THRU... statement and control proceeds to the next statement after the PERFORM..THRU... statement. EXIT must be the only word in the paragraph. A GO TO statement to ZZ-EXIT. paragraph is accepted practice in structured programs. 76.Given the statement IF ROSE-COLORED PERFORM ZZ-RTN, describe ROSE-COLORED ROSE-COLORED is the name of a 88-level data item.

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

83.What is an explicit scope terminator? When is it used? A scope terminator terminates its preceding verb. Example: IF .. END-IF. A verb executes all statements between the verb and its scope terminator. It is used with READ, WRITE, DELETE, REWRITE, PERFORM, EVALUATE, SEARCH, IF and STRING. 84.What is an in-line PERFORM? An in-line PERFORM statement executes all statements between the PERFORM and END-PERFORM commands. Eliminates the necessity of placing the statements to be executed in a separate paragraph and then performing that paragraph. 85.When used with a IF..END-IF statement what is the difference between NEXT SENTENCE and CONTINUE? NEXT SENTENCE gives control to the verb following the next period (.) while CONTINUE gives control to the next verb after the END-IF. 86.What is the significance of 'above the line' and 'below the line'? A program's virtual storage is 'below the line' when it is limited to 16 MB and 'above the line' when it can exceed 16MB. Programs compiled with a 24-bit mode can only address 16 MB of space. With COBOL II, a program can be compiled with a 31-bit mode which allows it to address more than 16MB of space. Thus COBOL II programs can do more processing and access larger amounts of data. 87.Name the statements no longer valid in COBOL II? REMARKS, CURRENT-DATE, CURRENT-DAY, TIME-OF-DAY, EXAMINE, READY TRACE, POSITIONING, "report writer statements" like RD, INITIATE, GENERATE, TERMINATE. 88. What does the INITIALIZE statement initialize values to? What fields does it ignore? INITIALIZE moves spaces to alphabetic fields and zeros to numeric fields. It doesn't initialize filler fields. 89.How is INITIALIZE advantageous when initializing tables? The INITIALIZE statement initializes the entire table so it's no longer necessary to initialize each occurrence of a field in a table by using a PERFORM..VARYING. 90.What additional functionality is given to the SET statement? SET field TO TRUE sets the field equal to the value associated with it (88level).

Page 56 of 117

91.Describe the EVALUATE statement The EVALUATE statement evaluates a field, literal, expression or a true/false condition and performs the statements indicated by the WHEN conditions. It reduces the use of Nested Ifs. 92. TRUE or FALSE. WHEN conditions specified in the EVALUATE statement are executed in alphabetical order. False. WHEN conditions are executed top-down, the first condition stated is evaluated first. That is why you should arrange the conditions in the order you really intended. 93.If EOF-FLAG is defined as an 88-level with a value of 'Y' State two ways to set the field equal to it's value. 1-Move 'Y' to it's group level data item. 2-Use the statement, SET EOF-FLAG TO TRUE. 94.The INSPECT statement can replace all blanks with zeroes. What COBOL II statement achieves the same results? INITIALIZE data item REPLACING ALPHANUMERIC DATA BY ZEROES 95.What COBOL II statement functions like the EXIT PROGRAM statement in a called program? GOBACK. It returns control back to the calling program and executes the next statement 96.Accessing CURRENT-DATE and CURRENT-TIME is no longer supported, how does COBOL II access these features? ACCEPT HOLD-DATE FROM DATE (The format is YYMMDD). ACCEPT HOLD-TIME FROM TIME (The format is HHMMSSMS). 97.How do you pass values to a COBOL pgm? If u want to pass values from jcl to Cobol use "parm" parameter in the exec statement and in the cobol program declare the linkage section for the values to be passed.If u want to pass values from cobol to other non-cobol programs this can be done by call by reference or call by value.ex: call pgma using wsname, ws-sex.

Page 57 of 117

VSAM
Short Notes
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 Records are in order as they are entered Direct access by RBA Alternate indexes allowed A record's RBA cannot change

KSDS Records are in collating sequence by key field Direct access by key or RBA Alternate indexes allowed A record's RBA can change

RRDS (fixed) Records are in relative record number order Direct access by relative record number No alternate indexes allowed A record's relative record number cannot change Empty slots in the data set are used for adding records

VRRDS Records are in relative record number order Direct access by relative record number No alternate indexes allowed A record's relative record number cannot change Free space is used for inserting and lengthening records

LDS No processing at record level Access with Data-In-Virtual (DIV) No alternate indexes allowed 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

No processing at record level

Space given up A slot given up by a deleted or by a deleted shortened record can be

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 Spanned records allowed Extended format allowed

record becomes free space Spanned records allowed Extended format or compression allowed

used

record becomes free space No spanned records allowed Extended format allowed No spanned records allowed Extended format allowed

No spanned records 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

3. How do you copy to a VSAM cluster? You use the IDCAMS utility with the REPRO option. 4. What is an alternate index? An alternate index is another file related to the cluster, but sorted using an alternate key that can have duplicates. 5. How do you create an alternate index? You use the IDCAMS utility with the DEFINE AIX option after you build the cluster and then do another IDCAMS with the BLDINDEX option to populate the alternate index. 6. What parameter in the DEFINE AIX option is used to determine the maximum number of duplicate keys allowable? The RECORDSIZE parameter. There are 2 numbers that follow this: the 1st is the average and the 2nd is the maximum. The values are equal to 5 + (cluster key length) + N*(alternate key length), where N is the allowable number of duplicates. 7. Name a few common VSAM status codes. 00-OK 02-READ a duplicate alternate key 10-end of file reached while doing a READ 22-trying to WRITE a duplicate primary key 23-record not found while doing a READ 97-file integrity verified, do an IDCAMS VERIFY 8. What is buffering and how does it apply to VSAM files? When large blocks of data are used, more main storage is required than when smaller blocks are used, but large blocks save CPU time and disk space. Additionally, extra buffers may save elapsed time since the program does not have to wait for an I/O to complete for it to continue processing. In the JCL, you specify BUFNI (number of index buffers) and BUFND (number of data buffers) as sub-parameters of the AMP parameter. For random access, the BUFNI is one more than the number of index levels and a BUFND of 2 is fine. For sequential access, a BUFNI of 1 and a minimum of 5 for BUFND is fine. For dynamic access, the values of each is the higher of the numbers for either random or sequential. 9. What is IDCAMS ? IDCAMS is the Access Method Services program. You run the IDCAMS program and supply AMS commands thru SYSIN. (examples of AMS commands are DELETE, DEFINE, REPRO etc..). 10.Can AMS commands be run from the TSO prompt ?

Page 61 of 117

Yes 11.Syntax of AMS modal commands ? 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

20.What happens when you open an empty VSAM file in a COBOL program for input? A VSAM file that has never contained a record is treated as unavailable. Attempting to open for input will fail. An empty file can be opened for output only. When you open for output, COBOL will write a dummy record to the file & then delete it out. 21.How do you initialize a VSAM file before any operation? a VSAM with alternate index? Can write a dummy program that just opens the file for output & then closes it. 22.What does a file status of 02 on a VSAM indicate? Duplicate alternate key . Happens on both input and output operation 23.How do you calculate record size of an alternate cluster? Give your values for both unique and non-unique. Unique Case: 5 + ( alt-key-length + primary-key ) Nonunique Case: 5 + ( alt-key-length + n * primary-key ) where n = # of duplicate records for the alternate key 24.What is the difference between sequential files and ESDS files? Sequential(QSAM) files can be created on tape while ESDS files cannot. Also, you can have ALTINDEX for an ESDS while no such facility exists for QSAM files. 25.How do you load a VSAM data set with records ? Using the REPRO command. 26.How do you define a GDG ? Use the DEFINE GENERATIONDATAGROUP command. In the same IDCAMS step, another dataset must be defined whose DCB parameters are used when new generations of the GDG are created. This dataset is known as the model dataset. The ds name of this model dataset must be the same as that of the GDG, so use a disp of keep rather than catlg and also specify space=(trk,0) 27.Do all versions of the GDG have to be of the same record length ? No, the DCB of the model dataset can be overridden when you allocate new versions. 28.How are different versions of GDG named ? base-file-name.GnnnnnV00 where nnnn= generation number (upto 255). nnnn will be 0000 for the 1st generation.

Page 64 of 117

29.Suppose 3 generations of a GDG exist. How would you reference the 1 st generation in the JCL? Use GDG name(-2). 30.Suppose a generation of GDG gets created in a particular step of a proc. How would you refer the current generation in a subsequent step? What would be the disposition of this generation now? Relative generation numbers are updated only at the end of the job, not at the end of a step. To allocate a new generation, we would be using (+1) with a DISP of (NEW,CATLG,DELETE). To refer to this in a subsequent step in the same job, we would again use (+1) but with a DISP of SHR or OLD. 31.What more info you should give in the DD statement while defining the next generation of a GDG? Give (+1) as the generation number, give (new,catlg) for disp, give space parameter, can give the dcb parameter if you want to override the dcb of the model dataset. 32.Assuming that the DEFINE jcl is not available, how do you get info about a VSAM files organization ? Use the LISTCAT command. 33.During processing of a VSAM file, some system error occurs and it is subsequently unusable . What do you do ? Run VERIFY.

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

6. What functions are performed in the analysis phase? Identify the data and how it is tracked by the system. Determine all input that the system/application receives. Identify the data and product the system/application produces. Examine how the data is to be processed, system's/application flow of control, it's functions and it's interaction with external systems/applications. 7. What functions are performed in the design phase? File and database formats are designed. Programs modules are identified. Programs specifications are created. Reports and screens are designed. Functions required for batch production jobs are determined. 8. What functions are performed in the development phase? File layouts and database tables are created and populated with data. Programs are coded and UNIT tested. JCL jobs and procedures are developed. 9. Describe 3 types of testing that should be performed to bring a system into implementation? SYSTEM testing insures all programs in the system work together logically and effectively. USER ACCEPTANCE testing allows the users to perform tests on screens, analyze output and review reports to ensure that their requirements are met. INTEGRATION testing tests the system in combination with other systems to make sure it works as part of a complex whole. 10.What is regression testing? REGRESSION testing insures that the tests originally conducted on a program and/or system before it was approved for production is repeated to make sure the results are the same. 11.How do you define a structured program? A program that's divided into paragraphs which perform specific functions. One main paragraph controls the processing of other paragraphs and the entry and exit points of the program. The program can be read in sequence from top to bottom. All paragraphs are performed. Branching or the use of GO TOs are avoided except when going to an EXIT paragraph in a PERFORM A-para THRU B-exit. 12.What are the contents of a program specification document? The program spec contains the program name, program type (online or batch), the names and layouts of files and/or tables used and created,

Page 67 of 117

pseudo-code that summarizes processing, screen layouts and report formats. 13.What steps are involved in implementing a system? Establish naming conventions for files, programs, screens, reports and jobs. Develop run documentation for jobs run by the scheduler. Replace test data with production data for files and tables. Identify users and necessary security issues. Move all programs, screens, reports and jobs to production libraries. Create problem resolution procedures (rerun/restart instructions). 14. What documents are created during the system life cycle and what is their purpose? Requirements Specification, Analysis document, Design document and System Test Plan. Documents are signed by the user which ensures that at each phase the system is fulfilling the requirements. 15.What does the term legacy mean? Legacy indicates before client-server technology 16.Describe client-server architecture. The basic characteristics of client/server architectures are: 1) combination of a client or front-end portion that interacts with the user, and a server or back-end portion that interacts with the shared resource. The client process contains solution-specific logic and provides the interface between the user and the rest of the application system. The server process acts as a software engine that manages shared resources such as databases, printers, modems, or high powered processors. 2) the front-end task and back-end task have fundamentally different requirements for computing resources such as processor speeds, memory, disk speeds and capacities, and input/output devices. 3) the environment is typically heterogeneous and multivendor. The hardware platform and operating system of client and server are not usually the same. Client and server processes communicate through a well-defined set of standard application program interfaces (API's) and RPC's. 4) An important characteristic of client-server systems is scalability. They can be scaled horizontally or vertically. Horizontal scaling means adding or removing client workstations with only a slight performance impact. Vertical scaling means migrating to a larger and faster server machine or multiservers. A two-tier architecture is where a client talks directly to a server, with no intervening server. It is typically used in small environments (less than 50 users). A common error in client/server development is to prototype an application in a small, two-tier environment, and then scale up by simply adding more users to the server. This approach will usually result in an ineffective system, as the server becomes overwhelmed. To properly scale to hundreds or thousands of users, it is usually necessary to

Page 68 of 117

move to a three-tier architecture. A three-tier architecture introduces a server (or an "agent") between the client and the server. The role of the agent is manifold. It can provide translation services (as in adapting a legacy application on a mainframe to a client/server environment), metering services (as in acting as a transaction monitor to limit the number of simultaneous requests to a given server), or intelligent agent services (as in mapping a request to a number of different servers, collating the results, and returning a single response to the client. 17.What are the pros and cons of client-server applications vs. mainframe applications? Maintenance of mainframe systems are more difficult, timely and costly. Mainframe software require expensive maintenance contracts and annual software licenses. End users don't have free access to corporate data and to get reports on the data, they must go through IT. Most organizations have more than one mainframe. Usually, data can't be shared among the host computers, leading to a rekeying of data and data duplication. It tends to be very good at managing high-volume transaction processing environments and safeguarding an organization's information assets. The major advantages of host-based computing are reliability and security. You can rely on most mainframes for 99.99% uptime, and because they're centrally administered by IS, they're far more secure than today's PC LANs. Mainframes run most of the world's large OLTP (online transaction processing) systems. Client/server will save money, increase worker productivity, boost profits, and achieve competitive advantage. It allows end user to access data and use the same tools they use every day,typically spreadsheets and word processors. Client/server architecture has its disadvantages, too. One of the biggest problems facing client/server technology is its high level of complexity. Instead of an application being designed in the traditional style, as one program that handles both the user interface and data access, a client/server application must be split into separate programs that operate independently of one another while being able to communicate with each other to carry out their assigned tasks. The trend is moving towards E-commerce applications wherein businesses conduct everything on the internet, but security issues have to be addressed before this becomes a viable option.

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

Issue a CICS SYNCPOINT command so that CICS's dynamic log is updated. 26.What is the difference between GN calls with no SSAs (an unqualified SSA) and a qualified SSA? GN calls with no SSAs will successively retrieve every segment in the database in hierarchic sequence. It will successively retrieve every segment of a particular segment type. GN calls with a qualified SSA will successively retrieve only those segments of a particular segment type that meet the qualifying criteria. 27.What happens if you end a CICS program without terminating the PSB? If so, why bother to terminate the PSB at all? The PSB will automatically terminate when the tasks ends. If you have a longrunning task, you may want to free up IMS resources before the task ends. 28.What is an ACB? The ACB (Access Control Block) is an expansion of information in a PSB. It is used to enable IMS to quickly access the information it needs from the database. 29.Is the ACB built before a batch program is run? Not usually. Generally, the ACB is built at execution time by IMS before the batch program runs. However, the ACB can be prebuilt by the DBA before execution time-but slightly different JCL must be used to execute the program. 30.How does a CICS program gain access to the ACB? When you schedule a PSB (IMS function "PCB"), you are actually accessing the ACB. 31. What do you have to do to your program when the program's PSB is changed? Nothing, unless the change directly affects what you are doing in the program (secondary index access, etc.). 32.Can you fully qualify SSAs with a GN call? Yes. 33.What is the difference between this and a GU call with fully qualified SSAs? A GU call will always position you at the first segment which matches the qualification, whereas successive GN calls will position you to the next matching segment.

Page 73 of 117

34.Can you "back up" in an IMS database? No. You must use either a GU or a GN with a command code of F (First) to go to the first entry of the segment type, and then use successive GN commands to get to the segment you want. 35.Are duplicate keys allowed in an IMS database? Yes. If so, how do you access the segment you want? If you know the segment you want is the first or last duplicate, you can use the command codes of F (First) or L (Last) to retrieve the segment you want. If not, you must access the duplicates via successive GN calls. 36.What is an IO-PCB? An IO-PCB is used in IMS/DC programs and to establish checkpoints in batch programs (via the CHKP call). If it exists in the PSB, it is always the first PCB. 37.How do you restore database position after a checkpoint is taken? Via an XRST call (checkpoint restart). 38. What information does IMS return in the DL/I Interface Block (HighLevel Interface)? Translator version, status code, segment name, segment level, key feedback length. 39.What information does IMS return in the PCB mask (Call-Level Interface)? Database name, segment level, status code, processing options, (DL/I reserved area), segment name, key feedback length, key feedback area. 40.If you use a concatenated key to restore position, will it also restore parentage? Why should this matter? No. It matters because a subsequent GNP call may fail or give unexpected results. 41.How would you retrieve the last segment under a particular parent segment? Use a GNP call with a command code of L (Last). 42.How do you establish accessibility to IMS databases in a CICS program? 1-Schedule the PSB (use "PCB" call) and check UIBFCTR (1st part of UIBRCODE) for LOW-VALUES to make sure that the scheduling call was successful.

Page 74 of 117

CALL 'CBLTDLI' USING DLI-PCB PSB-NAME BLL-UIB or ADDRESS OF DLIUIB. For COBOL : 2-Move UIBPCBAL to 01 level in the LINKAGE SECTION containing as many S9(08) COMP fields as the PSB has PCBs. 3-Move PCB addresses (from the individual COMP fields described in item 2) to their appropriate BLL cells in the LINKAGE SECTION. For COBOL II : 2-Move UIBPCBAL to ADDRESS of 01 level in the LINKAGE SECTION containing as many S9(08) COMP fields as the PSB has PCBs. 3-Move PCB addresses (from the individual COMP fields described in item 2) to their appropriate ADDRESS of PCBs in the LINKAGE SECTION. Note: Each PCB defined in the LINKAGE SECTION is composed of a 10-byte filler followed by a 2-byte status code. The program should then check the PCB status code for every operation just like in a batch program. 43. What does it mean when you get a return code of AM on an ISRT call? How would you solve this problem? It means that the PSB does not give the programmer permission to perform the ISRT. The problem can be solved either by using another PSB that does have the necessary authority or by getting the DBA to give the PSB a processing option of "I" on the segment. 44.What is the difference between a GN and a GNP call? A GN is a general-purpose retrieval call, which can be used for a variety of successive accesses depending on the SSAs and command codes used. A GNP is a special-purpose retrieval call which is used to retrieve successive segments after position on a "parent" segment has been established by a "GU" or "GN" call (GNP calls do not affect parentage.). 45.What must you do before issuing an REPL or DLET requeStatement? You must first successfully retrieve and lock the segment(s) with a "Get Hold" call (GHU, GHN, GHNP). (Note: with the High-Level Interface, a "Get" call (GU, GN, GNP) is acceptable.). 46.What does a processing option of "A" in a PCB mean? It means that the PCB will allow the program to perform all of the basic I/O operations (Get, Insert, Replace, Delete). 47. What happens when you try to replace key data in a segment? How do you get around this problem? The call fails (with a return code of "DA"). You get around this problem by first deleting the original segment, and then reinserting it with the new key

Page 75 of 117

value. 48.What is a logical relationship? 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

By coding an EXEC CICS START in the application program. By coding the transaction id and a trigger level in the DCT (automatic task initialization) By coding the trans id in the EXEC CICS return command. By associating the attention key with the PCT. By embedding the trans id in the first four positions of a screen sent to the terminal. By using the Program List Table. 8. How does CICS use the PCT table? After a user enters a trans-id, CICS goes to the Program Control Table(PCT) and finds that trans-id in the table. The table entry also contains the name of the program that executes when that trans-id is entered. 9. How does CICS use the PPT table? After finding the program in the PCT, CICS goes to the Program Processing Table. It finds the program name in the table. Associated with the program name is the location of the program; on disk or in storage. If the program is already in storage, CICS starts the task. If not, CICS gets the program(load module), loads it into storage and starts the task. The PPT entry is changed from on disk to in storage. 10.What is the purpose of PLT? PLT records are the set of application programs that will be executed automatically at CICS start-up time 11.What is the system transid CEMT? CEMT is the master terminal transaction that lets you display and change the CICS environment 12.What is a mapset? It is a collection of BMS maps link edited together. 13.How do you load a new version of your program or mapset? CEMT Set PROGram(programname) NEwcopy 14.How do you close a VSAM file in CICS? CEMT Set DA(filename) CLOsed 15.How about disabling a transaction so no one can use it?

Page 80 of 117

CEMT Set TRANS(transid) Disabled 16. What happens if you are testing a transaction and it goes into a loop or is running too slow, how do you cancel it so you can re-logon and re-test it again after the program logic is fixed? Go find another terminal and after identifying the task associated with your test transaction, issue this command: CEMT Set TAsk(tasknumber) FOrcepurge You can further disable the transaction so no one can use it until the program is fixed. 17.If a user erases a field (ERASE-EOF), the flag field is reset from LOWVALUES to HEX 80 when a RECEIVE MAP is issued. How can this present a problem and how can it be avoided? The flag field is a redefines of the attribute byte field. When you issue a SEND MAP, the attribute is set to HEX 80 which will present problems. This can be avoided by always moving LOW-VALUES to the symbolic map. 18.What is the EIB field that identifies the key pressed by the terminal user? EIBAID 19.What is the EIBAID and where is it stored? EIBAID identifies which PF or AID key was pressed by the user. It's stored in the execute interface block (EIB). 20.What's the difference between accessing linkage section fields using COBOL and COBOL II? COBOL uses the ADDRESS command to load the address of a field into a BLL cell and then issues a SERVICE RELOAD command which identifies the name of the field the BLL cell is pointing to. COBOL II uses ADDRESS OF to set the address of the field. 21.Explain how a program receives data from the terminal. The user enters data and presses a PF key. The program issues a RECEIVE MAP command which retrieves the data and places it in the format defined by the symbolic map. 22.A RECEIVE MAP is issued while both HANDLE AID and HANDLE CONDITION are in effect. A MAPFAIL condition occurs as a result. Which one is processed if an AID key is pressed? The HANDLE AID command has priority and is processed and the HANDLE CONDITION is ignored. 23.In a BMS macro, what are the 3-macro instructions?

Page 81 of 117

DFHMSD - (MSD-mapset definition) defines a mapset, which is a collection of BMS maps link-edited together. DFHMDI - (MDI-map definition individual) identifies each map within a mapset. DFHMDF - (MDF-map definition field) identifies each field/literal and it's characteristics within a map. 24.What is the difference between the XCTL and LINK commands? The LINK command passes control to another program at the next lower logical level and expects to return control back (using a RETURN command) to the LINKing program. The XCTL command transfers control to another program at the same logical level and does not expect control back. 25.What happens to the resources supplied to a transaction when an XCTL command is executed? How about LINK? With an XCTL, the working storage and the procedure division of the program issuing the XCTL are released. The I/O areas, the GETMAIN areas, and the chained Linkage Section areas (Commarea from a higher level) remain. All existing locks and queues also remain in effect. With a LINK, however, program storage is also saved, since the transaction expects to return and use it again. 26.How is LINK different from a CALL statement? The CALL statement is faster because CICS is not involved, however a LINK has its advantages: It automatically provides addressability to the EIB and you don't have to link-edit the subprogram together with the invoking program (STATIC Linkage) using OS COBOL. With COBOL II, you can dynamically invoke a subprogram that's not linkedited to the main program. In this case, LINK and CALL are almost the same except for the addressability problem when resolving abends. 27. What will happen if you issue an XCTL or a LINK and the called program cannot be found? If found, what other problems might occur? You will get a PGMIDERR condition. When a program is found, you might encounter a NOTAUTH condition which means security was not properly set up for your ID to access that program. 28. What CICS table must be updated before running a CICS program accessing DB2 data? The Resource Control Table (RCT) must be updated with the CICS transaction and its DB2 application plan. 29. In a CICS program that uses DB2, do you use the COMMIT/ROLLBACK commands or SYNCPOINT commands?

Page 82 of 117

SYNCPOINT. CICS takes control. 30.Describe the function of the SYNCPOINT command? SYNCPOINT alone makes all updates permanent. However, SYNCPOINT ROLLBACK reverses all updates. 31.What 2 CICS commands will cause DB2 to commit updates? RETURN and SYNCPOINT. 32.What is the function of CICS translator? Converts the EXEC CICS commands in to call statements for a specific programming language. (Assembler, PL/I and COBOL) 33.What are the two types of interfaces provided by the CICS application programs? Command Level and Macro level 34.What is the function of the DFHMDF macro? It defines the fields, literals, and characteristics of a field. It is part of the DFHMDI macro. 35.Explain 3 ways to position the cursor on a screen. 1) Static positioning: Code the IC (Insert Cursor) option in the DFHMDF field attribute in the BMS macro together with a SEND MAP. 2) Symbolic positioning: Move -1 or high-values to it's field length in the symbolic map together with a SEND MAP using the CURSOR option. 3) Relative positioning: With the SEND MAP command using the CURSOR option followed by a number equal to (row-1)*80 + (column-1) enclosed in parenthesis. 36.If IC is specified for more than one field than where the cursor will be positioned? At the last field with the IC. 37.A program is invoked without a communication area, what does that mean? It means that this is the first time the program is executed. The first thing a program should check for is if EIBCALEN is equal to zero (first time entry). 38. What is the advantage of defining a one-byte dummy field on a map with the attributes: DRK, PROT, FSET? Avoids receiving a map with no data. The map will always have at least one byte of data. This avoids a MAPFAIL condition on a RECEIVE MAP when no

Page 83 of 117

data has been entered and a ENTER or PF key is pressed. 39.Of the following keys, which transmit data? ENTER, PF, PA, ERASEEOF? The ENTER and PF keys transmit data while the PA and ERASE-EOF keys do not. 40. What are the advantages of using EIBAID over HANDLE AID when determining which key was pressed by the user? EIBAID follows structured methodology while HANDLE AID forces the use of sections and GO TOs. If data from the map is not needed (the user pressed PF3 to exit), you don't have to issue a RECEIVE MAP command with EIBAID usage but you must with HANDLE AID. 41.What are Modified Data Tags (MDT)? The last bit in the 8-bit attribute byte which indicates whether the user has modified the field with a value of 1. 42. What do you have to do to determine if screen data was sent from a specific field? You have to check if the MDT is turned on in that field's attribute byte. 43.Name 3 ways the MDT can be turned on. 1-When the user enters data into the field. 2-When the application program moves the DFHBMSFSE (MDT on) to the attribute byte. 3-By defining it as part of the DFHMDF attribute in the BMS macro definition. 44. A RECEIVE MAP is issued while both HANDLE AID and HANDLE CONDITION are in effect. A MAPFAIL condition occurs as a result. Which one is processed if an AID key is pressed? The HANDLE AID command has priority and is processed and the HANDLE CONDITION is ignored. 45.In a BMS macro, what are the 3 macro instructions? DFHMSD - (MSD-mapset definition) defines a mapset which is a collection of BMS maps link-edited together. DFHMDI - (MDI-map definition individual) identifies each map within a mapset. DFHMDF - (MDF-map definition field) identifies each field/literal and it's characteristics within a map. 46.How are the physical and symbolic maps defined?

Page 84 of 117

In the DFHMDI macro, if you specify TYPE=MAP physical map and TYPE=DSECT symbolic map will be produced. 47.What is the difference between a physical map and a symbolic map? The physical map is a load module defined in the PCT that defines how the screen looks; headings, field locations, attributes, etc. You have to do a NEWCOPY every time you do a BMS macro assembly to pick up all map changes. The symbolic map is a COBOL copy member that enables you to access the fields, attribute bytes, field length on the map through your program. 48.What 3 commands can be used to transfer program control? XCTL, RETURN and LINK. 49.What is the difference between PROT and ASKIP attributes? PROT and ASKIP make the field protected so that data cannot be entered. ASKIP causes the cursor to skip over the field and proceed to the next field. 50. What's the difference between specifying FSET on a field and just turning the MDT bit ON by the program? None. Both methods enable data to be transmitted back to the program whether or not the field was changed preventing a MAPFAIL condition. 51.What is a MAPFAIL? When an application program issues an RECEIVE MAP and there is no data sent back from the terminal. 52.On a data entry screen, what attributes are given to a field that's in error? BRT to highlight the field in error and moving -1 to the field length to position the cursor to the field for correction. 53. Name 6 other ways to start a CICS transaction other than by keying in the Transaction ID at the terminal? 1-by coding a START in the application program. 2-by coding the trans id and a trigger level on the DCT table. 3-by coding TRANSID in the RETURN command. 4-by associating an attention key with the Program Control Table. 5-by embedding the TRANSID in the first 4 positions of a screen sent to a terminal. 6-by using the Program List Table which records the set of application programs that will be executed at CICS start-up time. 54.What is the difference between the XCTL and START commands?

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

61.Can application uses a HANDLE AID ENTER (main-logic) and the HANDLE CONDITION ERROR (abort-rtn) commands. If the program issues a RECEIVE MAP and a MPFAIL condition occurs, which process will take control of the main-logic or abort-rtn? Main-logic will receive control because HANDLE AID has priority over HANDLE CONDITION. 62. How many conditions can you include in a single HANDLE CONDITION command? No more than 16 in a single handle condition. If you need more, then you must code another HANDLE CONDITION command. 63. What is the difference between an HANDLE CONDITION and an IGNORE command? A HANDLE CONDITION command creates a "go to" environment while the IGNORE command does not. Instead, it gives control back to the next sequential instruction following the command causing the condition. They are opposites. 64.What happens when a CICS command contains the NOHANDLE option? No action is going to be taken for any exceptional condition occurring during the execution of this command. The abnormal condition that occurred will be ignored even if an EXC CICS HANDLE condition exists. It has the same effect as the IGNORE condition except that it will not cancel the previous HANDLE CONDITION for any other commands that follow. 65.What happens when a CICS command contains the RESP option? No action is going to be taken for any exceptional condition occurring during the execution of this command. When an abnormal condition occurs, the CICS response code is a field in the program work area and can be checked later (usually at the next sequential instruction). This is the better than HANDLE CONDITION because exception handling is isolated to where a condition occurred thus making the program easier to read and maintain. 66. What's the difference between using HANDLE CONDITION and RESP to handle exceptional conditions? The HANDLE CONDITION command must be issued before the CICS command is executed. The DFHRESP commands are issued right after the CICS command is executed. 67.What is the HANDLE ABEND command?

Page 87 of 117

It allows the establishing of an exit so cleanup processing can be done in the event of abnormal task termination. 68. When a task suspends all the handle conditions via the PUSH command, how does the task reactivate all the handle conditions? By coding a POP HANDLE command. 69.What is the difference between the INTO and the SET option in the RECEIVE MAP command? The INTO option moves information in the TIOA (terminal I/O area) into the reserved specified area, while the SET option simply returns the address of the TIOA to the specified BLL cell or "address of" a linkage section. 70.Define the functions of Basic Mapping System (BMS). BMS allows the application to be device-independent. It translates the formatted data stream, thus enabling the application to reference data by symbolic labels. 71.What is a Skipper Field? When defining a field using DFHMSD if you specify in the ATTRIB option ASKIP, the cursor will skip the field to the next unprotected field. This is a skipper field. 72. Suppose you have a field in a map named ACCTID, and you want it bright. Explain how you can do this during the execution of the application. By moving either DFBMBRY (bright only) or DFHBMASB (askip bright) to the ACCTIDA field in the symbolic map. 73.What are the commands for sending and receiving data to the terminal? SEND and RECEIVE 74.what is the command used to send text to the screen without BMS? SEND TEXT 75.what is the command used to send a logical message, which contains more than one physical screens? SEND PAGE 76. Reducing the data traffic is a very important factor in an on-line environment. Explain the difference between the MAPONLY and DATAONLY options in the SEND MAP command.

Page 88 of 117

A vast majority of maps are defined as input/output. Therefore, to reduce data transmission the first a map is sent, you should use MAPONLY because this will set up the initial template on screen. After that, the application needs to send only the variable data in the symbolic map using DATAONLY. 77. If you're issuing a SEND MAP command to display edited data, do you use the MAPONLY or DATAONLY option? You use the DATAONLY option to display data from the symbolic map. 78.What happens if neither MAPONLY nor DATAONLY are specified? Constant data from the physical map combined with the variable data from the symbolic map are both sent, causing an increase in data transmission. 79. When you are sending your first data screen to the terminal, it is recommended that you also specify the ERASE option. Why? If you do not include the ERASE option, the data sent will be combined with previous material from the terminal. An ERASE will clear the screen first before sending your data thus doing a fresh screen overlay. 80.What happens if ERASEAUP was used instead of ERASE? Four things happen: 1-all MDTs are cleared. 2-the keyboard is unlocked. 3-all unprotected fields are erased. 4-the cursor is positioned at the first unprotected field. 81. How do you specify in your program, which fields are not to be sent to a map (terminal)? By moving low-values to those fields before doing a SEND MAP command. 82.What is the function of the Terminal Control Table (TCT)? The TCT defines the characteristics of each terminal with which CICS can communicate. 83.Assume trigger level 1. When a record is written to TDQA, say transaction A is started. While this task is running, application writes another record to the TDQ. Will this result in CICS starting another task of transaction A, while the first task is still running? When the number of entries (created by the writeq td commands issued by one or more programs) in the queue reaches the specified trigger level, a task specified in the definition of the destination is automatically initiated. Control is passed to a program that processes the data in the queue 84.What is automatic task initiation?

Page 89 of 117

CICS tasks can be automatically initiated by specifying a certain trigger level and when trigger level is reached, by writing the specified number of records into the TDQ, the transaction will be started automatically. For this there should be an entry in the DCT 85.What are Modified Data Tags (MDT)? The last bit in the 8-bit attribute byte, which indicates whether the user has modified the field with a value of 1. 86.What do you have to do to determine if screen data was sent from a specific field? You have to check if the MDT is turned on in that field's attribute byte. 87.Name 3 ways the MDT can be turned on. 1-When the user enters data into the field. 2-When the application program moves the DFHBMSFSE (MDT on) to the attribute byte. 3-By defining it as part of the DFHMDF attribute in the BMS macro definition. 88.Which CICS system program is responsible for handling the automatic task initiation (ATI)? Transient Data Program (TDP) 89.What are the differences between a Temporary Storage Queue (TSQ) and Transient Data Queue (TDQ)? 1-Temporary Storage Queue names are dynamically defined in the application program, while Transient Data Queues must first be defined in the DCT (Destination Control Table). 2-When a TDQ (intrapartition) contains a certain amount of records (trigger level), a CICS transaction can be started automatically using ATI (automatic transaction initiation) while a TSQ cannot. This type of TDQ is actually a VSAM file called DFHNTRA. 3-TDQ (extrapartition) may be used by batch applications while TSQ cannot. This type of TDQ is actually a QSAM file. 4-You may update an existing item in a TSQ while a TDQ cannot. 5-TSQ records can be read randomly. TDQ records can only be read sequentially. 6-TSQ records can be read more than once while TDQ records cannot. With TDQs, it is "one read" only and once read it is deleted from the destination. 90.What will happen if a task issues a DELETEQ TD against an Extrapartition Transient Data Queue? An invalid request exceptional condition will occur. The default action is that the task will be terminated.

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

108. What happens when an application issues a GETMAIN command to obtain main storage and the SHARED option is specified? There is no automatic release of the obtained storage at the end of the task which requested it. 109. Which CICS program is responsible for the management of the Dynamic StorageArea (DSA)? The Storage Control table. 110. How can an application release main storage acquired by a GETMAIN command? BY coding a FREEMAIN command with the data. SYNCPOINT will also release the storage area. 111. How do you release page buffers? By issuing a FREEMAIN command. 112. What is the function of the REQID in the STARTBR command?

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. What is the function of the RESETBR command?

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 two types of TDQs?

Intra-partition and Extra-partition TDQ. 116. what are the differences between intra and extra partition TDQs?

Intra-partition TDQ - read or write by the program in the same CICS system Extra-partition TDQ - used by the applications outside of the CICS system. 117. When debugging a CICS application, why would you use the CEBR transaction? To view the contents of the TSQ or TDQ.

Page 93 of 117

118.

What is the function of the CEDA transaction?

Its is used to perform the Resource Definition On-line operation (RDO). It adds, deletes, and changes table entries. 119. What command is used to update an existing record in a KSDS VSAM file? REWRITE. 120. What command is used to update an existing record in a TSQ?

WRITE command with rewrite option and itemnumber. 121. How about updating a TS queue record?

Use the WRITEQ TS command with the ITEM option followed by the item number together with the REWRITE option. 122. What is the purpose of the BIF DEEDIT command?

To remove all characters other than digits from an alphanumeric field. Remaining digits will be right-justified and padded with zeros as necessary. 123. What is the Base Locator for Linkage (BLL) used for?

It is used to address storage outside of the working-storage section of the application program. A set of BLL cells is also known as the parameter list. It is used (explicitly) in COBOL II, although the BLL cells can be found in the TGT of a COBOL II program. 124. Explain the term "transaction routing".

It is a CICS mode of intercommunication which allows a terminal connected to a local CICS to execute another transaction owned by a remote CICS. Explain the term "function request shipping". It is one of the CICS modes of intercommunication which allows an application program in a local CICS to access resources owned by a remote CICS. 125. Explain the term "MRO" (multi-Region Operation).

It is a mechanism by which different CICS address spaces within the same CPU can communicate and share resources. 126. If the length of the text specified in the INITIAL option of the DFHMDF macro exceeds the length specified in the LENGTH option what will happen? The excess length will be truncated.

Page 94 of 117

127. If, when executing a "READ INTO" command, the length of the actual variable length record exceeds the length specified in the LENGTH option, what will happen? You will get a LENGERR. 128. When a second READ with the UPDATE option is given against the same file in the same task prior to releasing the file, what will happen? 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. What is the function of the File Control Program?

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. Which command will terminate a VSAM mass insert operation?

UNLOCK.

Page 95 of 117

135. Which command(s) will deblock DAM files? DEBKEY will deblock by key. DEBREC will deblock by relative record number. 136. What could cause you to get an INVREQ when building a logical message to a screen? You have changed the disposition specified while building a logical message. 137. What command would you use if you wanted to discontinue building a logical message? You would issue a PURGE MESSAGE command. 138. What does the BMS ROUTE command do? It initiates the building of a logical message that will be scheduled for delivery to one or more terminals. 139. Can you intermix a SEND TEXT and a SEND MAP when building portions of a logical message? No. 140. What do you have to do to determine if data was sent from a specific field in a screen? Check the MDT of the attribute byte for that field. 141. What would happen if you issued a READNEXT TS command and there were no more data in the queue? You get an ITEMERR. 142. You have a DL/I file and you want to issue a READPREV. Will it work correctly? You can only issue a READPREV against a VSAM file. 143. Can you issue a BROWSE command in a CICS program that is pseudo-conversational? Yes, but the BROWSE will terminate at the end of each task in the session (it will not carry over). 144. What are 2 ways to setp up a browse starting with the first record in the file? 1-set the complete key equal to hex zeros or low-values (the default is GTEQ). 2-You can specify KEYLENGTH(0) and GENERIC options.

Page 96 of 117

145. In a VSAM file, when you want to do a mass delete, the file has to be unprotected. How can you specify to the system that a file is unprotected? In the FCT, you set LOG=NO. 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. Is it possible to submit a TSO batch job from CICS? If so how?

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. Explain reusability and reentrancy.

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. What is Asynchronous Processing?

Asynchronous Processing allows a CICS application program in a local system to initiate a remote transaction(s), which are owned, by the remote system. 161. What is transaction Routing?

Transaction Routing facility allows the terminal connected to a local system to run remote transactions which are owned by remote CICS system in the remote CICS system. 162. What is a relay program?

The relay program is a CICS supplied program for administrating transaction routing and it resides in the local system. When a transaction is entered in the local terminal, if the transaction is owned by the remote system, the relay program sends a request to the remote system to initiate the transaction in the remote system and receives all the responses and gives it back to the local terminal. 163. What is distributed transaction processing?

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. What are mirror transactions?

They are transactions supplied by the CICS for administration function request shipping and they reside in the remote system. When the remote receives the function request shipped by the local system, it initiates a corresponding mirror transaction for the function requested. The mirror transaction decodes the function request and issues the actual CICS command. 165. What are the remote system resources that are available to the local system? The resources available are VSAM files, DL/I databases, TDQs and TSQs. 166. What is Extended Recovery Facility? (XRF)

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. 168. What are the 3 ways to start a CICS system? Warm - CICS will start itself with certain system information and resources carried over from the previous CICS execution, which have been completed successfully. Cold - CICS system control tables will be completely initialized irrespective of the previous system activities and CICS system start with the cleanest resources. Emergency - If the previous CICS execution was terminated abnormally an emergency system restart will take place. This will reposition the system log at the very last second before termination and read the system log backwards and will copy the log records of all the in-flight tasks into the recovery dataset. 169. What are in-flight tasks?

Page 100 of 117

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.

Page 101 of 117

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}

Page 102 of 117

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

Page 103 of 117

U0273 - I/O ERROR DETECTED WHILE REPOSITIONING A GSAM DATASET DURING RESTART. U0295 - SORT-X PROGRAM LOADED USING WRONG EXECUTE. U0402 - PROBABLE IMS PROBLEM, TRY RESTARTING. U0428 - PSB NOT DEFINED AS AN IMS BMP/CONTACT DBA IN MORNING. U0437 - APPLICATION GROUP NAME OR RESOURCES SPECIFIED ARE NOT VALID FOR DEPENDENT REGION MAY NEED 'AGN=' PARAMETER, SEE MEMBER '#RACF'. U0452 - PSB CONTENTION / 2 DB JOBS DEALLOCATING AT SAME TIME. IF YOU GET MORE THAN 2 U0452 ABENDS, RESTART THE TRANSACTION (SIGN ON IMS AND /STA TRAN DB????CP) (SAME NAME AS PSB) U0456 - PSB IS STOPPED, /STA PROG ALL, STARTS ALL STOPPED PSB'S. SEE 'CMISCOP.UCC7.SCHEDULE(CA7OS) FOR HOW TO DISPLAY IMS INFO. U0458 - DATABASE IS STOPPED/CONTACT DBA ON CALL, UNLESS B/U'S ARE RUNNING. U0474 - CANCELLATION OF JOB THROUGH /STOP REGION ABDUMP U0476 - PSB OR PCB PROBLEM - CALL PROGRAMMER. U0519 U0522 - JOB TIMED OUT WAITING FOR A TAPE MOUNT. U0688 - LOST IMS FROM THE MIX, CHECK WITH OPERATIONS ON STATUS. U0775 - ISOLATION DEADLOCK - CONTENTION TRY RESTARTING 3 OR 4 TIMES, BEFORE CONTACTING CARDS ON CALL FOR THE JOB. 1 TIME IN 10,000 TOTAL MIX HAS CAUSED THE POOL TO BE FILLED MORE TIMES THAN NOT A PROGRAM HAS GONE BESERK, NOT CHECKPOINTING OR NOT CHECKPOINTING ENOUGH. LENGTH OF TIME TO BACK OUT SHOULD BE A POINTER TO THE PROBLEM JOB. U0777 - IMS CONTENTION/RESTART JOB LATER. U0811 - POINTER PROBLEM. U0844 - DATA BASE IS FULL, NOTIFY DBA. U0849 - NOT LISTED IN IMS MSG & CODES, BUT A RESTART CAN WORK - AN 849 ABEND IS CAUSED BY AN ILLEGAL DATASHARE OF A DATABASE. U0850 - DATA BASE ERROR, NOTIFY DBA.

Page 104 of 117

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

Page 105 of 117

U3708 * NO THREADS AVAILABLE U3710 - BAD INPUT U3710 * CHECK SPIE AREA; SPIE 0007 DATA EXCEPTION SPIE M004 ADDRESS EXCEPTION SPIE 0001 PSB ERROR, USE WRONG PROC ON SHR/BTCH COMPILE U3714 - MIRROR TASK ABEND * ATCH- SYSTEM HUNG SO IT DUMPED PGM, TRY AGAIN * AXFN- NO PGM GEN FOR PSB, OR USED PROD PSB IN TEST * 775 - ENQUE FILE FULL * 828 - INSERTING A DUPLICATE SECONDARY INDEX, DBA CAN FIX * 844 - DATABASE IS FULL, CALL DBA * 850 - DATABASE POINTERS ARE BAD, CALL DBA U3717 * PCB NOT DEFINED IN PSB. U3718 * NO FUNCTION CODE. U3723 * REASON=801 PSB NOT IN ACB LIBRARY. REASON=805 PSB NOT SCHEDULED/ DB NOT AVAILABLE REASON=828 TRYING TO INSERT DUPLICATE SECONDARY INDEX REASON=8FF DLI NO ACTIVE. U3734 * INCREASE REGION U4015 - BAD GNP CALL (GET NEXT PARENT)

System codes

SA14-04 MAY BE CONTENTION - TRY RESTARTING ONCE ACCORDING TO INSTRUCTION SA78-10 MAY BE CONTENTION - TRY RESTARTING ONCE ACCORDING TO INSTRUCTION. SA0A * INACTIVE PGM OVERRIDES FREE AREA, AREA TO BE RELEASED OVERLAPS * A FREE AREA. * INITIATOR FAILURE. SB0A * COBOL - CONTROL PASSED BEYOND END OG PGM DUE TO INVALID PERFORM. SB14 * ERROR ATTEMPTING TO CLOSE A PDS OPENED FOR OUTPUT TO A MEMBER. * THE STOW ROUTINE, WHICH PLACES THE MEMBER NAME IN THE DIRECTORY FAILED BECAUSE NO SPACE WAS LEFT IN THE DIRECTORY OR THE NAME ALREADY EXISTS OR AN INCORRECTABLE I/O ERROR OCCURED. * AN ATTEMPT IS BEING MADE TO ALLOCATE A PDS AND ADD A MEMBER FROM AN INVALID COBOL COMPILATION. SB37 - SPACE - NEED TO INCREASE SPACE ON THE SORTED OUTPUT DATA SET. * ALSO CAN MEAN IT COULDNT FIND ENOUGH SPACE ON THE VOLUME TO * ALLOCATE THE 15 EXTENTS OF SECONDARY. * IF JOB HAS THIS TYPE OF JCL - EXEC SORT,REGION=2M,PARM='CORE= 500K',CYL=50, AND JOB FAILS WITH RC16, INCREASE SORT SIZE BY IN CYL=XX TO INCREASE THE SORT WORK SIZE. THERE WILL BE NO SORT WORKS IN THE JCL ITSELF TO INCREASE. * SOME DM* JOBS ALLOCATE SPACE IN KILOBYTES IE SPACE=(1,(1500,500)),AVGREC=K SC03 - USER FILE HAS NOT BEEN CLOSED, NOTIFY DESIGNER. * FILE STATUS=92 OPENED FILE, DIDNT READ, TRIED TO REWRITE. SC13 * ERROR DURING OPEN PROCESSING. AN I/O ERR WAS FOUND OR THE SVC

Page 106 of 117

* ROUTINE WAS UNABLE TO LOCATE A CONCATENATED PARTITIONED DATASET. * THIS COULD BE AN ATTEMPT TO OPEN CONCAT. PDS FOR OUTPUT. * IT COULD ALSO BE THE FORMAT 1 DSCB COULD NOT BE LOACTED IN THE * VTOC OF THE DASD REFERENCED. SC78 - NOT ENOUGH C-POOL AVAIL NOT ENOUGH VIR STORAGE AVAIL. SD00 * NEEDS LARGER REGION. SD37 * MORE SPACE NEEDED IN SPACE PARM. THERE WAS NO SECONDARY SPACE * SPECIFIED. SE37 - SPACE PROBLEM - IF DSN IS A FOCUS D/S - TRY COMPRESSING THE DSN THRU 3.1. * THIS RESULTS WHEN AN OUTPUT PDS FILLS UP ITS SPACE. IT ALSO * HAPPENS WHEN THE PDS CANT ACQUIRE ITS 15 EXTENTS ON ONE VOLUME. * A PDS CAN NOT SPAN MORE THAT ONE VOLUME. SFFF PROBABLE CONTENTION - RESTART JOB SF13 * A SUPERVISOR CAL (SVC) INSTRUCTION CONTAINED AN INVALID OPERAND * OR THE SVC INSTRUCTION CALLED WAS NOT INCLUDED IN THE OPERATING * SYSTEM. THIS OCCURS DURING OPEN PROCESSING. IT COULD BE A PDS * MEMBER COULD NOT BE FOUND, OR CONFLICTING OR MISSING DCB PARMS. * INVALID PARMS PASSED TO SUPERVISOR CALL ROUTINE. SF22 * I/O TIME ESTIMATE EXCEEDED. SF2D * OVERLAY SUPERVISOR - INVALID SUPERVISOR CALL * BAD LOAD MODULE, RE-LINKEDIT MODULE. SF37 * INPUT/OUTPUT ERR IN END-OF- VOLUME PROCESSING OR END-OF-VOLUME * COULD NOT FIND A REQUIRED DATASET CONTROL BLOCK(DSCB). IT COULD * BE NO DSCB COULD BE FOUND FOR A CONCATENATED DSN ON DASD, OR * AN INVALID PARM WAS PASSED TO END-OF-VOLUME SVC (SVC 55). IT * COULD ALSO BE AN I/O ERROR READING A FORMAT DSCB OR READING * VOLUME LABEL ON THE SECOND VOLUME. S001 - I/O ERROR * WRONG LENGTH RECORD OR PHYSICAL BLOCK * NO END OF FILE MARKER * ATTEMPT TO READ RECORD AFTER END-OF-FILE CONDITION FOUND * HARDWARE ERROR * TRIED TO WRITE ON AN INPUT FILE * INCORRECT USE OF BLOCK CONTAINS CLAUSE - COBOL * SECONDARY SPACE TO SMALL- (LIKE SB37) * TAPE BEING READ IN WRONG DENSITY * TRTCH PARM WAS WRONG * RECFM V IS INCOMPATIBLE WITH TRTCH ET S001 * IF USING VSAM FILES IT COULD BE ONE OF THE FOLLOWING: 1) NO INVALID KEY CONDITION ON RANDOM PROCESSING. 2) KEY IS WRONG IN THE FD STATEMENT. S001-1 WRONG RECORD LENGTH OR BLOCKSIZE. S002 - RECORD LENGTH--ALSO CHECK FOR SQL CODE IN OUTPUT. S002-OC FILE BLOCKED TOO LARGE, EXCEEDS TRACK CAPACITY. * WRONG RECFM OR BLOCKSIZE IN JCL S013 - CONFLICTING OR UNSUPPORTED PARAMETERS IN DCB * BLOCKING IN PROGRAM=0; MUST HAVE BLOCKSIZE IN JCL. * FILE LENGTH DIFFERENT THAN DEFINED IN PROGRAM * MEMBER NAME SPECIFIED IN DD COULD NOT BE FOUND. * NO BLKSIZE/DCB SPECIFIED FOR A DUMMY DD. ** WHEN EXECUTING IEBGENER WITH SYSUT1 IS DD DUMMY, FOLLOWED BY

Page 107 of 117

SYSUT2 CREATING NEW DS, THE DCB INFORMATION MUST BE IDENTICAL. * JCL - TRIED TO CREATE A PDS WITHOUT ALLOCATING DIRECTORY BLOCKS S013-18 CANNOT FIND FILE, MAYBE EXECUTING WRONG PGM. * CANNOT FIND FILE LARGE, EXCEEDS TRACK CAPACITY S013-20 BLKSIZE NOT A MULTIPLE OF LRECL OR WRONG DSN. S013-60 NEED 'FB' IN DCB (RECFM=FB) S016 - SORT-X PGM; JCL DOES NOT CONTAIN SORT FIELDS S031 - I/O ERROR UNDER - PHYSICAL DAMAGE TO RECORDING MEDIUM INDEXED SEQUENTIAL - OUT OF SEQUENCE KEY WHEN LOADING AN ACCESS (QISAM) ISAM DATA SET - WRONG LENGTH RECORD OR BLOCK S03A - INCREASE REGION S03B - ERROR IN OPEN - DATA SET HAD NOT BEEN CREATED PROCESS FOR AN - DATA CONTROL BLOCK HAD NOT BEEN CLOSED INDEXED SEQUENTIAL AFTER DATA SET CREATED DATA SET - ERROR IN LRECL OR BLKSIZE S03D - ERROR IN OPEN - INDEXED SEQ ORGANIZATION NOT SPECIFIED PROCESS FOR AN IN DSORG OF DCB, REQUIRED EVEN IF INDEXED SEQUENTIAL SPECIFIED IN SOURCE PROGRAM DIRECT DATA SET - NOT ALL VOL-SER NUMBERS SPECIFIED OR INCORRECT SEQUENCE S04E - CONTENTION WITH ANOTHER JOB. - - - WHEN THE JOB IS A DB2 IMAGE COPY RESTART THE JOB FROM THE TOP ONLY WHEN THE MESSAGE AT THE BOTTOM OF OUTPUT READS RESOURCES UNAVAILABLE....JOYCE DILVER.... S062 - RETURN CODE EQUAL TO OR GREATER THAN VALUE OF NULL ARGUMENT PRODUCED S0B0 - I/O ERROR ON SYSTEM JOB QUEUE S0C1 - OPERATION EXCEPTION * A MISSING OR MISSPELLED DD. * DATASET WAS OPEN OR CLOSED WHEN AN INPUT/OUTPUT INSTRUCTION * WAS ISSUED FOR IT. IT SHOULD HAVE BEEN THE OPPOSITE. * BAD LOAD MODULE OR OBJECT DECK. * FORTRAN- MISSING DIMENSION STATEMENT, SAME NAME FOR ARRAY AND A * SUBROUTINE. * COBOL- USING SORT VERB, DDNAME WAS NOT SORTOUT WHEN THE GIVING * OPTION WAS USED. * COBOL- SUBROUTINE PROG ID WAS THE SAME AS THE ENTRY NAME. * COBOL- TRIED TO CALL WITHIN COBOL F SORT I/O PROCEDURE. * COBOL- TRIED TO CALL A SUBROUTINE WHICH COULDNT BE FOUND. S0C2 - PRIVILEGED OPERATION EXCEPTION * COBOL- MISSING PERIOD AT END OF PARAGRAPH OR PARAGRAPH NAMES. * COBOL- MISSING GOBACK AFTER SORT VERB - LOGIC FELL INTO * INPUT PROCEDURE. * A MISSING OR MISSPELLED DD. * DATASET WAS OPEN OR CLOSED WHEN AN INPUT/OUTPUT INSTRUCTION WAS ISSUED FOR IT. IT SHOULD HAVE BEEN THE OPPOSITE. S0C4 - PROTECTION EXCEPTION * INDEXING (SUBSCRIPTING) OUTSIDE THE PGM'S ASSIGNED LIMITS. * UNITIALIZED INDEX. * A MISSING OR MISSPELLED DD. * AN ATTEMPT TO READ AN UNOPEND INPUT FILE. * BLOCKSIZE AND RECORD SIZE BEING SPECIFIED AS = FOR VARIABLE LENGTH RECORDS

Page 108 of 117

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

Page 109 of 117

(UNIT=AFF=DDNAME) DEFERRED MOUNTING IS IMPLIED AND NO SPACE IS ALLOCATED. S214 - TAPE POSITIONING OR INVALID DISP - HARDWARE DEVICE DIFFICULTIES - BAD PHYSICAL SPOT ON RECORDING MEDIUM - NO TAPEMARK FOLLOWING DATA - DATA OBLITERATION S222 - OPERATOR CANCELED S228 - STORAGE VIOLATION - PROGRAM MIGHT HAVE BEEN COMPILED USING WRONG RMODE, AMODE. S237 - ERROR AT END OF VOLUME. S237-08 MAY BE CAUSED BY INTERNAL AND EXTERNAL TAPE LABEL NOT MATCHING, TRY WHATTAPE ON TAPE NUMBERS PRIOR AND RIGHT AFTER MISMATCHED TAPE. * BLOCK COUNT WRONG ON TRAILER LABEL. * VOL=SER SPECIFIED WRONG IN JCL. * TAPE BLOCK COUNT DIDNT AGREE WITH DCB BLOCK COUNT, POSSIBLE SKIPPED BLOCK DUE TO HARDWARE ERROR. S306 - THIS CAN HAPPEN IF A MEMBER GETS REMOVED FROM CICS LOADLIB SUCH AS CMSSGP.CICS.LOADLIB1 DAVE PADGETT CAN PUT THIS BACK ON THE APF LIST WITH A RESOLV COMMAND. CAN ALSO BE A RACF ABEND. (WILL SHOW MODULE XXXXXXXX NOT ACCESSED, USER UNAUTHORIZED. S314 - I/O ERROR READING DSCB. S322 - TIME OUT (CPU TIME LIMIT EXCEEDED), TRY ADDING TIME PARM 120 CPU MINUTES IS THE SYSTEM DEFAULT FOR EACH STEP IN A JOB. S400 - INVALID CONTROL - INVALID DCB PARAMETER BLOCK S413-08 I/O ERROR, RESTART JOB IN ABENDED STEP. * THE VOLUME COULDNT BE MOUNTED ON THE REQUESTED DEVICE. * THE VOLUME SERIAL # INCORRECT. * THE VOLUME SERIAL # WASNT SPECIFIED FOR AN INPUT DSN * VOLUME SEQUENCE # SPECIFIED IN CATLG OR JCL WAS GREATER THAN THE # OF VOLUMES CURRENTLY ALLOCATED TO THE DSN. S422 - JOB REQUIRED TOO MUCH SPACE IN SYSTEM JOB QUEUE. S437 - ERROR OCCURRED AT END OF VOLUME S428 - PSB AND REGION - IF PSB 'T' REGION = I003 INCOMPATIBLE - IF PSB 'P' REGION = I002 S513 - ERROR AT OPEN FOR TAPE DATA SET ON TAPE VOLUME. * ASSIGNMENT OF TWO DATASETS TO THE SAME TAPE DEVICE. S522 - TIME OUT (TASKS IN JOB STEP IN WAIT STATE DUE TO UNATTAINABLE RESOURCE E.G, PHYSICAL DEVICE, DATA SET, CPU) * PROGRAMMED TIMED OUT WAITING FOR TAPE MOUNT S606 - NOT ENOUGH MAIN STORAGE WAS AVAILABLE TO LOAD PROGRAM S60A * NEEDS MORE CORE S613 - TAPE OR CARTRIDGE POSITION ERROR * MISSING DCB . * DENSITY IS WRONG. * RECFM=F IN JCL WHEN FILE IS ACTUALLY FB S637 - I/O ERROR DURING END-OF-VOL; SEE SPECIFIC RETURN CODES IN IEC026I BOOK. * CONCATENATED DSNS HAVE UNLIKE ATTRIBUTES. I BOOK. S706 - THE REQUESTED LOAD MODULE WAS MARKED BY THE LINKAGE EDITOR AS NOT EXECUTABLE... S713 - ERROR DURING OPEN DUE TO EXPIRATION DATE VIOLATION.

Page 110 of 117

S714 - UNCORRECTABLE I/O ERROR OCCURRED IN TAPE LABEL PROCESSING (CRIMP IN TAPE, TAPE LABEL DESTROYED OR WRITTEN INCORRECTLY). S722 - TIMEOUT (OUTPUT LIMIT REACHED, JOB EXCEEDED NUMBER OF ALLOWABLE LINES) S737 - ERROR DURING END-OF VOLUME OR DURING ALLOCATION OF SECONDARY DASD SPACE AS REQUESTED IN SPACE PARM OF DD, POSSIBLY NEEDS MORE SPACE. * CONCATENATED DSN CANT BE FOUND. S755 - ENQUE FILE FULL - TOO MANY ENQUES (GET HOLD, ETC.) S775 - NO THREADS - SYSTEM SHUTTING DOWN -TRY LATER S80A - ERROR DURING GETMAIN - TRY INCREASING REGION PARM. 4096K OR 7M. 8M IS MAX BUT SHOULD EXERCISE CAUTION IN USING PER JOHN SHULTZ. 0 USES WHATEVER'S NEEDED, LIKE A 1440 PARM. S804 * NEEDS LARGER REGION SIZE. S806 - REQUESTED MODULE NOT FOUND / PROGRAM PROBLEM * MISSING STEPLIB OR JOBLIB CARD? * OBJECT PROGRAM NOT FOUND S813-04 TAPE MOUNTED DOES NOT HAVE DSN THAT THE JCL IS LOOKING FOR (COULD BE 2 TAPES WITH THE SAME INTERNAL NUMBER) S822 - REGION UNAVAILABLE (LIKE IN REGION=6M) - SYSTEM ERROR IN INITIATOR U11STEP (USUALLY IN CHANGE ACCUMS); REGION UNAVAILABLE, ERROR CODE=20 - TRY RESUBMITTING S837 - VOLUME COUNT PARM INSUFFICIENT VOL=(,,,10) (LABEL=TAPE,VOL=(,,,99) CAN SOMEONE EXPLAIN THE LABEL= TAPE PARM????? S850 USER ABEND ISSUED BY IMS. DATA BASE POINTER ERROR WHEN READING FROM A REGION NOT THE UPDATING REGION. CALL DBA. DATA BASE NEEDS TO BE DEALLOCATED AND REALLOCATED S678 - NEEDS REGION PARM ADDED ON JOB CARD (REGION=7M) S878 - VIRTUAL STORAGE REQUESTED NOT AVAILABLE. - TRY INCREASING REGION PARM. 4096K OR 7M. 8M IS MAX BUT SHOULD EXERCISE CAUTION IN USING PER JOHN SHULTZ. 0 USES WHATEVER'S NEEDED, LIKE A 1440 PARM. ADD REGION=4096K ON JOB CARD OR STEP. S90A * TRYING TO CLOSE A CLOSED FILE OR OPEN AN OPENED FILE. S913-38 ICH408I INSUFFICIENT AUTHORITY RACF

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

Page 111 of 117

R/C 16 WHEN EXECUTING SYNCSORT,PARM='RC16=ABE' JOB WILL RETURN CODE 16. MAX TO BOTTOM TO SEE IF ABEND IS EXPLAINED. * IF JOB HAS THIS TYPE OF JCL - EXEC SORT,REGION=2M,PARM='CORE= 500K',CYL=50, AND JOB FAILS WITH RC16, INCREASE SORT SIZE BY IN CYL=XX TO INCREASE THE SORT WORK SIZE. THERE WILL BE NO SORT WORKS IN THE JCL ITSELF TO INCREASE SPACE.

File status codes

I/O STATUS '35' DDNAME MISSING (COBOL II). I/O STATUS '37' CHECK FD RECORD LENGTH AGAINST DCB LENGTH (COBOL II). I/O STATUS '39' CHECK BLOCK CONTAINS CLAUSE IN FD (COBOL II). I/O STATUS '46' READ PAST END OF DATA ON FILE (COBOL II). I/O STATUS '47' READ AFTER FILE CLOSED (COBOL II). I/O STATUS '48' WRITING TO FILE OPENED AS INPUT. FILE STATUS '92' 1. ANY I/O REQUEST AGAINST A FILE THAT IS NOT OPEN. 2. ANY I/O REQUEST THAT IS NOT ALLOWED FOR THE OPTION THAT WAS SPECIFIED WITH THE OPEN STATEMENT. (I.E. READ A FILE OPENED AS AN OUTPUT OR REWRITE A FILE OPENED AS INPUT). 3. ANY WRITE OR REWRITE OF A RECORD WHOSE LENGTH IS GREATER THAN THE MAXIMUM SIZE SPECIFIED IN THE FD (DCB). 4. ANY ATTEMPTED ACTION ON A FILE AFTER END-OF-FILE CONDITION HAS OCCURED.

SQL return codes

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.

Page 112 of 117

90M - STOPPED UTILITY, UTILITY IS ACTIVE; CK. IF IMAGE COPIES ARE RUNNING. RESTART AFTER IMAGE COPIES COMPLETE. -904 - DB2-TABLE IS DOWN CONTACT SYSTEM DEV. (RESOURCE UNAVAILABLE) OR CAN BE A TEMPORARY CONTENTION - RESTART LATER. -911 - RESOURCE CONTENTION, RESTART AFTER JOB CAUSING CONTENTION ENDS -913 - RESOURCE CONTENTION, RESTART AFTER JOB CAUSING CONTENTION ENDS -04E - DATA PROBLEM OR DB2 INTERNAL ERROR -818 - BIND PROBLEM, RELATED TO PRODUCTION UPDATES. -923 - DB2 CONNECTION DOWN, CHECK STATUS OF DB2 PRODUCTION -924 - DB2 CONNECTION INTERNAL ERROR = OPERATIONS CHECK SUBSYS DB2 CAF ERROR: DB2 CONNECTION LIMIT HAS BEEN REACHED = TOO MUCH RUNNING IN DB2; RESTART AFTER ANOTHER DB2 JOB ENDS

Miscellaneous codes and messages PATTERN DSCB NOT FOUND IN VTOC -IF GDG WITH DISP=NEW,CATLG,DELETE, GDGMODEL MUST BE INCLUDED IN DCB= SUCH AS DCB=(GDGMODEL,RECFM=FB,ETC. NO PRIMARY VOLUME AVAILABLE MSG - NO VOLUME'S AVAILABLE WITH ENOUGH SPACE FOR RECALL. NO STORAGE VOL - VOL=PRIV ASSUMED - UNABLE TO ALLOCATE -- CHECK JCL FOR (SPGGRP,9); SPGGRP (OR OTHER ESOTERIC) MAY HAVE DECREASED NUMBER OF VOLUMES. SPGGRP HAD BEEN DECREASED TO 8 CAUSING THIS JCLERR. ALLOCATION FAILED DUE TO DATA FACILITY SYSTEM ERROR IGD17273I ALLOCATION HAS FAILED FOR ALL VOLUMES SELECTED FOR DATA SET ..NAME IGD17277I THERE ARE (XX) CANDIDATE VOLUMES OF WHICH XX ARE ENABLED OR QUIESCED.. THIS IS BASICALLY THE SAME AS SPACE REQUESTED NOT AVAILABLE. TRY DECREASING SPACE ALLOCATION PER GENE WILL 02/10/91, AND LET JONES & CO KNOW OF THIS SORT OF ABEND DURING WORK HOURS UNLESS UNABLE TO RESOLVE. **UPDATE 06/15/91 - TO DD STATEMENT ADD STORCLAS=NONSMS, IE UNIT=SYSDA,STORCLAS=NONSMS,SPACE=(ETC), THEN CHANGE/ADD USER=TTSVDMP, PASSWORD=???????? TO JOB CARD TO RESTART PER JOHN SHULTZ. 01/11/92 - CHANGING TO UNIT=(SPGGRP,3) CAN WORK. KDF 03/21/92 - OR ADDING MORE SORTWORKS. KDF

CICS abend codes

ADCA - PSB MAY NOT BE IN SYNC WITH THE SOURCE PROGRAM CHECK THAT THE DATABASE BEING CALLED IS REF-

Page 113 of 117

ERENCED IN THE PSB. ADCC - HAVE SYSTEMS MANAGEMENT RECYCLE DBCTL IN THE REGION THAT THE ABEND IS OCCURRING. IF THIS FAILS THEN CALL TECH SUPPORT ADLA - POSSIBLY DATABASE FULL, CALL DBA. THIS IS A GENERAL IMS FILE REGION ABEND CODE. PROGRAMMER CAN PULL DUMP USING CICS TRANS SP31 WHERE TASK=CSM5 / ABEND=ADLA / REGION=FILE REGION REGISTER 1 WILL CONTAIN IMS ABEND CODE (IN HEX). CORRESPONDING CICS AZI6 DUMP WILL TELL WHICH DATA BASE. ADLC - PROGRAM TRIED TO ACCESS A DATABASE THAT IS DISABLED. ADLF - DL/I CALL MADE FOR A DATABASE, BUT THE LINK TO THE SYSTEM ON WHICH IT RESIDES IS DOWN, CALL DBA. ADLG - ERRORS IN THE DL/I ARGUMENT LIST. (VERIFY PCB IS SCHEDULED) AEIP - CICS INVREQ CONDITION - IF USING LOGICAL PAGING CHECK TO SEE IF A MAP W/O PAGING WAS SENT AFTER ACCUM PAGING INITIATED. AEIV - LENGERR - INVALID LENGTH ON SEND, RECEIVE, AND OTHER VERBS AEXT - DB2 NOT COMPILED WITH DL/I OPTION TURNED ON AEY9 - DB2 HAS COME DOWN AND BACK UP BUT HAS NOT BEEN RE-ATTACHED. TRY ATTACHING BY CODING: IN CICS4 - "DSNC STRT 5" AKCS - DEADLOCK TIMEOUT. AICA - RUNAWAY TASK CONDITION, POSSIBLE LOOP. APCT - REQUESTED MODULE CANNOT BE LOCATED IN THE PPT OR ENTRY DISABLED (MODULE NOT FOUND IN THE LOAD LIBRARY). ASRA - USUALLY DATA EXCEPTION ERROR. ATNI - CICS DECIDES IT NEEDS TO ABEND THE TRANSACTION. COULD BE: INCORRECT DEFINITION IN TCT. INVALID DATA STREAM FOR DEVICE TYPE. AZI2 - TOO MANY DATABASE CALLS, NOT TAKING CHECKPOINT (CHECK TO SEE IF IN LOOP WITH DL/I CALLS). AZI4 - INTERREGION COMMUNICATION REQUEST CAN NOT BE COMPLETED BECAUSE THE OTHER SYSTEM HAS BECOME UNAVAILABLE. AZI6 - TIME OUT, PROGRAM MAY BE IN A LOOP. ISRT WITH SECONDARY INDEX THAT EXISTS RATHER THAN AN 'II' STATUS CODE. DATA BASE POINTER PROBLEM - INTER-REGION READ. RELATED TO BUFFERS. THIS IS A GENERAL ABEND CODE, OFTEN ACCOMPANIED BY AN ADLA ABEND FOR THE FILE REGION (SEE ADLA). 1009 - COBOL 2 ABEND - WORKING STORAGE TOO LARGE, COB2 ALLOWS FOR VERY LARGE WS BUT CICS STILL LIMITS AT 64K. 1011 - COBOL 2 ABEND - INDICATES USE OF ACCEPT, DISPLAY, ETC. INVALID VERB. APLC - SHARED LIBRARY FACILITIES ARE REQUIRED BY THE

Page 114 of 117

PROGRAM, BUT WERE NOT INCLUDED IN THE CICS SYSTEM DURING INITIALIZATION/INSTALLATION. APLD - ERROR DURING TRANSMISSION OF A RECORD TO THE CPLD QUEUE. APLE - ERROR DURING PL1 PROGRAM MANAGEMENT (EQUAL TO 4000 NON CICS ABEND) APLG - A GET STORAGE REQUEST TO THE STORAGE ALLOCATION ROUTINE SPECIFIED A SIZE > THAN CICS/OS/VS PERMITTED MAX (65,496) EITHER A BASED OR CONTROLLED VARIABLE THAT IS TOO LARGE IN AN ALLOCATE STMT, TOO MANY LARGE 'AUTOMATIC VARIALBES. APLI - ERROR DURING TRANSMISSION OF A RECORD TO THE CPLI QUEUE. APLM - NO MAIN PROCEDURE APLS - TERMINATION IS CAUSED BY THE 'ERROR' CONDITION, AND THE 'ERROR' CONDITION WAS NOT CAUSED BY AN ABEND (OTHER THAN AN ASRA ABEND). APLX - TOTAL POSSIBLE 'LIFO' STORAGE SEGMENTS HAVE BEEN EXHAUSTED. CHECK PROGRAM FOR LOOPS OR INCREASE THE 'ISASIZE' OR 'ISAINC'.

IMS abend codes

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

Page 115 of 117

PREVIOUSLY RETRIEVED BUT NOT COMMITED. DATA INTEGRITY NOT INSURED. - 0850 INTER-REGION DATA BASE BUFFER PROBLEM - 3303 SIMILAR TO 0805. DATA BASE OFFLINE IN IMS - DATA SHARING DATA BASE MAY STILL BE AVAILABLE IN ONLINE REGION. 3042 RUNNING INVALID PROC IN JCL (EXAMPLE TRYING TO EXECUTE DB2 IN PROC THAT DOES NOT SUPPORT IT OR TRYING TO EXECUTE BMP PROC FOR DB2) 3601 LIB POINTED TO BY IMS DD COULD NOT OPEN 3602 BLDL REQUEST FAILED FOR PSB 3603 REQUESTED PSB COULD NOT BE LOADED 3604 MISSING DDNAME ON GSAM FILE 3610 LOOK AT YOUR RESTART 3611 GSAM PSB IN USER LIST INVALID 3612 ERROR DURING EXTENDED CHKPT CALL 3613 ERROR DURING USER CALL TO GSAM DATABASE 3614 ERROR DURING PURGING GSAM BUFFERS AT CHKPT 3620 ERROR IN A RECURSIVE CALL TO CADDRPE DURING EXTENDED RESTART 3707 CICSXXX NOT AVAILABLE CLASS NOT = J FOR TEST SHARE BATCH CLASS NOT = K FOR PROD SHARE BATCH - 0101 SAVEAREA TOO SMALL - 0102 NO RESTART RECORD - DELETE CC505 3710 ABEND WITH USER CODE, CHECK SPIE AREA - 0001 PSB ERROR; WRONG PROC OR COMPILE - 0004 ADDRESS EXCEPTION - 0007 DATA EXCEPTION 3711 CICS NOT UP 'KILLER' PROGRAM - NEED MORE CHKPTS 3714 - AXFN NO PROGRAM GEN OR TEST PSB - ADLF CICS FILE REGION IS DOWN - DFH2 POSSIBLE CHKPT QUEUE CONTENTION - 775 ENQUE FILE FULL - 828 INSERTING DUPLICATE SECONDARY INDEX - ADLA/844 DATABASE FULL, CHECK SECONDARY INDEX - 850 BAD DATA BASE POINTERS - 852 BAD DATA BASE POINTERS - 853 INDEX POINTER PROBLEM - 913 INSUFFICIENT ACCESS 3717 PCB NOT DEFINED IN PSB OR INVALID DLI ARGUMENT LIST. CHECK 'LANG' PARM IN JCL CHECK LANGUAGE PARAMETER IN CICS SHARED BATCH PROC. REMEMBER DEFAULT IS PL/1. 3723 - 801 PSB NOT IN TABLES - 803 PSB ALREADY SCHEDULED - 805 PSB NOT IN ACBLIB OR DATA BASE OFFLINE - 806 PROGRAM NOT IN TEST LOAD LIB. CHECK 'MBR=' AND RECOMPILE. - 828 INSERTING DUPLICATE SECONDARY INDEX.

Page 116 of 117

4036 S322 S522 S722 S878 S1320 U0102 -

U0437 -

U0456 -

U0688 U1904 -

INVALID LANG PARM IN JCL - PROGRAM IS PL/I, LANG PARM IS 'C'. EXCEEDS TIME PARAMETER OPERATOR DID NOT MOUNT TAPE ON TIME. OUTLIM EXCEEDED NEED TO INCREASE CORE. BLOW UP TAKING CHKPT, NEED MORE REGION RESTART FAILED BECAUSE IMS CANNOT FIND RESTART INFO ASSOCIATED WITH CHECKPOINT ID. CHECK FOR LOW-VALUES IN RESTART RECORD. APPLICATION GROUP NAME OR RESOURCES SPECIFIED ARE NOT VALID FOR DEPENDENT REGION * MAY NEED 'AGN=' PARAMETER, SEE MEMBER '#RACF'. PSB NEEDS TO BE RESTARTED - SCHEDULING FOR TEST PSBS RUNNING IN IMS3 (USING PROC I003BMP OR I003DB2), GET INTO DBAE IN TSO, USE OPTION STARTPSB. OR PSB NOT NEW COPIED IN IMS (FOR TEST CHECK DB15563P FOR TEST PSB JOB THAT SHOULD RUN AT 10, 12, 2 AND 4) RUNNING 2 REGIONS IN 1 JOB. CHKPT UTILITY RECORD NOT CREATED

Page 117 of 117