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
What are the different rules for performing sort operation?
What is amode(31)
Name some of the examples of COBOl 11?
How to know whether the module is dynamical or statistical?
What are various search techniques in cobol? Explain.
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
how to convert the recors form vsam file to db2 table tru file aid
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
what is amode(24), amode(31), rmode(24) and rmode(any)?
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?
What are all the divisions of a COBOL program?
What do you understand by psb and acb?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?