View previous topic :: View next topic
|
Author |
Message |
Priyaraghu
New User
Joined: 16 Nov 2005 Posts: 7 Location: Bangalore, India
|
|
|
|
How to delete a set of VSAM files with the same High-level Qualifiers?
I need the JCL to delete, say 100 VSAM files, all of them having the same High-level Qualifiers. I dont want to hard-code the dataset names in the JCL. I need to delete them by just specifying their HLQs.
Can anyone Please Help on this? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
Priyaraghu
New User
Joined: 16 Nov 2005 Posts: 7 Location: Bangalore, India
|
|
|
|
Thankyou so much
It worked!!
The code that you gave deletes all VSAM files with 3 qualifiers..
and if i give DATASET(HLQ.**) then it deletes VSAM files with any number of qualifiers which have the same HLQ.
Thank you so much!! |
|
Back to top |
|
|
raajan_p
New User
Joined: 19 Sep 2005 Posts: 17
|
|
|
|
what changes do i need to make in the jcl if i need to do the same thing(i.e delete some 100 files with same qualifier) for flat files.
Regards,
Raajan |
|
Back to top |
|
|
Priyaraghu
New User
Joined: 16 Nov 2005 Posts: 7 Location: Bangalore, India
|
|
|
|
This utility can be used for files with DSORG SAM, PAM, PDS, PDSE, BDAM, EXCP, ISAM and VSAM. But it cannot be used for GDGs.. |
|
Back to top |
|
|
Kevin
Active User
Joined: 25 Aug 2005 Posts: 234
|
|
|
|
Of course, for VSAM or QSAM or GDG, the alterative method would always work:
- Run IDCAMS LISTCAT LVL(HLQ) to get the list of datasets with matching High-Level qualifiers.
- Extract the dataset name from the lines identified like:
CLUSTER ------ HLQ.VSAM.CLUSTER.NAME
or
NONVSAM ----- HLQ.whatever
and plug those dataset names into IDCAMS DELETE statements:
DELETE (HLQ.whatever)
- Run IDCAMS with the dynamically generated DELETE list as input. |
|
Back to top |
|
|
|