how can we fetch 3 records in cobol pgm any coding pls ?

Answers were Sorted based on User's Feedback



how can we fetch 3 records in cobol pgm any coding pls ?..

Answer / santhosh

Read the file and validate the things, once the all the
things are done for the record keep the count of it in an
working storage variable. Everytime when u try to read the
next record check for the count of WS variable, when it
reaches the count of 3 then terminate ur program.

Is This Answer Correct ?    6 Yes 1 No

how can we fetch 3 records in cobol pgm any coding pls ?..

Answer / madhu

we can assume 3 in-file records under fd in-file record.you
can start write nd read on 3 programs after that u can
create on jcl with 3 dif files then the out put shows on dif
files as u can given inputs follows

Is This Answer Correct ?    1 Yes 0 No

how can we fetch 3 records in cobol pgm any coding pls ?..

Answer / ravi

While reading a record from the input file keep ws- count variable for the count of records you read. When ws- count reaches count =3 put condition to terminate program

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

what is the use of filler in cobol programing?

4 Answers   MAT,


how to code in cobol while using variable block file?

1 Answers  


I have a field with data type X(10). I want to perform arithmetic operation on this field? I tried doing it by moving the value into a numeric field. but it didn't work out. I am getting a S0C7 abend. Pls let me know if there is any way of getting this done?

1 Answers  


how can u redefine picx(10) with pic 9(6).

3 Answers   TCS,


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

0 Answers   TCS,


What is Comm?

2 Answers   IBM, Kemper Corporation,


Write a cobol program making use of the redefine clause.

0 Answers  


What is the difference between comp and comp-3 usage? Explain other COBOL usage?s.

3 Answers   IBM, Xansa,


What is report-item in COBOL?

0 Answers   Arigo Infotech,


what is record label is empty or standard in file description of data division?

2 Answers   HCL,


Why we need to use redefine clause when we can define the variable seperately... what is actual need....

5 Answers   Accenture,


How many types of sorts are there in cobol?

5 Answers   Cap Gemini,


Categories