IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Loading key sequenced sorted flat file to existing VSAM file


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
morpheus007

New User


Joined: 27 Dec 2005
Posts: 58

PostPosted: Tue Jun 23, 2009 3:21 pm
Reply with quote

We have a prod VSAM file with customer data for about 100000 customers.its a KSDS file.

We now have a requirement to copy about 10 customer ID's from it
and load them to an existing test VSAM file.

We extracted the data for the 10 customers to a flat file and sorted them on key sequence.

We now want to REPRO this to the test VSAM file.

Please let us know what REPRO option would not overwrite the existing VSAM data in the test file.Also the output should be in correct key sequence.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jun 23, 2009 3:30 pm
Reply with quote

Click HERE to read the IDCAMS manual.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Jun 23, 2009 3:34 pm
Reply with quote

Here
Quote:
Please let us know what REPRO option would not overwrite the existing VSAM data in the test file.Also the output should be in correct key sequence.
by overwrite I believe, you meant "append".

My mainframes seesion is not up so can't test and can't tell for sure if this
Quote:
the output should be in correct key sequence
will be taken care (or not) but to append data for those customer IDs for which data might already be there in your "test-VSAM", you may try this:
Code:
REPRO INFILE(FILEIN) OUTFILE(FILEOUT) NOREPLACE
But please take a back-up of your VSAM before any experiment.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jun 23, 2009 4:19 pm
Reply with quote

Quote:
by overwrite I believe, you meant "append".

Anuj, You INSERT into a KSDS, you do not append, as the records are always stored in key sequence.

The solution also depends on what the OP means by "overwrite" - does he mean do not overwrite records in the file if they exist, or does he mean do not overwrite the whole file and only be left with the new inserts.

Unfortunately, with it not being psychic day today we can only guess at the requirement.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top