.MCALL .MODULE .MODULE GQWKC,RELEASE=V00,VERSION=30,COMMENT= .ENABLE LC .NLIST CND .LIST MEB ;+ ;************************************************************************ ;*.ST INQUIRE WORKSTATION CONNECTION AND TYPE * ;*.PAGE * ;*.X WORKSTATION CONNECTION * ;*.X WORKSTATION TYPE * ;*.X GQWKC * ;*.LIT * ;************************************************************************ ;* INQUIRE WORKSTATION CONNECTION AND TYPE * ;* GKCL,GKOP,WSOP,WSAC,SGOP Lma * ;* * ;* FORTRAN calling sequence: * ;* SUBROUTINE GQWKC (WKID, ERRIND, CONID, WTYPE) * ;* * ;* Input parameters: * ;* INTEGER WKID workstation identifier * ;* * ;* Output parameters: * ;* INTEGER ERRIND error indicator * ;* INTEGER CONID connection identifier * ;* INTEGER WTYPE workstation type * ;* * ;* Parameters: * ;* In workstation identifier N * ;* Out error indicator I * ;* Out connection identifier C * ;* Out workstation type W * ;* * ;* Effect: If the inquired information is available, the error * ;* indicator is returned as 0 and the values are returned * ;* in the output parameters. * ;* * ;* If the inquired information is not available, the * ;* values returned in the output parameters are implement- * ;* ation dependent and the error indicator is set to one * ;* of the following error numbers to indicate the reason * ;* for non-availability: * ;* * ;* 7 GKS not in proper state: GKS shall be in one * ;* of the states WSOP, WSAC or SGOP. * ;* 20 Specified workstation identifier is invalid * ;* 25 Specified workstation is not open * ;* * ;* References: * ;* 4.5.2 * ;* 4.11.2 * ;* * ;* Errors: * ;* none * ;************************************************************************ ;*.ELI * ;************************************************************************ ;- ;; .LIBRARY /UTL.MLB/ .MCALL $UTL $UTL .NLIST .INCLUDE /GOPSTA.INC/ .INCLUDE /WSSL.INC/ .LIST .PSECT G$$COD,RW,I,LCL,REL,CON GQWKC:: CLR @4(R5) ; Clear the error indicator. TST G$OPST ; Is GKS in state GKOP, WSOP, WSAC or SGOP? BNE 10$ ; Branch if it is. MOV #8.,@4(R5) ; GKS not in proper state. 10$: MOV @2(R5),R0 ; Get the workstation identifier. JSR PC,G$GWSL ; Get a pointer to the workstation state list. MOV WS$CID(R0),@6(R5) ; Get the connection ID. MOV WS$WT(R0),@10(R5) ; Get the workstation type. RTS PC ; Return .END