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
 

 

JCL sorting.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ppandey07

New User


Joined: 27 Nov 2008
Posts: 51
Location: Delhi, India

PostPosted: Tue May 22, 2012 1:23 pm    Post subject: JCL sorting.
Reply with quote

Hi there,

I have two files of same LRECL and have same data.
I want to sort these files via four fields and want to remove duplicates only via those four fields.
Now there is one more field in the files(different than sorted fields),
and on the basis of this field, I want to remove duplicates.
Can you please help me with that?
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7308

PostPosted: Tue May 22, 2012 1:42 pm    Post subject: Reply to: JCL sorting.
Reply with quote

If you want to remove duplicates, you'll need to sort on the fifth field as well, else how is anything to know about all the duplicates?

Then, what is wrong with SUM FIELDS=NONE?

If that isn't going to work for you, you'll have to explain it better, with examples of the input and the expected output for that input.

It is irrelevant if there are two files and you are going to sort them together, it is one file by the time the sort sees it.
Back to top
View user's profile Send private message
ppandey07

New User


Joined: 27 Nov 2008
Posts: 51
Location: Delhi, India

PostPosted: Tue May 22, 2012 2:19 pm    Post subject: Re: Reply to: JCL sorting.
Reply with quote

Bill Woodger wrote:
If you want to remove duplicates, you'll need to sort on the fifth field as well, else how is anything to know about all the duplicates?

Then, what is wrong with SUM FIELDS=NONE?

If that isn't going to work for you, you'll have to explain it better, with examples of the input and the expected output for that input.

It is irrelevant if there are two files and you are going to sort them together, it is one file by the time the sort sees it.


Fifth field has a different constant value in each file. Let’s say first file has value A and second has value B in fifth field. And If the concatenation of these two files causes any duplicate record (on the basis of first four field) then I want to remove duplicate and want
To keep record from first file only(with value A).

Please let me know if more information is required.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7308

PostPosted: Tue May 22, 2012 2:50 pm    Post subject: Reply to: JCL sorting.
Reply with quote

So, OPTION EQUALS, sort on four fields. SUM FIELDS=(NONE)

Try it.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue May 22, 2012 2:59 pm    Post subject:
Reply with quote

as long as the concatenation of files in SORTIN is file with 'A' first.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7308

PostPosted: Tue May 22, 2012 3:04 pm    Post subject: Reply to: JCL sorting.
Reply with quote

Worth pointing out. Pankaj, don't just "say" it, make it so, else you'll get the wrong ones.

EDIT: That means document it that way as well, so someone "cleverer" than you doesn't "correct" the order of the files because it is somehow neater, or something dumb like that.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sorting group data rajella DFSORT/ICETOOL 4 Sun Jan 22, 2017 11:32 pm
No new posts Efficient sorting chandracdac DFSORT/ICETOOL 5 Sat Oct 22, 2016 3:23 am
No new posts Stripping and Sorting of VB file G SRINIVASA RAO SYNCSORT 5 Wed Sep 14, 2016 1:34 pm
No new posts DFSORT sorting only specific records akodakka DFSORT/ICETOOL 4 Thu Aug 04, 2016 11:24 am
No new posts VB file sorting V S Amarendra Reddy DFSORT/ICETOOL 2 Fri Feb 26, 2016 8:29 pm


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