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: 8154
Location: East Dubuque, Illinois, 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 Compare yesterday's date to the one o... migusd SYNCSORT 7 Fri Sep 22, 2017 11:35 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm

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