View previous topic :: View next topic
|
Author |
Message |
manugeorge2004
New User
Joined: 17 Jun 2009 Posts: 38 Location: Denver
|
|
|
|
Hi
I have a requirement where I need to update few records in a VSAM file.
Is there a way I can do it with out DELETE/DEFINE of the file.
Also, I dont want to code a COBOL program for this.
Is this possible with IDCAMS.
The data I need to update is part of the key for the KSDS |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
If the data you need to update is part of the key, then you have to be able to delete keys and add new keys. The only way to do this in IDCAMS is to unload the VSAM file to a sequential file, delete and define the VSAM file, then reload with the new data.
You can write a program, delete / define the file, or talk to your site support group to see if your site owns a tool that can be used for such a task. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I have a requirement where I need to update few records in a VSAM file. |
If this is a "real" file (i.e. Production data) you also need to consider providing an audit trail of what was changed.
If this is a file of your own and is only for testing, an audit trail may not be necessary. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
And equally important, a BACKUP before changes are applied |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Quote: |
And equally important, a BACKUP before changes are applied |
Probably more important. . .
I tend to forget that not everyone automatically creates a backup when performing non-routine maintenance
d |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Dick -- I'm with you. It's so second-nature to take a backup before making changes that I don't even think about it any more. |
|
Back to top |
|
|
|