COBOL Interview Questions - 6

Question 51: What is 88 level used for ?
Answer : For condition names.

Question 52: What is level 66 used for ?
Answer : For RENAMES clause.

Question 53: What does the IS NUMERIC clause establish ?
Answer : IS NUMERIC can be used on alphanumeric items, signed numeric & packed decimal items and unsigned numeric & packed decimal items. IS NUMERIC returns TRUE if the item only consists of 0-9. However, if the item being tested is a signed item, then it may contain 0-9, + and -.

Question 54: How do you define a table/array in COBOL?
Answer : ARRAYS.
05 ARRAY 1 PIC X(9) OCCURS 10 TIMES.
05 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX.

Question 55: What is COMP SYNC?
Answer : Causes the item to be aligned on natural boundaries. Can be SYNCHRONIZED LEFT or RIGHT. For binary data items, the address resolution is faster if they are located at word boundaries in the memory. For example, on main   frame the memory word size is 4 bytes. This means that each word will start from an address divisible by 4. If my first variable is x(3) and next one is s9(4) comp, then if you do not specify the SYNC clause, S9(4) COMP will start from byte 3 ( assuming that it starts from 0 ). If you specify SYNC, then the binary data item will start from address 4. You might see some wastage of memory, but the access to this computational field is faster.

Question 56: What is the maximum size of a 01 level item in COBOL I? in COBOL II?
Answer : In COBOL II: 16777215

Question 57 : What is file status 39 ?
A50) Mismatch in LRECL or BLOCKSIZE or RECFM between your COBOL pgm & the JCL (or the dataset label). You will get file status 39 on an OPEN.

Question :58 Read the following code. 01 ws-n pic 9(2) value zero, a-para move 5 to ws-n. perform b-para ws-n times, b-para. move 10 to ws-n. how many times will h-para be executed ?
Answer : 5 times only, it will not take the value 10 that is initialized in the loop.

Question 59 How do you submit JCL via a Cobol program?
A93) Use a file //ddl DD sysout=(*, intrdr)write your JCL to this file. PI some on try this out.

Question 60: How to execute a set of JCL statements from a COBOL program
A94) Using EXEC CICS SPOOL WRITE(var-name) END-EXEC command, var-name is a COBOL host structure containing JCL statements.
1 2 3 4 5 6 7 8 9 10