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
 

 

adding floating number with ICEtool

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
HappySrinu

Active User


Joined: 22 Jan 2008
Posts: 195
Location: India

PostPosted: Tue Sep 09, 2008 6:02 pm    Post subject: adding floating number with ICEtool
Reply with quote

Hello experts,

infile:
13.5
2.5
27.5
1.3
5

how can i do sum of above data using ICETOOL

for numeric, I am using STATS FROM INFILE ON(stpos,leng,UFF)

but for decimal numbers, could any one tell me whats the formate code to use?
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Sep 09, 2008 9:30 pm    Post subject:
Reply with quote

Hello,

Look in the DFSORT part of the forum for topics that mention UFF and/or SFF (Unsigned and Signed Free Format).
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Sep 09, 2008 10:03 pm    Post subject:
Reply with quote

Happysrinu,

It gets a little tricky if you have records with both decimal data and without decimal data. In that case we need to modify the records a little bit to get the right total

I assumed that your input file is FB recfm with 80 bytes LRECL and the max length of your numeric data is 10 bytes

Code:

//STEP0100 EXEC PGM=ICEMAN                               
//SYSOUT   DD SYSOUT=*                                   
//SORTIN   DD *                                           
13.5                                                     
2.5                                                       
27.5                                                     
1.3                                                       
5                                                         
//SORTOUT  DD SYSOUT=*                                   
//SYSIN    DD *                                           
  SORT FIELDS=COPY                                       
  INREC IFTHEN=(WHEN=(1,10,SS,NE,C'.'),                   
  OVERLAY=(81:1,8,JFY=(SHIFT=RIGHT),C'.0')),             
  IFTHEN=(WHEN=NONE,OVERLAY=(81:1,10))                   
                                                         
  OUTFIL REMOVECC,NODETAIL,BUILD=(80X),                   
  TRAILER1=('TOTAL : ',TOT=(81,10,UFF,EDIT=(TTTTTTTT.T)))
/*


The output from this

Code:

TOTAL :       49.8 

Hope this helps...

Cheers
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 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 Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm
No new posts Sequence number add in SORT pshongal SYNCSORT 3 Fri Sep 02, 2016 3:32 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am


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