Read all records.

35 pts.
Tags:
COBOL/400
I have one pf file and i want to read all records in that pf file through the cobol, how i can read all records? plz explaine me with example.?

Software/Hardware used:
cobol

Answer Wiki

Thanks. We'll let you know when a new response is added.

1. Open the required file.

2. Set End of file marker to False.
3. Process record by record in a loop until End of file marker is true
     Fetch first record
     If successful, enter into loop
Fetch data into required fields.
Process the data
Check if next record exists.
True: continue the loop
        false:  exit the loop
4. Close the file.

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • CharlieBrowne
    Thanks for coming to ITKE. This seems like a homework question. What have you tried so far, and what problem are you having that we can help you with?
    41,380 pointsBadges:
    report
  • TomLiotta
    For examples, look in the Information Center first. The COBOL Programmers Guide has Examples of Processing DISK and DATABASE Files. This site would be used if you run into problems trying to make a program work. -- Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following