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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts DSNACCOX (can it be run on 1 db/ts, t... SRICOBSAS DB2 3 Sat May 06, 2017 12:59 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am


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