View previous topic :: View next topic
|
Author |
Message |
Selva0202
New User
Joined: 17 Oct 2008 Posts: 18 Location: USA
|
|
|
|
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? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Can you post the output from the run which accesses ML2 datasets |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 580 Location: London
|
|
|
|
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 |
|
|
|