How do you define a table/array in COBOL?

Answer Posted / mojib khan

To define a table using occurs clause..
working -storage section.
01 table.
*for one dimensional array
02 table-name pic size() occurs n times.
03 field1-name pic size.
03 field2-name pic size.
.......
........
........
03 fieldn-name pic size.

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that

2734


2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic

2122


What is perform what is varying?

711


What are different data types in cobol?

694


i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

1000






What are the pertinent COBOL

2045


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1908


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

8168


What is the difference between a binary search and a sequential search what are the pertinent cobol?

737


How to traceback if I am getting SOC7 or SOC4 abend? List down the steps

1005


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

825


What is the LINKAGE SECTION used in COBOL?

894


What is the use of intialize verb?

751


what is the use of outrecord?

1774


What is the difference between next sentence and continue in cobol programing language?

712