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
 
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm

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