MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Unable to delete a member thru REXX - TSO Commands

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
arshadh
Beginner


Joined: 10 Jan 2007
Posts: 33
Topics: 12

PostPosted: Thu Jan 18, 2007 8:44 am    Post subject: Unable to delete a member thru REXX - TSO Commands Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Thu Jan 18, 2007 8:49 am    Post subject: Reply with quote

what does your REXX look like?
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
arshadh
Beginner


Joined: 10 Jan 2007
Posts: 33
Topics: 12

PostPosted: Fri Jan 19, 2007 12:37 am    Post subject: Reply with quote

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
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri Jan 19, 2007 10:29 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group