OK, so with BUILD=(1,4,17) this must mean "Keep positions 1-4 and 17-end). This works. Thanks! ________________________________ From: IBM Mainframe Discussion List <[email protected]> on behalf of Farley, Peter x23353 <[email protected]> Sent: Monday, June 27, 2022 1:35 PM To: [email protected] <[email protected]> Subject: Re: Copy file, omitting first X characters
Sort input control cards (DFSORT or SYNCSORT): OPTION COPY INREC BUILD=(1,4,(5+X)) Where (5+X) is a constant equal to 5 plus the X characters you want to strip -- e.g. to strip the first 8 characters X=8 so (5+8) = 13, so " INREC BUILD=(1,4,13)". Another way to calculate the position to start copying is "column I want to keep + 4", in the above example (9+4) = 13. HTH Peter -----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Frank Swarbrick Sent: Monday, June 27, 2022 3:11 PM To: [email protected] Subject: Copy file, omitting first X characters EXTERNAL EMAIL I know this is very basic, but it's been a while... I want to copy a file where each record in the new file omits the first X number of characters from the source file, but includes everything else. Both files are variable length files. I imagine sort (I have IBM DFSORT) is the appropriate tool, but I'm simply not sure what options to specify. Thanks! ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN 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 ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
