IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

Is Merge utility only for sorted PS?

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> DFSORT/ICETOOL
View previous topic :: View next topic  
Author Message
Abhushan_s



Joined: 28 Jul 2008
Posts: 21
Location: Ahmedabad

Posted: Tue Aug 05, 2008 7:25 pm    Post subject: Is Merge utility only for sorted PS?  

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



Joined: 23 Nov 2006
Posts: 8733
Location: 221 B Baker St

Posted: Tue Aug 05, 2008 9:33 pm    Post subject:  

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



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

Posted: Tue Aug 05, 2008 11:02 pm    Post subject:  

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



Joined: 28 Jul 2008
Posts: 21
Location: Ahmedabad

Posted: Wed Aug 06, 2008 9:17 am    Post subject: I jus wnt 2 merge 2 DS's irresepective of any field.  

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



Joined: 28 Jul 2006
Posts: 664

Posted: Wed Aug 06, 2008 9:24 am    Post subject:  

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



Joined: 23 Nov 2006
Posts: 8733
Location: 221 B Baker St

Posted: Wed Aug 06, 2008 9:26 am    Post subject:  

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



Joined: 28 Jul 2008
Posts: 21
Location: Ahmedabad

Posted: Wed Aug 06, 2008 9:29 am    Post subject:  

hey thanks "gcicchet"
I believe i got it! i confused MERGE with CONCATENATE. :oops:
Back to top  
Frank Yaeger



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

Posted: Wed Aug 06, 2008 9:30 pm    Post subject:  

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:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
Back to top  
Abhushan_s



Joined: 28 Jul 2008
Posts: 21
Location: Ahmedabad

Posted: Thu Aug 07, 2008 8:47 am    Post subject: Reply to: Is Merge utility only for sorted PS?  

Hey thanks Frank!
I did go through the content yesterday! its indeed helpful!
thanks again for the help :D
Back to top  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> DFSORT/ICETOOL
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM