Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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?



Can we dynamically increase the size of occurs clause? i.e In case I an not sure of the size of ar..

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

Post New Answer

More COBOL Interview Questions

Can we use icetool in cobol program?

3 Answers  


if a dataset is already created with fixed length but after that i want to change fixed length to variable length then how is it possible

3 Answers   IBM,


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

0 Answers  


wht is structured cobol pgm and non structred cobol pgm ?

1 Answers   CTS, DELL,


01 a pic s9(5) occupies how many bytes ?

9 Answers   Wipro,


How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?

0 Answers  


How can you declare the file ?

1 Answers   Wipro,


Write the code implementing the perform … varying.

0 Answers  


How to use the same COBOL program in Batch and CICS on lines? explain with an example

0 Answers   IBM,


how will u find out 3rd week's 2nd day using occurs ?

3 Answers   L&T,


i declare a Table as OCCURS 2000 TIMES.If the input file has more than 2000 records will the COBOL program fail?

12 Answers  


What rules are to be followed while using the corresponding options?

0 Answers  


Categories