User Tools

Site Tools


cdc:nos2.source:nam5871:nvfsiam

NVFSIAM

Table Of Contents

  • [00005] PROC NVFSIAM 1)
  • [00006] NVFSIAM - ISSUE APPLICATION STATUS ACCOUNTING MESSAGE.
  • [00011] ISSUE APPLICATION STATUS ACCOUNTING MESSAGE.
  • [00059] PROC MESSAGE
  • [00060] PROC SSBEBF
  • [00061] PROC SSBSBF
  • [00214] PROC EXTRACT
  • [00215] EXTRACT - EXTRACT NONZERO AND NONBLANK CHARACTERS.
  • [00219] EXTRACT - EXTRACT NONZERO AND NONBLANK CHARACTERS.

Source Code

NVFSIAM.txt
  1. *DECK NVFSIAM
  2. USETEXT TEXTNVF
  3. USETEXT TXSMNVF
  4. USETEXT TXTANVF
  5. PROC NVFSIAM ((PT),(MTYP));
  6. # TITLE NVFSIAM - ISSUE APPLICATION STATUS ACCOUNTING MESSAGE. #
  7.  
  8. BEGIN # NVFSIAM #
  9.  
  10. #
  11. ** NVFSIAM - ISSUE APPLICATION STATUS ACCOUNTING MESSAGE.
  12. *
  13. * P. A. MURRAY 83/08/30
  14. *
  15. * THIS PROCEDURE ISSUES ACCOUNT MESSAGES TO THE SYSTEM'S ACCOUNT
  16. * DAYFILE. IT IS CALLED INTO EXECUTION BY THE FOLLOWING PROCEDURES:
  17. *
  18. * *NVFSNOF* *NVFSNON*
  19. *
  20. * PROC NVFSIAM ((PT),(MTYP))
  21. *
  22. * ENTRY:
  23. * PT = POINTER TO AST ENTRY (PT IS IGNORED IF MTYP = SBER)
  24. * MTYP = TYPE OF ACCOUNT MESSAGE TO ISSUE:
  25. * SANW = 0
  26. * SBNW = 1
  27. * SBER = 2
  28. * SENW = 3
  29. * NET/ON SM IS IN MSGBUF (IF MTYP = SBER)
  30. *
  31. * EXIT:
  32. * THE APPROPRIATE ACCOUNT MESSAGE IS SENT TO THE SYSTEM'S ACCOUNT
  33. * DAYFILE.
  34. *
  35. * NOTES:
  36. * THE FOLLOWING ARE THE FORMATS OF THE APPL STATUS ACCOUNTING
  37. * MESSAGES:
  38. *
  39. * SANW, APLNAME, JSN.
  40. *
  41. * SBNW, APLNAME, JSN.
  42. *
  43. * SBER, APLNAME, JSN.
  44. *
  45. * SENW, APLNAME, JSN.
  46. *
  47. * METHOD:
  48. * FOR EACH PARAMETER OF THE ACCOUNT MESSAGE, CALL INTERNAL
  49. * PROCEDURE *EXTRACT* TO DELETE TRAILING ZEROES AND BLANKS. WHEN
  50. * THE MESSAGE IS COMPLETE, CALL MACREL ROUTINE *MESSAGE* TO SEND
  51. * IT TO THE ACCOUNT DAYFILE.
  52. #
  53.  
  54. #
  55. **** PROC NVFSIAM - XREF LIST.
  56. #
  57. XREF
  58. BEGIN
  59. PROC MESSAGE; # SEND MESSAGE #
  60. PROC SSBEBF; # EXTRACT BIT FIELD #
  61. PROC SSBSBF; # STORE BIT FIELD #
  62. END
  63.  
  64. #
  65. ****
  66. #
  67. DEF ACCMSIZ$ #3#; # SIZE OF MESSAGE ASSEMBLY AREA #
  68. DEF COMMA$ #O"5655"#; # COMMA FOLLOWED BY ONE BLANK #
  69. DEF PERIOD$ #O"57000000"#; # PERIOD FOLLOWED BY ZERO BYTE #
  70.  
  71. ITEM BITSBF I; # STARTING BIT OF MESSAGE ASSEMBLY AREA #
  72. ITEM EBFNAME I; # NAME TO BE ENTERED INTO MESSAGE #
  73. ITEM I I; # LOOP VARIABLE #
  74. ITEM LEN I; # NUMBER OF BITS TO STORE #
  75. ITEM MTYP I; # TYPE OF ACCOUNT MESSAGE TO ISSUE #
  76. ITEM NUM I; # NUMBER OF CHARACTERS TO EXTRACT #
  77. ITEM ORDSBF I; # STARTING WORD OF MESSAGE ASSEMBLY AREA #
  78. ITEM PT I; # SUBSCRIPT FOR AST #
  79. ITEM TEMP I; # TEMPORARY STORAGE AREA #
  80.  
  81. #
  82. * THE FOLLOWING ARRAY IS THE MESSAGE ASSEMBLY AREA.
  83. #
  84. ARRAY ACCMSG [00:00] S(ACCMSIZ$);
  85. BEGIN
  86. ITEM ACC$TYP C(00,00,06); # MESSAGE TYPE #
  87. ITEM ACC$WORD U(00,00,60); # FULL WORD REFERENCE #
  88. END
  89.  
  90. #
  91. * THE FOLLOWING ARRAY DEFINES THE TYPES OF APPL. STATUS ACCOUNTING
  92. * MESSAGES. THIS ARRAY ORDER MUST COINCIDE WITH THE VALUE
  93. * DEFINITIONS FOR THE ACCOUNT MESSAGE TYPES IN TXTANVF TEXT.
  94. #
  95. ARRAY ACCTYP [00:03] S(1);
  96. BEGIN
  97. ITEM ACT$TYPE C(00,00,06) = ["SANW, ",
  98. "SBNW, ",
  99. "SBER, ",
  100. "SENW, "];
  101. END
  102.  
  103. #
  104. * THE FOLLOWING BASED ARRAY IS USED TO CLEAR THE MESSAGE ASSEMBLY
  105. * AREA.
  106. #
  107. BASED ARRAY CLRMAA [00:ACCMSIZ$] S(1);
  108. BEGIN
  109. ITEM CLR$WORD U(00,00,60);
  110. END
  111.  
  112. #
  113. * THE FOLLOWING ARRAY CONTAINS THE NUMBER OF CHARACTERS THAT WILL
  114. * NEED TO BE SCANNED BY THE EXTRACT PROCEDURE. THERE IS AN INDEX
  115. * RELATION BETWEEN EACH ARRAY ENTRY HERE AND THE ENTRIES IN THE
  116. * VALUES ARRAY.
  117. #
  118. ARRAY NUMCHAR [00:01] S(1);
  119. BEGIN
  120. ITEM NUM$VAL U(00,00,60);
  121. END
  122.  
  123. #
  124. * INFORMATION TO BE ENTERED INTO THE ACCOUNT MESSAGES ARE SAVED IN
  125. * THE FOLLOWING ARRAY.
  126. #
  127. ARRAY VALUES [00:01] S(1);
  128. BEGIN
  129. ITEM VAL$WORD U(00,00,60); # FULL WORD REFERENCE #
  130. END
  131.  
  132. #
  133. * **** MAIN PROCEDURE STARTS HERE. ****
  134. #
  135.  
  136. #
  137. * INITIALIZE THE MESSAGE ASSEMBLY AREA.
  138. #
  139. P<CLRMAA> = LOC(ACCMSG);
  140. FOR I = 0 STEP 1 UNTIL (ACCMSIZ$ - 1)
  141. DO
  142. BEGIN
  143. CLR$WORD[I] = 0;
  144. END
  145.  
  146. ACC$TYP[0] = ACT$TYPE[MTYP]; # SET MESSAGE TYPE #
  147.  
  148. #
  149. * INITIALIZE THE VARIABLES FOR INSERTING THE FIRST PARAMETER IN THE
  150. * MESSAGE.
  151. #
  152. ORDSBF = 0;
  153. BITSBF = 36;
  154. NUM$VAL[0] = 7;
  155. NUM$VAL[1] = 4;
  156. TEMP = COMMA$;
  157. LEN = 12;
  158.  
  159. #
  160. * OBTAIN THE APPLICATION NAME AND JSN AND STORE THEM INTO THE VALUES
  161. * ARRAY. IF THE MESSAGE TYPE IS SANW, SBNW, OR SENW, THEN GET THIS
  162. * INFORMATION FROM THE AST. IF THE MESSAGE TYPE IS SBER (DENOTING
  163. * AN UNSUCCESSFUL APPL. NETON ATTEMPT), THEN GET THIS INFORMATION
  164. * FROM THE SUPERVISORY MESSAGE, AS AN AST ENTRY FOR THIS APPL. MAY
  165. * NOT EXIST.
  166. #
  167. IF (MTYP EQ SANW$) OR
  168. (MTYP EQ SBNW$) OR
  169. (MTYP EQ SENW$)
  170. THEN # OBTAIN APPL NAME AND JSN FROM AST #
  171. BEGIN
  172. C<0,NUM$VAL[0]>VAL$WORD[0] = AST$ANAM[PT];
  173. C<0,NUM$VAL[1]>VAL$WORD[1] = AST$JSN[PT];
  174. END
  175. ELSE IF MTYP EQ SBER$ # OBTAIN APPL NAME AND JSN FROM SM #
  176. THEN
  177. BEGIN
  178. C<0,NUM$VAL[0]>VAL$WORD[0] = NETANAM[0];
  179. C<0,NUM$VAL[1]>VAL$WORD[1] = NETJSN[0];
  180. END
  181.  
  182. #
  183. * INSERT THE PARAMETERS INTO THE MESSAGE ASSEMBLY AREA.
  184. #
  185. FOR I = 0 STEP 1 UNTIL 1 DO
  186. BEGIN
  187. EBFNAME = VAL$WORD[I];
  188. NUM = NUM$VAL[I];
  189. EXTRACT;
  190. #
  191. * IF AT THE LAST VALUE OF THE LINE, CHANGE THE TERMINATOR FROM A
  192. * COMMA TO A PERIOD.
  193. #
  194. IF I EQ 1
  195. THEN
  196. BEGIN
  197. TEMP = PERIOD$;
  198. LEN = 24;
  199. END
  200. #
  201. * STORE THE TERMINATOR (EITHER COMMA OR PERIOD) INTO MESSAGE
  202. * ASSEMBLY AREA.
  203. #
  204. SSBSBF(ACCMSG,ORDSBF,BITSBF,LEN,TEMP);
  205.  
  206. END
  207.  
  208. #
  209. * SEND THE MESSAGE TO THE ACCOUNT DAYFILE.
  210. #
  211. MESSAGE(ACCMSG,5);
  212. CONTROL EJECT;
  213.  
  214. PROC EXTRACT;
  215. # TITLE EXTRACT - EXTRACT NONZERO AND NONBLANK CHARACTERS. #
  216.  
  217. BEGIN # EXTRACT #
  218. #
  219. ** EXTRACT - EXTRACT NONZERO AND NONBLANK CHARACTERS.
  220. *
  221. * P. A. MURRAY 83/08/30
  222. *
  223. * THIS PROCEDURE IS LOCAL TO NVFSIAM. ITS FUNCTION IS TO DELETE
  224. * TRAILING ZEROES AND BLANKS FROM VALUES AND STORE THE RESULTING
  225. * CHARACTERS) INTO THE ACCOUNT MESSAGE ASSEMBLY AREA.
  226. *
  227. * PROC EXTRACT
  228. *
  229. * ENTRY:
  230. * EBFNAME = THE VALUE, LEFT JUSTIFIED, THAT IS TO BE STORED.
  231. * NUM = THE NUMBER OF CHARACTERS IN THE VALUE TO BE STORED.
  232. * ORDSBF = STARTING WORD OF MESSAGE ASSEMBLY AREA.
  233. * BITSBF = STARTING BIT WITHIN WORD WHERE VALUE IS TO BE STORED
  234. * ACCMSG = THE ACCOUNT MESSAGE ASSEMBLY AREA.
  235. *
  236. * EXIT:
  237. * THE VALUE (WITHOUT TRAILING ZEROES AND BLANKS) IS PACKED INTO
  238. * THE ACCOUNT MESSAGE ASSEMBLY AREA. ORDSBF AND BITSBF ARE
  239. * UPDATED TO INDICATE THE STARTING BIT AFTER THE NEWLY INSERTED
  240. * VALUE IN THE MESSAGE ASSEMBLY AREA.
  241. *
  242. * METHOD:
  243. * CALL *SSBEBF* TO EXTRACT A 6-BIT CHARACTER FROM EBFNAME. IF THE
  244. * CHARACTER IS NONZERO AND NONBLANK, CALL *SSBSBF* TO STORE IT
  245. * INTO THE MESSAGE ASSEMBLY AREA.
  246. #
  247. ITEM BITEBF I; # STARTING BIT OF TEMP STORAGE AREA #
  248. ITEM FIN B; # EXIT LOOP VARIABLE #
  249. ITEM I I; # LOOP VARIABLE #
  250. ITEM ORDEBF I; # STARTING WORD OF TEMP STORAGE AREA #
  251. ITEM TMPCHAR I; # TEMPORARY STORAGE AREA #
  252.  
  253. #
  254. * **** EXTRACT PROCEDURE STARTS HERE. ****
  255. #
  256.  
  257. #
  258. * INITIALIZE THE EXTRACT ORDINALS.
  259. #
  260. ORDEBF = 0;
  261. BITEBF = 0;
  262. FIN = FALSE;
  263.  
  264. #
  265. * LOOP THROUGH THE VALUE WORD. WHEN A NONBLANK OR NONZERO
  266. * CHARACTER IS FOUND, STORE IT INTO THE MESSAGE ASSEMBLY AREA.
  267. * THE PROCESS IS FINISHED WHEN A BLANK OR ZERO CHARACTER IS FOUND.
  268. * DO NOT SCAN MORE THAN NUM CHARACTERS.
  269. #
  270. FOR I = 0 STEP 1 WHILE (I LS NUM AND NOT FIN)
  271. DO
  272. BEGIN
  273. SSBEBF(EBFNAME,ORDEBF,BITEBF,6,TMPCHAR);
  274. IF ((TMPCHAR EQ 0) OR (TMPCHAR EQ " "))
  275. THEN
  276. BEGIN
  277. FIN = TRUE;
  278. END
  279. ELSE
  280. BEGIN
  281. SSBSBF(ACCMSG,ORDSBF,BITSBF,6,TMPCHAR);
  282. END
  283. END
  284.  
  285. END # EXTRACT #
  286.  
  287. END # NVFSIAM #
  288.  
  289. TERM
1)
PT),(MTYP
cdc/nos2.source/nam5871/nvfsiam.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator