View previous topic :: View next topic
|
Author |
Message |
seshagiri.N Warnings : 1 New User
Joined: 05 Aug 2008 Posts: 16 Location: India
|
|
|
|
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 |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
SYS1.SAMPLIB ( IGGCSIRX ) can be easily adapted and is faster and more flexible than IDCAMS LISTCAT with wildcard processing. |
|
Back to top |
|
|
seshagiri.N Warnings : 1 New User
Joined: 05 Aug 2008 Posts: 16 Location: India
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
Back to top |
|
|
|