Reading/Updating a PF on the basis of RRN

45 pts.
Tags:
RPGLE
Hi All, Please tell me how can we read or update a PF on the basis of RRN. Thanks.

Answer Wiki

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

Depends how you’re trying to access the PF. If you’re using a SQL statement, you can use the RRN() function. IE: select * from lib/file where rrn(file) between 1 and 10

hope that helps,
Kevin

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
  • BigKat
    if your using RPGLE, when declaring the file, do not include "K"eyed Record Access Type on the F-Spec. Then when you use chain, setll, etc. instead of a key field, you use the rrn you want to chain, setll, etc. to position the file to the right record and update as normal.
    8,350 pointsBadges:
    report
  • TomLiotta
    Or simply READ the file without “K”eyed Record Access Type. The file will be read in RRN sequence ('arrival' sequence). No need to CHAIN unless you need to position to particular RRNs. 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