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

level number 77 is used to define a)group data b)elementary data c)redefine d)none

8 Answers   TCS,


how we rectify soc7 and soc4 errors in project?

1 Answers   Anaxis, TCS,


What is redefines clause in COBOL?

0 Answers   B-Ways TecnoSoft,


what modification we need to do in jcl if we use sort in cobol? I mean whether we need to include tempary file used for sorting in assign statement?

3 Answers   TCS,


Consider the following: 77 W-NUM PIC 9 VALUE 0 ------ MOVE 1 TO W-NUM PERFORM PARA-X UNTIL W-NUM > 9. ------ PARA-X ADD 1 TO W-NUM How many times PARA-X is executed ?

14 Answers   Accenture, TCS,






When is inspect verb is used in cobol?

0 Answers  


what is the basic concept of mainframe? what knowledge is needed for learn this mainframe?

4 Answers   CSE, TCS, Wipro,


01 a pic s9(5) value -12345, if we disply a , the sign will overpunched with last digit but i need to get the miuns sign in the result?

7 Answers  


If A>B next sentence end-if display 1 display 2. display 3. If a>b, it will display only 3.(the next sentence, ie., after fullstop/period) ____________________________________ if a>b continue end-if display 1 display 2. display 3. If a>b, it Will display 1 2 3 (the next statement) ____________________________________ if a>b continue display 1 end-if display 2 display 3. display 4. If a>b, Will it display 2 3 4 (or) 1 2 3 4 ?

8 Answers   UST,


how we rectify soc4 and soc7 error in project(need real time answer)? please reply

3 Answers   HCL, Wipro,


How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length

2 Answers   IBM, Wipro,


How to open and see copy book ?

3 Answers  


Categories