Try using the LINK command:

link trash                                                             
HCPLNM053E TRASH not in CP directory                                   
RSCHUH CMS 22 (CMS22B)(00053);                                         
link tools                                                             
HCPLNM022E A virtual device number was not supplied or it was invalid. 
RSCHUH CMS 22 (CMS22B)(00022);                                         
                               

Obviously, if you use diagrc, you will get either 53 or 22 as the return
code. 53 --> does not exist, 53 --> defined.


Regards, 
Richard Schuh 


-----Original Message-----
From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Hansen
Sent: Thursday, October 25, 2007 8:05 AM
To: IBMVM@LISTSERV.UARK.EDU
Subject: Re: How can I find if a user is defined in the directory
(without looking!)?

Hello again,

   Thank you for all your suggestions.  I did like Kens response with
the diagrc in it.  I did some testing and for simplicity I favor just
checking
the return code on the CP Q userid.  I had forgotten about our friend
EXECIO that stacks the output and I liked the PIPE that put the results
in a
stem variable.


      Thanks again to all,  Dave Hansen

Reply via email to