Thank you Sri, that worked! Peter
-----Original Message----- From: IBM Mainframe Discussion List <[email protected]> On Behalf Of Sri h Kolusu Sent: Tuesday, March 9, 2021 12:56 PM To: [email protected] Subject: Re: SORT syntax question > What is the correct syntax to find and replace all binary zeroes in > positions 1-34 with spaces and replace all X'41' characters by spaces > in positions 35-94 and do *both* FINDREP's only when position > 13 is C'D'? Peter, You need two separate IFTHEN statements as you have different START and END positions. something like this. IFTHEN=(WHEN=(13,1,CH,EQ,C'D'), FINDREP=(INOUT=(X'00',C' '), STARTPOS=01,ENDPOS=34),HIT=NEXT), IFTHEN=(WHEN=(13,1,CH,EQ,C'D'), FINDREP=(INOUT=(X'41',C' '), STARTPOS=35,ENDPOS=94)), Notice the HIT=NEXT on the first IFTHEN statement. Thanks, Kolusu -- 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
