View previous topic :: View next topic
|
Author |
Message |
balukanna
New User
Joined: 09 Apr 2008 Posts: 41 Location: USA
|
|
|
|
hi,
for ex:
input:
Code: |
200 04
200 05
201 04
202 10
202 03
202 02
|
i need an output like this:
Code: |
200 09
201 04
202 15
|
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You can use these DFSORT control statements to do what you asked for:
Code: |
SORT FIELDS=(1,3,CH,A)
OPTION ZDPRINT
SUM FIELDS=(8,2,ZD)
|
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
Use [URL] BBCode for External Links |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Sort on the first three bytes and sum on eight and ninth bytes.
Something like
Code: |
SORT FIELDS=(1,3,CH,A)
SUM FIELDS=(8,2,ZD) |
Dang Frank, you are quick....
Mean while, I'll be looking up the ZDPRINT option....grin..... |
|
Back to top |
|
|
balukanna
New User
Joined: 09 Apr 2008 Posts: 41 Location: USA
|
|
|
|
Hi Frank and cics guy,
Thanks for your valuable suggestion, it works fine,
Thanks a lot.. |
|
Back to top |
|
|
|