User Tools

Site Tools


cdc:nos2.source:nam5871:np_resp

NP$RESP

Table Of Contents

  • [00012] PROC NP$RESP
  • [00086] PROC NP$DBG
  • [00088] PROC NP$GSM
  • [00089] PROC NP$ON
  • [00091] PROC NP$SN

Source Code

NP$RESP.txt
  1. *DECK NP$RESP
  2. USETEXT AIPDEF
  3. USETEXT NP$MODE
  4. USETEXT NP$NWL
  5. USETEXT NP$STAT
  6. *IF DEF,XFR
  7. USETEXT NX$ACBF
  8. *ENDIF
  9. *IF,DEF,DEBUG
  10. USETEXT NP$DB
  11. *ENDIF
  12. PROC NP$RESP;
  13. *IF DEF,IMS
  14.  
  15. #
  16. *1DC NP$RESP
  17. *
  18. * 1. PROC NAME AUTHOR DATE
  19. * NP$RESP S.KRULEVITCH 77/3/21
  20. *
  21. * 2. FUNCTIONAL DESCRIPTION
  22. * THIS ROUTINE PROCESSES THE EXPECTED RESPONSE FROM NIP.
  23. *
  24. * 3. METHOD USED
  25. * NIP RESPONSE IS EXPECTED IN AIP"S WORKLIST AFTER THE HEADER
  26. * WORDS. NP$RESP RESETS THE NP$NWL HEADER WORD AND TABLE
  27. * POINTER WORDS: NEXT AND SPACE$LEFT. THE POSSIBLE WORKLIST
  28. * RESPONSES ARE TREATED AS FOLLOWS:
  29. *
  30. * A NETON RESPONSE IS TREATED IN NP$ON.
  31. *
  32. * FOR A GET/GETL/GTFL/GETF RESPONSE, NP$RESP WILL PASS THE
  33. * APPLICATION BLOCK HEADER OF THE DATA MESSAGE TO THE APPLICATION
  34. * HEADER ADDRESS (HA). NP$RESP WILL LOG THE MESSAGE ON AIP
  35. * DEBUG FILE VIA ROUTINE NP$DBG. IF STAT IS DEFINED
  36. * THEN THE NUMBER OF MESSAGES OF A SPECIFIC ABT IS INCREMENTED.
  37. *
  38. * FOR A GETSM RESPONSE, THE SMB POINTERS ARE UPDATED AND THE
  39. * NEXTSMLEN WORD ( WHICH SPECIFIES THE LENGTH
  40. * OF THE NEXT SUPERVISORY MESSAGE IN NIP"S FIELD LENGTH WAITING
  41. * FOR ROOM IN THIS APPLICATION"S SMB) IS SET.
  42. * IF THE APPLICATION HAD PREVIOUSLY REQUESTED A SUPERVISOR
  43. * MESSAGE, THEN NP$GSM IS CALLED. LTAA IS SET TO ZERO, AND
  44. * DEFER$GSM IS SET TO FALSE.
  45. *
  46. * IF THE DOWNLINE BUFFER FEATURE IS IN USE, RESET THE WORKLIST
  47. * TABLE POINTER WORDS FOR THE APPLICATION-SUPPLIED DOWNLINE
  48. * BUFFER.
  49. *
  50. * 4. ENTRY CONDITIONS
  51. * AWL$NEXT[NHDR] - AWL WORD COUNT.
  52. * LOC$HA - LOCATION FOR THE HEADER ADDRESS.
  53. *
  54. * 5. EXIT CONDITIONS
  55. * HA - CONTAINS ABH IF THERE WAS A GET/GETL/GETF.
  56. * NEXTSMLEN - ZERO IF NO SUPERVISORY MESSAGES AVAILABLE FOR USER.
  57. * OTHERWISE, LENGTH OF THE NEXT MESSAGE.
  58. *
  59. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  60. * AIPDEF NP$CRT NP$DB NP$MODE
  61. * NP$NWL NP$STAT
  62. *
  63. * 7. ROUTINES CALLED
  64. * NP$GSM
  65. * NP$DBG
  66. * NP$ON
  67. * NP$SN - INCREMENTS STATISTICS COUNTER
  68. *
  69. * 8. DAYFILE MESSAGES
  70. * NONE
  71. *
  72.  #
  73.  
  74. *ENDIF
  75. BEGIN
  76.  
  77. # #
  78. *CALL NP$CRT
  79.  
  80. # #
  81. # ROUTINE CALLED: #
  82. # #
  83. XREF
  84. BEGIN
  85. *IF DEF,DEBUG
  86. PROC NP$DBG; #OUTPUT MESSAGE TO ZZZZZDN #
  87. *ENDIF
  88. PROC NP$GSM; #DELIVERS A SUP MSG TO APP #
  89. PROC NP$ON; #PROCESSES NETON RESPONSE #
  90. *IF DEF,STAT
  91. PROC NP$SN; #INCREMENTS STATISTICS COUNTER#
  92. *ENDIF
  93. END
  94. ITEM
  95. I I, #TEMPORARY VARIABLE #
  96. J; # TEMPORARY VARIABLE #
  97. BASED ARRAY MEM[0:O"77777"] S(1);
  98. ITEM
  99. HA I (0); #HEADER AREA #
  100.  
  101. #**********************************************************************#
  102. # #
  103. # NP$RESP EXECUTION BEGINS HERE #
  104. # #
  105. *CALL NP$RST
  106. FOR I=NEXT WHILE N$AWL[0] NQ 0
  107. DO
  108. BEGIN
  109. IF N$GETAWL[0] NQ 0
  110. THEN
  111. BEGIN # GET/GETL/GETF/GETFL AWL RESPONSE #
  112. P<MEM> = LOC$HA;
  113. HA[0] = ABH[I+1];
  114. *IF DEF,DEBUG
  115. NP$DBG; # WRITE TO ZZZZZDN FILE #
  116. *ENDIF
  117. *IF DEF,STAT
  118. J = TYPE"INB" + ABH$ABT[I+1];
  119. NP$SN(J); # UPDATE STATISTICS #
  120. *ENDIF
  121. N$GETAWL[0] = 0;
  122. TEST I;
  123. END
  124.  
  125. I = I + AWLESIZE; # GMM AWL ALWAYS 2ND AWL ENTRY #
  126. IF N$GMMAWL[0] NQ 0
  127. THEN # GETMM AWL RESPONSE #
  128. BEGIN
  129. GMBFOOT = GMBFOOT + GMM$NW[I+1]; # UPDATE FOOT OF DATA BUF #
  130. GMBLN = GMM$ALN[I+1]; # LIST NUMBER OF DATA IN AIP QUEUE #
  131.  
  132. *IF,DEF,STAT
  133. STAT[TYPE"GMD"] = STAT[TYPE"GMD"] + GMM$NM[I];
  134. STAT[TYPE"GMWD"] = STAT[TYPE"GMWD"] + GMM$NW[I+1];
  135. *ENDIF
  136.  
  137. N$GMMAWL[0] = 0; # END GETMM PROCESING #
  138. END
  139.  
  140. IF N$GSMAWL[0] NQ 0
  141. THEN # GSM AWL RESPONSE #
  142. BEGIN
  143. I = I + AWLESIZE; # GSM AWL ALWAYS 3RD AWL ENTRY #
  144.  
  145. *IF,DEF,STAT
  146. STAT[TYPE"GSD"] = STAT[TYPE"GSD"] + GMM$NM[I];
  147. STAT[TYPE"GSWD"] = STAT[TYPE"GSWD"] + ABH$TLC[I+1];
  148. *ENDIF
  149. FOOT = FOOT + ABH$TLC[I+1]; # UPDATE FOOT PTR OF SMB #
  150. NEXTSMLEN = NWL$RC[I+1]; # SIZE OF NEXT AVAIL SM #
  151. N$AWL[0] = 0; # END AWL PROCESSING #
  152. IF DEFER$GSM
  153. THEN
  154. BEGIN
  155. NP$GSM; # SEND SM TO APPLICATION #
  156. LTAA = 0;
  157. DEFER$GSM = FALSE;
  158. END
  159. TEST I;
  160. END
  161.  
  162. IF N$NETONAWL[0] NQ 0
  163. THEN # NETON AWL RESPONSE #
  164. BEGIN
  165. NP$ON;
  166. N$AWL[0] = 0; # END AWL PROCESSING #
  167. END
  168. *IF DEF,XFR
  169. IF N$XFRAWL[0] NQ 0
  170. THEN
  171. BEGIN
  172. NET$AWL$XFR = NWL$RC[NEXT] ;
  173. N$AWL[0] = 0 ;
  174. END
  175. *ENDIF
  176. END #END FOR LOOP #
  177.  
  178. IF DOWNUSE
  179. THEN # DOWNLINE BUFFER FEATURE IS IN USE #
  180. BEGIN
  181. P<WORKLIST> = LOC$APBUF; # POINT WORKLIST TO APPL BUFFER #
  182. NEXT = 0;
  183. SPACE$LEFT = AB$SIZE[0];
  184. END
  185.  
  186. RETURN;
  187. END #NP$RESP#
  188. TERM
cdc/nos2.source/nam5871/np_resp.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator