User Tools

Site Tools


cdc:nos2.source:nam5871:netoff

NETOFF

Table Of Contents

  • [00011] PROC NETOFF
  • [00089] PROC NP$RTIM
  • [00091] PROC NP$ERR
  • [00092] PROC NP$WRTR
  • [00093] PROC NP$WRTW
  • [00094] PROC NP$PIOE
  • [00097] PROC NP$CLK
  • [00098] PROC NP$DATE
  • [00099] PROC NP$SPRT
  • [00101] PROC NP$WRTW
  • [00102] PROC NP$PIOE
  • [00104] PROC NP$XFER

Source Code

NETOFF.txt
  1. *DECK NETOFF
  2. USETEXT AIPDEF
  3. USETEXT NP$MODE
  4. USETEXT NP$NWL
  5. USETEXT NP$STAT
  6. *IF,DEF,DEBUG
  7. USETEXT NP$DB
  8. *IF DEF,XFR,1
  9. USETEXT NX$ACBF
  10. *ENDIF
  11. PROC NETOFF;
  12. *IF DEF,IMS
  13. #
  14. *1DC NETOFF
  15. *
  16. * 1. PROC NAME AUTHOR DATE
  17. * NETOFF S.KRULEVITCH 77/06/28
  18. *
  19. * 2. FUNCTIONAL DESCRIPTION
  20. * THIS ROUTINE INFORMS NIP THAT THE APPLICATION IS NETTING OFF.
  21. * IT RESTORES AIP TO THE STATE IT WAS IN PRIOR TO NETON.
  22. *
  23. * 3. METHOD USED
  24. * FORMATS A NETOFF WORKLIST ENTRY AND SENDS IT TO NIP BY NP$XFER.
  25. * WHEN DEBUG OPTION IS DEFINED A TWO WORD ENTRY IS WRITTEN TO
  26. * THE DEBUG LOG FILE.
  27. * WORD 0
  28. * 2
  29. * 0 4
  30. * I-------------------------I----------------I
  31. * I I I
  32. * I SECONDS SINCE DEADSTART I MILLISECONDS I
  33. * I I I
  34. * I-------------------------I----------------I
  35. *
  36. * WORD 1
  37. * 2 4 5
  38. * 4 2 3
  39. * I-------I---------I--------I---------I
  40. * I I I I I
  41. * I I OFF$CAL I I OFF$OPC I
  42. * I I I I I
  43. * I-------I---------I--------I---------I
  44. *
  45. * OFF$CAL - CALLING ADDRESS
  46. * OFF$OPC - NETOFF OP$CODE (=7)
  47. *
  48. * NAMA614
  49. * 4. ENTRY CONDITIONS NAMA614
  50. * NEXT - WORKLIST NEXT AVAILABLE WORD PTR NAMA614
  51. * NAMA614
  52. * 5. EXIT CONDITIONS NAMA614
  53. * DEFER$PRO = FALSE
  54. * DEFER$GSM = FALSE
  55. * LTAA = 0
  56. * PARALLEL = FALSE
  57. * PN - PROCESS NUMBER IS SET TO 0. NAMA614
  58. * ACCEPTED - AIP ON/OFF SWITCH SET OFF NAMA614
  59. *
  60. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  61. * AIPDEF NP$CRT
  62. * NP$DB NP$MODE NP$NWL NP$STAT
  63. *
  64. * 7. ROUTINES CALLED
  65. * NP$CLK - DELIVERS TIME IN DISPLAY CODE (STAT DEFINED)
  66. * NP$DATE - DELIVERS DATE IN DISPLAY CODE (STAT DEFINED)
  67. * NP$PIOE - PROCESS I/O ERROR AFTER WRITE OPERATION ON FILE
  68. * NP$RTIM - DELIVERS TIME FROM DEADSTART IN SECONDS AND
  69. * MILLISECONDS (STAT/DEBUG DEFINED)
  70. * NP$SPRT - OUTPUTS STATISTICS TO,THEN CLOSES,ZZZZZSN.(STAT)
  71. * NP$WRTW - WRITES TEXT TO SPECIFIED FILE.(STAT/DEBUG DEFINED)
  72. * NP$WRTR - CLOSES FILE BY WRITING EOR.(DEBUG DEFINED)
  73. * NP$XFER - TRANSFERS WORKLIST TO NIP
  74. *
  75. * 8. DAYFILE MESSAGES
  76. * NONE
  77. *
  78.  #
  79. *ENDIF
  80. BEGIN
  81.  
  82. *CALL NP$CRT
  83.  
  84. # #
  85. # EXTERNAL ROUTINES: #
  86. # #
  87. XREF BEGIN
  88. *IF DEF,DEBUG
  89. PROC NP$RTIM; #RETURNS TIME SINCE DEADSTART #
  90. *IF DEF,XFR,1
  91. PROC NP$ERR ; # ERROR MESSAGE TO DAYFILE #
  92. PROC NP$WRTR; #WRITES EOR TO ZZZZZDN #
  93. PROC NP$WRTW; #WRITES WORDS TO ZZZZZDN #
  94. PROC NP$PIOE; # PROCESS I/O ERROR ON FILE #
  95. *ENDIF
  96. *IF DEF,STAT
  97. PROC NP$CLK; #DELIVERS TIME IN DISPLAY CODE #
  98. PROC NP$DATE; #DELIVERS DATE IN DISPLAY CODE #
  99. PROC NP$SPRT; #PUTS STATISTICS ON ZZZZZSN #
  100. *IF -DEF,DEBUG
  101. PROC NP$WRTW; #WRITES WORDS ON FILE #
  102. PROC NP$PIOE; # PROCESS I/O ERROR ON FILE #
  103. *ENDIF
  104. PROC NP$XFER; #TRANSFERS WORKLIST TO NIP #
  105. END #XREFS#
  106. # #
  107. # LOCAL DECLARATIONS #
  108. # #
  109. ITEM
  110. I I; #INDEX VARIABLE #
  111. ARRAY OFFWL[0:3] P(1);
  112. ITEM
  113. OFFHDR I (0),
  114. OFFHDR$P U (0,9,12), #PROCESS NUMBER #
  115. OFFHDR$N U (0,22,8), #NO. OF ENTRIES IN WORKLIST #
  116. OFFHDR$W U (0,30,12), #NO. OF WORDS IN WORKLIST #
  117. OFFHDR$AWL U (0,42,18), #ADDR WHERE WORKLIST RETURNED #
  118. OFFNWL I (0),
  119. *IF DEF,DEBUG
  120. OFFNWL$ID U (0,0,6), #UNPROCESSED WORKLIST ID = 35 #
  121. *ENDIF
  122. OFFNWL$BS U (0,6,18), #BLOCK SIZE #
  123. OFFNWL$OP U (0,54,5); #OP CODE #
  124. *IF DEF,DEBUG
  125.  
  126. # DEBUG OPTION ARRAY DEFINITIONS #
  127.  
  128. ARRAY OFFLINE P(2); # LOGS NETOFF ENTRY #
  129. BEGIN
  130. ITEM OFF$TIM U(0,0,60); # TIME OF CALL TO NETOFF #
  131. ITEM OFF$CAL U(1,24,AL); # NETOFF CALLING ADDRESS #
  132. ITEM OFF$OPC I(1,54,6); # NETOFF OPCODE (=7) #
  133. END
  134.  
  135.  
  136. # DEBUG OPTION ITEM DEFINITIONS #
  137.  
  138. ITEM TIMEWD U; # REAL TIME SINCE DEADSTART #
  139. *ENDIF
  140. *IF DEF,STAT
  141. ITEM CHARWD C(10);
  142. *ENDIF
  143. *IF DEF,STAT
  144. ARRAY STMSG P(5);
  145. ITEM
  146. ST$CC C(0,0,10)=["0 "], #DOUBLE SPACE #
  147. ST$MSG12 C(1,0,35)=["NAM STATISTICS GATHERING TERMINATED"];
  148. ARRAY STMSGA P(6);
  149. ITEM
  150. ST$CCA C(0,0,10)=[" "], #SINGLE SPACE #
  151. ST$MSG3 C(1,0,13)=["NETOFF DATE "],
  152. ST$DATE C(2,18,10),
  153. ST$MSG4 C(3,18,7)=[" TIME"],
  154. ST$TIME C(4,0,10),
  155. ST$EOLA I(5,0,60)=[0];
  156. *ENDIF
  157. #**********************************************************************#
  158. # #
  159. # NETOFF EXECUTION BEGINS HERE: #
  160. IF NOT ACCEPTED
  161. THEN
  162. RETURN; #NO NETON #
  163. *IF DEF,DEBUG
  164.  
  165. # FORMAT LOG ENTRY FOR NETOFF CALL #
  166. P<CALLADR> = LOC(NETOFF); # GET CALL ADDRESS #
  167.  
  168. NP$RTIM(TIMEWD); # GET REAL TIME SINCE DEADSTART #
  169. OFF$TIM[0] = TIMEWD;
  170. OFF$CAL[0] = CALLADDR[0];
  171. OFF$OPC[0] = OP$OFF;
  172. NP$WRTW(DB$FET,OFFLINE,2); # WRITE NETOFF TO DEBUG LOG #
  173. NP$WRTR(DB$FET,1); # WRITE EOR TO DEBUG LOG #
  174. #
  175.   CHECK FOR I/O ERROR IN DEBUG LOG FILE
  176. #
  177. IF FET$AT[0] NQ 0
  178. THEN # I/O ERROR HAS OCCURRED ON FILE#
  179. BEGIN
  180. NP$PIOE(DB$FET); # PROCESS I/O ERROR #
  181. END
  182. #
  183.   NSUPWRD BASED ARRAY POINTER TO THE USER COMMUNICATION WORD
  184.   WAS SET BY NETON. THE ARRAY IS LOCATED IN NP$NWL COMDECK.
  185.  
  186.   UPDATE MSGCNT IN NSUP COMMUNICATION WORD.
  187. #
  188. MSGCNT[0] = MSGCNT[0] +1;
  189. # #
  190.  
  191. *ENDIF
  192. *IF DEF,STAT
  193. NP$DATE(CHARWD); #PUT CURRENT DATE IN OUTPUT LINE #
  194. ST$DATE = CHARWD;
  195. NP$CLK(CHARWD); #GET TIME IN DISPLAY CODE #
  196. ST$TIME = CHARWD; #PUT DISPLAY CODE TIME IN CHARACTER ARRAY #
  197. NP$WRTW(SN$FET,STMSG,5);
  198. NP$WRTW(SN$FET,STMSGA,6);
  199. #
  200.   CHECK FOR I/O ERROR IN STATISTICS FILE
  201. #
  202. IF SN$AT[0] NQ 0
  203. THEN # I/O ERROR HAS OCCURRED ON FILE#
  204. BEGIN
  205. NP$PIOE(SN$FET); # PROCESS I/O ERROR #
  206. END
  207. NP$SPRT; #DUMP STATISTICS TO ZZZZZSN #
  208. *ENDIF
  209. # #
  210. *IF DEF,XFR
  211. *IF DEF,DEBUG,3
  212. IF NUMFILEXFR NQ 0
  213. THEN
  214. NP$ERR("45"); # STILL FILE BEING TRANSFERRED #
  215. # OUTSTANDING, ABORT C.P. #
  216. *ENDIF
  217. # BUILD NETOFF REQUEST IN OFFNWL #
  218. # #
  219. OFFHDR[NHDR] = LOC(OFFHDR[NHDR]) + 1;
  220. OFFHDR$P[NHDR] = PN;
  221. OFFHDR$N[NHDR] = 1;
  222. OFFHDR$W[NHDR] = OPABHSIZ + NHDR;
  223. I = NHDR + 1;
  224. OFFNWL[I] = 0;
  225. *IF DEF,DEBUG
  226. OFFNWL$ID[I] = AWLID;
  227. *ENDIF
  228. OFFNWL$BS[I] = OPABHSIZ;
  229. OFFNWL$OP[I] = OP$OFF;
  230. # #
  231. # SEND NWL TO NIP VIA SSCALL: #
  232. # #
  233. PARALLEL = FALSE;
  234. NP$XFER(LOC(OFFWL[NCTL])); #SENDS WORKLIST TO NIP #
  235. # #
  236. # REINITIALIZE AIP STATES #
  237. # #
  238. DEFER$PRO = FALSE ;
  239. DEFER$GSM = FALSE ;
  240. LTAA = 0 ;
  241. ACCEPTED = FALSE;
  242.  
  243. RETURN;
  244. END #NETOFF#
  245. TERM
cdc/nos2.source/nam5871/netoff.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator