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

how to crack cts interview apps? NOVEMBER 21 2010

2 Answers   CTS,


What are the cobol coding sheets?

0 Answers  


I have one column say 'X' defined as VARCHAR Can anyone tell me What are the different ways to update this column thru COBOL-DB2 program?

5 Answers  


should I use Go back in the main program ? Yes we can use Go back in main program as well.

2 Answers   Xansa,


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

0 Answers  






here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?

2 Answers   IBM,


how to submit a jcl by cobol program. clear me with an example.

3 Answers   HCL,


wht do u mean by (*,intrdr) wht is * used for ?

2 Answers  


i have n records in one file and in this file there is some fields and i want to count that how many sharma in my file so plz give the coding that how we read sharma ?

2 Answers  


We are using the searching a table which is indexed, once the key is found, how can we get the occurance at which the key was found.

1 Answers  


In a COBOL II PERFORM statement, when is the conditional tested, before or after the perform execution?

3 Answers  


How to replace the GOTO statement in COBOL without changing the structure of program. e.g. consider following code... I.D. E.D. D.D. P.D. compute C = A + B. GOTO para 100-display. compute D = C - D. GOTO 200-display. some other logic...... ........ GOTO 300-para. ...... ...... GOTO 400-para. Now I want to replacce all GOTO statements without changing the structure and otput of program.

6 Answers   Accenture,


Categories