How to define a array dynamically.....
Answers were Sorted based on User's Feedback
Answer / samay simant
Use the Occurs Depending on clause.
01 College-table
05 Student-table occurs 10 to 20 times depending on
NUM_Stud.
Here the size of array is dependent on Number of students.
Thus this is dynamically created.
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / billyboyo
In IBM's Language Environment you can dynamically
acquire storage (look up HEAP in the manual). The storage
you acquire you can use as you like. Can be an array,
therefore a dynamic array. It is a "work-around" as dynamic
arrays are not directly supported.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / mahesh
hi pandu
occurs clause is used to define the tables so in
01 we mention the group so it does not any pic clause
even sub groups are also not having a pic clause
only elementary items contain pic clause
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / pandu
hi Samay,your answer is correct but i had doubt why don't
we write it as
01 College-table
05 Student-table occurs 10 to 20 times depending on
NUM_Stud.
because 01-49 all are group items naa.
and why don't we mention pic clause in above 01 and 05
pls tell me naa.
| Is This Answer Correct ? | 0 Yes | 0 No |
consider the following piece of code 01 GROSS-PAY 05 BASIC-PAY PIC 9(5) 05 ALLOWENCES PIC 9(3) if BASIC-PAY has a value 1000 and ALLOWENCES has a value of 250,what will be displayed by the statement DISPLAY GROSS-PAY a.1250 b.01000250 c.01250 d.1.250
how to access vsam files in cobol and how to differentiate that this is ESDS file
How will 128 be saved in s9 (3) comp-3 How will 12 be saved in s9 (2) comp
what are the limitations of Inline Perform?
how can we find total no of records in a file ....is there any utility......?
Which of the following characters is NOT valid in column 7? a. - b. \ c. * d. # e. $
What do you feel makes a good program?
Identify the invalid dataname from the following: (A) savings-account (B) annual-allocation-for-overhead (C) samount250 (D) 12demand
How is sign stored in a comp-3 field?
Program A calls program B. Will the working storage variables declared in program B be initialized every time it is called by program A or will the values be retained until the end of program A?
how we rectify soc7 and soc4 errors in project?
How do you come out of an EVALUATE statement?