View previous topic :: View next topic
|
Author |
Message |
rkprasanth_m
New User
Joined: 22 Jun 2006 Posts: 44
|
|
|
|
Would you please give me the procedure or best prastices to merge VSAM data sets |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Use a SORT MERGE, providing that there is a common key in both files, and that they're already sorted in key order. |
|
Back to top |
|
|
guptaa
New User
Joined: 22 Feb 2007 Posts: 10 Location: pune
|
|
|
|
first repro the two files into flat files
merge and sort the two files and don't forget to omit duplicates
then repro the flat file into single VSAM i think this is the simplest way to do that... |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
merge and sort the two files and don't forget to omit duplicates |
What criteria would you use for removing duplicates.
What data will be omitted.
What is the effect on business by omitting data.
May be a duplicate key, but totally different data.
- which record do you want to delete and why. |
|
Back to top |
|
|
Vijay_K
New User
Joined: 23 Apr 2007 Posts: 1 Location: Bangalore
|
|
|
|
For removing duplicates we have to use SUM FIELDS=NONE option in Jcl Sort |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Vijay_K
Quote: |
For removing duplicates we have to use SUM FIELDS=NONE option in Jcl Sort |
What I meant was .... if you have two records with a duplicate key in your two VSAM files, is how do you decide which of the two records to omit, and why.
What if the other fields differ, how do you decide which to drop and which to keep.
What effect will this have on the business if you drop the incorrect data, or if the data from both records is required.
My original post
Quote: |
May be a duplicate key, but totally different data.
- which record do you want to delete and why. |
Yes, technically the answer is correct, but financially ??? |
|
Back to top |
|
|
rz061m
New User
Joined: 03 Mar 2006 Posts: 48 Location: Chennai
|
|
|
|
expat wrote: |
Vijay_K
Quote: |
For removing duplicates we have to use SUM FIELDS=NONE option in Jcl Sort |
What I meant was .... if you have two records with a duplicate key in your two VSAM files, is how do you decide which of the two records to omit, and why.
What if the other fields differ, how do you decide which to drop and which to keep.
What effect will this have on the business if you drop the incorrect data, or if the data from both records is required.
My original post
Quote: |
May be a duplicate key, but totally different data.
- which record do you want to delete and why. |
Yes, technically the answer is correct, but financially ??? |
Hi,
As far as these information it has to be decided by the question poster...... we cant spoon feed all these datas, see the question posted. For this sort of question this is the answer could be given.
if you start thinking financially then he has to give more details.... |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
if the record layout allows it a plain SORT will do
( DFSORT accepts VSAM both for input and output)
otherwise
repro the VSAM to PS files, sort, repro to VSAM
I suppose that all the application/business related concerns ( record layout, duplicate keys, ...... ) have already been worked out; |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
I suppose that all the application/business related concerns ( record layout, duplicate keys, ...... ) have already been worked out; |
Was that a Gloucester Spot at flight level three zero ? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
Was that a Gloucester Spot at flight level three zero ? |
Dumb of me :-) I do not get the joke
regards
E2L e.s. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
A reference to an old English phrase ...........
Gloucester Spot is a breed of pig, so basically it is saying "If pigs could fly" |
|
Back to top |
|
|
|