COBOL and JCL Fundamentals
Test your knowledge of COBOL programming statements, data definitions, and JCL job control language used in mainframe environments.
Questions
Which of the following are syntactically correct? (1) 01 REC-1 PIC SX(4). (2) 01 REC-2 PIC S9(4). (3) 01 REC-1 PIC V99. (4) 01 REC-1 PIC P99. (5) 01 REC-1 PIC 9(4)S. (6) 01 REC 1 PIC X(4).
- 2, 3 and 6
- 3, 4 and 6
- 1, 2 and 3
- 2, 3 and 4
COMPUTE A=B is a valid statement
- True
- False
Maximum number of INSTREAM procedures
- 10
- 15
- 20
- 25
5 generations of a GDG already exist. Refer 1st generation in the JCL
- GDG (-4)
- GDG (-3)
- GDG (-5)
- GDG (1)
The parameter used to specify whether job is to be held until further notice or for syntax checking
- HOLD
- TYPERUN
- TYPRUN
- SCAN
I have multiple jobs in a member. What happens if I submit it?
- Multiple jobs are submitted
- Job will abend
- Only one step gets executed
- Only first job will be submitted
Which of the following functions can DD statements perform?
- Tell the system which data set to access
- Request a printer to produce the job output
- Indicate where to store new data sets
- Initiate a new program
Which of the following are considerations for selecting programs that may be grouped together as a job?
- Programs must run sequentially
- Programs must be dependent on each other
- Programs must access the same databases
- Programs must have the same accounting information
Which one of the following is a valid job name?
- //TEST*1
- // JOB13
- //$ABCD
- //STEPSEVEN
What are the correct values for the DSN parameter of a temporary data set?
- &NAME&(TEMP)
- &&TEMP(NAME)
- &&NAME
- &NAME
vsam means virtual storage acess method
- True
- False
SET is also a valid AMS command.
- True
- False
Which of the following PIC definitions can be used in the declaration of a record of a sequential file that will be used as INPUT
- PIC X(9)
- PIC S9(4) COMP
- PIC Z(4)
- PIC 9(4)V99
- PIC 9(4).99
"Which tests are allowed with the following variable? 01 END-OF-FILE PIC X. 88 EOF VALUE 'N'."
- IF EOF THEN …
- IF EOF IS TRUE THEN ...
- IF END-OF-FILE = 'Y' THEN ...
- IF END-OF-FILE THEN ...
Which of the following COBOL EVALUATE statements in syntactically NOT correct?
- EVALUATE A <n> WHEN 0 DISPLAY 'A = 0' <n> WHEN 5 DISPLAY 'A = 5' <n> WHEN OTHER DISPLAY 'A IS NOT 0 NOR 5' <n> END-EVALUATE
- EVALUATE TRUE <n> WHEN A=0 DISPLAY 'A = 0' <n> WHEN A=5 DISPLAY 'A = 5' <n> WHEN OTHER DISPLAY 'A IS NOT 0 OR 5' <n> END-EVALUATE
- EVALUATE A <n> WHEN A=0 DISPLAY 'A = 0' <n> WHEN A=5 DISPLAY 'A = 5' <n> WHEN OTHER DISPLAY 'A IS NOT 0 NOR 5' <n> END-EVALUATE
- none
Take a look at the following COBOL instruction. When will instruction-3 be executed? IF A=B THEN instruction-1 ELSE instruction-2. instruction-3.
- never
- if A is equal to B
- if A is different from B
- always
Which of the following statements concerning files are true?
- the FD entry in the DATA DIVISION gives a description of the structure of a file.
- the first record is automatically read on opening a file.
- if a file is opened in I-O mode you can use this file for reading as well as for writing.
- you can not read indexed files from a COBOL program.
- in the SELECT clause you have to give a complete description of the exact location of the file.
What is the content of RESULT after execution of the following COBOL instruction. The start value of RESULT is 0. PERFORM VARYING C FROM 1 BY 1 UNTIL C = 6 COMPUTE RESULT = RESULT + 1 END-PERFORM
- 4
- 5
- 6
- 7
Can a SEARCH be applied to a table which does not have an INDEX defined?
- No
- Yes
- can't say
- none
What is the maximum length of a field you can define using COMP-3?
- 8 Bytes
- 10 Bytes
- 12 Bytes
- 16 Bytes