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
 

 

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: 440
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 Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts Need Help with : IFTHEN(WHEN=GROUP) Sumanta_89 DFSORT/ICETOOL 1 Wed Apr 19, 2017 5:23 pm
No new posts Group elements using ICETOOL Learncoholic DFSORT/ICETOOL 2 Fri Apr 14, 2017 11:01 am


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