View previous topic :: View next topic |
Author |
Message |
arshadh Beginner
Joined: 10 Jan 2007 Posts: 33 Topics: 12
|
Posted: Thu Jan 18, 2007 8:44 am Post subject: Unable to delete a member thru REXX - TSO Commands |
|
|
Hi,
When I list the dataset before trying to delete it lists that succesfully( Giving recfm,lrecl,volume details). But while deleting it fails saying that the entry "****.####.&&&&" is not found . When I try to free it with FREE UNCATALOG it says that the entry is not allocated. But whenever I LISTDS the entry it goes succesfully>>> |
|
Back to top |
|
|
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu Jan 18, 2007 8:49 am Post subject: |
|
|
what does your REXX look like? _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
|
arshadh Beginner
Joined: 10 Jan 2007 Posts: 33 Topics: 12
|
Posted: Fri Jan 19, 2007 12:37 am Post subject: |
|
|
Pls find the code...
Code: |
/* rexx */
DO i=1 to 2
dsninl=old.i
/* old. contains names of two sequential datasets */
X = OUTTRAP("A.","*")
"LISTDS '"DSNINL"'"
X = OUTTRAP("OFF")
/* take the record length
length.i = substr(a.3,7,6)
/* we form new member name by concatenating an arbitrary qualifier
newdsn.i=dsninl||.new
say 'newdsn.i' newdsn.i
say length.i
/* here we get the ds info into a stem variable A to check the new dsn slready
exists or not.if so to delete it */
X = OUTTRAP("a.","*")
"LISTDS '"newdsn.i"' "
X = OUTTRAP("OFF")
"LISTDS '"newdsn.i"' "
SAY 'a.1 ' a.1 ' BEFORE DELETE'
/* if exists then we delete it */
if a.1 = newdsn.i
then do
"delete '"newdsn.i"' scratch nvr volumeentry "
"FREE DSNAME('"newdsn.i"') UNCATALOG"
end
X = OUTTRAP("c.","*")
"LISTDS '"newdsn.i"' "
X = OUTTRAP("OFF")
SAY c.1 ' AFTER DELETE ' .
|
Here "a.1 before delete" and "c.1 after delete" says such member exists .But when deleting it says entry not found |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Fri Jan 19, 2007 10:29 am Post subject: |
|
|
Not sure what is going on here exactly, but since these are sequential data sets, you should be able to delete them with something like
Quote: |
free da(ds-name) /*expect this to fail if not already allocated */
alloc f(temp-dd) da(ds-name) mod delete unit(sysda) space(0,1) track
free f(temp-dd)
|
The other possibility might be that these data sets are part of an allocated concatenation and therefore may not be cataloged but still some commands will find them (those that use SVC99 allocation for example). |
|
Back to top |
|
|
|
|