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 REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts after TBSARG: Row 370 from 1000 Pedro TSO/ISPF 1 Fri Apr 14, 2017 2:32 am


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