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


Please Help Members By Posting Answers For Below Questions

In which area will you utilize 88 level items in cobol?

722


) how do u code after getting data?

1580


what is the use of outrecord?

1771


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2060


Mention the guidelines to write a structured cobol program?

620






In COBOL, what is the different between index and subscript?

761


What are declaratives and what are their uses in cobol?

714


What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?

717


How to know whether the module is dynamical or statistical?

656


) How do u handle errors in BMS macro?

1429


What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

676


How are the next sentence and continue different from each other?

766


How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)

2723


I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.

2011


What rules are followed by the search verb.

638