> Can you set an a priori upper bound on the number of 'ABC' records?
> Suppose you're confident that there are at most 1000.

Gil,

Unfortunately that wouldn't work.  If your input  have less than 1000
records for the key 'ABC' and you code STOPAFT=1001, then it would read the
entire file as we did not reach the STOPAFT limit.  The parm STOPAFT is
executed after the INCLUDE/OMIT. Check this link for processing order.

https://www.ibm.com/support/knowledgecenter/SSLTBW_2.4.0/com.ibm.zos.v2r4.icea100/ice2ca_DFSORT_processing_.htm#idg7073__stmtseq

> This will select (some value of) N 'ABC' records plus 1001-N other
> records.  A second step can select the 'ABC' records from that smaller
> data set.

You don't need a second step as you can use STARTREC/ENDREC/ACCEPT parms on
OUTFIL to select "n" number of records.

Thanks.
Kolusu


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to