I have a table with 3 dimensions like this :
01 ws-table
04 ws-page occurs 3
08 ws-column occurs 2.
12 ws-record occurs 20 pic x(40).
How to code with PERFORM varying with 3 dimension...I
forgot..
Answer Posted / lu
you have coding like this :
Working Storage Section.
77 I-page pic 99 value zero.
77 J-col pic 99 value zeroes.
77 K-record pic 99 value zeroes.
Procedure Division.
Perform 1000-move varying I-page from 1 by 1 until
I-page > 3
after J-col from 1 by 1 until
J-col > 2
after K-record from 1 by 1 until
K-record > 20.
1000-move.
move a-field to ws-record (I-page, J-col, K-record).
Is This Answer Correct ? | 12 Yes | 0 No |
Post New Answer View All Answers
how do you define single dimensional array and multidimensional array in your cobol?
How arrays can be defined in COBOL?
how to refer the data field?
When is inspect verb is used in cobol?
explain sorting techniques in cobol program?
What is a scope terminator give example?
What rules are followed by the search verb.
What is the difference between Call and a Link?
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
What is the difference between binary search and sequential search?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
Discuss about changing dataset name in proc.
Name some of the examples of COBOl 11?
Explain how to differentiate call by context by comparing it to other calls?