How's this for a starting point?

/* REXX to delete certain older files for specified userid */

                                                               
parse upper arg userid                                         
                                                               
/* syntax check */                                             
If userid = ""  Then Do                                        
    Say "Syntax DELSVCFI userid"                               
    return 8                                                   
    end                                                        
                                                               
/* Issue the LISTCAT trapping the output */                    
Call OUTTRAP "ListCat.", "*"                                   
"LISTCAT LEVEL(" || userid ||".QUALIFIER) CREATION(1)"          
Call OUTTRAP("OFF")                                            
                                                               
If RC <> 0 Then Do                                             
  Say "LISTCAT Failed, RC =" RC                                
  Say ListCat.1                                                
  Exit RC                                                      
  End  /* End bad RC */                                        
                                                               
/* Parse the output and Delete the files */                    
count = 0                                                      
Do i = 1 To ListCat.0                                          
    Parse Var ListCat.i key . dsn .                            
    If key = "NONVSAM" Then Do                                 
        "DELETE '" || dsn || "'"                               
        If RC = 0 Then count = count + 1                       
        End   /* End found NONVSAM */                          
    End   /* End loop on stem output */                        
                                                               
Say count "datasets deleted"                                   

Charles



-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Pommier, Rex R.
Sent: Monday, January 30, 2006 11:50 AM
To: [email protected]
Subject: Basic question on deleting datasets


Hi.

I'm afraid I'm in a "can't see the forest because of the trees"
situation which probably has a very easy answer that I can't see.

I have a disk pack that I need to get a large subset of the datasets off
it as well as uncataloged.  Is there some way using IDCAMS or DFSMSdss

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to