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 Global and External Variables?

1434


Describe the cobol database components?

1218


i need a small 3d program using inline and outline.

2261


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

2284


If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly

3211


How arrays can be defined in COBOL?

1298


how do you reference the variable block file formats from cobol programs

1309


What is the difference between Call and a Link?

1262


Whats the difference between search & search ALL?

6661


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

1152


What is the usage of comp fields in cobol?

1222


What is Pic 9v99 Indicates in COBOL?

1337


Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc

1307


i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

1607


Write a cobol program making use of the redefine clause.

1227