How do define Dynamic array in COBOL how do u define single dimensional array and multidimensional array in your COBOL?
Submitted by: AdministratorIn 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.
Submitted by: Administrator
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.
Submitted by: Administrator
Read Online IBM MainFrame Job Interview Questions And Answers
Top IBM MainFrame Questions
☺ | How do define Dynamic array in COBOL how do u define single dimensional array and multidimensional array in your COBOL? |
☺ | Can 88 level variable be declared in FD section? |
☺ | What is difference b/w file-aid tool and file-aid utility? |
☺ | How to handle -911 (deadlock) error in a db2 program so that the program will never abend? |
☺ | Suppose I have 1000 rows in a db2 table. I want to update first 100 records, How do I do it? |
Top Mainframe Technical Categories
☺ | IBM MainFrame Interview Questions. |
☺ | IBM AS400 Interview Questions. |
☺ | JCL Interview Questions. |
☺ | IMS DB Interview Questions. |
☺ | CICS Interview Questions. |