Q.How to get name of a VSE Guest Machine ? 
Author Message
 Q.How to get name of a VSE Guest Machine ?

Can anyone point me in the right direction. I need to get the name of
the VSE guest machine (Yup we really are using VSE) that a batch
assembly is running in.

The name of a control block (and possibly how to acces it) or an SVC
that might return the info.

Thanks in advance, Chris.



Tue, 04 Sep 2001 03:00:00 GMT  
 Q.How to get name of a VSE Guest Machine ?

Quote:

>Can anyone point me in the right direction. I need to get the name of
>the VSE guest machine (Yup we really are using VSE) that a batch
>assembly is running in.

>The name of a control block (and possibly how to acces it) or an SVC
>that might return the info.

I doubt that VSE knows or cares.  Most likely, you will have to write
some code (that must run in supervisor state) to issue a diagnose 8 (CP
function diagnose) command QUERY USERID & parse the returned o/p.

Here is an example:

         LA    R8,CPQRY                point to command
         LA    R9,BUFF                 RETURN BUFFER
         LA    R10,CPQRYLEN            command length
         ICM   R10,8,=X'40'            SIGNAL OUTPUT INTO BUFFER
         LA    R11,BUFF$               RETURN BUFFER LENGTH
*
*        ISSUE DIAGNOSE
*              rx=r8    input buffer address
*              rx+1=r9  output buffer address
*              ry=r10   length of input buffer + flag
*              ry+1=r11 length of output buffer
*
         DIAG  R8,R10,8                CONSOLE FUNCTION DIAGNOSE
*
*         When control is returned from diagnose,
*         rx+1 register points to the buffer that contains command
*               response (r9)
*         ry    contains the cp return code (r10)
*         ry+1  specifies the length of response (r11)
*
*        See if the return code in R10 is zero.
*        If not, return an error indication.
*        if so,  move the first word into the output area.
*
         LTR   R10,R10                 Error?
         BZ    SETRSP1                 No.
*                                      Yes.
. . . . . . . . . .

CPQRY    DC    C'QUERY USERID'
CPQRYLEN EQU   *-CPQRY
*
BUFF     DS    D                       Return buffer.
         DS    2D                      Trash.                  
BUFF$    EQU   *-BUFF                  Buffer length in bytes.

After the diagnose call (DIAG is a macro in CMS, DMSOM MACLIB I think),
the userid will be in BUFF with a trailing blank if its less than 8
chars followed by "AT nodeid".  Unless the possible userids are all
the same length, you will have to scan for the blank seperator.
--
Rich Greenberg    Work:  PM0RMG atsign WSPVM1.worldspan.com   +1 770-563-6656
N6LRT   Marietta, GA, USA   Play: richgr atsign netcom.com    +1 770-321-6507
Eastern time.    I speak for myself & my dogs only.        VM'er since CP-67
Canines:Val(Chinook,CGC,TT),Red(Husky,(RIP)),Shasta(Husky,TT) Owner:Chinook-L
Atlanta Siberian Husky Rescue.  Adopt a homeless Husky.  Asst Owner:Sibernet-L



Thu, 06 Sep 2001 03:00:00 GMT  
 Q.How to get name of a VSE Guest Machine ?
Thanks for the response. I'm afraid my request was't quite clear. I need to write
a batch assembly that can get the name of the guest machine it runs in. Seems our
operators have been running jobs in the wrong machines alot lately, If I can find
the info and return it to the COBOL caller,  then they can cancel themsleves if
run in the wrong machine.

Thanks again, Chris

Quote:

> I doubt that VSE knows or cares. <<Snip>>



Fri, 07 Sep 2001 03:00:00 GMT  
 Q.How to get name of a VSE Guest Machine ?

writes:

Quote:
>I doubt that VSE knows or cares.

Actually, I think VSE does know--the VSE console (Attention Routine) command
SIR  returns:

sir
...
AR 0015 VM-SYSTEM = VM/ESA          VER. 2 REL. 2.0  SERV.LVL. = 9705
AR 0015 PROCESSOR = 9221-16         USERID    = ITESA
AR 0015 PROC-MODE = ESA             IPL(103)    03/07/1999 16:29:42
AR 0015 AF-SYSTEM = VSE/AF          VER. 6 REL. 2.1
AR 0015 SERV.LVL. = DY44364         SERV.DATE = 06/25/1997
AR 0015 IPL-PROC  = $IPLESA         JCL-PROC  = $$JCL
...

Note the "USERID = ITESA" - that information is coming from the name of the VM
userid of the guest.

VSE does send certain commands to VM (e.g., CPCLOSE when a writer task is
started with the VM subparameter), so VSE does care and there is a bit in the
SYSCOM to reflect that it is under VM.

I hadn't stumbled across a fulfillment of Chris' request as an easy macro. (You
would think it would be a good candidate for the EXTRACT macro, but if it is, I
haven't hit upon it.)

Mark A. Young



Sat, 08 Sep 2001 03:00:00 GMT  
 Q.How to get name of a VSE Guest Machine ?

Quote:


>>Can anyone point me in the right direction. I need to get the name of
>>the VSE guest machine (Yup we really are using VSE) that a batch
>>assembly is running in.

>I doubt that VSE knows or cares.  Most likely, you will have to write
>some code (that must run in supervisor state) to issue a diagnose 8 (CP
>function diagnose) command QUERY USERID & parse the returned o/p.
>         LA    R8,CPQRY                point to command
>         LA    R9,BUFF                 RETURN BUFFER
>         LA    R10,CPQRYLEN            command length
>         ICM   R10,8,=X'40'            SIGNAL OUTPUT INTO BUFFER
>         LA    R11,BUFF$               RETURN BUFFER LENGTH
>         DIAG  R8,R10,8                CONSOLE FUNCTION DIAGNOSE

I presume VM will reflect the Diagnose back to VSE if it is running
in problem state.  This is needed for VM running under VM.  Sometimes it
would be nice if it didn't do that, though.  Should work in supervisor
state, though.

-- glen



Sat, 08 Sep 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Getting Mac machine name in VW?

2. Q. How to get name of VSE Guest "Re-Stated"

3. VSE: Getting Shift F10 keycode

4. VSE Porting Tool Project - Looking for VSE customer contacts for porting study

5. VSE - Join the VSE mailing list!

6. Problems with migration VSE for OS/2 to VSE for Windows NT

7. VSE: Interest in REXX-Binding for VSE-OS2 ?

8. Getting into Forth on a UNIX Machine

9. getting the IP address of the local machine

10. LE/VSE COBOL and DFSORT/VSE's Year2000 Features

11. LE/VSE COBOL and DFSORT/VSE's Year 2000 Features

 

 
Powered by phpBB® Forum Software