User Tools

Site Tools


cdc:nos2.source:nam5871:nvforoc

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
  1. *DECK NVFOROC
  2. USETEXT TEXTNVF
  3. USETEXT TEXTSS
  4. USETEXT TXCMDNV
  5. USETEXT TXTAPSS
  6. PROC NVFOROC;
  7. # TITLE NVFOROC - RECOGNIZE OPERATOR COMMAND. #
  8.  
  9. BEGIN # NVFOROC #
  10. #
  11. ** NVFOROC - RECOGNIZE OPERATOR COMMAND.
  12. *
  13. * A. LIM. 82/03/17.
  14. *
  15. * THIS PROCEDURE-S MAIN FUNCTION IS TO RECOGNIZE OPERATOR TYPEINS.
  16. * IT CALLS COMMAND RECOGNIZER TO VALIDATE THE COMMAND. IT MAY
  17. * DISPATCH THE RETURNED PARAMETERIZED COMAND TO THE *NVFODHC*
  18. * ROUTINE, OR IT MAY GENERATE A MESSAGE TO THE OPERATOR IN THE
  19. * EVENT OF AN ERRONEOUS COMMAND. IT IS CALLED INTO EXECUTION
  20. * WHENEVER THERE IS DATA IN OPERATOR-TYPEIN-QUEUE *OPTQ*.
  21. *
  22. * PROC NVFOROC
  23. *
  24. * ENTRY OPERATOR TYPEIN ENTRIES IN *OPTQ*.
  25. *
  26. * EXIT IN THE EVENT OF VALID COMMAND, IT CALLS *NVFODHC* WITH
  27. * PARAMETERIZED COMMAND IN *WCBUF[1]*, *HDRCMD[1]*, AND
  28. * *PARMS[0]*. OTHERWISE, A TERMINAL-TEXT IS SENT TO
  29. * THE CONNECTION-TRAFFIC-QUEUE, *CTQ*.
  30. *
  31. * METHOD THIS PROCEDURE CONSISTS PRIMARY A LARGE LOOP, EACH TIME
  32. * THROGH THE LOOP, AN OPERATOR TYPEIN ENTRY WILL BE
  33. * REMOVED FROM THE *OPTQ*.
  34. * IF HOP/END-WARNING, DISCARD THE CURRENT ENTRY, AND
  35. * SEND A NULL TERMINAL-TEXT TO *CTQ*.
  36. * IF HOP/BRK, CALL *NVFOPHC* TO PROCESS IT.
  37. * ELSE, IT CALLS *SSRRCS* TO RECOGNIZE THE COMMAND.
  38. * IF VALID COMMAND, IT CALLS *NVFODHC* TO DO FURTHER
  39. * PROCESSING OF THE COMMAND, ELSE IT SENDS A TERMINAL
  40. * -TEXT TO THE CONNECTION TRAFFIC QUEUE *CTQ*.
  41. * IT TERMINATES WHEN *OPTQ* IS EXHAUSTED.
  42. *
  43. #
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50. #
  51. **** PROC NVFOROC XREF LIST
  52. #
  53. XREF
  54. BEGIN
  55. PROC ABORT; # MACREL- ABORT TASK MACRO #
  56. PROC MESSAGE; # MACREL- MESSAGE MACRO #
  57. PROC NVFODHC; # DISPATCH HOP COMMAND #
  58. PROC SSRRCS; # RECOGNIZE A COMMAND STRING #
  59. PROC SSTAQE; # ACCEPT A QUEUE ENTRY #
  60. PROC SSTRQE; # REMOVE A QUEUE ENTRY #
  61. END
  62. #
  63. ****
  64. #
  65.  
  66.  
  67. DEF DF$ # 0 #; # MESSAGE OPTION FOR DAYFILE MESSAGE #
  68. DEF CSTSIZ$ # 14 #; # CST SIZE= 14 ENTRY + 1 TERMINATE ENTRY #
  69. DEF CSSIZ$ # 14 #; # CMD STRING SIZE= 139 + 1 TERMINATE CHAR#
  70.  
  71.  
  72. # THIS IS THE SWITCH LIST FOR ERROR CODE RETURNING FROM *SSRRCS* #
  73.  
  74. SWITCH ERRSWT # ERROR SWITCH BY ERROR CODE #
  75. LLNOERR, # 0- NO ERROR #
  76. LLPRMLNG, # 1- PARAMETER TOO LONG #
  77. LLEXPRD, # 2- EXPECTING PERIOD #
  78. LLEXPDCMA, # 3- EXPECTING PERIOD OR COMMA #
  79. LLUNRGCMD, # 4- UNRECOGNIZED COMMAND #
  80. LLINVCMPRM, # 5- INVALID COMBINATION OF PARMS #
  81. LLCMDMSPRM, # 6- COMMAND MISSING PARAMETER #
  82. LLPRMSH, # 7- PARAMETER LIST TOO SHORT #
  83. LLMSGLNG; # 8- INPUT MESSAGE TOO LONG #
  84.  
  85.  
  86. #
  87. ** CST- COMMAND SYNTAX TABLE.
  88. *
  89. * THIS IS THE COMMAND SYNTAX TABLE FOR NVF. IT IS INPUT TO
  90. * THE COMMAND RECOGNIZER TO DEFINE THE SYNTAX AND THE SEMANTICS
  91. * OF THE ALLOWABLE COMMANDS.
  92. * THE TABLE IS ORDERED(SCANNED TOP TO BOTTOM) AND CONTAINS FLAG
  93. * CHARACTERS TO DEFINE THE ORDER AND MEANING OF THE CHARACTERS
  94. * TO BE ENTERED TO SELECT THE ACTION TO BE PERFORMED.
  95. * EACH SYNTAX LINE IS TERMINATED BY AN END-OF-LINE($) TERMINATOR,
  96. * AND THE TABLE IS TERMINATED BY AN END-OF-LINE ENTRY.
  97. #
  98.  
  99. ARRAY CST[00:CSTSIZ$] S(CSSIZ$);
  100. BEGIN
  101. ITEM CST$LINE C(00,00,140) =
  102. ["ENA@APL,<ENABLE_EN>,\!<APPL_AP>=@APP?^\$",
  103. "IDA@APL,<IDLE_ID>,\!<APPL_AP>=@APP?^\$",
  104. "IDH@HST,<IDLE_ID>,\!<HOST_HO>@HO0^\$",
  105. "DIA@APL,<DISABLE_DI>,\!<APPL_AP>=@APP?^\$",
  106. "DIH@HST,<DISABLE_DI>,\!<HOST_HO>@HO0^\$",
  107.  
  108. "STA@APL,<STATUS_ST>,\!<APPL_AP>=@APP?^\$",
  109. "STT@STA,<STATUS_ST>,\!<TERM_TE>=@TER?^\$",
  110. "STU@STA,<STATUS_ST>,\!<UNAME_UN>=@USR?^\$",
  111. "STS@APL,<STATUS_ST>,\![<APPLS_APS>@APS^\\[AC@AC0^\$",
  112. "SSA@APL,<STATUS_ST>,\![<TERMS_TES>@TES^\\![<APPL_AP>=@APP?^\
  113. $",
  114. "SSU@STA,<STATUS_ST>,\![<TERMS_TES>@TES^\\![<UNAME_UN>=@USR?^
  115. \$",
  116. "SUA@APL,<STATUS_ST>,\![<UNAMES_UNS>@USS^\\![<APPL_AP>=@APP?^
  117. \$",
  118. "HIL@HIS,<HISTORY_HI>^\ALL@ALL^\$",
  119. "$"];
  120. END
  121.  
  122.  
  123. #
  124. * THE FOLLOWING ARE MESSAGE ARRAYS EITHER FOR OUTBOUND TERMINAL
  125. * TEXT OR DESTINED FOR SYSTEM DAYFILE.
  126. #
  127.  
  128. ARRAY PLGMSG[00:00] S(3);
  129. BEGIN
  130. ITEM PLG$MSG C(00,00,19) =
  131. ["PARAMETER TOO LONG."];
  132. ITEM PLG$ZERO U(01,54,06) = [0];
  133. ITEM PLG$ZERO1 U(02,00,60) = [0];
  134. END
  135.  
  136.  
  137. ARRAY EPDMSG[00:00] S(2);
  138. BEGIN
  139. ITEM EPD$MSG C(00,00,17) =
  140. ["EXPECTING PERIOD."];
  141. ITEM EPD$ZERO U(01,42,18) = [0];
  142. END
  143.  
  144.  
  145. ARRAY EPCMSG[00:00] S(3);
  146. BEGIN
  147. ITEM EPC$MSG C(00,00,26) =
  148. ["EXPECTING PERIOD OR COMMA."];
  149. ITEM EPC$ZERO U(02,36,24) = [0];
  150. END
  151.  
  152.  
  153. ARRAY URCMSG[00:00] S(3);
  154. BEGIN
  155. ITEM URC$MSG C(00,00,21) =
  156. ["UNRECOGNIZED COMMAND."];
  157. ITEM URC$ZERO U(02,06,54) = [0];
  158. END
  159.  
  160.  
  161. ARRAY ICPMSG[00:00] S(4);
  162. BEGIN
  163. ITEM ICP$MSG C(00,00,34) =
  164. ["INVALID COMBINATION OF PARAMETERS."];
  165. ITEM ICP$ZERO U(03,24,36) = [0];
  166. END
  167.  
  168.  
  169. ARRAY CMPMSG[00:00] S(3);
  170. BEGIN
  171. ITEM CMP$MSG C(00,00,26) =
  172. ["COMMAND MISSING PARAMETER."];
  173. ITEM CMP$ZERO U(02,36,24) = [0];
  174. END
  175.  
  176.  
  177. ARRAY IMLMSG[00:00] S(3);
  178. BEGIN
  179. ITEM IML$MSG C(00,00,23) =
  180. ["INPUT MESSAGE TOO LONG."];
  181. ITEM IML$ZERO U(02,18,42) = [0];
  182. END
  183.  
  184.  
  185. $BEGIN
  186.  
  187. ARRAY PLSMSG[00:00] S(4);
  188. BEGIN
  189. ITEM PLS$MSG C(00,00,36) =
  190. [" NVFOROC- PARAMETER LIST TOO SHORT."];
  191. ITEM PLS$ZERO U(03,36,24) = [0];
  192. END
  193.  
  194. $END
  195.  
  196.  
  197. ITEM EC U; # ERROR CODE RETURNING FROM *SSRRCS* #
  198. ITEM ET U; # ERROR TEXT RETURNING FROM *SSRRCS* #
  199. ITEM I I; # DUMMY LOOP INDUCTION VAR #
  200. ITEM MAX U; # MAX NO OF CMD PARMS IN PARAMETER LIST #
  201. ITEM PCNT U; # PARM COUNT FROM *SSRRCS* #
  202.  
  203.  
  204. CONTROL EJECT;
  205.  
  206. #
  207. * PROCESS ALL ENTRIES IN *OPTQ*, FOR EACH ENTRY:
  208. * CALL COMMAND RECOGNIZER WITH COMMAND SYNTAX TABLE, COMMAND
  209. * STRING, STRING LENGTH IN CHARACTERS, AND MAXIMUM NUMBER OF
  210. * COMMAND PARAMETERS ALLOWABLE IN PARAMETER LIST. IT RETURNS
  211. * THE PARAMETER LIST, PARAMETER LIST COUNT, ERROR CODE AND
  212. * ERROR TEXT IF ANY.
  213. #
  214. FOR I = 0 WHILE OPQL NQ 0
  215. DO
  216. BEGIN
  217. WCB$WORD[1] = 0; # CLEAR WC WORD 1 #
  218. HDR$WORD[1] = 0; # CLEAR HDR CMD WORD 1 #
  219. WCB$IAF[1] = TRUE; # PRESET IAF TO TRUE #
  220. WCB$HAF[1] = FALSE; # PRESET HAF TO FALSE #
  221. SSTRQE(P<OPTQ>,WCBUF[0],HDRCMD[0],PARMS[0]); # REMOVE 1 ENTRY #
  222. IF HOPENDWF
  223. THEN
  224. BEGIN # HOP/END-WARNING, DISCARD ENTRY #
  225. WCB$WC[1] = 2; # AND SEND A NULL TEXT TO *CTQ* #
  226. ABHABT[1] = HOPTX$;
  227. SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],MSGBUF[0]);
  228. GOTO ENDCASE;
  229. END
  230. IF HDR$BOF[0]
  231. THEN
  232. BEGIN # HOP/BRK #
  233. IF CMDINPGF
  234. THEN
  235. BEGIN
  236. ABORTCMDF = TRUE;
  237. END
  238. GOTO ENDCASE;
  239. END
  240. MAX = MCMDL$ - (WCB$WC[0] - 2); # MAX NO OF CMD IN PARM LIST #
  241. SSRRCS(CST,PARMS[0],HDR$TXCCNT[0],PARMS[WCB$WC[0]-2],MAX,PCNT,
  242. EC,ET);
  243. HDR$OPORD[1] = HDR$OPORD[0]; # SET OPERATOR ORDINAL #
  244. ABHWORD[1] = 0;
  245. ABHABT[1] = HOPTX$;
  246. GOTO ERRSWT[EC]; # ERROR SWITCH BY EC #
  247.  
  248. LLNOERR: # VALID COMMAND, CALL *NVFODHC* #
  249.  
  250. CRNT$CMD = PAR$ELNAME[WCB$WC[0]-2]; # SAVE CURRENT COMMAND ID #
  251. HDR$SPCNT[1] = PCNT; # SYNTAX PARAMETER COUNT #
  252. HDR$APCNT[1] = 0; # ADDR PARAMETER COUNT #
  253. HDR$TXWCNT[1] = WCB$WC[0] - 2; # TEXT WORD COUNT #
  254. HDR$VERB[1] = PAR$ELNAME[WCB$WC[0]-2]; # COMMAND VERB #
  255. HDR$TXCCNT[1] = HDR$TXCCNT[0]; # TEXT LEN IN CHARS #
  256. NVFODHC; # DISPATCH HOP COMMAND #
  257. GOTO ENDCASE;
  258.  
  259. LLPRMLNG: # EC= "PARAMETER TOO LONG." #
  260.  
  261. WCB$WC[1] = LMSG30$/10 + 2;
  262. SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],PLGMSG[0]);
  263. GOTO ENDCASE;
  264.  
  265. LLEXPRD: # EC= "EXPECTING PERIOD." #
  266.  
  267. WCB$WC[1] = LMSG20$/10 + 2;
  268. SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],EPDMSG[0]);
  269. GOTO ENDCASE;
  270.  
  271. LLEXPDCMA: # EC= "EXPECTING PERIOD OR COMMA." #
  272.  
  273. WCB$WC[1] = LMSG30$/10 + 2;
  274. SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],EPCMSG[0]);
  275. GOTO ENDCASE;
  276.  
  277. LLUNRGCMD: # EC= "UNRECOGNIZED COMMAND." #
  278.  
  279. WCB$WC[1] = LMSG30$/10 + 2;
  280. SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],URCMSG[0]);
  281. GOTO ENDCASE;
  282.  
  283. LLINVCMPRM: # EC= "INVALID COMBINATION OF PARAMETERS."#
  284.  
  285. WCB$WC[1] = LMSG40$/10 + 2;
  286. SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],ICPMSG[0]);
  287. GOTO ENDCASE;
  288.  
  289. LLCMDMSPRM: # EC= "COMMAND MISSING PARAMETER." #
  290.  
  291. WCB$WC[1] = LMSG30$/10 + 2;
  292. SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],CMPMSG[0]);
  293. GOTO ENDCASE;
  294.  
  295. LLPRMSH: # EC= "PARAMETER LIST TOO SHORT." #
  296.  
  297. $BEGIN
  298. MESSAGE(PLSMSG[0], DF$); # SEND MESSAGE TO DAYFILE #
  299. ABORT; # AND ABORT NVF #
  300. $END
  301.  
  302. LLMSGLNG: # EC= "INPUT MESSAGE TOO LONG." #
  303.  
  304. WCB$WC[1] = LMSG30$/10 + 2;
  305. SSTAQE(P<CTQ>,WCBUF[1],ABHBUF[1],IMLMSG[0]);
  306.  
  307. ENDCASE:
  308.  
  309. END # FOR I LOOP #
  310.  
  311.  
  312. END # NVFOROC #
  313.  
  314. TERM
cdc/nos2.source/nam5871/nvforoc.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator