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