*DECK CSSDRC USETEXT TEXTCS; USETEXT TXTAPSS; USETEXT TXTSUSS; USETEXT TXTSMCS; USETEXT TXCMDCS; USETEXT TEXTSS; PROC CSSDRC; # TITLE CSSDRC - DISPATCH ROUTED COMMANDS. # BEGIN #CSSDRC# # ** CSSDRC - DISPATCH COMMANDS. * * C. BRION 82/06/15. * * THIS PROCEDURE WILL EXTRACT ROUTED COMMANDS FROM THE ROUTED * COMMAND QUEUE AND THEN, BASED ON THE COMMAND VERB, EITHER * CALL THE APPROPRIATE COMMAND PROCESSING PROCEDURE OR QUEUE * AN ENTRY TO THE APPROPRIATE PROCESSOR. * * PROC CSSDRC * * ENTRY: * AT LEAST ONE ROUTED COMMAND QUEUE ENTRY RESIDES IN THE * ROUTED COMMAND QUEUE. * * EXIT: * THE ROUTED COMMAND QUEUE WILL BE EXHAUSTED AND THE ENTRIES * WILL HAVE BEEN PROCESSED BY THE APPROPRIATE COMMAND PROCESSING * PROCEDURE. # # **** PROC CSSDRC XREF LIST # XREF BEGIN PROC CSSACO; # ACTION CONTROL CMD # PROC CSSAGO; # ACTION GO COMMAND # PROC CSSADI; # ACTION DISABLE CMD # PROC CSSAEN; # ACTION ENABLE CMD # PROC CSSADL; # ACTION DUMP/LOAD CMD # PROC CSSDTC; # ACTION OVERLAY CMD # PROC CSSARE; # ACTION REPORT COMMAND # PROC CSSASD; # ACTION SEND CMD # PROC CSSAST; # ACTION STATUS CMD # PROC CSSAIN; # ACTION INFO CMD # PROC CSSAED; # ACTION END CMD # PROC CSSAAC; # ACTION ALERT COMMAND # PROC CSSASO; # ACTION SEND TO OPERATOR # PROC CSSTCM; # TERMINATE COMMAND # PROC SSTAQE; # SS-ACCEPT QUEUE ENTRY # PROC SSTRQE; # SS-REMOVE QUEUE ENTRY # PROC MESSAGE; # MACREL DAYFILE MSG # PROC ABORT; # MACREL ABORT # END # **** # # * ITEMS # ITEM I; # LOOP VARIABLE # ITEM J; # LOOP VARIABLE # ITEM OORD I; # OCB ORDINAL # # * BADCMD - BAD COMMAND VERB MESSAGE. # ARRAY BADCMD [00:00] S(2); BEGIN ITEM BAD$TXT1 C(00,00,18) = ["CSSDRC-BAD COMMAND"]; ITEM BAD$ZERO U(01,48,12) = [0]; END # * MAIN PROC START # # * THIS PROCEDURE WILL REMOVE A QUEUE ENTRY FROM THE ROUTED COMMAND * QUEUE UNTIL IT IS EMPTY. # FOR I = 0 WHILE RCQL NQ 0 DO BEGIN # * CLEAR BUFFER. # FOR J=0 STEP 1 UNTIL MCMDL$ DO BEGIN PAR$WORD[J] = 0; END SSTRQE(P,WCBUF[0],HDRCMD[0],PARMS[0]); # * ENTRY REMOVED INTO COMMON MEMORY AS FOLLOWS: * * WCBUF = ONE WORD FOR ENTRY WORD COUNT. * HDRCMD = ONE WORD FOR COMMAND HEADER. * PARMS = THE COMMAND BODY WITH THE SYNTAX AND ADDRESS PARAMETER * LISTS PRECEEDED BY THE RAW COMMAND TEXT STRING. # # * IF THE OCB IS CURRENTLY ACTIVE AND THE CB PENDING FLAG * IS NOT SET TRUE, THEN CONTINUE WITH PROCESSING. OTHER- * WISE, SEND NULL TERMINAL TEXT TO CONNECTION LAYER SO * AS TO UNLEASH THE CON/CB FOR THE OPERATOR. # OORD = HDR$OPORD[0]; # SET THE OCB ORDINAL # IF OC$STATE[OORD] THEN BEGIN IF NOT OC$CBPD[OORD] THEN BEGIN # * BASED ON THE COMMAND VERB VALUE OF THE COMMAND HEADER WORD, * THE DISPATCH TO THE APPROPRIATE COMMAND PROCESSOR IS DONE. # IF HDR$VERB[0] EQ "CO0" # CONTROL CMD # THEN CSSACO; ELSE IF HDR$VERB[0] EQ "GO0" # GO CMD # THEN CSSAGO; ELSE IF HDR$VERB[0] EQ "DI0" # DISABLE CMD # THEN CSSADI; ELSE IF HDR$VERB[0] EQ "EN0" # ENABLE CMD # THEN CSSAEN; ELSE IF HDR$VERB[0] EQ "DU0" # DUMP OR LOAD CMD # OR HDR$VERB[0] EQ "LO0" THEN CSSADL; ELSE IF HDR$VERB[0] EQ "TS0" # OVERLAY CMD # THEN CSSDTC; ELSE IF HDR$VERB[0] EQ "SE0" # SEND CMD # THEN CSSASD; ELSE IF HDR$VERB[0] EQ "SE1" # SEND CMD # THEN CSSASO; ELSE IF HDR$VERB[0] EQ "ST0" # STATUS CMD # THEN CSSAST; ELSE IF HDR$VERB[0] EQ "IN0" # INFO CMD # THEN CSSAIN; ELSE IF HDR$VERB[0] EQ "RE0" # REPORT CMD # THEN CSSARE; ELSE IF HDR$VERB[0] EQ "END" # END CMD # OR HDR$VERB[0] EQ "BYE" OR HDR$VERB[0] EQ "HEL" THEN CSSAED; ELSE IF HDR$VERB[0] EQ "BRK" # BREAK CMD # THEN CSSTCM; ELSE IF HDR$VERB[0] EQ "HI0" # HISTORY CMD # THEN BEGIN WCB$SMID[0] = SMID"HIST"; # SET INTERNAL ID # SSTAQE(P,WCBUF[0],HDRCMD[0],PARMS[0]); # QUEUE OPERATOR # # OUPUT Q ENTRY # # FOR HISTORY # END ELSE IF HDR$VERB[0] EQ "AL0" # ACTION ALERT COMMAND # THEN CSSAAC; ELSE BEGIN $BEGIN MESSAGE(BADCMD,0); ABORT; $END END END ELSE # CB PENDING FLAG ON # BEGIN WCB$WORD[1] = 0; ABHWORD[1] = 0; WCB$WC[1] = 2; WCB$SMID[1] = SMID"TTEXT"; WCB$IAF[1] = TRUE; ABHADR[1] = OORD; SSTAQE(P,WCBUF[1],ABH[1],CSSM[1]); END END END # FOR LOOP # END #CSSDRC# TERM