Return to the CL Tips
A technique for retrieving number of records selected by OPNQRYF
In the CL you can:
CPYFRMQRYF FROMOPNID(OPNID) TOFILE(QTEMP/TEMPFILE) CRTFILE(*YES) to collect
all records available for this OPNQRYF on one temporary file.
RTVMBRD FILE(QTEMP/TEMPFILE) NBRCURRCD(&RECORDS) to retrieve the number of
records of that temporary file.
[report a broken link by clicking here]