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
 

 

SORT - totals of a column

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

New User


Joined: 22 Feb 2008
Posts: 70
Location: Turkey

PostPosted: Fri Dec 05, 2008 5:16 pm    Post subject: SORT - totals of a column
Reply with quote

Hello,
my inout data is like that;

Code:

DENIZ     ;60001     ;15.01.2008;G10;11   ; 000000000000080,00;
DENIZ     ;60005     ;18.01.2008;BUS;10   ; 000000000000455,00;
DENIZ     ;60006     ;01.02.2008;T10;10   ; 000000000000240,00;
DENIZ     ;60007     ;05.02.2008;T20;10   ; 000000000000069,00;
DENIZ     ;60008     ;15.01.2008;G10;11   ; 000000000000000,00;
DENIZ     ;60014     ;29.01.2008;G10;11   ; 000000000000000,00;


I want to output same data plus 1 line at the bottom (Totals of last column);

Code:

DENIZ     ;60001     ;15.01.2008;G10;11   ; 000000000000080,00;
DENIZ     ;60005     ;18.01.2008;BUS;10   ; 000000000000455,00;
DENIZ     ;60006     ;01.02.2008;T10;10   ; 000000000000240,00;
DENIZ     ;60007     ;05.02.2008;T20;10   ; 000000000000069,00;
DENIZ     ;60008     ;15.01.2008;G10;11   ; 000000000000000,00;
DENIZ     ;60014     ;29.01.2008;G10;11   ; 000000000000000,00;
                                            000000000000844,00;


is it possible?
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: Fri Dec 05, 2008 10:43 pm    Post subject:
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN    DD    *
  OPTION COPY
  OUTFIL REMOVECC,
    TRAILER1=(45:TOT=(45,18,UFF,EDIT=(TTTTTTTTTTTTTTT,TT)),C';')
/*
Back to top
View user's profile Send private message
ozgurseyrek

New User


Joined: 22 Feb 2008
Posts: 70
Location: Turkey

PostPosted: Sat Dec 06, 2008 4:25 pm    Post subject:
Reply with quote

thank you very much...
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 DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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