Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to empty a vsam file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to empty a vsam file
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

Moderator Team Head


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

PostPosted: Tue Jun 17, 2008 6:29 pm    Post subject: Reply to: How to empty a vsam file
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: 8201
Location: Dubuque, Iowa, USA

PostPosted: Tue Jun 17, 2008 6:29 pm    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Tue Jun 17, 2008 6:38 pm    Post subject: Reply to: How to empty a vsam file
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: 757
Location: Germany

PostPosted: Wed Jun 18, 2008 11:43 am    Post subject:
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    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 ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts File Tailoring -- Temporary dataset i... samzee71 CLIST & REXX 3 Fri Dec 01, 2017 3:12 am
No new posts Rexx - File tailoring samzee71 CLIST & REXX 10 Thu Nov 30, 2017 10:47 pm
No new posts Compare VSAM files using DFSORT pshongal DFSORT/ICETOOL 5 Thu Nov 23, 2017 10:24 am
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us