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
 

 

Difference between MERGE and SORT utility?

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

New User


Joined: 30 Dec 2006
Posts: 11
Location: Chennai-India

PostPosted: Tue Jan 02, 2007 6:50 pm    Post subject: Difference between MERGE and SORT utility?
Reply with quote

Can any explain me the difference between the MERGE and SORT utility? icon_lol.gif
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Jan 02, 2007 6:53 pm    Post subject:
Reply with quote

There is no MERGE utility, just SORT.
Sort re-sequences the input.
Merge combines two (or more) pre-sequenced inputs.
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 02, 2007 10:08 pm    Post subject:
Reply with quote

Quote:
Can any explain me the difference between the MERGE and SORT utility?


MERGE and SORT are functions of a sort utility (e.g. DFSORT). For a MERGE, each of the data sets to be merged must already be in sorted order by a particular key (or keys) and that key must be used as the MERGE key (or keys). For a SORT, the data sets can be unsorted and can be sorted by any key (or keys) specified as the SORT key (or keys).

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. It also explains the concepts of sorting, merging and copying. 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
Sabry Krishnan L

New User


Joined: 30 Dec 2006
Posts: 11
Location: Chennai-India

PostPosted: Wed Jan 03, 2007 12:21 pm    Post subject: Re: Difference between MERGE and SORT utility?
Reply with quote

Thanks Frank. The explanation gives me more clarity about the both the functions. I will putforth what i got. Using both the functionalityof DFSORT we can concatenate 2 files. In MERGE the files should be sorted under a key where as it is not required in SORT. Am i right?
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 03, 2007 9:55 pm    Post subject:
Reply with quote

Quote:
In MERGE the files should be sorted under a key where as it is not required in SORT. Am i right?


Well, you're right that the input files do not have to be in sorted order for a SORT, whereas they do for a MERGE. In either case, you must specify a key on which to sort or merge.

Quote:
Using both the functionalityof DFSORT we can concatenate 2 files.


If you're asking if you can use two files for SORT or MERGE, the answer is yes. For SORT, you'd use a SORTIN DD with the two files concatenated:

Code:

//SORTIN DD DSN=...  input file1
//       DD DSN=...  input file2


For MERGE, you'd use a SORTIN01 DD and a SORTIN02 DD:

Code:

//SORTIN01 DD DSN=...  sorted input file1
//SORTIN02 DD DSN=...  sorted input file2
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 Difference between TWALENG and TWASIZE Arunkumar Chandrasekaran CICS 3 Tue Jan 03, 2017 12:57 pm
No new posts TAPE VERIFY utility?? MrExtraordinare JCL & VSAM 3 Fri Dec 09, 2016 10:57 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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