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 Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Group elements using ICETOOL Learncoholic DFSORT/ICETOOL 2 Fri Apr 14, 2017 11:01 am
No new posts Joinkeys with decimal scdinesh DFSORT/ICETOOL 3 Fri Feb 10, 2017 4:46 am
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am


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