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?

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

How you can read the file from bottom?

1082


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

1091


Write some characteristics of cobol as means of business language.

1078


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

3205


System Testing for Mainframe Developers What is System Testing? integration testing ? what's the procedure ..

2011


how to convert the recors form vsam file to db2 table tru file aid

3208


Difference between array and sub-script ?

1603


Name some of the examples of COBOl 11?

3082


What is link edit in cobol?

1148


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?

7729


how do you reference the printer file formats from cobol programs

1140


how to move the records from file to array table. give with code example

2630


What the difference is between continue and next sentence?

1103


What is the Purpose of POINTER Phrase in STRING command in COBOL?

1195


What is the problem of ordered sequential files access?

1108