cdc:nos2.source:nam5871:nvforoc
Table of Contents
NVFOROC
Table Of Contents
- [00006] PROC NVFOROC
- [00011] RECOGNIZE OPERATOR COMMAND.
- [00055] PROC ABORT
- [00056] PROC MESSAGE
- [00057] PROC NVFODHC
- [00058] PROC SSRRCS
- [00059] PROC SSTAQE
- [00060] PROC SSTRQE
Source Code
- NVFOROC.txt
- *DECK NVFOROC
- USETEXT TEXTNVF
- USETEXT TEXTSS
- USETEXT TXCMDNV
- USETEXT TXTAPSS
- PROC NVFOROC;
- # TITLE NVFOROC - RECOGNIZE OPERATOR COMMAND. #
- BEGIN # NVFOROC #
- #
- ** NVFOROC - RECOGNIZE OPERATOR COMMAND.
- *
- * A. LIM. 82/03/17.
- *
- * THIS PROCEDURE-S MAIN FUNCTION IS TO RECOGNIZE OPERATOR TYPEINS.
- * IT CALLS COMMAND RECOGNIZER TO VALIDATE THE COMMAND. IT MAY
- * DISPATCH THE RETURNED PARAMETERIZED COMAND TO THE *NVFODHC*
- * ROUTINE, OR IT MAY GENERATE A MESSAGE TO THE OPERATOR IN THE
- * EVENT OF AN ERRONEOUS COMMAND. IT IS CALLED INTO EXECUTION
- * WHENEVER THERE IS DATA IN OPERATOR-TYPEIN-QUEUE *OPTQ*.
- *
- * PROC NVFOROC
- *
- * ENTRY OPERATOR TYPEIN ENTRIES IN *OPTQ*.
- *
- * EXIT IN THE EVENT OF VALID COMMAND, IT CALLS *NVFODHC* WITH
- * PARAMETERIZED COMMAND IN *WCBUF[1]*, *HDRCMD[1]*, AND
- * *PARMS[0]*. OTHERWISE, A TERMINAL-TEXT IS SENT TO
- * THE CONNECTION-TRAFFIC-QUEUE, *CTQ*.
- *
- * METHOD THIS PROCEDURE CONSISTS PRIMARY A LARGE LOOP, EACH TIME
- * THROGH THE LOOP, AN OPERATOR TYPEIN ENTRY WILL BE
- * REMOVED FROM THE *OPTQ*.
- * IF HOP/END-WARNING, DISCARD THE CURRENT ENTRY, AND
- * SEND A NULL TERMINAL-TEXT TO *CTQ*.
- * IF HOP/BRK, CALL *NVFOPHC* TO PROCESS IT.
- * ELSE, IT CALLS *SSRRCS* TO RECOGNIZE THE COMMAND.
- * IF VALID COMMAND, IT CALLS *NVFODHC* TO DO FURTHER
- * PROCESSING OF THE COMMAND, ELSE IT SENDS A TERMINAL
- * -TEXT TO THE CONNECTION TRAFFIC QUEUE *CTQ*.
- * IT TERMINATES WHEN *OPTQ* IS EXHAUSTED.
- *
- #
- #
- **** PROC NVFOROC XREF LIST
- #
- XREF
- BEGIN
- PROC ABORT; # MACREL- ABORT TASK MACRO #
- PROC MESSAGE; # MACREL- MESSAGE MACRO #
- PROC NVFODHC; # DISPATCH HOP COMMAND #
- PROC SSRRCS; # RECOGNIZE A COMMAND STRING #
- PROC SSTAQE; # ACCEPT A QUEUE ENTRY #
- PROC SSTRQE; # REMOVE A QUEUE ENTRY #
- END
- #
- ****
- #
- DEF DF$ # 0 #; # MESSAGE OPTION FOR DAYFILE MESSAGE #
- DEF CSTSIZ$ # 14 #; # CST SIZE= 14 ENTRY + 1 TERMINATE ENTRY #
- DEF CSSIZ$ # 14 #; # CMD STRING SIZE= 139 + 1 TERMINATE CHAR#
- # THIS IS THE SWITCH LIST FOR ERROR CODE RETURNING FROM *SSRRCS* #
- SWITCH ERRSWT # ERROR SWITCH BY ERROR CODE #
- LLNOERR, # 0- NO ERROR #
- LLPRMLNG, # 1- PARAMETER TOO LONG #
- LLEXPRD, # 2- EXPECTING PERIOD #
- LLEXPDCMA, # 3- EXPECTING PERIOD OR COMMA #
- LLUNRGCMD, # 4- UNRECOGNIZED COMMAND #
- LLINVCMPRM, # 5- INVALID COMBINATION OF PARMS #
- LLCMDMSPRM, # 6- COMMAND MISSING PARAMETER #
- LLPRMSH, # 7- PARAMETER LIST TOO SHORT #
- LLMSGLNG; # 8- INPUT MESSAGE TOO LONG #
- #
- ** CST- COMMAND SYNTAX TABLE.
- *
- * THIS IS THE COMMAND SYNTAX TABLE FOR NVF. IT IS INPUT TO
- * THE COMMAND RECOGNIZER TO DEFINE THE SYNTAX AND THE SEMANTICS
- * OF THE ALLOWABLE COMMANDS.
- * THE TABLE IS ORDERED(SCANNED TOP TO BOTTOM) AND CONTAINS FLAG
- * CHARACTERS TO DEFINE THE ORDER AND MEANING OF THE CHARACTERS
- * TO BE ENTERED TO SELECT THE ACTION TO BE PERFORMED.
- * EACH SYNTAX LINE IS TERMINATED BY AN END-OF-LINE($) TERMINATOR,
- * AND THE TABLE IS TERMINATED BY AN END-OF-LINE ENTRY.
- #
- ARRAY CST[00:CSTSIZ$] S(CSSIZ$);
- BEGIN
- ITEM CST$LINE C(00,00,140) =
- ["ENA@APL,<ENABLE_EN>,\!<APPL_AP>=@APP?^\$",
- "IDA@APL,<IDLE_ID>,\!<APPL_AP>=@APP?^\$",
- "IDH@HST,<IDLE_ID>,\!<HOST_HO>@HO0^\$",
- "DIA@APL,<DISABLE_DI>,\!<APPL_AP>=@APP?^\$",
- "DIH@HST,<DISABLE_DI>,\!<HOST_HO>@HO0^\$",
- "STA@APL,<STATUS_ST>,\!<APPL_AP>=@APP?^\$",
- "STT@STA,<STATUS_ST>,\!<TERM_TE>=@TER?^\$",
- "STU@STA,<STATUS_ST>,\!<UNAME_UN>=@USR?^\$",
- "STS@APL,<STATUS_ST>,\![<APPLS_APS>@APS^\\[AC@AC0^\$",
- "SSA@APL,<STATUS_ST>,\![<TERMS_TES>@TES^\\![<APPL_AP>=@APP?^\
- $",
- "SSU@STA,<STATUS_ST>,\![<TERMS_TES>@TES^\\![<UNAME_UN>=@USR?^
- \$",
- "SUA@APL,<STATUS_ST>,\![<UNAMES_UNS>@USS^\\![<APPL_AP>=@APP?^
- \$",
- "HIL@HIS,<HISTORY_HI>^\ALL@ALL^\$",
- "$"];
- END
- #
- * THE FOLLOWING ARE MESSAGE ARRAYS EITHER FOR OUTBOUND TERMINAL
- * TEXT OR DESTINED FOR SYSTEM DAYFILE.
- #
- ARRAY PLGMSG[00:00] S(3);
- BEGIN
- ITEM PLG$MSG C(00,00,19) =
- ["PARAMETER TOO LONG."];
- ITEM PLG$ZERO U(01,54,06) = [0];
- ITEM PLG$ZERO1 U(02,00,60) = [0];
- END
- ARRAY EPDMSG[00:00] S(2);
- BEGIN
- ITEM EPD$MSG C(00,00,17) =
- ["EXPECTING PERIOD."];
- ITEM EPD$ZERO U(01,42,18) = [0];
- END
- ARRAY EPCMSG[00:00] S(3);
- BEGIN
- ITEM EPC$MSG C(00,00,26) =
- ["EXPECTING PERIOD OR COMMA."];
- ITEM EPC$ZERO U(02,36,24) = [0];
- END
- ARRAY URCMSG[00:00] S(3);
- BEGIN
- ITEM URC$MSG C(00,00,21) =
- ["UNRECOGNIZED COMMAND."];
- ITEM URC$ZERO U(02,06,54) = [0];
- END
- ARRAY ICPMSG[00:00] S(4);
- BEGIN
- ITEM ICP$MSG C(00,00,34) =
- ["INVALID COMBINATION OF PARAMETERS."];
- ITEM ICP$ZERO U(03,24,36) = [0];
- END
- ARRAY CMPMSG[00:00] S(3);
- BEGIN
- ITEM CMP$MSG C(00,00,26) =
- ["COMMAND MISSING PARAMETER."];
- ITEM CMP$ZERO U(02,36,24) = [0];
- END
- ARRAY IMLMSG[00:00] S(3);
- BEGIN
- ITEM IML$MSG C(00,00,23) =
- ["INPUT MESSAGE TOO LONG."];
- ITEM IML$ZERO U(02,18,42) = [0];
- END
- $BEGIN
- ARRAY PLSMSG[00:00] S(4);
- BEGIN
- ITEM PLS$MSG C(00,00,36) =
- [" NVFOROC- PARAMETER LIST TOO SHORT."];
- ITEM PLS$ZERO U(03,36,24) = [0];
- END
- $END
- ITEM EC U; # ERROR CODE RETURNING FROM *SSRRCS* #
- ITEM ET U; # ERROR TEXT RETURNING FROM *SSRRCS* #
- ITEM I I; # DUMMY LOOP INDUCTION VAR #
- ITEM MAX U; # MAX NO OF CMD PARMS IN PARAMETER LIST #
- ITEM PCNT U; # PARM COUNT FROM *SSRRCS* #
- CONTROL EJECT;
- #
- * PROCESS ALL ENTRIES IN *OPTQ*, FOR EACH ENTRY:
- * CALL COMMAND RECOGNIZER WITH COMMAND SYNTAX TABLE, COMMAND
- * STRING, STRING LENGTH IN CHARACTERS, AND MAXIMUM NUMBER OF
- * COMMAND PARAMETERS ALLOWABLE IN PARAMETER LIST. IT RETURNS
- * THE PARAMETER LIST, PARAMETER LIST COUNT, ERROR CODE AND
- * ERROR TEXT IF ANY.
- #
- FOR I = 0 WHILE OPQL NQ 0
- DO
- BEGIN
- WCB$WORD[1] = 0; # CLEAR WC WORD 1 #
- HDR$WORD[1] = 0; # CLEAR HDR CMD WORD 1 #
- WCB$IAF[1] = TRUE; # PRESET IAF TO TRUE #
- WCB$HAF[1] = FALSE; # PRESET HAF TO FALSE #
- SSTRQE(P<OPTQ>,WCBUF[0],HDRCMD[0],PARMS[0]); # REMOVE 1 ENTRY #
- IF HOPENDWF
- THEN
- BEGIN # HOP/END-WARNING, DISCARD ENTRY #
- WCB$WC[1] = 2; # AND SEND A NULL TEXT TO *CTQ* #
- ABHABT[1] = HOPTX$;
- SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],MSGBUF[0]);
- GOTO ENDCASE;
- END
- IF HDR$BOF[0]
- THEN
- BEGIN # HOP/BRK #
- IF CMDINPGF
- THEN
- BEGIN
- ABORTCMDF = TRUE;
- END
- GOTO ENDCASE;
- END
- MAX = MCMDL$ - (WCB$WC[0] - 2); # MAX NO OF CMD IN PARM LIST #
- SSRRCS(CST,PARMS[0],HDR$TXCCNT[0],PARMS[WCB$WC[0]-2],MAX,PCNT,
- EC,ET);
- HDR$OPORD[1] = HDR$OPORD[0]; # SET OPERATOR ORDINAL #
- ABHWORD[1] = 0;
- ABHABT[1] = HOPTX$;
- GOTO ERRSWT[EC]; # ERROR SWITCH BY EC #
- LLNOERR: # VALID COMMAND, CALL *NVFODHC* #
- CRNT$CMD = PAR$ELNAME[WCB$WC[0]-2]; # SAVE CURRENT COMMAND ID #
- HDR$SPCNT[1] = PCNT; # SYNTAX PARAMETER COUNT #
- HDR$APCNT[1] = 0; # ADDR PARAMETER COUNT #
- HDR$TXWCNT[1] = WCB$WC[0] - 2; # TEXT WORD COUNT #
- HDR$VERB[1] = PAR$ELNAME[WCB$WC[0]-2]; # COMMAND VERB #
- HDR$TXCCNT[1] = HDR$TXCCNT[0]; # TEXT LEN IN CHARS #
- NVFODHC; # DISPATCH HOP COMMAND #
- GOTO ENDCASE;
- LLPRMLNG: # EC= "PARAMETER TOO LONG." #
- WCB$WC[1] = LMSG30$/10 + 2;
- SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],PLGMSG[0]);
- GOTO ENDCASE;
- LLEXPRD: # EC= "EXPECTING PERIOD." #
- WCB$WC[1] = LMSG20$/10 + 2;
- SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],EPDMSG[0]);
- GOTO ENDCASE;
- LLEXPDCMA: # EC= "EXPECTING PERIOD OR COMMA." #
- WCB$WC[1] = LMSG30$/10 + 2;
- SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],EPCMSG[0]);
- GOTO ENDCASE;
- LLUNRGCMD: # EC= "UNRECOGNIZED COMMAND." #
- WCB$WC[1] = LMSG30$/10 + 2;
- SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],URCMSG[0]);
- GOTO ENDCASE;
- LLINVCMPRM: # EC= "INVALID COMBINATION OF PARAMETERS."#
- WCB$WC[1] = LMSG40$/10 + 2;
- SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],ICPMSG[0]);
- GOTO ENDCASE;
- LLCMDMSPRM: # EC= "COMMAND MISSING PARAMETER." #
- WCB$WC[1] = LMSG30$/10 + 2;
- SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],CMPMSG[0]);
- GOTO ENDCASE;
- LLPRMSH: # EC= "PARAMETER LIST TOO SHORT." #
- $BEGIN
- MESSAGE(PLSMSG[0], DF$); # SEND MESSAGE TO DAYFILE #
- ABORT; # AND ABORT NVF #
- $END
- LLMSGLNG: # EC= "INPUT MESSAGE TOO LONG." #
- WCB$WC[1] = LMSG30$/10 + 2;
- SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],IMLMSG[0]);
- ENDCASE:
- END # FOR I LOOP #
- END # NVFOROC #
- TERM
cdc/nos2.source/nam5871/nvforoc.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator