Tag: mainframe

Questions Related to mainframe

The following portion of procedure division MOVE 0 TO A, I. PARA-1. ADD 3 TO A. ADD 2 TO I. IF I < a=" ‘,">B MOVE A TO C ELSE MOVE B TO C. ADD C TO D. Indicate which one of the following does not support the above statements

  1. The value of A will be added to D only if A is greater than B.

  2. The value of B will be added to D only if B is greater than A.

  3. The larger of the values, A and B will be added to D.

  4. NONE


Correct Option: C

IF NOT AGE LESS THAN 30 AND 40 GO TO PARA-AGE-MIDDLES. The controls will go to the paragraph named PARA-AGE-MIDDLE.

  1. if AGE is greater than or equal to 40.

  2. If AGE is greater than or equal to 30.

  3. If AGE is greater than or equal to 30 but less than 40.

  4. If AGE is less than or equal to 30.


Correct Option: C
  1. it is used for individual data item in working-storage section.

  2. It is used for items with rename clause.

  3. It is used for a data item which redefines another data item.

  4. It is used for a condition name which can have either a true or false.


Correct Option: D
  1. IF A NOT = 1 OR 2 OR 3 MOVE A TO B.

  2. IF NOT A = 1 AND 2 AND 3 MOVE A TO B.

  3. IF A NOT = 1 AND 2 AND 3 MOVE A TO B.

  4. IF A NOT = 1 OR A NOT = 2 OR A NOT = 3 MOVE A TO B.


Correct Option: C

Determine the total number of bytes in the following. 01 REC-1. 02 FIRST-GROUP. 03 A1 PIC X(4). 03 A2 PIC 99. 02 REDEFINES FIRST-GROUP. 03 A3 PIC 999. 03 A4 PIC 999. 02 THIRD-GROUP. 03 A5 OCCURS 5 TIMES PIC 99.

  1. 22

  2. 16

  3. 12

  4. 14


Correct Option: B

AI Explanation

To determine the total number of bytes in the given structure, we need to consider the size of each field and group.

Let's go through each line to calculate the total number of bytes:

01 REC-1 - This is a level 01 group and does not contribute to the byte count.

02 FIRST-GROUP - This is a level 02 group and does not contribute to the byte count.

03 A1 PIC X(4) - This field has a length of 4 bytes.

03 A2 PIC 99 - This field has a length of 2 bytes.

02 REDEFINES FIRST-GROUP - This is a level 02 group and does not contribute to the byte count.

03 A3 PIC 999 - This field has a length of 3 bytes.

03 A4 PIC 999 - This field has a length of 3 bytes.

02 THIRD-GROUP - This is a level 02 group and does not contribute to the byte count.

03 A5 OCCURS 5 TIMES PIC 99 - This field occurs 5 times and each occurrence has a length of 2 bytes. So, the total length for this field is 5 * 2 = 10 bytes.

Adding up the byte counts for each field, we have:

4 + 2 + 3 + 3 + 10 = 22 bytes.

Therefore, the correct answer is A) 22.

Determine the bytes 01 REC-1. 01 A PIC X(6). 02 B REDEFINES A. 03 C OCCURS 6 TIMES PIC 9. 02 D OCCURS 4 TIMES. 03 E PIC X(5). 03 F PIC 999

  1. 38

  2. 44

  3. 14

  4. 12


Correct Option: A
  1. Subscripting enables us to write a more compact code in the procedure division.

  2. Subscripting enables us to refer to any element of a table by the same data name with the facility of identifying the particular element through the values of subscript

  3. Subscripting reduces the number of entries to be included in the data division.

  4. Subscripting enables us to use loops in the procedure division.


Correct Option: D
  1. The passing of job control information to the Job Entry Subsystem

  2. The addressing of input resources

  3. The performance of calculations

  4. The sending of an email to the person who submitted the job


Correct Option: A,B