IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is Merge utility only for sorted PS?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Abhushan_s

New User


Joined: 28 Jul 2008
Posts: 34
Location: Ahmedabad

PostPosted: Tue Aug 05, 2008 7:25 pm
Reply with quote

Hi,
Is the MERGE utility only applicable for those PS' which are in a sorted order?
What will it give as an output if we are trying to merge 2 PS's for which we dont have an idea as to whether they are in a sorted order or not, because while trying to do the above i got a SOC6 abend, is it due to the above error that i was commiting or was it due to some other problem?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Aug 05, 2008 9:33 pm
Reply with quote

Hello Abhushan and welceom to the forums,

When you have a question, please start a new topic for your question rather than replying to some existing topic.

Quote:
Is the MERGE utility only applicable for those PS' which are in a sorted order?
Yes, in order to successfully MERGE, the input files must already be in sequence by the "merge key(s)". If you are not sure about the sequence of the data, it needs to be sorted prior to a merge. If you are not sure of the data, it may be better to just use sort rather than merge. This would depend on how much data there is and how many of the input files are already in the proper sequence.

If you post your jcl, the control statements, and the diagnostic information presented by the execution, someone will be better able to help.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue Aug 05, 2008 11:02 pm
Reply with quote

Quote:
What will it give as an output if we are trying to merge 2 PS's for which we dont have an idea as to whether they are in a sorted order or not


If the records in either input data set are not in order by the MERGE key you specify, you will get an out-of-sequence error message. For example:

ICE068A 0 OUT OF SEQUENCE SORTIN02

Quote:
while trying to do the above i got a SOC6 abend, is it due to the above error that i was commiting or was it due to some other problem?


I wouldn't expect a S0C6 abend. You'd have to supply more information (JES messages, program messages, JCL, etc) before anyone could help you with that.
Back to top
View user's profile Send private message
Abhushan_s

New User


Joined: 28 Jul 2008
Posts: 34
Location: Ahmedabad

PostPosted: Wed Aug 06, 2008 9:17 am
Reply with quote

Hi,

Thanks for the reply

Actually I have 2 files that have data in a random order but then as iam using the SORT utility for the purpose of only merging, so cant i just merge 2 files irrespective of any fields? icon_question.gif
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Aug 06, 2008 9:24 am
Reply with quote

Hi Abhushan,

I'm only going to repeat what has already been metioned.


You CANNOT merge 2 files that are NOT in the order of the MERGE key you specify.


What you can do is concatenate the 2 files and use SORT to get the desired results.


I'm not sure what I have stated is any more clearer than already mentioned.


Gerry
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Aug 06, 2008 9:26 am
Reply with quote

Hello,

Quote:
so cant i just merge 2 files irrespective of any fields?
Do you know what a merge is? I believe possibly not. . . It is a real term with a real difinition and one should not make up their own definition.

A merge on the mainframe is code that compares multiple sets of input data that are already in the "same sequence" and produces an output file that is in that same sequence.

Quote:
Actually I have 2 files that have data in a random order but then as iam using the SORT utility for the purpose of only merging
Again, if both sets of data is not in the same sequence, you will not do a merge. . .

Is it possible that your requirement has nothing to do with merging the data but rather you want to copy both files into a third file with no regard to the sequence of the data? If you only need to copy both of your input files into one combined files, you would not use merge. You would simply copy the files.

If this is not what you are looking for, you need to provide better clarification. Make up 2 small files of only 5 records each and show what you want for output when the process is run.
Back to top
View user's profile Send private message
Abhushan_s

New User


Joined: 28 Jul 2008
Posts: 34
Location: Ahmedabad

PostPosted: Wed Aug 06, 2008 9:29 am
Reply with quote

hey thanks "gcicchet"
I believe i got it! i confused MERGE with CONCATENATE. icon_redface.gif
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Wed Aug 06, 2008 9:30 pm
Reply with quote

Abhusan,

If you're not familiar with DFSORT and DFSORT's ICETOOL or with the terminology for the functions it performs, 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
View user's profile Send private message
Abhushan_s

New User


Joined: 28 Jul 2008
Posts: 34
Location: Ahmedabad

PostPosted: Thu Aug 07, 2008 8:47 am
Reply with quote

Hey thanks Frank!
I did go through the content yesterday! its indeed helpful!
thanks again for the help icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts REASON 00D70014 in load utility DB2 6
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
This topic is locked: you cannot edit posts or make replies. Merge 2 input files based on the reco... JCL & VSAM 2
No new posts Merge 2 input files after sort SYNCSORT 14
Search our Forums:

Back to Top