Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Decimal Precision using icetool

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Decimal Precision using icetool
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 Moderator


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

PostPosted: Wed Sep 02, 2009 9:06 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am
No new posts DB2 FLOAT precision soundarr DB2 4 Fri Jul 15, 2016 9:47 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us