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

Search Uncat DSNs in the Storage Group


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Selva0202

New User


Joined: 17 Oct 2008
Posts: 18
Location: USA

PostPosted: Mon Aug 02, 2010 7:43 am
Reply with quote

Hello,

I do have a requirement to cleanup the uncataloged datasets from the Storage Group. I tried with the following JCL and it searches for the datasets which are migrated to ML2 as well. But, I want to exclude the datasets which are already migrated to ML2 from the search criteria.

JCL:-

//STEP01 EXEC PGM=ADRDSSU,REGION=0M,PARM=('TYPRUN=NORUN')
//SYSPRINT DD SYSOUT=*
//DSNOUT DD DUMMY
//SYSIN DD *
DUMP -
STORGRP(XXXXXXXX) -
OUTDD(DSNOUT) -
DS(INCL(**) -
EXCL(SYS1.**,CATALOG.**) -
BY((CATLG,EQ,NO))) -
DELETE PURGE
//

Is there a way to achieve this? icon_idea.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Aug 02, 2010 4:31 pm
Reply with quote

Can you post the output from the run which accesses ML2 datasets
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Wed Aug 11, 2010 2:52 pm
Reply with quote

You are trying to do a Logical DUMP DELETE which does not work when dealing with uncataloged datasets. Because it is logical it tries to go via the catalog hence reference to migrated data. You have to do a Physical DUMP at the volume level to achieve what you want. Unfortunately you have to specify each volume you want to process for a Phsyical DUMP as STORGRP is not an option. You can only have 255 statements in teh SYSIN too so you may have to do multiple jobsteps.
e.g.
//STEP01 EXEC PGM=ADRDSSU,REGION=512M,PARM=('TYPRUN=NORUN')
//SYSPRINT DD SYSOUT=*
//XIT DD DUMMY
//SYSIN DD *
DUMP ODD(XIT) PURGE DEL OPT(4) -
DS(INCL(**) -
EXCL(SYS1.**,CATALOG.**) -
BY((CATLG,EQ,NO),(REFDT,NE.*))) -
IDY( -
(volser1) -
(volser2) -
...etc
)
//

I'd suggest you analyze why all these uncataloged datasets have got like that in SMS managed volumes, which in theory shouldn't have any uncataloged. A bunch of IDCAMS DIAGNOSE jobs should flush out a number of issues, but you need to find out what caused these in the first place and jump on whoever is the culprit!
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts CICS vs LE: STORAGE option CICS 0
No new posts first column truncated in search result IBM Tools 13
Search our Forums:

Back to Top