cdc:nos2.source:nam5871:nvfsiam
Table of Contents
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
- *DECK NVFSIAM
- USETEXT TEXTNVF
- USETEXT TXSMNVF
- USETEXT TXTANVF
- PROC NVFSIAM ((PT),(MTYP));
- # TITLE NVFSIAM - ISSUE APPLICATION STATUS ACCOUNTING MESSAGE. #
- BEGIN # NVFSIAM #
- #
- ** NVFSIAM - ISSUE APPLICATION STATUS ACCOUNTING MESSAGE.
- *
- * P. A. MURRAY 83/08/30
- *
- * THIS PROCEDURE ISSUES ACCOUNT MESSAGES TO THE SYSTEM'S ACCOUNT
- * DAYFILE. IT IS CALLED INTO EXECUTION BY THE FOLLOWING PROCEDURES:
- *
- * *NVFSNOF* *NVFSNON*
- *
- * PROC NVFSIAM ((PT),(MTYP))
- *
- * ENTRY:
- * PT = POINTER TO AST ENTRY (PT IS IGNORED IF MTYP = SBER)
- * MTYP = TYPE OF ACCOUNT MESSAGE TO ISSUE:
- * SANW = 0
- * SBNW = 1
- * SBER = 2
- * SENW = 3
- * NET/ON SM IS IN MSGBUF (IF MTYP = SBER)
- *
- * EXIT:
- * THE APPROPRIATE ACCOUNT MESSAGE IS SENT TO THE SYSTEM'S ACCOUNT
- * DAYFILE.
- *
- * NOTES:
- * THE FOLLOWING ARE THE FORMATS OF THE APPL STATUS ACCOUNTING
- * MESSAGES:
- *
- * SANW, APLNAME, JSN.
- *
- * SBNW, APLNAME, JSN.
- *
- * SBER, APLNAME, JSN.
- *
- * SENW, APLNAME, JSN.
- *
- * METHOD:
- * FOR EACH PARAMETER OF THE ACCOUNT MESSAGE, CALL INTERNAL
- * PROCEDURE *EXTRACT* TO DELETE TRAILING ZEROES AND BLANKS. WHEN
- * THE MESSAGE IS COMPLETE, CALL MACREL ROUTINE *MESSAGE* TO SEND
- * IT TO THE ACCOUNT DAYFILE.
- #
- #
- **** PROC NVFSIAM - XREF LIST.
- #
- XREF
- BEGIN
- PROC MESSAGE; # SEND MESSAGE #
- PROC SSBEBF; # EXTRACT BIT FIELD #
- PROC SSBSBF; # STORE BIT FIELD #
- END
- #
- ****
- #
- DEF ACCMSIZ$ #3#; # SIZE OF MESSAGE ASSEMBLY AREA #
- DEF COMMA$ #O"5655"#; # COMMA FOLLOWED BY ONE BLANK #
- DEF PERIOD$ #O"57000000"#; # PERIOD FOLLOWED BY ZERO BYTE #
- ITEM BITSBF I; # STARTING BIT OF MESSAGE ASSEMBLY AREA #
- ITEM EBFNAME I; # NAME TO BE ENTERED INTO MESSAGE #
- ITEM I I; # LOOP VARIABLE #
- ITEM LEN I; # NUMBER OF BITS TO STORE #
- ITEM MTYP I; # TYPE OF ACCOUNT MESSAGE TO ISSUE #
- ITEM NUM I; # NUMBER OF CHARACTERS TO EXTRACT #
- ITEM ORDSBF I; # STARTING WORD OF MESSAGE ASSEMBLY AREA #
- ITEM PT I; # SUBSCRIPT FOR AST #
- ITEM TEMP I; # TEMPORARY STORAGE AREA #
- #
- * THE FOLLOWING ARRAY IS THE MESSAGE ASSEMBLY AREA.
- #
- ARRAY ACCMSG [00:00] S(ACCMSIZ$);
- BEGIN
- ITEM ACC$TYP C(00,00,06); # MESSAGE TYPE #
- ITEM ACC$WORD U(00,00,60); # FULL WORD REFERENCE #
- END
- #
- * THE FOLLOWING ARRAY DEFINES THE TYPES OF APPL. STATUS ACCOUNTING
- * MESSAGES. THIS ARRAY ORDER MUST COINCIDE WITH THE VALUE
- * DEFINITIONS FOR THE ACCOUNT MESSAGE TYPES IN TXTANVF TEXT.
- #
- ARRAY ACCTYP [00:03] S(1);
- BEGIN
- ITEM ACT$TYPE C(00,00,06) = ["SANW, ",
- "SBNW, ",
- "SBER, ",
- "SENW, "];
- END
- #
- * THE FOLLOWING BASED ARRAY IS USED TO CLEAR THE MESSAGE ASSEMBLY
- * AREA.
- #
- BASED ARRAY CLRMAA [00:ACCMSIZ$] S(1);
- BEGIN
- ITEM CLR$WORD U(00,00,60);
- END
- #
- * THE FOLLOWING ARRAY CONTAINS THE NUMBER OF CHARACTERS THAT WILL
- * NEED TO BE SCANNED BY THE EXTRACT PROCEDURE. THERE IS AN INDEX
- * RELATION BETWEEN EACH ARRAY ENTRY HERE AND THE ENTRIES IN THE
- * VALUES ARRAY.
- #
- ARRAY NUMCHAR [00:01] S(1);
- BEGIN
- ITEM NUM$VAL U(00,00,60);
- END
- #
- * INFORMATION TO BE ENTERED INTO THE ACCOUNT MESSAGES ARE SAVED IN
- * THE FOLLOWING ARRAY.
- #
- ARRAY VALUES [00:01] S(1);
- BEGIN
- ITEM VAL$WORD U(00,00,60); # FULL WORD REFERENCE #
- END
- #
- * **** MAIN PROCEDURE STARTS HERE. ****
- #
- #
- * INITIALIZE THE MESSAGE ASSEMBLY AREA.
- #
- P<CLRMAA> = LOC(ACCMSG);
- FOR I = 0 STEP 1 UNTIL (ACCMSIZ$ - 1)
- DO
- BEGIN
- CLR$WORD[I] = 0;
- END
- ACC$TYP[0] = ACT$TYPE[MTYP]; # SET MESSAGE TYPE #
- #
- * INITIALIZE THE VARIABLES FOR INSERTING THE FIRST PARAMETER IN THE
- * MESSAGE.
- #
- ORDSBF = 0;
- BITSBF = 36;
- NUM$VAL[0] = 7;
- NUM$VAL[1] = 4;
- TEMP = COMMA$;
- LEN = 12;
- #
- * OBTAIN THE APPLICATION NAME AND JSN AND STORE THEM INTO THE VALUES
- * ARRAY. IF THE MESSAGE TYPE IS SANW, SBNW, OR SENW, THEN GET THIS
- * INFORMATION FROM THE AST. IF THE MESSAGE TYPE IS SBER (DENOTING
- * AN UNSUCCESSFUL APPL. NETON ATTEMPT), THEN GET THIS INFORMATION
- * FROM THE SUPERVISORY MESSAGE, AS AN AST ENTRY FOR THIS APPL. MAY
- * NOT EXIST.
- #
- IF (MTYP EQ SANW$) OR
- (MTYP EQ SBNW$) OR
- (MTYP EQ SENW$)
- THEN # OBTAIN APPL NAME AND JSN FROM AST #
- BEGIN
- C<0,NUM$VAL[0]>VAL$WORD[0] = AST$ANAM[PT];
- C<0,NUM$VAL[1]>VAL$WORD[1] = AST$JSN[PT];
- END
- ELSE IF MTYP EQ SBER$ # OBTAIN APPL NAME AND JSN FROM SM #
- THEN
- BEGIN
- C<0,NUM$VAL[0]>VAL$WORD[0] = NETANAM[0];
- C<0,NUM$VAL[1]>VAL$WORD[1] = NETJSN[0];
- END
- #
- * INSERT THE PARAMETERS INTO THE MESSAGE ASSEMBLY AREA.
- #
- FOR I = 0 STEP 1 UNTIL 1 DO
- BEGIN
- EBFNAME = VAL$WORD[I];
- NUM = NUM$VAL[I];
- EXTRACT;
- #
- * IF AT THE LAST VALUE OF THE LINE, CHANGE THE TERMINATOR FROM A
- * COMMA TO A PERIOD.
- #
- IF I EQ 1
- THEN
- BEGIN
- TEMP = PERIOD$;
- LEN = 24;
- END
- #
- * STORE THE TERMINATOR (EITHER COMMA OR PERIOD) INTO MESSAGE
- * ASSEMBLY AREA.
- #
- SSBSBF(ACCMSG,ORDSBF,BITSBF,LEN,TEMP);
- END
- #
- * SEND THE MESSAGE TO THE ACCOUNT DAYFILE.
- #
- MESSAGE(ACCMSG,5);
- CONTROL EJECT;
- PROC EXTRACT;
- # TITLE EXTRACT - EXTRACT NONZERO AND NONBLANK CHARACTERS. #
- BEGIN # EXTRACT #
- #
- ** EXTRACT - EXTRACT NONZERO AND NONBLANK CHARACTERS.
- *
- * P. A. MURRAY 83/08/30
- *
- * THIS PROCEDURE IS LOCAL TO NVFSIAM. ITS FUNCTION IS TO DELETE
- * TRAILING ZEROES AND BLANKS FROM VALUES AND STORE THE RESULTING
- * CHARACTERS) INTO THE ACCOUNT MESSAGE ASSEMBLY AREA.
- *
- * PROC EXTRACT
- *
- * ENTRY:
- * EBFNAME = THE VALUE, LEFT JUSTIFIED, THAT IS TO BE STORED.
- * NUM = THE NUMBER OF CHARACTERS IN THE VALUE TO BE STORED.
- * ORDSBF = STARTING WORD OF MESSAGE ASSEMBLY AREA.
- * BITSBF = STARTING BIT WITHIN WORD WHERE VALUE IS TO BE STORED
- * ACCMSG = THE ACCOUNT MESSAGE ASSEMBLY AREA.
- *
- * EXIT:
- * THE VALUE (WITHOUT TRAILING ZEROES AND BLANKS) IS PACKED INTO
- * THE ACCOUNT MESSAGE ASSEMBLY AREA. ORDSBF AND BITSBF ARE
- * UPDATED TO INDICATE THE STARTING BIT AFTER THE NEWLY INSERTED
- * VALUE IN THE MESSAGE ASSEMBLY AREA.
- *
- * METHOD:
- * CALL *SSBEBF* TO EXTRACT A 6-BIT CHARACTER FROM EBFNAME. IF THE
- * CHARACTER IS NONZERO AND NONBLANK, CALL *SSBSBF* TO STORE IT
- * INTO THE MESSAGE ASSEMBLY AREA.
- #
- ITEM BITEBF I; # STARTING BIT OF TEMP STORAGE AREA #
- ITEM FIN B; # EXIT LOOP VARIABLE #
- ITEM I I; # LOOP VARIABLE #
- ITEM ORDEBF I; # STARTING WORD OF TEMP STORAGE AREA #
- ITEM TMPCHAR I; # TEMPORARY STORAGE AREA #
- #
- * **** EXTRACT PROCEDURE STARTS HERE. ****
- #
- #
- * INITIALIZE THE EXTRACT ORDINALS.
- #
- ORDEBF = 0;
- BITEBF = 0;
- FIN = FALSE;
- #
- * LOOP THROUGH THE VALUE WORD. WHEN A NONBLANK OR NONZERO
- * CHARACTER IS FOUND, STORE IT INTO THE MESSAGE ASSEMBLY AREA.
- * THE PROCESS IS FINISHED WHEN A BLANK OR ZERO CHARACTER IS FOUND.
- * DO NOT SCAN MORE THAN NUM CHARACTERS.
- #
- FOR I = 0 STEP 1 WHILE (I LS NUM AND NOT FIN)
- DO
- BEGIN
- SSBEBF(EBFNAME,ORDEBF,BITEBF,6,TMPCHAR);
- IF ((TMPCHAR EQ 0) OR (TMPCHAR EQ " "))
- THEN
- BEGIN
- FIN = TRUE;
- END
- ELSE
- BEGIN
- SSBSBF(ACCMSG,ORDSBF,BITSBF,6,TMPCHAR);
- END
- END
- END # EXTRACT #
- END # NVFSIAM #
- TERM
1)
PT),(MTYP
cdc/nos2.source/nam5871/nvfsiam.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator