Tag: mainframe

Questions Related to mainframe

  1. A READ statement is missing in the MAINLINE section after the PERFORM.

  2. MAINLINE must not contain any statements other than the PERFORM statement.

  3. S-EOF-CHECK is not properly initialized prior to the PERFORM statement

  4. The line "SET S-END-OF-FILE TO TRUE" is not a valid statement.

  5. In working storage, an 88 level must be defined for values of S-EOF-CHECK other than 'N' and 'Y'.


Correct Option: C
  1. There should not be a hyphen between PROGRAM and ID.

  2. Line 0100 should be DIVISION-ID.

  3. The compiler shortened the program name to "AM822P11".

  4. Line 0200 should be PROGRAM IDENTIFICATION. AM822P115.

  5. The program name must not contain numbers.


Correct Option: C

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?

  1. 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.

  2. 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.

  3. 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.

  4. 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.


Correct Option: C
  1. 10 for sequential, 120 for VSAM

  2. 16 for sequential, 123 for VSAM

  3. 10 for sequential, 10 for VSAM

  4. 16 for sequential, 16 for VSAM


Correct Option: B
  1. The job can execute for 1440 CPU secs

  2. The job can execute for 1440 CPU minutes

  3. No CPU time limit to be applied

  4. None of the above


Correct Option: C