Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref

Author Message
HappySrinu

Active User

Joined: 22 Jan 2008
Posts: 195
Location: India

 Posted: Tue Sep 09, 2008 6:02 pm    Post subject: adding floating number with ICEtool 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?

dick scherrer

Site Director

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

 Posted: Tue Sep 09, 2008 9:30 pm    Post subject: Hello, Look in the DFSORT part of the forum for topics that mention UFF and/or SFF (Unsigned and Signed Free Format).
Skolusu

Senior Member

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

Posted: Tue Sep 09, 2008 10:03 pm    Post subject:

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
 All times are GMT + 6 Hours
 Page 1 of 1

Search our Forum:

 Topic Author Forum Replies Posted Similar Topics INVALID RECFM FOR DDNAME SYSLIN AND C... sandeep kumar302 All Other Mainframe Topics 7 Fri Apr 27, 2018 6:07 pm Reformatting and adding additional fi... Badbeef SYNCSORT 6 Thu Apr 05, 2018 4:45 pm Repeat Sequence Number Until change i... rahulabvp DFSORT/ICETOOL 6 Thu Mar 29, 2018 12:51 pm add sequence number for duplicate rec... SRUTHI DRAVIDAMANI COBOL Programming 11 Thu Feb 22, 2018 5:37 pm Receommendations required for adding ... Alan Playford JCL & VSAM 4 Wed Feb 14, 2018 4:01 pm

 © 2003-2017 IBM MAINFRAME Software Support Division
 Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us