Dave,  I messed up in my last example.

By coding the pipe without the USER keyword yow get what you want.

/* */                                    
                                         
address command                          
                                         
arg userid                               
                                         
    "PIPE cp query" userid "| stem resp."
    say resp.1                           
                                         
exit                                     

Responses:

cpcmdtst ftpserve                     Logged on
FTPSERVE - DSC                    
Ready; T=0.01/0.01 11:00:05       
cpcmdtst vssivp1                  
HCPCQU045E VSSIVP1 not logged on      Not logged on
Ready; T=0.01/0.01 11:00:19       
cpcmdtst vssivp                   
HCPCQV003E Invalid option - VSSIVP    Not in directory 
Ready; T=0.01/0.01 11:00:28       

Rick

Rick Bourgeois, President
Virtual Software Systems, Inc.
7715 Browns Bridge Rd
Gainesville, GA  30506
[EMAIL PROTECTED]
770-781-3200

-----Original Message-----
From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Hansen
Sent: Thursday, October 25, 2007 10: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

Reply via email to