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

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

721


Define static linking and dynamic linking.

647


here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?

6776


Write a program that uses move corresponding.

662


What is an in line perform? When would you use it? Anything else you wish to say about it.

632






How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?

693


Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.

2043


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

616


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

657


Difference between array and sub-script ?

1147


what is search and searchall?what is the diffrence between them?give an best example?

5519


What is inspect in cobol ?

789


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

846


Difference between cobol and cobol-ii?

693


What are literals?

618