IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Deleting the datasets


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
seshagiri.N
Warnings : 1

New User


Joined: 05 Aug 2008
Posts: 16
Location: India

PostPosted: Sat Aug 16, 2008 2:44 pm
Reply with quote

Hi all,

I have the below requirement:

There are 1000's of datasets of some Highlevel qualifier like...

abcd.ab31.gh.**.file33
abcd.ab31.gh.**.file34

Among all these datasets only migrated datasets has to be deleted. Can anyone give me any clue how to proceed?

Thanks in advance!
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Sat Aug 16, 2008 3:03 pm
Reply with quote

Trap the output of a listcat command in rexx.
Examine the output searching for MIGRAT and store concerned Data Set names in stem.

Perform HDELETE on these files rereading the stem.

That's all.

Cheers
Pierre
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Aug 16, 2008 3:40 pm
Reply with quote

SYS1.SAMPLIB ( IGGCSIRX ) can be easily adapted and is faster and more flexible than IDCAMS LISTCAT with wildcard processing.
Back to top
View user's profile Send private message
seshagiri.N
Warnings : 1

New User


Joined: 05 Aug 2008
Posts: 16
Location: India

PostPosted: Tue Aug 19, 2008 6:48 pm
Reply with quote

Thank you very much!

I am facing a problem. Please see the code segment below:

Code:
DSNAME =DNAME                 
ADDRESS TSO "DELETE '"DSNAME"'"
SAY DNAME DELETED             


If DNAME=ABCD.DEFD.GHYH, then I got a mesage like below.

Code:
INVALID DATA SET NAME, 'ABCD.DEFD.GHYH                                   
***                                                                           
INVALID DATA SET NAME, '                                         
LASTCC=12                                                       


The DNAME is dynamic. How can I resolve this?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Aug 19, 2008 6:54 pm
Reply with quote

How long is the string DNAME? It looks to me like you need to truncate some training blanks from the end. No?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Aug 19, 2008 7:11 pm
Reply with quote

I have recently posted a REXX to delete migrated datasets, and lots of other functions in this very helpboard.

CLICK HERE to see the code and what it might do for you !

In fact, you should already have seen it as you were the OP on that thread - which bears a remarkable resemblence to THIS one

Consider yourself warned for multiple postings icon_evil.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Deleting a Tape file JCL & VSAM 14
No new posts CA7 deleting files in steps after job... CA Products 4
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
No new posts PL/I, VB Datasets and the RDW PL/I & Assembler 4
No new posts how to get list of all VSAM/non-VSAM ... JCL & VSAM 13
Search our Forums:

Back to Top