1,565 pts.
 QPNQRY start over
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:
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.
Last Wiki Answer Submitted:  March 21, 2011  4:39 pm  by  WaltZ400   645 pts.
All Answer Wiki Contributors:  WaltZ400   645 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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,565 pts.

 

Oops – typo. Should say OPNID keyword

 1,565 pts.