IBM MainFrame Question:

Download Job Interview Questions and Answers PDF

How do define Dynamic array in COBOL how do u define single dimensional array and multidimensional array in your COBOL?

IBM MainFrame Interview Question
IBM MainFrame Interview Question

Answer:

In IBM Cobol

1) In IBM's Language Environment you can dynamically
acquire storage (look up HEAP in the manual). The storage
you acquire you can use as you like. Can be an array,
therefore a dynamic array. It is a "work-around" as dynamic
arrays are not directly supported.
2) 01 SINGLE-DIM-ARRAY
05 SDA-ITEM PIC X OCCURS 30.
A single-dimension array of thirty one-byte characters.
3) 01 MULTI-DIM-ARRAY.
05 MDA-FIRST-DIM OCCURS 20.
07 MDA-SECOND-DIM OCCURS 30 PIC X.
A multi-dimension array of 20 times 30 one-byte characters.

Download IBM MainFrame Interview Questions And Answers PDF

Previous QuestionNext Question
What is difference between comp and comp-3?How To get the last record in VSAM file in cluster? And How can u get the ksds file records into ur COBOL program? Please tell me about these two questions.?