0 pts.
 OPNQRY and WRKQRY
In wrkqry there is an option to save the selected records to an output file.Similarly is there a way to use OPNQRY in a CL or in an SQLRPG to directly move the selected records to another file?

Software/Hardware used:
ASKED: December 13, 2008  1:11 PM
UPDATED: December 18, 2008  10:14 AM

Answer Wiki:
<a href="http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/cl/cpyfrmqryf.htm#CPYFRMQRYF.Top_Of_Page">CpyFrmQryF</a> Copy from Qry File MIS Hi, u can use the following command in a single statement to transfer records to another file: OPNQRYF FILE(CUSTOMER/ADDRESS) QRYSLT(’STATE *EQ "TEXAS"’) CPYFRMQRYF FROMOPNID(ADDRESS) TOFILE(TEXAS/ADDRESS) CRTFILE(*YES) thanks Ram
Last Wiki Answer Submitted:  December 18, 2008  10:14 am  by  MurrayInfoSys   940 pts.
All Answer Wiki Contributors:  MurrayInfoSys   940 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


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