COBOL and JCL Programming Quiz

Test your knowledge of mainframe COBOL programming, JCL concepts, VSAM data management, and mainframe utilities including abend codes, file operations, and COBOL language features

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

In what mode the file should be OPENed to Rewrite/ Delete records in a File?

  1. OUTPUT
  2. EXTEND
  3. I-O
  4. INPUT
Question 2 Multiple Choice (Single Answer)

02 A PIC 9(5)V99 VALUE 234.56. MOVE A TO B DISPLAY B If we want to display the content of A as "$ 234.56-", how should we declare the variable B?

  1. PIC $ZZZZ9.99-
  2. PIC $$$$9V99-
  3. PIC -$9(6).99
  4. PIC $9(6).99-
Question 3 Multiple Choice (Single Answer)

RESULT = 0 PERFORM VARYING C FROM 1 BY 1 UNTIL C = 6 COMPUTE RESULT = RESULT + 1 END-PERFORM What is the content of RESULT, after completion of above statements?

  1. 4
  2. 5
  3. 6
  4. 1
Question 4 Multiple Choice (Single Answer)

In a COBOL program, the following statements are coded: CALL 'PROGRAMB' USING A, B, C END-CALL. What is the significance of the END-CALL in the above CALL Statement?

  1. All the woking staorage variables in ProgramB will be initialized when the Program B execution is completed.
  2. Nothing will happen. It is just coded to indicate the end of CALL statement.
  3. Areas A, B and C will be initialized when the Program B execution is completed.
  4. None of the above
Question 5 Multiple Choice (Single Answer)

A COBOL Program (Program A) calls Program B. What will happen, If STOP RUN is issued at the end of Program B?

  1. The Control will come back to Program A.
  2. The control will NOT come back to Program A and Program B will terminates immediately at the STOP RUN Statement.
  3. Program B abends abnormally.
  4. Infinite Loop
Question 6 Multiple Choice (Single Answer)

What abend will be hit when a COBOL program is trying to move Alphabetic Data into Numeric fields?

  1. S0C1
  2. S0C4
  3. S0C7
  4. S0CB
Question 7 Multiple Choice (Single Answer)

Can we execute a COBOL program both from an Online Program (CICS) and Batch Program (JOB)?

  1. Yes, Always Possible
  2. Yes, Only when the COBOL program contains CICS and Batch common verbs/statements
  3. No. Never Possible
  4. None of the above
Question 8 Multiple Choice (Single Answer)

How many Bytes will be assigned for a field which is defined with S9(6) COMP usage?

  1. 2
  2. 4
  3. 6
  4. 8
Question 9 Multiple Choice (Single Answer)

How many bytes will be assigned to a field which is defined with USAGE POINTER?

  1. 4
  2. 6
  3. 8
  4. 10
Question 10 True/False

we can display the index variable like normal cobol variable

  1. True
  2. False
Question 11 Multiple Choice (Multiple Answers)

we will do the operations on the index variable using:

  1. PERFORM
  2. MOVE
  3. SEARCH
  4. SET
Question 12 True/False

INITIALIZE statement cannot load a variable-length table (one that was defined using OCCURS DEPENDING ON)

  1. True
  2. False
Question 13 True/False

STOP RUN statement closes all files defined in any of the programs

  1. True
  2. False
Question 14 Multiple Choice (Single Answer)

If STOP RUN is not coded in the program,

  1. Abend with S806
  2. Abend with U4095
  3. Abend with U4038
  4. Abend with S322
Question 15 Multiple Choice (Single Answer)

How is a new GDG coded

  1. 0
  2. +1
  3. -1
  4. None of the Above
Question 16 Multiple Choice (Single Answer)

Which of the following is not a modal command?

  1. a) IF
  2. b) THEN
  3. c) DO
  4. d) GOTO
Question 17 Multiple Choice (Single Answer)

Condiser the following statements REPRO can be used for X) Copy one flat to other flat file Y) Copy one PDS(all the members) to other PDS Z) Copy only one member from one PDS to other PDS

  1. a) All 3 statements are TRUE
  2. b) X and Y are TRUE
  3. c) X and Z are TRUE
  4. d) Y and Z are FALSE
Question 18 Multiple Choice (Single Answer)

Which VSAM clusters support only fixed length records?

  1. a) LDS
  2. b) RRDS
  3. c) ESDS
  4. d) KSDS
Question 19 Multiple Choice (Single Answer)

What is the DD statement for a output file?

  1. Code the DSN as PDS (member) with a DISP = OLD
  2. Code the DSN as PDS (member) with a DISP = SHR
  3. Code the DSN as PDS (member) with a DISP = NEW
  4. Code the DSN as PDS (member) with a DISP = MOD
Question 20 Multiple Choice (Single Answer)

What is S322 abend

  1. a) Indicates a space abend
  2. b) Indicates a regione abend
  3. c) Indicates a time out abend
  4. d) a and c