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

Updating records in a VSAM file


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

New User


Joined: 17 Jun 2009
Posts: 38
Location: Denver

PostPosted: Thu Nov 04, 2010 11:52 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Nov 05, 2010 12:12 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Nov 05, 2010 1:03 am
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Nov 05, 2010 12:42 pm
Reply with quote

And equally important, a BACKUP before changes are applied
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Nov 05, 2010 7:14 pm
Reply with quote

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 icon_redface.gif

d
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Nov 05, 2010 7:17 pm
Reply with quote

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
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 Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
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
Search our Forums:

Back to Top