COBOL and JCL Programming Quiz

Test your knowledge of COBOL programming syntax, file operations, and JCL job control language on IBM mainframe systems

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Maximum number of partitioned datasets that can be concatenated

  1. 16
  2. 255
  3. 289
  4. 75
Question 2 Multiple Choice (Single Answer)

maximum number of exec statements that can be coded in a single JCL

  1. 125
  2. 1024
  3. 225
  4. 255
Question 3 Multiple Choice (Single Answer)

How do you access a file that had a disposition of KEEP?

  1. Need to supply volume serial no. VOL=SER=xxxx
  2. No need of volume serial no
  3. Cannot access the file
  4. None
Question 4 Multiple Choice (Single Answer)

What will happen if we try to create GDG (+2) generaton instead of (+1) generation, when GDG(0) is ***.G0001V00?

  1. ***.G0003V00
  2. ***.G0002V00
  3. gives error
  4. none
Question 5 True/False

We can code instream data in a PROC.

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

What does TIME=1440 mean ?

  1. no CPU time limit is to be applied to this step
  2. CPU time limit is 1440
  3. Cannot code like that in JCL
  4. None
Question 7 Multiple Choice (Single Answer)

Which one of the following is a function of the JOB statement?

  1. Contains documentation information only
  2. Identifies the program to be run
  3. Identifies data sets to be used during the job
  4. Identifies the job name and specifies accounting information
Question 8 Multiple Choice (Single Answer)

During the course of a job, a program uses the output from a previous job step as its source data, and then creates a new data set and copies it to another storage device. How many DD statements would you find in the JCL for this job step?

  1. 1
  2. 2
  3. 3
  4. 4
Question 9 Multiple Choice (Multiple Answers)

Which of the following equations are correct?

  1. DISP=(,PASS) is equivalent to DISP=(NEW,PASS,KEEP)
  2. DISP=(,,KEEP) is equivalent to DISP=(NEW,DELETE,KEEP)
  3. DISP=(,,CATLG) is equivalent to DISP=(OLD,CATLG,CATLG)
  4. DISP=(OLD,,) is equivalent to DISP=(OLD,KEEP,KEEP)
Question 10 Multiple Choice (Single Answer)

An OPEN operation has been tried on file already opened.

  1. 6
  2. 42
  3. 41
  4. 16
Question 11 Multiple Choice (Single Answer)

Which of the following errors are possible within a COBOL if statement?

  1. Infinite loop
  2. logical error
  3. runtime error
  4. All of the above
Question 12 Multiple Choice (Single Answer)

You store it as YYYYMMDD in 8 bytes. What is the COBOL definition of this field?

  1. Pic Y(4)M(2)D(2)
  2. Pic date(yyyymmdd)
  3. Pic date(8)
  4. Pic X(8)
Question 13 Multiple Choice (Single Answer)

Which of the following words is NOT a COBOL reserved word?

  1. RECORD
  2. INDEX
  3. VARIABLE
  4. FILE
Question 14 Multiple Choice (Single Answer)

Which of the following words can NOT be used to perform calculations in a COBOL program

  1. ASSIGN
  2. DIVIDE
  3. MULTIPLY
  4. ADD
Question 15 Multiple Choice (Multiple Answers)

When is a scope terminator mandatory?

  1. in-line PERFORMS
  2. EVALUATE
  3. IF
  4. all
Question 16 Multiple Choice (Single Answer)

How many file open modes are there?

  1. 2
  2. 3
  3. 4
  4. 5
Question 17 True/False

In an EVALUTE statement is the order of the WHEN clauses significant?

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

Which all modes of opening is required when WRITE is used?

  1. Input
  2. Output
  3. Input-Output
  4. Extend
Question 19 Multiple Choice (Single Answer)

A space is required after the comma in the table reference. i.e. A(I, J). If the space is not present,

  1. compilation error
  2. no error
  3. depends on compiler
  4. none
Question 20 Multiple Choice (Single Answer)

What else can we code instead of STOP RUN in a stand-alone COBOL program to have the same functionality

  1. FINISH
  2. GO BACK
  3. STOP
  4. EXIT