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
Questions
In what mode the file should be OPENed to Rewrite/ Delete records in a File?
- OUTPUT
- EXTEND
- I-O
- INPUT
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?
- PIC $ZZZZ9.99-
- PIC $$$$9V99-
- PIC -$9(6).99
- PIC $9(6).99-
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?
- 4
- 5
- 6
- 1
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?
- All the woking staorage variables in ProgramB will be initialized when the Program B execution is completed.
- Nothing will happen. It is just coded to indicate the end of CALL statement.
- Areas A, B and C will be initialized when the Program B execution is completed.
- None of the above
A COBOL Program (Program A) calls Program B. What will happen, If STOP RUN is issued at the end of Program B?
- The Control will come back to Program A.
- The control will NOT come back to Program A and Program B will terminates immediately at the STOP RUN Statement.
- Program B abends abnormally.
- Infinite Loop
What abend will be hit when a COBOL program is trying to move Alphabetic Data into Numeric fields?
- S0C1
- S0C4
- S0C7
- S0CB
Can we execute a COBOL program both from an Online Program (CICS) and Batch Program (JOB)?
- Yes, Always Possible
- Yes, Only when the COBOL program contains CICS and Batch common verbs/statements
- No. Never Possible
- None of the above
How many Bytes will be assigned for a field which is defined with S9(6) COMP usage?
- 2
- 4
- 6
- 8
How many bytes will be assigned to a field which is defined with USAGE POINTER?
- 4
- 6
- 8
- 10
we can display the index variable like normal cobol variable
- True
- False
we will do the operations on the index variable using:
- PERFORM
- MOVE
- SEARCH
- SET
INITIALIZE statement cannot load a variable-length table (one that was defined using OCCURS DEPENDING ON)
- True
- False
STOP RUN statement closes all files defined in any of the programs
- True
- False
If STOP RUN is not coded in the program,
- Abend with S806
- Abend with U4095
- Abend with U4038
- Abend with S322
How is a new GDG coded
- 0
- +1
- -1
- None of the Above
Which of the following is not a modal command?
- a) IF
- b) THEN
- c) DO
- d) GOTO
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
- a) All 3 statements are TRUE
- b) X and Y are TRUE
- c) X and Z are TRUE
- d) Y and Z are FALSE
Which VSAM clusters support only fixed length records?
- a) LDS
- b) RRDS
- c) ESDS
- d) KSDS
What is the DD statement for a output file?
- Code the DSN as PDS (member) with a DISP = OLD
- Code the DSN as PDS (member) with a DISP = SHR
- Code the DSN as PDS (member) with a DISP = NEW
- Code the DSN as PDS (member) with a DISP = MOD
What is S322 abend
- a) Indicates a space abend
- b) Indicates a regione abend
- c) Indicates a time out abend
- d) a and c