View previous topic :: View next topic
|
Author |
Message |
Debasis Misra Warnings : 1 New User
Joined: 16 Sep 2008 Posts: 72 Location: Bangalore
|
|
|
|
Hi
I have a VSAM file with layout as below
First File or the input file
Code: |
0001XXX1
0002XX2
0003XXX1
|
If i have to copy this data into another VSAM file with the same record layout and properties. And i don't want to overlay data which already exists in the second file
Second File or the output file
I want the o/p file layout to be
Code: |
0001XXX1
0002XX2
0003XX3
|
Is it possible to achieve this with REPRO? Is there any other method by which this could be acheived? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You didn't think to mention what type of VSAM file it is. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
Is it possible to achieve this with REPRO? Is there any other method by which this could be acheived? |
using REPRO NO
using <SORT> YES |
|
Back to top |
|
|
Debasis Misra Warnings : 1 New User
Joined: 16 Sep 2008 Posts: 72 Location: Bangalore
|
|
|
|
Bill Woodger wrote: |
You didn't think to mention what type of VSAM file it is. |
Sorry i did not mention this earlier. Both the files are VSAM Key sequence Datasets |
|
Back to top |
|
|
Debasis Misra Warnings : 1 New User
Joined: 16 Sep 2008 Posts: 72 Location: Bangalore
|
|
|
|
Quote: |
using REPRO NO
using <SORT> YES |
Now that i know REPRO is not possible i will try SORT.
I also changed how the data in files will be. I noticed a typo from earlier
Code: |
KSDS 1
0001XXX1
0002XXX2
0003XXX1 |
Code: |
KSDS 2
0001XXX1
0003XXX3 |
Code: |
o/p KSDS
0001XXX1
0002XXX2
0003XXX3 |
Where the first 4 bytes are the key of the KSDS
The o/p KSDS needs to have all data present in the 2nd KSDS and the records in KSDS1 which are not present in KSDS2. Basically i want to copy data from first KSDS into 2nd KSDS without overlaying any data |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
I was wondering why enrico said No. I guess he was looking at your data, which does not match your original description in the text.
If you have on your input file a mix of keys which are already present, and keys which are not already present, and you just want those records which have keys which are not already present, the look at the manual which describes IDCAMS, find the bit about REPRO and look at REPLACE within REPRO and see if that will do what you want. |
|
Back to top |
|
|
|