Author: Arun Raj
Posted: Wed Dec 07, 2016 11:08 pm (GMT 5.5)
From your original post, if it is every alternate digit, should it not be like this?
9 (2) + 8 + 7(2) + 6 + 5(2) + 4 + 3(2) + 2 + 1(2) = 70 * 9 = 630
You don't need to worry about the format of intermediate results because, as suggested you can do multiple computations one after the other, like this and edit only the final result.
SORTOUT
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard
Posted: Wed Dec 07, 2016 11:08 pm (GMT 5.5)
Quote: | ||||
My Input record
|
From your original post, if it is every alternate digit, should it not be like this?
9 (2) + 8 + 7(2) + 6 + 5(2) + 4 + 3(2) + 2 + 1(2) = 70 * 9 = 630
You don't need to worry about the format of intermediate results because, as suggested you can do multiple computations one after the other, like this and edit only the final result.
Code: |
//SORTIN DD * 987654321 //SYSIN DD * OPTION COPY OUTREC BUILD=((1,1,ZD,MUL,+2,ADD, 2,1,ZD,ADD, 3,1,ZD,MUL,+2,ADD, 4,1,ZD,ADD, 5,1,ZD,MUL,+2,ADD, 6,1,ZD,ADD, 7,1,ZD,MUL,+2,ADD, 8,1,ZD,ADD, 9,1,ZD,MUL,+2),MUL,+9,EDIT=(TTTT)) |
Code: |
0630 |
_________________
Arun
----------------------------------------------------------------------------------------------------
Love is like an hourglass, with the heart filling up as the brain empties. -Jules Renard