Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to Delete VSAM Files with same HLQs

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to Delete VSAM Files with same HLQs
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

Moderator Team Head


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

PostPosted: Thu Nov 17, 2005 1:03 am    Post subject: Re: How to Delete VSAM Files with same HLQs
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:

http://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    Post subject: Re: How to Delete VSAM Files with same HLQs
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    Post subject: Re: How to Delete VSAM Files with same HLQs
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    Post subject: Re: How to Delete VSAM Files with same HLQs
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    Post subject: Re: How to Delete VSAM Files with same HLQs
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts VSAM Space Allocation mrgnndhmk JCL & VSAM 7 Sat Apr 22, 2017 12:42 am
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us