COBOL and JCL Programming Quiz
Test your knowledge of COBOL programming syntax, file operations, and JCL job control language on IBM mainframe systems
Questions
Maximum number of partitioned datasets that can be concatenated
- 16
- 255
- 289
- 75
maximum number of exec statements that can be coded in a single JCL
- 125
- 1024
- 225
- 255
How do you access a file that had a disposition of KEEP?
- Need to supply volume serial no. VOL=SER=xxxx
- No need of volume serial no
- Cannot access the file
- None
What will happen if we try to create GDG (+2) generaton instead of (+1) generation, when GDG(0) is ***.G0001V00?
- ***.G0003V00
- ***.G0002V00
- gives error
- none
We can code instream data in a PROC.
- True
- False
What does TIME=1440 mean ?
- no CPU time limit is to be applied to this step
- CPU time limit is 1440
- Cannot code like that in JCL
- None
Which one of the following is a function of the JOB statement?
- Contains documentation information only
- Identifies the program to be run
- Identifies data sets to be used during the job
- Identifies the job name and specifies accounting information
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
- 2
- 3
- 4
Which of the following equations are correct?
- DISP=(,PASS) is equivalent to DISP=(NEW,PASS,KEEP)
- DISP=(,,KEEP) is equivalent to DISP=(NEW,DELETE,KEEP)
- DISP=(,,CATLG) is equivalent to DISP=(OLD,CATLG,CATLG)
- DISP=(OLD,,) is equivalent to DISP=(OLD,KEEP,KEEP)
An OPEN operation has been tried on file already opened.
- 6
- 42
- 41
- 16
Which of the following errors are possible within a COBOL if statement?
- Infinite loop
- logical error
- runtime error
- All of the above
You store it as YYYYMMDD in 8 bytes. What is the COBOL definition of this field?
- Pic Y(4)M(2)D(2)
- Pic date(yyyymmdd)
- Pic date(8)
- Pic X(8)
Which of the following words is NOT a COBOL reserved word?
- RECORD
- INDEX
- VARIABLE
- FILE
Which of the following words can NOT be used to perform calculations in a COBOL program
- ASSIGN
- DIVIDE
- MULTIPLY
- ADD
When is a scope terminator mandatory?
- in-line PERFORMS
- EVALUATE
- IF
- all
How many file open modes are there?
- 2
- 3
- 4
- 5
In an EVALUTE statement is the order of the WHEN clauses significant?
- True
- False
Which all modes of opening is required when WRITE is used?
- Input
- Output
- Input-Output
- Extend
A space is required after the comma in the table reference. i.e. A(I, J). If the space is not present,
- compilation error
- no error
- depends on compiler
- none
What else can we code instead of STOP RUN in a stand-alone COBOL program to have the same functionality
- FINISH
- GO BACK
- STOP
- EXIT