Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Search Uncat DSNs in the Storage Group

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Search Uncat DSNs in the Storage Group
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: 8593
Location: Back in jolly old England

PostPosted: Mon Aug 02, 2010 4:31 pm    Post subject:
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 User


Joined: 31 Dec 2009
Posts: 445
Location: London

PostPosted: Wed Aug 11, 2010 2:52 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sharing PLI storage Pedro PL/I & Assembler 2 Mon Oct 16, 2017 10:11 pm
No new posts HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Search for a string in many PDS KARTHIGADEVI CLIST & REXX 5 Fri Sep 08, 2017 2:32 pm
This topic is locked: you cannot edit posts or make replies. Limit access to certain RACF group cvnlynn CLIST & REXX 5 Wed Aug 23, 2017 2:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us