Thanks Max, that would seem to be the way. Peter
-----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Massimo Biancucci Sent: Tuesday, September 22, 2020 1:44 PM To: [email protected] Subject: Re: SORT question: How to both remove records from a file AND write removed records to a 2nd output? Peter, look at OUTFIL syntax and SAVE keyword. Regards. Max > In one pass of an input file is there a way to use SORT to both remove > identified records from an input file AND write those removed records > to a second output file? > > I know I can run two passes of the input using INCLUDE in pass 1 to > select just the records to be removed and a second pass using OMIT to > take them out, but can it be done in one pass? > > Peter -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
