User Tools

Site Tools


cdc:nos2.source:nam5871:nvfaiam

NVFAIAM

Table Of Contents

  • [00004] PROC NVFAIAM1)
  • [00005] NVFAIAM - A-A ISSUE ACCOUNTING MESSAGE
  • [00010] A-A ISSUE ACCOUNTING MESSAGE.
  • [00071] PROC MESSAGE
  • [00072] PROC NVFTCCT
  • [00073] PROC SSBEBF
  • [00074] FUNC XCDD
  • [00075] PROC SSBSBF
  • [00142] CLRMAA - UTILITY DEFINITION TO CLEAR MAA.
  • [00466] PROC AXTRACT
  • [00467] AXTRACT - A-A EXTRACT NON-ZERO AND NON-BLANK CHARACTERS.
  • [00471] AXTRACT - A-A EXTRACT NON-ZERO,NON-BLANK CHARACTERS.

Source Code

NVFAIAM.txt
  1. *DECK NVFAIAM
  2. USETEXT TEXTNVF
  3. USETEXT TXTANVF
  4. PROC NVFAIAM((PAC),(MTYP));
  5. # TITLE NVFAIAM - A-A ISSUE ACCOUNTING MESSAGE
  6.   #
  7.  
  8. BEGIN # NVFAIAM #
  9. #
  10. ** NVFAIAM - A-A ISSUE ACCOUNTING MESSAGE.
  11. *
  12. * C. BRION 82/10/07
  13. *
  14. * THIS PROCEDURE ISSUES ACCOUNT MESSAGES TO THE SYSTEM'S ACCOUNT
  15. * DAYFILE. IT IS CALLED INTO EXECUTION BY THE FOLLOWING
  16. * PROCEDURES:
  17. * *NVFAACC* *NVFATAC* *NVFAEAC* *NVFAPSV* *NVFARVD*
  18. *
  19. * PROC NVFAIAM((PAC),(MTYP))
  20. *
  21. * ENTRY:
  22. * PAC = POINTER TO PAAC ENTRY
  23. * MTYP = TYPE OF ACCOUNT MESSAGE TO ISSUE:
  24. * ABAC = 0
  25. * ABAA = 1
  26. * ABAE = 2
  27. * ABEA = 3
  28. * ABRE = 4
  29. * AEAA = 5
  30. * ABAR = 6
  31. *
  32. * NOTES:
  33. *
  34. * THE FOLLOWING ARE THE FORMATS OF THE A-A ACCOUNTING MESSAGES:
  35. *
  36. * ABAC, C1, USERNUM, FAMILY, APPL.
  37. * ABAC, C2, SNODE, DNODE.
  38. *
  39. * ABAA, APPL, RAPPL, RHID.
  40. *
  41. * ABAE, C1, USERNUM, FAMILY, RAPPL.
  42. * ABAE, C2, SNODE, DNODE.
  43. *
  44. * ABEA, APPL, RAPPL, RHID.
  45. *
  46. * ABRE, APPL.
  47. *
  48. * AEAA, C1, APPL, RAPPL, RHID.
  49. * AEAA, C2, XXXXXXSECS.
  50. *
  51. * ABAR, SERVICE(APPL), SNODE, DNODE.
  52. *
  53. *
  54. * EXIT:
  55. * APPROPRIATE ACCOUNT MESSAGE ISSUED TO THE SYSTEM'S ACCOUNT
  56. * DAYFILE.
  57. *
  58. * METHOD:
  59. * FOR EACH PARAMETER OF THE ACCOUNT MESSAGE, CALL INTERNAL
  60. * PROCEDURE *AXTRACT* TO DELETE TRAILING ZEROES AND BLANKS.
  61. * WHEN MESSAGE IS COMPLETE, CALL MACREL ROUTINE *MESSAGE* TO
  62. * SEND IT TO THE ACCOUNT DAYFILE.
  63. #
  64.  
  65. #
  66. **** PROC NVFAIAM - XREF LIST.
  67. #
  68.  
  69. XREF
  70. BEGIN
  71. PROC MESSAGE; # SEND MESSAGE #
  72. PROC NVFTCCT; # CALCULATE APPLICATION CONNECT TIME #
  73. PROC SSBEBF; # EXTRACT BIT FIELDS #
  74. FUNC XCDD; # MACREL CONVERT INTEGER TO DISPLAY DEC #
  75. PROC SSBSBF; # SS-STORE BIT FIELD #
  76. END
  77.  
  78.  
  79. #
  80. ****
  81. #
  82.  
  83. DEF COMMA$ #O"5655"#; # COMMA FOLLOWED BY ONE BLANK #
  84. DEF ACCMSIZ$ #5#; # SIZE OF MSG ASSEMBLY AREA #
  85. DEF PERIOD$ #O"57000000"#; # PERIOD FOLLOWED BY ZERO BYTE #
  86. DEF SECS$ #O"2305032357000000"#; # "SECS." FOLLOWED BY 0 BYTE#
  87. ITEM BITSBF I; # STARTING BIT OF MESSAGE ASSEMBLY AREA #
  88. ITEM EBFNAME I; # NAME TO BE ENTERED INTO MESSAGE #
  89. ITEM I I; # LOOP VARIABLE #
  90. ITEM LEN I; # NUMBER OF BITS TO STORE #
  91. ITEM MTYP I; # TYPE OF ACCOUNT MESSAGE TO ISSUE #
  92. ITEM ORDSBF I; # STARTING WORD OF MESSAGE ASSEMBLY AREA #
  93. ITEM PAC I; # SUBSCRIPT FOR ARRAY PAAC #
  94. ITEM TEMP I; # TEMPORARY STORAGE AREA #
  95. ITEM INDXSTART I; # TEMP INDEX START LOCATION #
  96. ITEM CTYP I; # CONNECTION TYPE INDICATOR #
  97. ITEM INDXSTOP I; # TEMP INDEX STOP LOCATION #
  98. ITEM NUM I; # NUMBER OF CHARACTERS TO EXTRACT #
  99. ITEM J I; # LOOP VAR #
  100.  
  101. #
  102. * THE FOLLOWING ARRAY IS THE MESSAGE ASSEMBLY AREA.
  103. #
  104.  
  105. ARRAY ACCMSG [00:00] S(ACCMSIZ$);
  106. BEGIN
  107. ITEM ACC$TYP C(00,00,10);
  108. ITEM ACC$C2 C(00,36,02);
  109. ITEM ACC$WORD U(00,00,60);
  110. END
  111.  
  112. #
  113. * THE FOLLOWING ARRAY CONTAINS THE VALUES FROM THE PAAC ENTRY THAT
  114. * NEED TO BE CONVERTED BY AXTRACT.
  115. #
  116.  
  117. ARRAY VALUES [00:05] S(1);
  118. BEGIN
  119. ITEM VAL$WORD U(00,00,60);
  120. ITEM VAL$CWRD C(00,00,03);
  121. END
  122.  
  123. #
  124. * THE FOLLOWING ARRAY DEFINES THE TYPES OF ACCOUNTING MESSAGES
  125. * THAT ARE A-A. THIS ARRAY ORDER MUST COINCIDE WITH THE VALUE
  126. * DEFINITIONS FOR THE ACCOUNT MSG TYPES IN TXTANVF TEXT.
  127. #
  128.  
  129. ARRAY ACCTYP [00:06] S(1);
  130. BEGIN
  131. ITEM ACT$WORD C(00,00,10);
  132. ITEM ACT$TYPE C(00,00,10) = ["ABAC, C1, ",
  133. "ABAA, ",
  134. "ABAE, C1, ",
  135. "ABEA, ",
  136. "ABRE, ",
  137. "AEAA, C1, ",
  138. "ABAR, "];
  139. END
  140.  
  141. #
  142. ** CLRMAA - UTILITY DEFINITION TO CLEAR MAA.
  143. #
  144.  
  145. BASED ARRAY CLRMAA [00:ACCMSIZ$] S(1);
  146. BEGIN
  147. ITEM CLR$WORD U(00,00,60);
  148. END
  149.  
  150. #
  151. * THE FOLLOWING ARRAY IS FOR STORING THE LOCAL SOURCE AND
  152. * DESTINATION NODES.
  153. #
  154.  
  155. ARRAY NODES [00:00] S(2);
  156. BEGIN
  157. ITEM SNODE U(00,00,60);
  158. ITEM SNODEC C(00,42,03);
  159. ITEM DNODE U(01,00,60);
  160. ITEM DNODEC C(01,42,03);
  161. END
  162.  
  163. #
  164. * THE FOLLOWING ARRAY CONTAINS THE NUMBER OF CHARACTERS THAT WILL
  165. * NEED TO BE CONVERTED. THERE IS AN INDEX RELATION TO EACH ARRAY
  166. * ENTRY HERE AND IN THE VALUES ARRAY.
  167. #
  168.  
  169. ARRAY NUMCHAR [00:05] S(1);
  170. BEGIN
  171. ITEM NUM$VAL U(00,00,60);
  172. END
  173.  
  174. #
  175. * ***** MAIN PROCEDURE STARTS HERE *****
  176. #
  177.  
  178. #
  179. * CLEAR THE MAA (MESSAGE ASSEMBLY AREA).
  180. #
  181.  
  182. P<CLRMAA> = LOC(ACCMSG);
  183. FOR I = 0 STEP 1 UNTIL (ACCMSIZ$ - 1)
  184. DO
  185. BEGIN
  186. CLR$WORD[I] = 0;
  187. END
  188.  
  189. ACC$TYP[0] = ACT$WORD[MTYP]; # SET MESSAGE TYPE #
  190.  
  191. #
  192.   EXTRACT THE NEEDED VALUES FROM THE PAAC ENTRY AND STORE INTO THE
  193.   VALUES ARRAY.
  194. #
  195.  
  196. VAL$WORD[0] = PA$UWORD[PAC];
  197. VAL$WORD[1] = PA$FWORD[PAC];
  198. VAL$WORD[2] = PA$RAPWRD[PAC];
  199. VAL$WORD[3] = PA$IAPWRD[PAC];
  200. VAL$WORD[4] = PA$RAPWRD[PAC];
  201. VAL$WORD[5] = PA$RHWRD[PAC];
  202.  
  203. #
  204.   IF THE MESSAGE TYPE IS EITHER ABAC OR ABAE THEN THE FIRST LINE OF
  205.   THE MESSAGE WILL BE STARTED IN WORD 1, BIT 0. THERE WILL BE 7
  206.   CHARACTERS IN EACH OF THE FIRST 3 VALUES THAT WILL HAVE TO BE
  207.   CONVERTED AND PACKED INTO THE MAA (MESSAGE ASSEMBLY AREA).
  208. #
  209.  
  210. IF ((MTYP EQ ABAC$) OR (MTYP EQ ABAE$))
  211. THEN
  212. BEGIN
  213. ORDSBF = 1;
  214. BITSBF = 0;
  215. INDXSTART = 0;
  216. INDXSTOP = 2;
  217. NUM$VAL[0] = 7;
  218. NUM$VAL[1] = 7;
  219. NUM$VAL[2]= 7;
  220. END
  221. ELSE IF ((MTYP EQ ABAA$) OR (MTYP EQ ABEA$))
  222.  
  223. #
  224.   OR IF THE MESSAGE TYPE IS ABAA OR ABEA THEN THE STARTING MAA WORD
  225.   ORDINAL IS 0 AND THE STARTING BIT IS 36. THE PAAC VALUES IN VALUES
  226.   ARRAY SUBSCRIPTS 3,4,5 ARE TO BE EXTRACTED AND THERE ARE 7,7 AND
  227.   3 CHARACTERS IN THOSE VALUES RESPECTIVELY THAT ARE TO PACKED INTO
  228.   THE MAA.
  229. #
  230.  
  231. THEN
  232. BEGIN
  233. ORDSBF = 0;
  234. BITSBF = 36;
  235. INDXSTART = 3;
  236. INDXSTOP = 5;
  237. NUM$VAL[3] = 7;
  238. NUM$VAL[4] = 7;
  239. NUM$VAL[5] = 3;
  240. END
  241. ELSE IF ((MTYP EQ ABRE$) OR (MTYP EQ ABAR$))
  242.  
  243. #
  244.   OR IF THE MESSAGE TYPE IS EITHER ABRE OR ABAR THEN THERE IS ONLY
  245.   ONE PAAC ENTRY VALUE TO BE EXTRACTED AND PACKED INTO THE MAA.
  246.   THAT VALUE MAY HAVE 7 CHARACTER MAX LENGTH.
  247. #
  248.  
  249. THEN
  250. BEGIN
  251. ORDSBF = 0;
  252. BITSBF = 36;
  253. INDXSTART = 3;
  254. INDXSTOP = 3;
  255. NUM$VAL[3] = 7;
  256. END
  257. ELSE IF MTYP EQ AEAA$
  258.  
  259. #
  260.   OR THE MESSAGE TYPE MAY BE AEAA IN WHICH CASE THE FIRST 3 PAAC
  261.   VALUES OF 7,7 AND 3 CHARACTER LENGTHS MUST BE EXTRACTED AND PACKED
  262.   INTO THE MAA. THEY MUST BE PACKED INTO DIFFERENT LOCATIONS OF THE
  263.   MAA, HENCE THE SPECIAL CASE FROM ABAA AND ABEA TYPES.
  264. #
  265.  
  266. THEN
  267. BEGIN
  268. ORDSBF = 1;
  269. BITSBF = 0;
  270. INDXSTART = 3;
  271. INDXSTOP = 5;
  272. NUM$VAL[3] = 7;
  273. NUM$VAL[4] = 7;
  274. NUM$VAL[5] = 3;
  275. END
  276.  
  277. #
  278.   GENERATE THE FIRST LINE OF THE MESSAGE IN THE MAA.
  279.   SETUP THE LOCAL VARIABLES CONTAINING THE VALUE TO BE EXTRACTED
  280.   AND PACKED AND THE NUMBER OF CHARACTERS TO PROCESS. THE AXTRACT
  281.   PROCEDURE WORKS WITH THESE VARIABLES.
  282. #
  283.  
  284. TEMP = COMMA$;
  285. LEN = 12;
  286.  
  287. #
  288.   CONVERT THE SNODE AND DNODE VALUES.
  289. #
  290.  
  291. SNODE[0] = XCDD(PA$SNODE[PAC] + 1000);
  292. DNODE[0] = XCDD(PA$DNOD[PAC] + 1000);
  293.  
  294.  
  295. FOR I =INDXSTART STEP 1 UNTIL INDXSTOP
  296. DO
  297. BEGIN
  298. EBFNAME = VAL$WORD[I];
  299. NUM = NUM$VAL[I];
  300. AXTRACT;
  301.  
  302. #
  303.   IF AT LAST VALUE OF LINE, THEN MUST TERMINATE LINE WITH PERIOD
  304.   AND A BLANK ONLY IF IT IS NOT AN ABAR TYPE SINCE THIS TYPE OF
  305.   MESSAGE NEEDS THE SOURCE AND DESTINATION NODES APPENDED.
  306. #
  307. IF (I EQ INDXSTOP) AND
  308. (MTYP NQ ABAR$)
  309. THEN
  310. BEGIN
  311. TEMP = PERIOD$;
  312. LEN = 24;
  313. END
  314.  
  315. #
  316.   STORE THE TERMINATOR (EITHER COMMA OR PERIOD) INTO MAA.
  317. #
  318.  
  319. SSBSBF(ACCMSG,ORDSBF,BITSBF,LEN,TEMP);
  320.  
  321. END
  322.  
  323. #
  324.   NOW IF THE TYPE IS A ABAR, EXTRACT AND PACK THE SNODE AND DNODE
  325.   INTO THE MAA.
  326. #
  327.  
  328. IF MTYP EQ ABAR$
  329. THEN
  330. BEGIN
  331. VAL$CWRD[0] = SNODEC[0];
  332. VAL$CWRD[1] = DNODEC[0];
  333. NUM$VAL[0] = 3;
  334. NUM$VAL[1] = 3;
  335. INDXSTART = 0;
  336. INDXSTOP = 1;
  337.  
  338. FOR J = INDXSTART STEP 1 UNTIL INDXSTOP
  339. DO
  340. BEGIN
  341. EBFNAME = VAL$WORD[J];
  342. NUM = NUM$VAL[J];
  343. AXTRACT;
  344.  
  345. #
  346.   TERMINATE AS BEFORE WITH EITHER COMMA OR PERIOD.
  347. #
  348.  
  349. IF J EQ INDXSTOP
  350. THEN
  351. BEGIN
  352. TEMP = PERIOD$;
  353. LEN = 24;
  354. END
  355.  
  356. SSBSBF(ACCMSG,ORDSBF,BITSBF,LEN,TEMP);
  357.  
  358. END
  359. END
  360.  
  361. #
  362.   SEND THE FIRST LINE OF MESSAGE (MAYBE LAST).
  363. #
  364.  
  365. MESSAGE(ACCMSG,5);
  366.  
  367. #
  368.   PREPARE THE SECOND LINE OF THE MESSAGE TYPES THAT REQUIRE A
  369.   SECOND LINE.(ABAC, ABAE, AEAA)
  370.   SAME PROCEDURAL MANNER AS BEFORE. SET UP THE VALUES AND NUMBER
  371.   OF CHARACTERS THAT NEED TO BE EXTRACTED AND PACKED THEN TERMINATE
  372.   THE LINE WITH THE PERIOD, ZERO BYTE SEQUENCE.
  373. #
  374.  
  375. IF ((MTYP EQ ABAC$) OR (MTYP EQ ABAE$) OR (MTYP EQ AEAA$))
  376. THEN
  377. BEGIN
  378. ACC$C2[0] = "C2";
  379. ORDSBF = 1;
  380. BITSBF = 0;
  381.  
  382. IF MTYP NQ AEAA$
  383. THEN
  384. BEGIN
  385.  
  386. #
  387.   FOR THE ABAC AND ABAE MESSAGE TYPES THE SNODE AND DNODE VALUES
  388.   MUST BE PACKED INTO THE MAA.
  389. #
  390.  
  391. VAL$CWRD[0] = SNODEC[0];
  392. VAL$CWRD[1] = DNODEC[0];
  393. NUM$VAL[0] = 3;
  394. NUM$VAL[1] = 3;
  395. INDXSTART = 0;
  396. INDXSTOP = 1;
  397.  
  398. TEMP = COMMA$;
  399. LEN = 12;
  400.  
  401. FOR J = INDXSTART STEP 1 UNTIL INDXSTOP
  402. DO
  403. BEGIN
  404. EBFNAME = VAL$WORD[J];
  405. NUM = NUM$VAL[J];
  406. AXTRACT;
  407. IF J EQ INDXSTOP
  408. THEN
  409. BEGIN
  410. TEMP = PERIOD$;
  411. LEN = 24;
  412. END
  413.  
  414. SSBSBF(ACCMSG,ORDSBF,BITSBF,LEN,TEMP);
  415.  
  416. END
  417.  
  418. END
  419. ELSE # TYPE AEAA MESSAGE #
  420. BEGIN
  421.  
  422. #
  423.   SET A-A CONNECT TIME REQUEST AND CALL TO CALCULATE THE CONNECT
  424.   TIME FOR THE MESSAGE
  425. #
  426.  
  427. CTYP = AATIME$;
  428. NVFTCCT(PAC,0,EBFNAME,CTYP);
  429.  
  430. #
  431.   REFINE CONNECT TIME RETURNED AND PACK INTO MAA.
  432. #
  433.  
  434. NUM = 7;
  435. AXTRACT;
  436.  
  437. #
  438.   APPEND THE SECS. SUFFIX TO THE MESSAGE.
  439. #
  440.  
  441. TEMP = SECS$;
  442. LEN = 48;
  443.  
  444. #
  445.   STORE FINAL TERMINATOR INTO THE SECOND LINE.
  446. #
  447.  
  448. SSBSBF(ACCMSG,ORDSBF,BITSBF,LEN,TEMP);
  449.  
  450. END
  451.  
  452. #
  453.   ISSUE THE SECOND LINE OF THE MESSAGE.
  454. #
  455.  
  456. MESSAGE(ACCMSG,5);
  457.  
  458. END
  459.  
  460. #
  461. * ***************************************************************
  462. #
  463.  
  464. CONTROL EJECT;
  465.  
  466. PROC AXTRACT;
  467. # TITLE AXTRACT - A-A EXTRACT NON-ZERO AND NON-BLANK CHARACTERS. #
  468. BEGIN # AXTRACT #
  469.  
  470. #
  471. ** AXTRACT - A-A EXTRACT NON-ZERO,NON-BLANK CHARACTERS.
  472. *
  473. * C. BRION 82/10/15.
  474. *
  475. * THIS PROCEDURE IS LOCAL TO NVFAIAM AND ITS FUNCTION IS TO EXTRACT
  476. * NON-ZERO AND NON-BLANK TRAILING CHARACTERS FROM VALUES AND THEN
  477. * STORE THE RESULTING CHARACTER(S).
  478. *
  479. * PROC AXTRACT
  480. *
  481. * ENTRY:
  482. * VALUE RESIDES IN EBFNAME, LEFT JUSTIFIED.
  483. * NUMBER OF CHARACTERS RESIDES IN NUM.
  484. * STORE WORD ORDINAL AND BIT ORDINAL WITHIN WORD IN ORDSBF,BITSBF.
  485. * STORE ADDRESS IN ACCMSG.
  486. *
  487. #
  488.  
  489. ITEM OEBF I;
  490. ITEM BEBF I;
  491. ITEM I I;
  492. ITEM TCHAR I;
  493. ITEM FIN B;
  494.  
  495. #
  496. * **** AXTRACT PROCEDURE STARTS HERE. ****
  497. #
  498.  
  499. #
  500.   INITIALIZE THE EXTRACT ORDINALS
  501. #
  502.  
  503. OEBF = 0;
  504. BEBF = 0;
  505. FIN = FALSE;
  506.  
  507. #
  508.   LOOP THROUGH THE VALUE WORD. WHEN A NON-BLANK OR NON-ZERO
  509.   CHARACTER FOUND, IT IS STORED INTO STORE ADDRESS. OTHERWISE,
  510.   THE PROCESS IS FINISHED. DO NOT SCAN MORE THAN NUM CHARACTERS.
  511. #
  512.  
  513. FOR I = 0 STEP 1 WHILE (I LS NUM AND NOT FIN)
  514. DO
  515. BEGIN
  516. SSBEBF(EBFNAME,OEBF,BEBF,6,TCHAR);
  517. IF ((TCHAR EQ 0) OR (TCHAR EQ " "))
  518. THEN
  519. BEGIN
  520. FIN = TRUE;
  521. END
  522. ELSE
  523. BEGIN
  524. SSBSBF(ACCMSG,ORDSBF,BITSBF,6,TCHAR);
  525. END
  526. END
  527.  
  528. END # AXTRACT #
  529.  
  530. END # NVFAIAM #
  531. TERM
  532. *ENDIF
1)
PAC),(MTYP
cdc/nos2.source/nam5871/nvfaiam.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator