User Tools

Site Tools


cdc:nos2.source:nam5871:np_xfer

NP$XFER

Table Of Contents

  • [00003] PROC NP$XFER(BASE)
  • [00096] PROC NP$ERR
  • [00097] PROC NP$OSIF
  • [00098] PROC NP$RCL
  • [00100] PROC NP$SN

Source Code

NP$XFER.txt
  1. *DECK NP$XFER
  2. USETEXT AIPDEF
  3. PROC NP$XFER(BASE);
  4. *IF DEF,IMS
  5. #
  6. *1DC NP$XFER
  7. *
  8. * 1. PROC NAME AUTHOR DATE
  9. * NP$XFER S.KRULEVITCH 77/05/23
  10. *
  11. * 2. FUNCTIONAL DESCRIPTION
  12. * THIS ROUTINE FORMATS A REQUEST TO MOVE THE NWL TO NIP.
  13. * IT CALLS NP$OSIF TO MAKE THE ACTUAL OPERATING SYSTEM CALL.
  14. *
  15. * 3. THE SUBSYSTEM CALL IS FORMATTED AS FOLLOWS:
  16. * 2 3 4
  17. * 0 0 2
  18. * S S C AUTO SS$ID=NIP ADDR=BASE=LOC(NWL)
  19. * NWL[NCTL] CONTAINS THE COMPLETE BIT,ERROR FLAGS,THE RT BITS
  20. * AND THE WORD COUNT OF THE NWL(MAXIMUM=64=100B).
  21. * RT BIT 47 SET TO ZERO MEANS THE OPERATING SYSTEM WILL HOLD A
  22. * REQUEST UNTIL THE SUBSYSTEM IS ABLE TO ACCEPT IT. SET TO ONE,
  23. * CONTROL WILL BE RETURNED TO THE USER IF THE SUBSYSTEM IS BUSY.
  24. * RT BIT 46 SET TO ONE IMPLIES THAT ERROR FLAGS WILL BE SET AND
  25. * CONTROL WILL BE RETURNED TO THE USER ON NONFATAL ERRORS.
  26. * THE AUTO RECALL BIT WILL BE SET IF THE APPLICATION IS NOT IN
  27. * PARALLEL MODE.
  28. * IF IT IS A NETON WORKLIST, THE NWL WILL BE ISSUED WITH RECALL
  29. * (IF APPLICATION IS NOT IN PARALLEL MODE) ON NETON WORKLIST
  30. * ENTRY-S COMPLETION BIT.
  31. *
  32. * 4. ENTRY CONDITIONS
  33. * BASE - SET TO THE ADDRESS OF EITHER NWL OR SWL
  34. * BUF$LEN[1] - SET TO NUMBER OF WORDS IN WORKLIST
  35. * ACCEPTED - TRUE IF WORKLIST TRANSFER IS NOT A NETON
  36. * PARALLEL - SET TRUE IF APPLICATION WANTS TO GAIN CONTROL AS
  37. * SOON AS POSSIBLE AFTER NIP HAS BEEN CALLED
  38. *
  39. * 5. EXIT CONDITIONS
  40. * BASE - SET TO ADDRESS OF THE ARRAY WHICH CONTAINS (OR WILL
  41. * CONTAIN) THE WORKLIST RESPONSE.
  42. * DEFER$PRO - SET TRUE IF THE COMPLETE BIT, CB[0], IS NOT SET -
  43. * SO SUPERVISORY MESSAGE PROCESSING WAS DEFERRED
  44. *
  45. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  46. * AIPDEF CRCOM NP$DB NP$LOF
  47. * NP$MODE NP$NWL NP$STAT
  48. *
  49. * 7. ROUTINES CALLED
  50. * NP$ERR - ERROR PROCESSIMG
  51. * NP$OSIF - ISSUE OS REQUEST
  52. * NP$RCL - RECALL COMPASS ROUTINE
  53. * NP$SN - INCREMENTS STATISTICS COUNTER
  54. *
  55. * 8. DAYFILE MESSAGES
  56. * NETWORK APPLICATION ABORTED, RC = 51.
  57. * NP$XFER: NWL HAS OVERFLOWED.
  58. *
  59. * NETWORK APPLICATION ABORTED, RC = 67.
  60. * NP$XFER: NIP NOT AVAILABLE AT SCP.
  61. *
  62. *
  63.  # NAMA614
  64. *ENDIF
  65. BEGIN
  66.  
  67. #
  68.   THE FOLLOWING COMMON DECKS ARE COMPILED INLINE IN
  69.   ORDER TO PRESET THE COMMON BLOCKS.
  70. #
  71. CONTROL PRESET;
  72. *CALL CRCOM
  73. *CALL NP$MODE
  74. *CALL NP$NWL
  75. *CALL NP$NWNC
  76. *CALL NP$STAT
  77. *IF,DEF,DEBUG
  78. *CALL NP$DB
  79. *CALL NP$LOF
  80. *ENDIF
  81. *IF DEF,XFR,4
  82. *CALL NX$ACBF
  83. *CALL NX$ACBX
  84. *CALL NX$MSG
  85. *CALL NX$CHAR
  86.  
  87.  
  88. # #
  89. # FORMAL PARAMETERS: #
  90. # #
  91. ITEM BASE I; #ADDRESS OF WORKLIST #
  92. # #
  93. # EXTERNAL ROUTINES CALLED: #
  94. # #
  95. XREF BEGIN
  96. PROC NP$ERR; #ERROR PROCESSOR #
  97. PROC NP$OSIF; #ISSUE OS REQUEST #
  98. PROC NP$RCL; #RECALL #
  99. *IF DEF,STAT
  100. PROC NP$SN; #INCREMENTS STATISTICS COUNTER#
  101. *ENDIF
  102. END #XREFS#
  103. # #
  104. # LOCAL DECLARATIONS: #
  105. # #
  106. XREF ITEM SS$ID U; # NIP SCP IDENT #
  107. ARRAY SSCALL[0] S(1);
  108. ITEM
  109. CTL$WD I (0),
  110. SSC C (0,0,3),
  111. AUTO B (0,19,1),
  112. SSCP U(0,20,4),
  113. SS U (0,30,12),
  114. ADDR U (0,42,18);
  115. BASED ARRAY PAREA[0:63] S(1);
  116. ITEM
  117. WORD I (0),
  118. BUF$LEN U (0,30,12),
  119. RSSRIN I(0,0,36),
  120. WRDCNT I(0,36,6),
  121. RCDC I(0,42,4),
  122. RT I(0,46,2),
  123. FLAGS I(0,48,11),
  124. OPCD U(0,54,5), # WORKLIST OPCODE #
  125. CBIT B(0,59,1);
  126. ITEM
  127. N I; #TEMPORARY VARIABLE #
  128.  
  129. #**********************************************************************#
  130. # #
  131. # NP$XFER EXECUTION BEGINS HERE #
  132. # #
  133. P<PAREA> = BASE;
  134. IF PARALLEL
  135. THEN
  136. WORD[0] = X"3000"; #SET RT BITS (12 AND 13) #
  137. ELSE
  138. WORD[0] = X"2000";
  139. # BIT 12 SET TO ONE IMPLIES THAT THE O/S WILL RETURN CONTROL TO #
  140. # THE USER IF THE SUBSYSTEM IS BUSY. #
  141. N=BUF$LEN[NHDR];
  142. *IF DEF,DEBUG
  143. IF N GR LWL+1 #WORKLIST HAS OVERFLOWED NWL #
  144. THEN
  145. BEGIN
  146. NP$ERR("51"); # NAM DEBUG ERROR. #
  147. END #N GR WLS#
  148. *ENDIF
  149.  
  150. WRDCNT[0] = N;
  151. # #
  152. # SET UP SSC CALL #
  153. # #
  154. CTL$WD = 0;
  155. SSC = "SSC";
  156. AUTO = NOT PARALLEL AND ACCEPTED;
  157. SS = SS$ID;
  158. ADDR = BASE;
  159. NP$OSIF(SSCALL);
  160. # #
  161. # CHECK FLAGS #
  162. # #
  163. IF PARALLEL
  164. THEN
  165.  
  166. BEGIN
  167. IF NOT CBIT[0]
  168. THEN
  169. BEGIN
  170. DEFER$PRO = TRUE;
  171. C$FLAG[0] = FALSE; #OPERATION INCOMPLETE #
  172.  
  173. IF NOT ACCEPTED
  174. THEN
  175. BEGIN # IF A NETON WORKLIST TRANSFER #
  176. IF NWL$CB[NHDR+1]
  177. THEN
  178. BEGIN # NETON OPERATION IS COMPLETED #
  179. DEFER$PRO = FALSE;
  180. C$FLAG = TRUE;
  181. N$FLAG = TRUE;
  182. END
  183. END
  184.  
  185. *IF DEF,STAT
  186. # #
  187. # UPDATE STATISTICS #
  188. # #
  189. NP$SN(TYPE"WLX"); #INCREMENT COUNTER #
  190. *ENDIF
  191. END
  192.  
  193. ELSE
  194. BEGIN
  195. DEFER$PRO = FALSE;
  196. C$FLAG[0] = TRUE; #OPERATION COMPLETE #
  197. *IF -DEF,STAT
  198. N$FLAG = NOT CTL$NONAM[NCTL];
  199. *ENDIF
  200. *IF DEF,STAT
  201. IF CTL$NONAM[NCTL]
  202. THEN
  203. BEGIN
  204. N$FLAG = FALSE; #NAM NOT AVAILABLE #
  205. NP$SN(TYPE"WLNX"); #INCREMENT COUNTER #
  206. END #NONAM#
  207. *ENDIF
  208. IF CTL$BUSY[NCTL]
  209. THEN
  210. BEGIN
  211. C$FLAG = FALSE; #OPERATION INCOMPLETE #
  212. DEFER$PRO = TRUE;
  213. *IF DEF,STAT
  214. # #
  215. # UPDATE STATISTICS #
  216. # #
  217. NP$SN(TYPE"WLNX"); #INCREMENT COUNTER #
  218. *ENDIF
  219. END
  220.  
  221. *IF DEF,STAT
  222. ELSE
  223. BEGIN
  224. # #
  225. # UPDATE STATISTICS #
  226. # #
  227. NP$SN(TYPE"WLX"); #INCREMENT COUNTER #
  228. END #PARALLEL SUCCESSFUL WORKLIST TRANSFER#
  229.  
  230. *ENDIF
  231. END#CB TRUE#
  232.  
  233. END #PARALLEL FLAGS SET#
  234.  
  235. ELSE
  236. IF OPCD[NHDR+1] NQ OP$OFF
  237. THEN # THIS WAS NOT A NETOFF WORKLIST #
  238. BEGIN
  239. IF CTL$NONAM[NCTL]
  240. THEN # NAM IS NOT AVAILABLE #
  241. BEGIN
  242. IF (ACCEPTED ) AND # NETON COMPLETED SUCCESSFULLY #
  243. (NOT NOABTAPP) # OKAY TO ABORT APPLICATION #
  244. THEN # NON-NETON WORKLIST TRANSFER HAD FAILED #
  245. BEGIN # ABORT APP SINCE NAM IS GONE #
  246. N$AWL[0] = 0; # CLEAR AWL RESPONSE FLAGS #
  247. *IF DEF,STAT
  248. NP$SN(TYPE"WLNX");
  249. *ENDIF
  250. NP$ERR("67");
  251. END
  252. ELSE
  253. N$FLAG[0] = FALSE; # NAM NOT AVAILABLE #
  254. END
  255. ELSE
  256. BEGIN # NAM IS AVAILABLE #
  257. IF CTL$BUSY[NCTL]
  258. THEN # NIP HAD NO BUFFER AVAILABLE FOR NWL #
  259. BEGIN
  260. *IF,DEF,STAT
  261. NP$SN(TYPE"WLNX"); # INCREMENT NO OF REJECTED NWLS #
  262. *ENDIF
  263. END
  264. ELSE # NWL WORKLIST RECEIVED BY NIP #
  265. BEGIN
  266. IF ACCEPTED
  267. THEN # APPLICATION HAS ALREADY NETTED ON #
  268. BEGIN
  269. *IF,DEF,STAT
  270. NP$SN(TYPE"WLX"); # INCREMENT NO OF SUCCESSFUL NWLS #
  271. *ENDIF
  272. END
  273. ELSE # THIS MUST BE NETON NWL ISSUED W/O RECALL#
  274. BEGIN
  275. NP$RCL(LOC(NWL[NHDR+1])); # WAIT FOR NIP TO PROCESS #
  276. END # NETON WORKLIST #
  277. END
  278. *IF DEF,XFR
  279. IF XFRWLIST
  280. THEN
  281. BEGIN # VALIDATING NETXFR CALL #
  282. FOR N = N WHILE NOT NWL$CB[NHDR+1]
  283. DO
  284. NP$RCL(0) ; # RECALL UNTILL RESPONSE FROM NAM #
  285. END
  286. *ENDIF
  287. END
  288. END
  289.  
  290. RETURN;
  291.  
  292. END #NP$XFER#
  293. TERM
cdc/nos2.source/nam5871/np_xfer.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator