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

01 var1 pic x(10) 01 var2 redefines var1 pic 9(10). then in procedure division move 'abcde' to var1 then waht is the value of var1 and var2

9 Answers   HSBC,


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

0 Answers   IBM,


1) can we display the index?

3 Answers   ADP, IBM,


what is the default print format? in cobol

3 Answers   HSBC,


What will happen if we generate GDG +2 version instead of +1 version?

2 Answers   T systems,






Which division and paragraphs are mandatory for a COBOL program?

0 Answers  


input:- A 10 20 30 40 B 5 7 10 14 C 8 12 14 16.... output:- A = 100,B=36,C=50. Here spaces are considered between numbers. When we give input as above, the numbers should be added n displayed.So please help me out.

4 Answers  


What is the difference between PIC 9.99 and PIC9v99?

0 Answers  


hi friends,can any one post the ibm mainframe inteqview questions for 1year exp candidate,for itc infotech interview?. have any body attended for this in the past?...

1 Answers   ITC Infotech,


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

0 Answers  


What are 77 levels used for?

0 Answers  


Difference between ps, esds

3 Answers  


Categories