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 / 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 |
What are various search techniques in cobol? Explain.
How do u initialize an array?
What does the initialize statement do ?
What happens in the background of spool when we submit a job for compilation and execution... This is a recent question in ibm...Kindly help me.....
01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. what would be the value of yyy
how many subpgms we can use in a main pgm ? how do u link sub pgm to main pgm ? how can i use the parameters declared in main pgm to sub pgm ?
How to increase the logical record length of existing PS file?
How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length
in real time what is the suitable exp where in-stream procedure is better then catalog procedure.
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
what is the difference between Plan & package
consider the following FD FILE-1 01 REC-1 PIC X(80) ...... WORKING-STORAGE SECTION 01 W-REC PIC X(90) ........ PROCEDURE DIVISION FIRST-PARA ....... READ FILE-1 INTO W-REC AT END MOVE 1 TO EOF-FLAG which of the following is true with respect to the above? a.REC-1 will contain nothing and W-REC will contain the contains of the record read b.REC-1 and W-REC contain the same data c.syntex is invalid and error will occur d.REC-1 and W-REC must be of same size