View previous topic :: View next topic
|
Author |
Message |
vpr_118 Warnings : 1 New User
Joined: 07 Apr 2008 Posts: 64 Location: chennai
|
|
|
|
Hi,
Can any one tell how to empty a VSAM file. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
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 |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Morning Robert !
IDCAMS Delete-Cluster-Purge will work on KSDS too. No need to this record by record. |
|
Back to top |
|
|
|