IBM Mainframe COBOL and JCL Quiz
Questions covering IBM mainframe computing including COBOL programming concepts, JCL job control, and mainframe dataset management (PS, PDS, GDG, ESDS).
Questions
What does the INITIALIZE verb do?
- Alphabetic, Alphanumeric fields & alphanumeric edited items are set to SPACES
- Numeric, Numeric edited items set to ZERO.
- FILLER , OCCURS DEPENDING ON items left untouched.
- All the Above.
TYPE=SCAN What does it do?
- Scans JCL for errors.
- Invalid Syntax
- Scans for previous executing jobs
- Does nothing!
When I try to browse my Colleague's latest GDG tape version, What will I get?
- What's the problem is browsing it? Only editing is not possible.
- Security Violation / Access Denied.
- Cant browse a latest GDG tape version.
- Cant browse a latest GDG tape version, but can browse own datasets.
REPLACING option of a COPY statement will
- Replace the copybook with another.
- The option is invalid with copy statement.
- It allows for the same copy to be used more than once in the same code by changing the replace value.
- Has no impact.
How can I delete a record from an ESDS file?
- Just go with normal delete process it will go fine.
- Can delete only if the record is obtained by a random read.
- Are you nuts? How can you delete a record from a ESDS file?
- Using SORT utility
OCCURS clause cannot be used in 01 Level
- Occurs clause in 01 cant be done because 01 is the top most level.
- Who said so, you can use it, I bet!
- Occurs clause is there to repeat fields with same format, not the records.
- Stack will over flow.
EXIT - What does it do?
- Does Nothing!
- Terminates the program.
- Terminates the paragraph.
- Terminates the loop.
Maximum number of steps a job can have is
- Unlimited
- 255
- 125
- Limited to business requirement
What if you code GO BACK instead of STOP RUN in a independent COBOL program
- What's the problem in it? Will go fine!
- Program goes in infinite loop.
- Program will not execute.
- Compiler throws error.
How do you define COMP-1 / COMP-2?
- DEFINE WS-VAR PIC(9) COMP-1
- 01 WS-VAR PIC(9) COMP-1
- 01 WS-VAR USAGE COMP-1
- Author should learn COBOL
JUSTIFIED can be used only with the following data types :
- ALPHABETIC, ALPHANUMERIC
- ALPHABETIC, ALPHANUMERIC, NUMERIC
- ALPHABETIC, NUMERIC
- ALPHANUMERIC, NUMERIC
REDEFINE X(250) by X(245) - Is it possible
- Yes
- No
- X(245) can be refined to X(250)
- Author should learn COBOL
Modes to OPEN a file for writing :
- INPUT
- I-O, OUTPUT
- I-O, OUTPUT, EXTEND
- OUTPUT, EXTEND
Maximum number of in-stream procedures in a JCL can be
- As usual, Unlimited.
- 1
- 15
- 255
Maximum size of 01 level item?
- Unlimited
- 16777215
- Limited to DASD
- Author should learn COBOL
Where will be the sign stored in COMP field?
- How can u store a sign in COMP?huh!
- You can store sign only in COMP-3
- Most significant bit
- Most significant byte
Space allocated by OS when PS or PDS is created?
- User Defined KB.
- Unlimited KB.
- Limited to DASD
- 56 KB
Formula for calculating bytes required for COMP-3 variable
- N/2 + 1
- N^2 + 1
- N+1/2
- (N/2)^2
When you pass a table via LINKAGE, which of the following makes you a good programmer?
- Subscript
- Index
- Either
- Author should learn COBOL
A job can run continuously in mainframe for
- 1440 Minutes
- 248 Days
- Forever
- Till Mainframe server is down