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
 

 

Reg: Deletion and creation of 1000 datasets

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Swetha Kunala

New User


Joined: 01 Sep 2006
Posts: 4

PostPosted: Fri Apr 13, 2007 5:35 pm    Post subject: Reg: Deletion and creation of 1000 datasets
Reply with quote

Hi,

I need to delete some 100 datasets which are of the format
PNF.XX.ABC01,PNF.XX.ABC02 etc til PNF.XX.ABC1000.
COuld you please let me know how i can delete them at once using the IDCAMS utility ?

I also want to recreate these 1000 datasets.
How can this be done ?

Thanks,
Swetha
Back to top
View user's profile Send private message

agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 686
Location: Earth

PostPosted: Fri Apr 13, 2007 6:11 pm    Post subject:
Reply with quote

See if below link helps.. icon_smile.gif
http://ibmmainframes.com/viewtopic.php?t=6069&highlight=adrdssu
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: Fri Apr 13, 2007 6:12 pm    Post subject:
Reply with quote

You can't easily do this using IDCAMS because the wildcard can only be used for a complete dsn level.

If ABC1000 is DEFINITELY the last one then you can use the wildcard, but if there are more after ABC1000 you can't.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 686
Location: Earth

PostPosted: Fri Apr 13, 2007 6:16 pm    Post subject:
Reply with quote

Quote:
I need to delete some 100 datasets which are of the format
PNF.XX.ABC01,PNF.XX.ABC02 etc til PNF.XX.ABC1000.
COuld you please let me know how i can delete them at once using the IDCAMS utility ?

I also want to recreate these 1000 datasets.
How can this be done ?

Just a suggestion..
If these are not VSAM files, you should use GDGs for such datasets, it will be pretty easy to manage them. icon_smile.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: Fri Apr 13, 2007 7:06 pm    Post subject:
Reply with quote

If these files are NOT VSAM, then here's a cutie that works. Rather than delete and redefine them again, I just null the files.

Code:

/* REXX *** RESET DSN RATHER THAN DELETE DEFINE                      */
                                                                       
"FREE  FI(SYSIN,SYSUT1,SYSUT2)"                                         
"ALLOC FI(SYSIN)  DUMMY"                                               
"ALLOC FI(SYSUT1) DUMMY"                                               
                                                                       
"EXECIO * DISKR DELETES ( STEM DELS. FINIS"                             
                                                                       
DO A = 1 TO DELS.0                                                     
  DSN = STRIP(SUBSTR(DELS.A,1,44))                                     
  "FREE FI(SYSUT2)"                                                     
  "ALLOC FI(SYSUT2) DA('"DSN"') SHR"                                   
  "IEBGENER"                                                           
END                                                                     
"FREE  FI(SYSIN,SYSUT1,SYSUT2)"                                         


It's run in batch with the DELETES DD * having a list of the datasets to be nulled.
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 DUMP DATASETS VS TRACE DATASETS! lind sh CICS 4 Tue Dec 06, 2016 11:31 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts ISPF Tables Creation newsysprg TSO/ISPF 6 Wed Jul 13, 2016 2:21 pm
No new posts Finding unreferenced datasets without... Alan Playford JCL & VSAM 5 Tue Jul 12, 2016 9:07 pm
No new posts BDW in VB datasets harisukumaran JCL & VSAM 5 Sat May 28, 2016 9:46 am


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