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..

Answers were Sorted based on User's Feedback



I have a table with 3 dimensions like this : 01 ws-table 04 ws-page occurs 3 08 ws-..

Answer / 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

I have a table with 3 dimensions like this : 01 ws-table 04 ws-page occurs 3 08 ws-..

Answer / garry

@Lu

Excellent Posts, I Really appreciate your time for giving wonderful and sure-shot results.

Pls keep it up.

gmt360@gmail.com

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More COBOL Interview Questions

How can we pass data from cobol to JCl?

7 Answers   ADP, Amdocs, IBM,


copy 100 records without using ibm utilities

3 Answers  


What is file status 39 ?

10 Answers   JPMorgan Chase,


01 ws-p pic 9(2). 01 ws-q pic 9(2) value 01. 01 ws-r pic 9(2) value 99. p.d. compute p = q + r what will be result of p ans(00) but my question is that how i got 10 on the place of 00. (truncation will ocuure on right side not left). please tell me ?

6 Answers   L&T,


how you will define variables length in cobol.

3 Answers   Temenos,






What rules are to be followed while using the corresponding options?

0 Answers  


how do u list the abended jobs?

1 Answers   IBM,


How include time & date in the report generation in cobol programing?

2 Answers  


How are the next sentence and continue different from each other?

0 Answers  


i WANT ALL ERROR codes IN CICS and DB2

2 Answers  


) How do u handle errors in BMS macro

0 Answers   IBM,


diffrence between renames and redifnes with examples

3 Answers   IBM,


Categories