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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If you are current on the owner of a set, what is the difference between obtain next and obtain first?

632


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

984


Explain about different table spaces.

642


How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?

639


What is cobol?

736






Why do we code s9 (4) comp. Inspite of knowing comp-3 will occupy less space?

701


Can a Search can be done on a table with or without Index?

796


how do you reference the variable unblock file formats from cobol programs

734


What are the pertinent COBOL commands?

2617


Name the sections present in data division.

693


What is the difference between comp and comp-3?

692


I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.

1103


What guidelines should be followed to write a structured cobol prgm?

662


Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.

1691


What is the usage of comp fields in cobol?

646