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

How to Delete VSAM Files with same HLQs


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Priyaraghu

New User


Joined: 16 Nov 2005
Posts: 7
Location: Bangalore, India

PostPosted: Wed Nov 16, 2005 3:08 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Nov 17, 2005 1:03 am
Reply with quote

How about using the DFSMSdss SAR utility:

Code:

//STEP0001 EXEC  PGM=ADRDSSU                             
//SYSPRINT DD    SYSOUT=*                                 
//JUNK     DD    DUMMY                                   
//SYSIN    DD    *                                       
  DUMP DATASET(INCLUDE(HLQ.*)) -                 
    OUTDD(JUNK) DELETE                                   
/*           


See here for more details:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DGT2R230/CCONTENTS?DT=20040624152404
Back to top
View user's profile Send private message
Priyaraghu

New User


Joined: 16 Nov 2005
Posts: 7
Location: Bangalore, India

PostPosted: Thu Nov 17, 2005 10:45 am
Reply with quote

icon_biggrin.gif 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
View user's profile Send private message
raajan_p

New User


Joined: 19 Sep 2005
Posts: 17

PostPosted: Thu Nov 17, 2005 3:34 pm
Reply with quote

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
View user's profile Send private message
Priyaraghu

New User


Joined: 16 Nov 2005
Posts: 7
Location: Bangalore, India

PostPosted: Thu Nov 17, 2005 3:38 pm
Reply with quote

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
View user's profile Send private message
Kevin

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Thu Nov 17, 2005 4:35 pm
Reply with quote

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
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top