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 |
What should be the sorting order for SEARCH ALL?
where do we use dyanamic call ? and where do we use static call pls give any example pls ?
example for sub strings ? and refernce modifications whit output pls
0 Answers College School Exams Tests, IBM,
Can a Search can be done on a table with or without Index?
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
01 a pic x(6) value is abcdef 01 b pic x(3) move a to b wht will be the value in b ?
Can we dynamically increase the size of occurs clause? i.e In case I an not sure of the size of array and want to increase the size at run time.If yes , how?
what is the difference between start and startbr?
How do you define a table/array in COBOL?
which certifications r 4 cobol,jcl,db2,cics what is format of xam n what is importance of these certifications... plz post answer only if u r sure... thanks
I have a Flat file in which certain records are present in a tabular format. I need to extract some of the records on some basis from it and copy them into a flat file...how it can be done ??
How to code fscode 10 in cobol program? Where yoy code in your pgm?give ans for the question.