View previous topic :: View next topic
|
Author |
Message |
Abhushan_s
New User
Joined: 28 Jul 2008 Posts: 34 Location: Ahmedabad
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
Abhushan_s
New User
Joined: 28 Jul 2008 Posts: 34 Location: Ahmedabad
|
|
|
|
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? |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Abhushan_s
New User
Joined: 28 Jul 2008 Posts: 34 Location: Ahmedabad
|
|
|
|
hey thanks "gcicchet"
I believe i got it! i confused MERGE with CONCATENATE. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
Abhushan_s
New User
Joined: 28 Jul 2008 Posts: 34 Location: Ahmedabad
|
|
|
|
Hey thanks Frank!
I did go through the content yesterday! its indeed helpful!
thanks again for the help |
|
Back to top |
|
|
|