Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 How can I convert charactor to fixed ... liying DFSORT/ICETOOL 7 Tue May 22, 2018 3:35 pm
No new posts How to group and sum the decimal value sakrat DFSORT/ICETOOL 2 Tue Mar 06, 2018 9:13 pm
No new posts ICETOOL - RESIZE DYNAMICALLY kranthikumarb DFSORT/ICETOOL 0 Tue Nov 21, 2017 5:30 pm
No new posts Extend the decimal values in DIVISION Balaryan DFSORT/ICETOOL 3 Thu Oct 05, 2017 4:05 pm
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us