Almost, but not quite. The RC=3 means "invalid option." The proper form of
the query is CP QUERY USER userid, which will report "not logged on" for a
user that doesn't exist. Spooling your punch (after querying it to capture
the existing setting) to the target user will return RC=53 if the user
doesn't exist, 0 if it does.
Marty
____________________
Martin Zimelis
Principal
maz/Consultancy
_____
From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of Huegel, Thomas
Sent: Thursday, October 25, 2007 10:22 AM
To: [email protected]
Subject: Re: How can I find if a user is defined in the directory (without
looking!)?
Can't you use the return code from your CP QUERY? 0 = logged on, 3 = not in
directory, 45 = in directory but not logged on...
-----Original Message-----
From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED]
Behalf Of Dave Hansen
Sent: Thursday, October 25, 2007 9:16 AM
To: [email protected]
Subject: How can I find if a user is defined in the directory (without
looking!)?
Hello,
I have an EXEC that I wish to use to TRANS the console files from another
userid for a given period of time. I would like to check if the userid
given the EXEC actually exists.
I looked at the CMS QUERY which does stack the results, but userid is not
part of the CMS query. The CP Query does let me know about the user,
but doesn't stack the results.
The CP MSG (and SMSG) & IND USER don't care about the userid, and an
invalid userid is always NOT LOGGED ON.
It looks like I almost need to spool and close my console to get the
results of my CP Query. I suppose I could just issue the TRANS against an
invalid userid and let it fail.
Any thoughts from the group?
Thank you, Dave Hansen
Sr. Systems Programmer
Hennepin County
__________________________________________________________________
<< ella for Spam Control >> has removed VSE-List messages and set aside
VM-List for me
You can use it too - and it's FREE! http://www.ellaforspam.com