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 |
I got user abend U4038 while compiling my runjcl.. can anyone help me?
is this below syntax correct? CALL 'subprg' using A,B Please help
what is the minimum number of lines a Cobol program should have to successfully compile and run
11 Answers ABC, Societe Generale,
What is CALL statement in COBOL?
what is qualification on occurs clause?
What are VS COBOL 11 special features?
i have mainprogram and subgram...if i compile mainprogram without stop run..what will u get in compilation time?
how we rectify soc7 and soc4 errors in project?
What is the reference modification.
Name some of the examples of COBOl 11?
How do you set a return code to the JCL from a COBOL program?
What is the Linkage section? What is the Use and Why the parm length use alway "PARM-LENGTH PIC S9(4) or PIC S9 (4) COMP." any reason?.Please let me know any one... Cheers,Prasad