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

How to empty a vsam file


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

New User


Joined: 07 Apr 2008
Posts: 64
Location: chennai

PostPosted: Tue Jun 17, 2008 6:15 pm
Reply with quote

Hi,

Can any one tell how to empty a VSAM file.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Jun 17, 2008 6:29 pm
Reply with quote

You'll find a few different suggestions here in this previous topic.
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: Tue Jun 17, 2008 6:29 pm
Reply with quote

IDCAMS DELETE command usually works well when followed by DEFINE CLUSTER.

If you can't delete/define it, what type of VSAM file -- KSDS, ESDS, RRDS, linear? KSDS you'd have to delete each record by key. RRDS can't really be emptied since the relative record exists always. ESDS might be emptied by opening for output instead of append, but I haven't tested that to know for sure. And I haven't used enough linear to know how to empty it.

Usually VSAM files don't need to be emptied but if they do it's typically an application issue and the application has code to delete the records.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Tue Jun 17, 2008 6:38 pm
Reply with quote

vpr,

Quote:
Can any one tell how to empty a VSAM file.


I use fileaid in edit mode to empty a VSAM file.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Wed Jun 18, 2008 11:43 am
Reply with quote

Morning Robert !

IDCAMS Delete-Cluster-Purge will work on KSDS too. No need to this record by record.
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 4
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