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
 

 

Only total of charge amount in OUTPUT by using SORT?

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

New User


Joined: 15 Dec 2005
Posts: 21

PostPosted: Thu Nov 05, 2009 2:46 am    Post subject: Only total of charge amount in OUTPUT by using SORT?
Reply with quote

I have million of records with duplicate of circuit ids. I don't have any unique key also.

I want to get the total of charge amount from all input. The output should display only only line of total amount.
Example :
Charge amount Field
CHARGE-AMT PIC S9(07)V99 COMP-3
Input file

LX775-CIRCUIT-ID | IND LX775-CHARGE-AMT
C(14) (18-31) | PS(7,2) (70-74)
---------------- | --- ----------------
CEOWB LFO 0001, | ,+0.00 ,
CEOWB LFO 0001, | ,+0.00 ,
CEOWB 3BR 0001, | ,+0.00 ,
CEOWB 3BR 0001, | ,+127.00 ,
CEPFC T0Z 0001, | ,+0.00 ,
CEPFC T0Z 0001, | ,+663.36 ,
CEPFC U6E 0001, | ,+0.00 ,
CEPFC U6E 0001, | ,+663.00 ,
CEPFC X7N 0001, | ,+0.00 ,
CEPFC X7N 0001, | ,+691.00 ,
CEPFC X9T 0001, | ,+0.00 ,
CEPFC X9T 0001, | ,+691.00 ,

Output
Total : 2835.36
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: Thu Nov 05, 2009 2:57 am    Post subject:
Reply with quote

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

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD SYSOUT=*
//SYSIN    DD    *
  OPTION COPY
  OUTFIL REMOVECC,NODETAIL,
    TRAILER1=('Total :',TOT=(70,5,PD,EDIT=(IIIIIIIT.TT)))
/*
Back to top
View user's profile Send private message
vijayprabu

New User


Joined: 15 Dec 2005
Posts: 21

PostPosted: Thu Nov 05, 2009 3:19 am    Post subject:
Reply with quote

Thanks lot! I appreciate you help. My code is working now.
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 Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts JES2 doesn't honor the priority of th... Aron Lendvai JCL & VSAM 7 Thu Jun 29, 2017 1:41 pm


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