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
Answers were Sorted based on User's Feedback
Answer / veenaibm
Multidimentional array is as follows:
01 TABLE-REC-1.
05 ROWS OCCURS 1 TO 10 TIMES.
10 COLUMNS OCCURS 1 TO 10 TIMES.
20 CELL PIC X(1).
Now if we want to access the value of the variable CELL,
we can use
Perform x from 1 by 1 until x>10
Perform y from 1 by 1 until y>10
cell(x,y).
In the question, it is not a 2 dimentional array.
It is 2 single dimentional array which can be accessed
independently.
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / talluri
01 ws-array
05 ws-table1 occurs 10 times.
05 ws-table2 occures 10 times.
01 i pic 9(2).
01 j pic 9(2).
procedure division.
perform varing i from 1 by 1 until i>10
perform varing j from 1 by 1 until i>10
accept ws-table1(i,J)
accept ws-table2(i,J)
end-perform
end-perform.
perform varing i from 1 by 1 until i>10
display ws-table1(i,J)
end-perfrom.
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / 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 |
What is the use of LINKAGE SECTION?
How can you declare the file ?
C1 C2 C3 are three conditions whose TRUTH values are as folloes. C1-TRUE C2-FALSE C3-TRUE A,B,C are defined as given below A:C1 AND(NOT C2) OR C3 B.(NOT C1) OR (NOT C2 AND NOT C3) C.(C1 OR C2)AND C3 D.C1 AND C2 OR C3 given the above information which of the following statements are valid? a.only A,B and C are TRUE b.only A,C and D are TRUE c.A,B,C and D are TRUE d.only C and D are TRUE
given the following: 77 A PIC 9V9 VALUE 9.5 77 B PIC 9 VALUE 9. 77 C PIC V9 VALUE 0.8 77 D PIC 9 77 E PIC 9 77 F PIC 9V999 what are the contenta of D E nad F after the following statements are executed: COMPUTE F ROUNDED=A+C/B MULTIPLY A BY C GIVING E ADD B C A GIVING D ROUNDED a.F=9.589 E=8 D=1 b.F=9.589 E=8 D=9 c.F=9.589 E=7 D=9 d.F=9.589 E=7 D=1
What is Alternate Index ? How is it different from regular index ?
diffrence between renames and redifnes with examples
how can u redefine picx(10) with pic 9(6).
how can we code index in an array of cobol pgm?
What rules are to be followed while using the corresponding options?
what is qualification on occurs clause?
if a pic 9(3) value 354,b pic x(2) value '46' then a)a>b 2)a<b 3)error
What is the difference between a subscript and an index in a table definition?