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
 

 

Loading key sequenced sorted flat file to existing VSAM file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Loading key sequenced sorted flat file to existing VSAM file
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: 8593
Location: Back in jolly old England

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

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

Senior Member


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

PostPosted: Tue Jun 23, 2009 3:34 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Tue Jun 23, 2009 4:19 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 3 Tue Jan 17, 2017 4:26 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts Underlying DB2 VSAM LDS - SMF recording vasanthz All Other Mainframe Topics 6 Thu Jan 05, 2017 4:20 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


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