User Tools

Site Tools


cdc:nos2.source:nam5871:qtcmd

Table of Contents

QTCMD

Table Of Contents

  • [00005] PROC QTCMD(CC,ADDR)
  • [00092] PROC NP$ERR

Source Code

QTCMD.txt
  1. *DECK QTCMD
  2. USETEXT AIPDEF
  3. USETEXT QTRMCOM
  4. USETEXT QTRMNIT
  5. PROC QTCMD(CC,ADDR);
  6. *IF DEF,IMS
  7. #
  8. *1DC QTCMD
  9. *
  10. * 1. PROC NAME AUTHOR DATE
  11. * QTCMD E. GEE 11/01/84
  12. *
  13. * 2. FUNCTION DESCRIPTION.
  14. * PROCESS COMMAND CODES FROM THE APPLICATION TO ALTER THE
  15. * EXECUTION OF QTRM.
  16. *
  17. * 3. METHOD USED.
  18. * IF QTOPEN NOT CALLED YET AND COMMAND CODE IS NOT 9,
  19. * CALL NP$ERR TO ISSUE DAYFILE MESSAGE AND ABORT APP.
  20. * IF COMMAND CODE VALID,
  21. * STORE NORMAL COMPLETION RETURN CODE FIELD IN NIT.
  22. * JUMP TO CODE TO PROCESS THE COMMAND CODE.
  23. * 1: SET NOTIFICATION OF BREAK INDICATOR FLAG.
  24. * CLEAR AUTOMATIC PROCESS OF USER BREAK FLAG.
  25. * 2: SET NOTIFICATION OF USER INTERRUPT FLAG.
  26. * 3: SET NOTIFICATION OF INACTIVE CONNECTION FLAG.
  27. * 4: SET SUPPORT NAM K-DISPLAY FLAG.
  28. * 5: SET NOTIFICATION OF INITIAL CONNECTION REQUEST FLAG.
  29. * 6: STORE ADDRESS IN PARM-ADDR FIELD OF NIT.
  30. * 7: SET AUTOMATIC PROCESS OF USER BREAK FLAG.
  31. * CLEAR NOTIFICATION OF BREAK INDICATOR FLAG.
  32. * 8: IF APP WANTS TO POLL INDIVIDUAL CONNECTIONS FOR DATA,
  33. * SET CONNECTION POLLING FLAG.
  34. * ELSE (APP WANTS TO REVERT TO POLLING ALL CONNECTIONS),
  35. * CLEAR CONNECTION POLLING FLAG.
  36. * 9: SET NO ABORT IF NETON REJECTED FLAG.
  37. * 10: SET NO ABORT IF ERR/LGL RECEIVED FLAG.
  38. * 11: SUPPORT ONLY SPECIFIED DEVICE TYPES.
  39. * 12: PROCESS PRU/ON SUP MSG ONLY FOR SPECIFIED DEVICE TYPES.
  40. * 13: CONVERT PM MESSAGES.
  41. * ELSE (INVALID COMMAND CODE VALUE),
  42. * STORE QTCMD REJECT RETURN CODE IN NIT.
  43. * STORE REASON FOR REJECT IN SEC-RETURN-CODE FIELD.
  44. * RETURN.
  45. *
  46. * 4. ENTRY CONDITIONS.
  47. * CC COMMAND CODE
  48. * ADDR ADDRESS TO STORE IN PARM-ADDR FIELD
  49. *
  50. * 5. NORMAL EXIT CONDITIONS.
  51. * NIT$RC OK RETURN CODE
  52. *
  53. * 6. ABNORMAL EXIT CONDITIONS.
  54. * NIT$RC QTCMD REJECT RETURN CODE
  55. * NIT$S$RC REASON FOR QTCMD REJECTING CALL
  56. *
  57. * 7. COMDECKS AND SYMPL TEXT USED.
  58. * AIPDEF AIP DEFINITIONS
  59. * NP$CRT CDC COPYRIGHT
  60. * QTRMCOM QTRM VARIABLES
  61. * QTRMNIT NIT
  62. *
  63. * 8. ROUTINES AND OVERLAYS CALLED.
  64. * NP$ERR ISSUE ERROR MESSAGE AND ABORT APP
  65. *
  66. * 9. DAYFILE MESSAGES OR OTHER IMPORTANT INFORMATION.
  67. * *** NETWORK APPLICATION ABORTED, RC = 75. ***
  68. * *** QTCMD: REQUEST INVALID BEFORE QTOPEN. ***
  69. *
  70.  #
  71. *ENDIF
  72.  
  73. # CONTROL DEFINITIONS
  74. #
  75. CONTROL PRESET;
  76. CONTROL PACK;
  77. CONTROL DISJOINT;
  78. CONTROL INERT;
  79. CONTROL FASTLOOP;
  80.  
  81. *CALL NP$CRT
  82. #
  83.   INPUT VARIABLES
  84. #
  85. ITEM ADDR; # ADDRESS TO STORE IN PARM-ADDR FIELD #
  86. ITEM CC; # COMMAND CODE #
  87. #
  88.   ROUTINES CALLED
  89. #
  90. XREF
  91. BEGIN
  92. PROC NP$ERR; # DAYFILE ERROR MESSAGE AND ABORT APP #
  93. END
  94. #
  95.   LOCAL VARIABLES
  96. #
  97. DEF MINCC#1#; # MINIMUM COMMAND CODE VALUE #
  98. DEF MAXCC#13#; # MAXIMUM COMMAND CODE VALUE #
  99.  
  100. SWITCH SWTCH$CC ,CC$1,CC$2,CC$3,CC$4,CC$5,CC$6,CC$7,CC$8,
  101. CC$9,CC$10,CC$11,CC$12,CC$13
  102. ;
  103.  
  104. #**********************************************************************#
  105. CONTROL EJECT;
  106.  
  107. #
  108.   EXECUTABLE CODE BEGINS HERE
  109. #
  110. BEGIN
  111. IF (NOT NETON$STATUS) AND # APP HAS NOT NETTED ON YET #
  112. (CC NQ 9 ) # COMMAND CODE IS NOT 9 #
  113. THEN # QTOPEN HAS NOT BEEN CALLED #
  114. BEGIN
  115. NP$ERR("75"); # ISSUE ERROR MESSAGE AND ABORT APP #
  116. END
  117.  
  118. IF NETON$STATUS
  119. THEN # QTOPEN MUST ALREADY HAVE BEEN CALLED #
  120. BEGIN # SO NIT ADDRESS MUST ALREADY EXIST #
  121. P<NIT> = NIT$ADDR; # ADDRESS OF NETWORK INFORMATION TABLE #
  122. NIT$RC[0] = S"OK"; # INITIALIZE RETURN CODE TO SUCCESSFUL COM#
  123. END
  124. IF (CC GQ MINCC) AND
  125. (CC LQ MAXCC)
  126. THEN # VALID COMMAND CODE #
  127. BEGIN
  128. GOTO SWTCH$CC[CC];
  129.  
  130. CC$1: # NOTIFICATION OF BREAK INDICATOR MARK #
  131.  
  132. BEGIN
  133. BREAKMARK = TRUE; # SET FLAG TO NOTIFY APP ABOUT BI/MARK #
  134. AUTOBREAK = FALSE; # CLEAR AUTO BREAK PROCESSING FLAG #
  135. GOTO CC$END;
  136.  
  137. END
  138.  
  139. CC$2: # NOTIFICATION OF USER/APPL INTERRUPTS #
  140.  
  141. BEGIN
  142. USERINTR = TRUE; # SET FLAG TO NOTIFY APP ABOUT INTR/USR #
  143. GOTO CC$END;
  144.  
  145. END
  146.  
  147. CC$3: # NOTIFICATION OF INACTIVE CONNECTIONS #
  148.  
  149. BEGIN
  150. INACTIVE = TRUE; # SET FLAG TO NOTIFY APP ABOUT FC/INACT #
  151. GOTO CC$END;
  152.  
  153. END
  154.  
  155. CC$4: # APPLICATION SUPPORTS NAM K-DISPLAY #
  156.  
  157. BEGIN
  158. KDISPLAY = TRUE; # SET FLAG FOR SUPPORTING NAM K-DISPLAY #
  159. GOTO CC$END;
  160.  
  161. END
  162.  
  163. CC$5: # NOTIFICATION OF CONNNECTION REQUESTS #
  164.  
  165. BEGIN
  166. CONINIT = TRUE; # SET FLAG TO NOTIFYING APP ABOUT CON/REQ #
  167. GOTO CC$END;
  168.  
  169. END
  170.  
  171. CC$6: # STORE ADDRESS IN PARM-ADDR FIELD OF NIT #
  172.  
  173. BEGIN
  174. NIT$PARMADR[0] = LOC(ADDR); # ADDR TO STORE IN PARM-ADDR #
  175. GOTO CC$END;
  176.  
  177. END
  178.  
  179. CC$7: # AUTOMATIC PROCESSING OF USER BREAKS #
  180.  
  181. BEGIN
  182. AUTOBREAK = TRUE; # SET FLAG FOR AUTO USER BREAK PROCESSING #
  183. BREAKMARK = FALSE; # CLEAR NOTIFICATION OF BREAK MARK FLAG #
  184. GOTO CC$END;
  185.  
  186. END
  187.  
  188. CC$8: # SELECT CONNECTION FOR POLLING DATA #
  189.  
  190. BEGIN
  191. IF ADDR EQ 1
  192. THEN # APP WANTS TO SELECT DATA FROM CONNECTION#
  193. BEGIN
  194. CONPOLL = TRUE; # SET FLAG FOR NETGET PROCESSING #
  195. END
  196. ELSE # APP WANTS TO REVERT BACK TO LIST PROCESS#
  197. BEGIN
  198. CONPOLL = FALSE; # CLEAR FLAG TO REVERT TO CALLING NETGETL #
  199. END
  200. GOTO CC$END;
  201.  
  202. END
  203.  
  204. CC$9: # DO NOT ABORT IF NETON IS REJECTED #
  205. BEGIN
  206. NOABTNETONA = TRUE; # SET FLAG TO NOT ABORT IF NETON REJECT #
  207. GOTO CC$END;
  208.  
  209. END
  210.  
  211. CC$10: # DO NOT ABORT IF ERR/LGL IS RECEIVED #
  212. BEGIN
  213. NOABTERRLGL = TRUE; # SET FLAG TO NOT ABT IF ERR/LGL RECEIVE#
  214. GOTO CC$END;
  215.  
  216. END
  217.  
  218. CC$11: # SUPPORT ONLY SPECIFIED DEVICE TYPES #
  219. BEGIN
  220. SUPDTW[0] = ADDR; # SET DEVICE TYPE FLAGS #
  221. GOTO CC$END;
  222.  
  223. END
  224.  
  225. CC$12: # PROCESS PRU/ON SUP MSG ONLY FOR #
  226. # SPECIFIED DEVICE TYPES. #
  227. BEGIN
  228. PRUDTW[0] = ADDR; # SET DEVICE TYPES FOR PRU/ON PROCESSING #
  229. PRUTRAA[0] = FALSE;# PRU INTERFACE NOT SUPPORTED FOR INTRAHST#
  230. PRUCON[0] = FALSE; # PRU INTERFACE NOT SUPPORTED FOR CONSOLE #
  231. GOTO CC$END;
  232.  
  233. END
  234.  
  235. CC$13: # CONVERT PM MESSAGES #
  236. BEGIN
  237.  
  238. IF (ADDR LS 0) OR # MINIMUM CONVERSION CODE #
  239. (ADDR GR 2) # MAXIMUM CONVERSION CODE #
  240. THEN # INVALID CONVERSION CODE WAS SPECIFIED #
  241. BEGIN
  242. NIT$RC[0] = NITRTC"QTCMDREJ"; # QTCMD REJECT RETURN CODE #
  243. NIT$S$RC[00] = NITSRTC"BADCONVC"; # BAD CONVERSION CODE #
  244. END
  245. ELSE # VALID CONVERSION CODE WAS SPECIFIED #
  246. BEGIN
  247. PMCONV = ADDR; # SET TYPE OF CONVERSION FOR PM MESSAGES #
  248. END
  249. GOTO CC$END;
  250.  
  251. END
  252.  
  253.  
  254. CC$END: # END OF CASE STATEMENT #
  255. END
  256. ELSE # BAD COMMAND CODE WAS SPECIFIED #
  257. BEGIN
  258. NIT$RC[0] = S"QTCMDREJ"; # QTCMD REJECT RETURN CODE #
  259. NIT$S$RC[0] = S"UNRECOG"; # BAD COMMAND CODE #
  260. END
  261. RETURN;
  262. END
  263. TERM
cdc/nos2.source/nam5871/qtcmd.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator