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
 

 

How can we delete records from a VSAM dataset.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Abhushan_s

New User


Joined: 28 Jul 2008
Posts: 34
Location: Ahmedabad

PostPosted: Thu Sep 25, 2008 1:14 pm    Post subject: How can we delete records from a VSAM dataset.
Reply with quote

Could anyone help me as to how can we Delete Records from a particular VSAM file?
Back to top
View user's profile Send private message

genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Thu Sep 25, 2008 1:20 pm    Post subject:
Reply with quote

you can do that in a number of ways. find out which file operation utility ur shop has and u can just get into the file and delete whatever records u want.
you might have Ditto or MasterCat or FileAid...

you can do it using JCL. u can use something like SELCOPY.

really depends on what ur requirement is. is it just to delete the records once and forget ? or is it some job which will be reusable ?
Back to top
View user's profile Send private message
Abhushan_s

New User


Joined: 28 Jul 2008
Posts: 34
Location: Ahmedabad

PostPosted: Thu Sep 25, 2008 1:28 pm    Post subject: Reply to: How can we delete records from a VSAM dataset.
Reply with quote

Hey thank you!

Actually i wasnt aware of the file-aid option, so was not able to open the dataset as a simple PS is opened.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Thu Sep 25, 2008 1:37 pm    Post subject: Re: Reply to: How can we delete records from a VSAM dataset.
Reply with quote

Abhushan_s wrote:
.. was not able to open the dataset as a simple PS is opened.
You would need a "layout" to open VSAM via FileAid, use "formatted-edit (F2 at my shop)" to edit it.
Back to top
View user's profile Send private message
Nick Jones

New User


Joined: 28 Apr 2009
Posts: 13
Location: UK

PostPosted: Thu Apr 30, 2009 3:02 am    Post subject: How can we delete records from a VSAM dataset.
Reply with quote

If I could put forward the case for SELCOPY... (I do work for Compute (Bridgend) Ltd on the SELCOPY help desk, so what would you expect ?) icon_wink.gif

SELCOPY VSAM input (sequentially or direct by KEY/Record number/RBA)supports READ for update. This is achieved by specifying parameter UPDATE (or UPD) on the VSAM data set READ statement.

Once a VSAM data set is opened for update, the SELCOPY DELETE, INSERT and UPDATE operations may be used to delete the last record read, insert a record out of key sequence and update the last record read respectively.

e.g. To conditionally delete a record from a VSAM data set being read sequentially...

Code:
READ INDD  UPD
IF POS ...                  * Test conditions...
  THEN DELETE INDD


For more specific code, you would need to provide us with a more detailed spec.
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 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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm


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