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
 

 

Is Merge utility only for sorted PS?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Is Merge utility only for sorted PS?
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

Site Director


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

PostPosted: Tue Aug 05, 2008 9:33 pm    Post subject:
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 Moderator


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

PostPosted: Tue Aug 05, 2008 11:02 pm    Post subject:
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    Post subject: I jus wnt 2 merge 2 DS's irresepective of any field.
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: 1703
Location: Australia

PostPosted: Wed Aug 06, 2008 9:24 am    Post subject:
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

Site Director


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

PostPosted: Wed Aug 06, 2008 9:26 am    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Wed Aug 06, 2008 9:30 pm    Post subject:
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:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html
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    Post subject: Reply to: Is Merge utility only for sorted PS?
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    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 How to Use DebugTool CodeCoverage Uti... neo4u IBM Tools 0 Thu Jun 22, 2017 6:38 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts DB2 - TERMINATE utility vasanthz DB2 5 Mon May 15, 2017 11:49 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts HLIST Utility In Batch Virendra Shambharkar TSO/ISPF 4 Fri Apr 07, 2017 3:38 pm


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