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 a subscript ?

3 Answers  


Hi, My interviewer ask A calls B and C calls B, a and b are static c and b are dynamic.what happens if they compile and execute at same time.

3 Answers   iGate,


hie everyone.i just completed my b.tech in electronics and joined mainframes course.am i doing right course for my better future?please help me with your suggestions.ill be very thankful to you guys.

2 Answers  


What are subroutines ? and how do we pass data to the sub routines?

2 Answers   Xansa,


What are 77 levels used for?

0 Answers  






how many times PARA-A is performed : PERFORM PARA-A VARYING TIMES-COUNTER FROM 1 BY 1 UNTIL TIMES-COUNTER >0 PARA-A MOVE P TO Q MOVE H TO TIMES COUNTER a.10 b.1 c.11 d.0

4 Answers   TCS,


) What is the use of IGNORE?

1 Answers   IBM,


Hi................... I have records like this aaaa cccc bbbb And i want output like this bbbb cccc aaaa How can it possible ?. Note:Please make sure records are in unsorted order. somebody plzzz help me.

1 Answers  


Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning

0 Answers  


What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I want Display WS-VARX and WS-VARN?

3 Answers   Xansa,


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,


i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

0 Answers  


Categories