Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

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

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

@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

More COBOL Interview Questions

what is the difference between perform varying and perform until

What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I want Display WS-VARX and WS-VARN?

What is the difference between PIC 9.99 and 9v99 in COBOL?

What are declaratives and what are their uses in cobol?

What is an in-line perform ?

perform I from 0 by 1 until I=5?How maney times it will executes

PERFORM ACCUMULATE-TOTALS VARYING A FROM 1 BY 2 UNTIL A >2 AFTER B FROM1 BY 1 UNTIL B>2 AFTER C FROM 2 BY -1 UNTIL C<2 How many times the paragraph ACCUMULATE-TOTALS would be exicuted?

Wat is the difference between NEXT and CONTINUE statement in cobol,can any one explain with example.

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

What is the difference between SEARCH and SEARCH ALL? What is more efficient?

What is comp-1 and comp-2?

what is the advantage of using redefines instead of delaring the variables ?

Categories