*DECK NVFOPSC
USETEXT TEXTNVF
USETEXT TEXTSS
USETEXT TXINNVF
USETEXT TXCMDNV
USETEXT TXSMNVF
USETEXT TXTAPSS
PROC NVFOPSC;
# TITLE NVFOPSC - PERFORM SHUTDOWN COMMAND. #
BEGIN # NVFOPSC #
#
** NVFOPSC - PERFORM SHUTDOWN COMMAND.
*
* A. LIM. 82/03/22.
*
* THIS PROCEDURE-S MAIN FUNCTION IS TO PERFORM A HOP SHUTDOWN
* COMMAND. IT IS CALLED INTO EXECUTION BY: *NVFODHC*
*
* PROC NVFOPSC
*
* ENTRY HOP COMMAND IN *WCBUF[1]*, *HDRCMD[1]*, AND *PARMS[0]*
* WITH *WCBUF* DEFINED IN TEXTSS, AND *HDRCMD* AND *PARMS*
* DEFINED IN TXCMDNV.
*
* EXIT A SH/ISD SM IS SENT TO OUTGOING-TRAFFIC-QUEUE *OTQ*,
* AND A NULL TERMINAL-TEXT LINE IS SENT TO CONNECTION-
* TRAFFIC-QUEUE *CTQ*.
*
* METHOD USE THIS HOP COMMAND-S VERB IN THE PARAMETER LIST TO
* DETERMINE IF A FORCE SHUT-DOWN OF THE HOST IS REQUIRED.
* BUILD SH/ISD SM WITH FORCE-SHUT-DOWN FLAG SET/NOT-SET,
* AND SEND IT TO *OTQ*. BUILD A NULL TERMINAL-TEXT LINE
* WITH INPUT-ALLOW-FLAG SET AND SEND IT TO *CTQ*.
#
#
**** PROC NVFOPSC XREF LIST
#
XREF
BEGIN
PROC NVFUMQE; # MAKE QUEUE ENTRY #
PROC SSSAWR; # SS- ACCEPT A WORKLIST REQUEST #
PROC SSTAQE; # SS- ACCEPT A QUEUE ENTRY #
END
#
****
#
CONTROL EJECT;
ITEM I I; # LOOP INDUCTION VARIABLE #
ITEM MATCH B; # LOOP EXIT VARIABLE #
# BUILD SH/ISD SM AND SEND IT TO *OTQ* #
NVFSTATE = TRUE; # INITIATE IDLE/DISABLE HOST #
SPMSG0[1] = 0; # CLEAR MESSAGE BUFFER #
IF HDR$VERB[1] EQ IDH$
THEN
SHISF[1] = FALSE; # IDLE HOST, NO FORCE SHUTDOWN #
ELSE
SHISF[1] = TRUE; # DISABLE HOST, FORCE SHUTDOWN #
WCB$WORD[1] = 0; # CLEAR WC WORD #
ABHWORD[1] = 0; # CLEAR ABH WORD #
WCB$WC[1] = LSH + 2; # BUILD WC WORD #
ABHABT[1] = APPCMD; # BUILD ABH WORD #
ABHACT[1] = CT60TRANS;
ABHTLC[1] = LSH;
PFCSFC[1] = SHISD;
SHISAN[1] = 0; # SHUTDOWN IS FOR ALL APPLICATION #
SSTAQE(P<OTQ>,WCBUF[1],ABHBUF[1],NVFSM[1]); # SEND SH/ISD TO OTQ#
#
* SEND THE COMMAND TEXT OFF TO THE NETWORK LOG FILE AND THE HISTORY
* BUFFER.
#
NVFUMQE(P<USQ>,PARMS[0],5,0,HDR$TXWCNT[1]*10);
# SEND A NULL TERMINAL-TEXT LINE TO *CTQ* #
WCB$WORD[1] = 0; # CLEAR WC WORD #
ABHWORD[1] = 0; # CLEAR ABH WORD #
WCB$IAF[1] = TRUE; # SET INPUT-ALLOW FLAG TRUE #
WCB$WC[1] = 2;
ABHABT[1] = HOPTX$;
SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],MSGBUF[0]);
#
* IF NO NETWORK APPLICATIONS EXIST, COMPLETE NVF EXECUTION.
#
MATCH = FALSE;
FOR I = 0 STEP 1 WHILE (NOT MATCH)
AND (I LS ASTLNGTH/ASTSIZ$)
DO
BEGIN
IF AST$AN[I] NQ 0
THEN MATCH = TRUE; # STILL HAVE ACTIVE APPLICATION #
END
IF NOT MATCH
THEN SSSAWR(WWDF"NICNE");
END # NVFOPSC #
TERM