Mainframe: COBOL, CICS, and JCL Programming
Covers COBOL data types, storage, and control structures; CICS commands and error handling; and JCL job control procedures for mainframe systems programming.
Questions
How can return codes be tested before execution of a job step?
- Through the RC keyword
- Through the CODE keyword
- Through the COND keyword
- Through the RETURNCD keyword
What is concatenating?
- Overriding or adding procedures
- Logically connecting input datasets
- Overriding a called PROC dsname
- All of the above
How can values be passed from the job stream to an executable program?
- Through the PARM keyword
- Through the VALUE parameter
- Through the PGM parameter
- All of the above
Must tape dataset definitions include VOL=SER specifications?
- Yes
- No
- Only for uncataloged datasets
- Only for cataloged datasets
What is the length of DFHCOMMAREA
- 16Kb
- 32Kb
- 64Kb
- 1 MB
By which commad we test the map amd mapset individually
- CEMT
- CECI
- CEDF
- CEBR
by which command we switch amoung messages?
- CEMT
- CEBR
- CMSG
- CECKI
What error we get when we press enter with out entering any value in map
- MAPFAIL
- ASRA
- ASRB
- AEI9
how we position the cursor in a cics pogrem statically
- send map() cursor()
- cursor()
- send ()
- none of the above
How many bytes will a S9(8) COMP field occupy ?
- 9
- 4
- 8
- 5
How many bytes does a S9(7) COMP-3 field occupy
- 4
- 8
- 3
- 7
How many bytes does a S9(7) COMP-3 field occupy
- 4
- 8
- 3
- 7
How many bytes does a S9(7) SIGN TRAILING SEPARATE field occupy ?
- 7
- 8
- 9
- 4
What is the maximum value that can be stored in S9(8) COMP?
- 999999999
- 9999999
- 99999999
- 99999
What is the maximum size of a 01 level item in COBOL II?
- 16777215
- 16777200
- 1677250
- 16772150
05 FIELDA PIC XXXX VALUE 'ABCb'. 05 FIELDB PIC XXXX VALUE SPACES. .... MOVE FUNCTION REVERSE(FIELDA) TO FIELDB. Which one of the following is the content of FIELDB following execution of the MOVE statement shown in the sample code above?
- bABC
- bCBA
- bcba
- ABbC
- ABCb
Sample Code Field in working storage: 05 S-EOF-CHECK PIC X(01). 88 S-NOT-END-OF-FILE VALUE 'N'. 88 S-END-OF-FILE VALUE 'Y'. MAINLINE. SET S-END-OF-FILE TO TRUE PERFORM A0100-PRINT-DETAIL-AND-FOOTERS UNTIL S-END-OF-FILE END-PERFORM. Using the sample working storage and mainline section of a program, which one of the following is the coding error that occurred in the sample above?
- A READ statement is missing in the MAINLINE section after the PERFORM.
- MAINLINE must not contain any statements other than the PERFORM statement.
- S-EOF-CHECK is not properly initialized prior to the PERFORM statement
- The line "SET S-END-OF-FILE TO TRUE" is not a valid statement.
- In working storage, an 88 level must be defined for values of S-EOF-CHECK other than 'N' and 'Y'.
Sample Code 0100 IDENTIFICATION DIVISION. 0200 PROGRAM-ID. AM822P115. Referring to the sample code above, which one of the following statements is correct?
- There should not be a hyphen between PROGRAM and ID.
- Line 0100 should be DIVISION-ID.
- The compiler shortened the program name to "AM822P11".
- Line 0200 should be PROGRAM IDENTIFICATION. AM822P115.
- The program name must not contain numbers.
Table Definition Sample data shown below. 100 entries maximum. Data is ordered by item. Limit table size to actual data. Item Price D00025A 23.50 D00025B 29.50 D00025C 33.99 D00026A 11.20 Which one of the following is the proper COBOL description for the above table definition?
- 01 PRICE-TABLE. 05 PRICE-GROUP OCCURS 1 TO 100 TIMES ASCENDING KEY IS ITEM-CODE. 10 ITEM-CODE PIC X(7). 10 ITEM-PRICE PIC 99V99.
- 01 PRICE-TABLE. 05 PRICE-GROUP OCCURS UP TO 100 TIMES DEPENDING ON WS-ITEM-COUNT ASCENDING KEY IS ITEM-CODE. 10 ITEM-CODE PIC X(7). 10 ITEM-PRICE PIC 99V99.
- 01 PRICE-TABLE. 05 PRICE-GROUP OCCURS 1 TO 100 TIMES DEPENDING ON WS-ITEM-COUNT ASCENDING KEY IS ITEM-CODE. 10 ITEM-CODE PIC X(7). 10 ITEM-PRICE PIC 99V99.
- 01 PRICE-TABLE. 05 PRICE-GROUP OCCURS UP TO 100 TIMES DEPENDING ON WS-ITEM-COUNT AND KEY ITEM-CODE. 10 ITEM-CODE PIC X(7). 10 ITEM-PRICE PIC 99V99.
Sample code WORKING-STORAGE SECTION. 01 WORK-TABLE. 05 WK-ALPHA PIC A(2) VALUE 'AB'. 05 FILLER PIC X VALUE ''. 05 WK-ALPHANUM PIC X(4) VALUE 'CDEF'. 05 PIC X VALUE ''. 05 WK-NUM PIC 999. 05 PIC X VALUE '*'. PROCEDURE DIVISION. .... INITIALIZE WORK-TABLE. After execution of the statement in the sample code above, which one of the following values does WORK-TABLE contain? NOTE: b = BLANK or UNPRINTABLE HEXADECIMAL character
- bbbbbbbb0*
- ABCDEFbb0*
- ABbCDEFb000b
- bbbbbb000*