QPNQRY start over

1,720 pts.
Tags:
AS/400 - CL Command
AS/400 command functions
CL Commands
OPNQRYF
Is there a CL command to restart/reset an Open Query from the beginning ?

I could repeat the OPNQRYF command, but that's silly if a single command does the same thing

 

Mike



Software/Hardware used:
as/400
ASKED: March 21, 2011  4:16 PM
UPDATED: March 21, 2011  4:54 PM

Answer Wiki

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

Leaving the OVRDBF Share(*YES) intact don’t do a CLOF. Run POSDBF OPNID(openid) POSITION(*START) instead. set ‘openid’ equal to what you used in the OPNQRYF. This will position the file from the OPNQRYF back to the beginning of the file. You can then call the next RPG program that is using this. Once you are all done then do a CLOF.

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
  • aceofdelts
    Thanks. This seems to be exactly what I need. I expect that since the existing code does not use the OPNIN keyword, I can likewise omit it in my POSDBF. I'll try it later today. Mike
    1,720 pointsBadges:
    report
  • aceofdelts
    Oops - typo. Should say OPNID keyword
    1,720 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