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

can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1 Answers  


Which is the default, TEST BEFORE or TEST AFTER for a PERFORM statement?

0 Answers  


If there are two copybooks which have same variables and we are using both the copybooks in our program. will there be an error and if i move values to the variable which copybook varibales gets the values i move in.

3 Answers   CTS,


Where the Plan is located in CICS-DB2

2 Answers   IBM,


What compiler option would you use for dynamic linking?

2 Answers  


Re: 01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING". 01 NAME2 PIC X(13). now I want to display the value of NAME1 in reverse order i.e value should be displayed as "GNIMMARGORP LOBOC" HOW can I do that ??? please let me know if any one knows it.

2 Answers   IBM,


Which of the following characters is NOT valid in column 7? a. - b. \ c. * d. # e. $

4 Answers  


what is the result of the following? DIVIDE A INTO B GIVING C. a.C=A/B b.the reminder of B/A is stored in C c.C=B/A d.the reminder of A/B is stored in C

3 Answers   TCS,


Can we use redefine clause in occurs clause?

10 Answers  


What are the pertinent COBOL commands?

0 Answers   Satyam,


which one is better among static call and dynamic call?

3 Answers  


how to check whether the open command of a sequential file is successful? or not?

2 Answers   CSC, IBM,


Categories