Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

DFSORT/ICETOOL :: RE: Performing arithmetic on input field

$
0
0
Author: zh_lad
Posted: Wed Dec 07, 2016 4:03 pm (GMT 5.5)

Fine I used EDIT to supress trailing spaces.

Code:
//STEP001  EXEC PGM=SORT                 
//SORTIN   DD *                         
3456                                     
//SORTOUT  DD SYSOUT=*                   
//SYSIN    DD *                         
  OPTION COPY                           
  OUTREC FIELDS=(1,1,ZD,MUL,+1,EDIT(T), 
                 2,1,ZD,MUL,+2,EDIT(IT),
                 3,1,ZD,MUL,+1,EDIT(T), 
                 4,1,ZD,MUL,+2,EDIT(IT))


I am doing 3(1)+4(2)+5(1)+6(2). I will add them once I know what multiplication is producing.

It create:
Code:
---+--
******
3 8512


How do I display only one digit when result of multiplication is only one digit? Bear in mind, I need to SUM them later.
4 x 2 is coming out as b8.

Thanks


Viewing all articles
Browse latest Browse all 9405

Trending Articles