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 are the pertinent COBOL

2509


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

1093


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.

2392


What is an in line perform? When would you use it? Anything else you wish to say about it.

1020


Write a cobol program making use of the redefine clause.

1121


How did the release of cobol/370 version 1.3 improve the performance of release 1.1?

1033


What is the difference between goback, stop run and exit program in cobol?

1521


how do you reference the fixed unblock file formats from cobol programs

1174


Which division and paragraphs are mandatory for a COBOL program?

1191


What is cobol?

1193


What is comp-1 and comp-2?

1185


) How do u handle errors in BMS macro?

1908


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

2181


How do u write test cases?

2012


i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com

2171