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


Please Help Members By Posting Answers For Below Questions

how do you define single dimensional array and multidimensional array in your cobol?

670


How arrays can be defined in COBOL?

662


how to refer the data field?

1805


When is inspect verb is used in cobol?

673


explain sorting techniques in cobol program?

686






What is a scope terminator give example?

655


What rules are followed by the search verb.

633


What is the difference between Call and a Link?

696


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

2332


What is the difference between binary search and sequential search?

638


What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

672


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

670


Discuss about changing dataset name in proc.

758


Name some of the examples of COBOl 11?

2679


Explain how to differentiate call by context by comparing it to other calls?

684