View previous topic :: View next topic
|
Author |
Message |
manjinder
New User
Joined: 04 Dec 2005 Posts: 45 Location: pune
|
|
|
|
help me i want to add fields of non-vsam file using sort utility.
e.g
i/p
1111 aaaa
2222 bbbb
3333 aaaa
it shold give o/p as
1111 aaaa
5555 bbbb
thankx in advance
regards...
manjinder
Title changed from "hello frds" to "add fields of non-vsam file using sort utility" : Priyesh. |
|
Back to top |
|
|
rajandhla
Active User
Joined: 18 Oct 2005 Posts: 182 Location: Luton UK
|
|
|
|
Can you please bit clear on what conditions you are adding the fields
Regards
Jai |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Add in what way? It looks like you're adding the value in the second aaaa key to the value in the first bbbb key. That doesn't tell us anything about the rules you want to use. Do you really mean to add the values for the same key, in which case the output would be:
4444 aaaa
2222 bbbb
You need to tell us the rules you want to use to get from input to output. |
|
Back to top |
|
|
manjinder
New User
Joined: 04 Dec 2005 Posts: 45 Location: pune
|
|
|
|
i am really sorry i want to add like this
1111 aaaa
2222 bbbb
3333 aaaa
o/p
4444 bbbb
i am really sorry
regards..
manjinder |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Is this a joke? How do you get 4444 for bbbb?
Again, you need to tell us the rules you want to use to get from input to output. |
|
Back to top |
|
|
manjinder
New User
Joined: 04 Dec 2005 Posts: 45 Location: pune
|
|
|
|
sorry i wanted toadd like 5555 aaaa.
i was wrong please sorry forgive me pls.
regard..
manjinder |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Ok, how do you get 5555 for aaaa? If I add up the values for the two aaaa records, I get 1111+3333 = 4444.
If you want help, you need to state clearly and correctly what it is you're trying to do, and show a clear and correct example of the input records and what you want for output. We've been at this for three days and we still don't know what you want.
Maybe I can guess what you want (or maybe not).
If your input records are:
1111 aaaa
2222 bbbb
3333 aaaa
and you want to sum on the key to get:
4444 aaaa
2222 bbbb
you can use the following DFSORT control statements:
Code: |
SORT FIELDS=(6,4,CH,A)
OPTION ZDPRINT
SUM FIELDS=(1,4,ZD)
|
Since 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 |
|
|
|