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 |
How to resolve the soc4 and soc7 errors?
When can the USING phrase be included in the call statement ?
i am a btech cs 2009 passout. i am opting for mainframe course. is it good to do this course? pls. anyone suggest me
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
which is better either static call or dynamic call? and why?
What is COMP-1? COMP-2?
is it possible to pass an SQL query inside a jcl which is inside a cobol program?
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
can we use COPY statement in w-s section? how?
can anyone explain me the concept of COMP-4 PLEASE??
in cobol main pgm is calling sub pgm but sub pgm does not exists , what abend i get if submit the job?
File status must be checked both while opening and reading the file or only while reading the file?