Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Deleting the datasets

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Deleting the datasets
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: 456
Location: Belgium

PostPosted: Sat Aug 16, 2008 3:03 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Sat Aug 16, 2008 3:40 pm    Post subject:
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    Post subject:
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

Moderator Team Head


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

PostPosted: Tue Aug 19, 2008 6:54 pm    Post subject: Reply to: Deleting the datasets
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: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 19, 2008 7:11 pm    Post subject:
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    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
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 Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm
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

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us