Author: zh_lad
Subject: Re: Reply to: Performing arithmetic on input field
Posted: Thu Dec 08, 2016 7:46 pm (GMT 5.5)
Hi Bill,
How will I deal with space when result of multiplication is only 1 digit.
How will I ignore space to pick up digits to sum in OUTREC (second IFTHEN).
Rohit was using FIND and REPLACE
Thanks.
Subject: Re: Reply to: Performing arithmetic on input field
Posted: Thu Dec 08, 2016 7:46 pm (GMT 5.5)
Hi Bill,
How will I deal with space when result of multiplication is only 1 digit.
Code: |
1,1,UFF,MUL,+2,EDIT(IT) |
How will I ignore space to pick up digits to sum in OUTREC (second IFTHEN).
Rohit was using FIND and REPLACE
Code: |
OUTREC FINDREP=(INOUT=(C' ',C'')) |
Thanks.
Bill Woodger wrote: |
IFTHEN=(WHEN=INIT for an OVERLAY to give you the several multiply-by-two results (they are not "intermediate results" in the sense normally used), then another WHEN=INIT with the BUILD to ADD all the digits that you need (odd-number from original location, even-numbered from the location OVERLAYed to) and then multiply that by +9. |