Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
add fields of non-vsam file using sort utility

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

New User


Joined: 04 Dec 2005
Posts: 45
Location: pune

PostPosted: Mon Jan 16, 2006 2:17 pm    Post subject: add fields of non-vsam file using sort utility
Reply with quote

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
View user's profile Send private message

rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Mon Jan 16, 2006 10:21 pm    Post subject: Re: add fields of non-vsam file using sort utility
Reply with quote

Can you please bit clear on what conditions you are adding the fields

Regards
Jai
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: Mon Jan 16, 2006 10:37 pm    Post subject:
Reply with quote

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
View user's profile Send private message
manjinder

New User


Joined: 04 Dec 2005
Posts: 45
Location: pune

PostPosted: Tue Jan 17, 2006 10:03 am    Post subject: Re: add fields of non-vsam file using sort utility
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Tue Jan 17, 2006 9:12 pm    Post subject:
Reply with quote

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
View user's profile Send private message
manjinder

New User


Joined: 04 Dec 2005
Posts: 45
Location: pune

PostPosted: Wed Jan 18, 2006 10:14 am    Post subject: Re: add fields of non-vsam file using sort utility
Reply with quote

sorry i wanted toadd like 5555 aaaa.
i was wrong please sorry forgive me pls.
regard..
manjinder
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: Wed Jan 18, 2006 9:19 pm    Post subject:
Reply with quote

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:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
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 Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us