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?
Answer Posted / lu
yes, ...you declare an array like this:
77 ws-counter pic 9(04) value zeroes.
01 ws-array.
07 ws-field pic x (01) ouccurs 1 to 1000
depending on ws-counter.
Procedure Division.
Perform Read-file until ws-end-of-file = 'y'.
Read-file.
Read file at end
move 'y' to ws-end-of-file.
if ws-end-of-file not = 'y'
add 1 to ws-counter
move aa of file to ws-field (ws-counter).
the maximun is 1000 occurrences and minimun is 1...
| Is This Answer Correct ? | 14 Yes | 0 No |
Post New Answer View All Answers
How you can read the file from bottom?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
Write some characteristics of cobol as means of business language.
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..
how to convert the recors form vsam file to db2 table tru file aid
Difference between array and sub-script ?
Name some of the examples of COBOl 11?
What is link edit in cobol?
here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?
how do you reference the printer file formats from cobol programs
how to move the records from file to array table. give with code example
What the difference is between continue and next sentence?
What is the Purpose of POINTER Phrase in STRING command in COBOL?
What is the problem of ordered sequential files access?