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 Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 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 Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am


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