IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Decimal Precision using icetool


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Michaelod
Warnings : 1

New User


Joined: 02 Sep 2008
Posts: 49
Location: Edinburgh

PostPosted: Wed Sep 02, 2009 6:48 pm
Reply with quote

Hi,

Wonder if someone can help me. I have the following data member

Code:

  INREC IFTHEN=(WHEN=(112,1,CH,EQ,C'-'),
             OVERLAY=(279:112,32),HIT=NEXT)

  OUTFIL FNAMES=OUT,REMOVECC,NODETAIL,
    OUTREC=(1,51,182X),
     TRAILER1=(1:FEEDID,
                 SEPERATOR,
                 CREATOR,
                 TOT=(279,32,SFF,EDIT=(STTTTTTTTTTTTTTTTTTTTTTTTTT.TTTT),
                 SIGNS=(+,-)),
                 DATATYPE)


Basically I am trying to sum a field where the values are -ve. On the output record I get a value of -21.7943 however the value i should get is -2179.4300.

Anyone have any ideas how to sort this?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Sep 02, 2009 9:06 pm
Reply with quote

Since you haven't said exactly what your input fields look like, it's difficult to help you. But as a guess, I'd say it looks like you need to multiple the -ve value by +100 to get the result you want. Perhaps replacing your INREC statement and the TOT operand with the following will do it:

Code:

 INREC IFTHEN=(WHEN=(112,1,CH,EQ,C'-'),
  OVERLAY=(279:112,32,SFF,MUL,+100,TO=ZD,LENGTH=32))


Code:

           TOT=(279,32,ZD,EDIT=(STTTTTTTTTTTTTTTTTTTTTTTTTT.TTTT),


If that doesn't help, please show an example of the records in your input file (relevant fields only) for the + and - cases, and what you expect for output. Give the RECFM and LRECL of the input file. Give the starting position, length and format of each relevant field.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Shift left VB record without x00 endi... DFSORT/ICETOOL 11
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
Search our Forums:

Back to Top