Write the syntax of a two dimensional array?
Answers were Sorted based on User's Feedback
Answer / praveen
WORKING-STORAGE SECTION.
01 MATA.
05 ROWA OCCURS 2 TIMES.
10 COLA OCCURS 2 TIMES PIC 9.
| Is This Answer Correct ? | 44 Yes | 11 No |
Answer / s
01 grparray.
02 month occurs 12 times index by a1.
03 week pic x(4)occurs 7 times.
| Is This Answer Correct ? | 46 Yes | 19 No |
Answer / varun v
Agree with Ans #1 and #2,
Ans #3 -- Occurs class cannot be at 01 level
| Is This Answer Correct ? | 34 Yes | 10 No |
Answer / bhanu
this is actually a question which i got.
How to initialize a two dimensional array with indexes?
can any one kindly show me the syntax..?
| Is This Answer Correct ? | 9 Yes | 2 No |
Answer / jagan
WORKING-STORAGE SECTION.
01 M-GROUP.
02 M OCCURS 6 TIMES.
03 W PIC X(4) OCCURS 4 TIMES.
| Is This Answer Correct ? | 9 Yes | 6 No |
Answer / mic
To Ans # 5 ..
We can initialize an Index By SET INDEX-NAME TO X
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / siri
TWO DIMENTIONAL ARRAY SYNTAX:-
01 WS-ARRAY
05 A OCCURS 30 TIMES
10 B OCCURS 30 TIMES
15 B1 PIC X(10)
15 B2 PIC X(10).
| Is This Answer Correct ? | 0 Yes | 2 No |
Answer / guest
01 items x(10) occurs 10 times
02 sub items pic x(10) 5 times
| Is This Answer Correct ? | 9 Yes | 68 No |
input:- 12233344445555566666... output:- 1=1,2=4,3=9... Here firstno i.e 1 should be displayed and after that the alikeno.s should be added n displayed.i.e 2+2=4 like tat it goeson.
why occurs clause not mentioned in 01 level
6 Answers HCL, NIIT, TCS, Tesco,
For rewrite, why is it mandatory that file needs to be opened?
can we use reference modification an arry.
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
How would the number +1234 be stored if a PIC clause of PICTUREs9(4) comp-3 were used?
in cobol perform stmt whether it first checks the condition or not
How do you reference the fixed block file formats from cobol programs
What is the default value(s) for an initialize and what keyword allows for an override of the default?
I have a sequential file of 100 records. How do I load the records into a two dimensional array ?
Can we move X(9) to 9(9). If yes what are the ways for doing this?
how many bytes does s9(15) occupy in comp1 comp2 and comp3 ?