how will u retreive value from a table.write it with syntex.
01 ws-table
05 ws-table1 occurs 10 times.
05 ws-table2 occurs 10 times.
the above is 2 dimensional array..how will u retrieve 1st
element of an array
Answer Posted / abhishek
while declaring a two dimensional array we have to use the
INDEXED BY clause
01 ws-array
05 ws-table1 occurs 10 times INDEXED BY I
10 ws-table2 occures 10 times INDEXED BY J
15 var-1 pic x(4)
15 var-2 pic x(5)
01 i pic 9(2).
01 j pic 9(2).
procedure division.
perform varing i from 1 by 1 until i>10
AFTER varing j from 1 by 1 until i>10
accept var-1(i,J)
accept var-2(i,J)
end-perform.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
What is an in line perform? When would you use it? Anything else you wish to say about it.
What are the different rules for performing sort operation?
What is the difference between PIC 9.99 and 9v99 in COBOL?
What are the different open modes available in cobol?
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
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)?
Which mode is used to operate the sequential file?
What is the difference between PIC 9.99 and PIC9v99?
Whats the difference between search & search ALL?
what happens if parmparameter passes zero bytes to the program
how do you reference the printer file formats from cobol programs
Why would you use find and get rather than to obtain?
What is the utilization of copybook in cobol?
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?