AFAIK, this cannot be done (easily) without knowing the total number of records in advance. You might be able put some logic together using sort exit 15.
HTH, <snip> does any of you have a recommendation on advising SORT to only take the last n records into SORTOUT. problem is, for STARTREC=xxx you would need to know the resulting total number in advance. </snip> ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

