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...

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

Answer Posted / prem

Occur clause is a kind of an array which holds the data of
simalar type in a particular record.
Ex: If we define an occur clause which hold the marks of a
particular student scored in 3 subjects. The code for this
would be as mentioned below

01 Student.
02 Name PIC X(20).
02 MARK OCCURS 3 times PIC 9(03).

So, For a Student "A" marks would be stored in MARK[1], MARK
[2], MARK[3], for "B" MARK[2], MARK[2], MARK[2] likes wise.

In a record format it would be displayed as below
A___________________052060080

B___________________060068070

Total length of the record is 20 + (3*3) = 29

This code will process n number of records no matter what
is the size of occur clause but if the length of the
records is beyond 29 then only the job will abend.

I hope this answers your query.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between structured cobol programming and object alternativelyiented cobol programming?

1231


what is difference between cobol and cobol/400

22894


) what is the difference between AID and HANDLE AID?

2149


Can you please let me know the centre name of INS certification in Kolkata.

2238


Mention the guidelines to write a structured cobol program?

1082


Define static linking and dynamic linking.

1180


What are the different rules for performing sort operation?

1214


What is the difference between comp and comp-3 usage?

1195


Name some of the examples of COBOl 11?

3136


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

3250


) how do u code after getting data?

2145


How to traceback if I am getting SOC7 or SOC4 abend? List down the steps

5366


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

1099


What is the LINKAGE SECTION used in COBOL?

1522


which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad

1500