*DECK NVFUMQE
USETEXT TEXTNVF
USETEXT TEXTSS
USETEXT TXTANVF
USETEXT TXTAPSS
USETEXT TXTSUSS
PROC NVFUMQE(QUEUE,MTEXT,(MTYP),(MADR),(MLNGTH));
# TITLE NVFUMQE - MAKE QUEUE ENTRY. #
BEGIN # NVFUMQE #
#
** NVFUMQE - MAKE QUEUE ENTRY.
*
* E. THAVIKULWAT 81/08/28
* C. BRION 82/06/01
*
* THIS PROCEDURE BUILDS THE WC AND HEADER WORD FOR THE SM OR TEXT
* AND CALLS *SSTAQE* TO HAVE IT TRANSFERRED TO THE APPROPRIATE
* QUEUE. THIS PROCEDURE IS CALLED INTO EXECUTION BY THE FOLLOWING
* PROCEDURES:
* *NVFSNOF* *NVFSNON* *NVFTACC* *NVFTBRK* *NVFTCRN*
* *NVFTDAD* *NVFTDSP* *NVFTETC* *NVFTETI* *NVFTICR*
* *NVFTILP* *NVFTINA* *NVFTITE* *NVFTPUV* *NVFTPVD*
* *NVFTPVR* *NVFTRCN* *NVFTRVD* *NVFTVAA* *NVFTVVD*
* *NVFOAPE*
*
* PROC NVFUMQE(QUEUE,MTEXT,(MTYP),(MADR),(MLNGTH))
*
* ENTRY:
* QUEUE = DESTINATION QUEUE FOR THE SM OR TEXT.
* MTEXT = FWA OF MESSAGE ARRAY.
* (MTYP) = TYPE OF SM OR TEXT:
* 0 = WRITE VCB FILE
* 1 = READ VCB FILE
* 2 = MSG DATA BLOCK
* 3 = SUPERVISORY MESSAGE
* 5 = COMMAND FROM THE HOP
* 6 = SET HOP ALERT FLAG
* 7 = TERMINAL TEXT
* 8 = PROMPT TYPE TERMINAL TEXT
* 9 = PROTOCOL RESPONSE
* (MADR) = ADDRESSING INFORMATION.
* (MLNGTH) = LENGTH OF SM OR TEXT (UNIT DEPENDS ON MTYP).
*
* EXIT:
* SM OR TEXT TRANSFERRED TO ITS APPROPRIATE QUEUE.
*
* NOTES:
* PROCEDURE BUILDS THE HEADER WORD USING ABH (APPLICATION BLOCK
* HEADER) FORMAT. FOLLOWING FIELDS ARE SET:
* ABT, ADR, ACT, AND TLC
*
* METHOD:
* BUILD WC AND HEADER WORD FROM GIVEN INFORMATION AND CALL
* *SSTAQE* TO ENTER THE SM OR TEXT IN THE GIVEN QUEUE.
#
#
**** PROC NVFUMQE - XREF LIST.
#
XREF
BEGIN
PROC SSTAQE; # ACCEPT QUEUE ENTRY #
END
#
****
#
DEF ACTAPR$ #1#; # ACT FOR ASYNCHRONOUS PROTOCOL RESPONSE #
DEF ACTSPR$ #2#; # ACT FOR SYNCHRONOUS PROTOCOL RESPONSE #
DEF ACTTTX$ #4#; # ACT FOR DATA #
DEF MXPR$ #12#; # MAXIMUM NUMBER OF PROTOCOL RESPONSES-1 #
DEF VCBREAD$ #1#; # VCB READ REQUEST TYPE #
ITEM I I; # LOOP VARIABLE #
ITEM MADR I; # ADDRESSING INFORMATION #
ITEM MATCH B; # EXIT LOOP INDICATOR #
ITEM MLNGTH I; # LENGTH OF MESSAGE (UNIT DEPENDS ON ACT) #
ITEM MTYP I; # TYPE OF SM OR TEXT #
ITEM QUEUE I; # DESTINATION QUEUE FOR MESSAGE #
ARRAY MTEXT[00:00] S(1);
BEGIN
ITEM MTX$PFCSFC U(00,00,16); # REFERENCES PFC/SFC #
END
#
* THE FOLLOWING TABLE CONTAINS PFCSFC OF PROTOCOL RESPONSE SMS
* DESTINED FOR THE *CTQ* QUEUE. THE VALUE OF THE LOOP VARIABLE
* UPON FINDING A MATCH WILL BE THE INTERNAL ID ASSIGNED TO THE SM.
* NOT FINDING A MATCH IMPLIES SM IS NOT DESTINED FOR THE *CTQ*
* QUEUE AND THUS WILL NOT NEED TO BE ASSOCIATED WITH AN INTERNAL
* ID.
#
ARRAY PRPFCSFC[0:MXPR$] S(1);
BEGIN
ITEM PR$PFCSFC U(00,00,16) = [CRITEA, # TERM CONN REQ AB #
CRITEN, # TERM CONN REQ NOR #
CRIAPN, # A-A CONN REQ NOR #
CRIAPA, # A-A CONN REQ ABN #
CRRAPN, # A-A REM CON REQ N #
CRRAPA, # A-A REM CON REQ A #
CRRCNN, # RECONN TO NVF NOR #
CRRCNA, # REC/A TO NIP #
CRSWH, # SWITCH CONN REQ #
CRTRM, # TERMINATE CONN #
FCRST, # RESET #
HOPSRTN$, # HOP START NORM #
HOPENDN$]; # HOP END NORM #
END
WCB$WORD[0] = 0; # CLEAR WORD COUNT BUFFER #
ABHWORD[0] = 0; # CLEAR ABH WORD BUFFER #
ABHABT[0] = MTYP;
ABHADR[0] = MADR;
ABHTLC[0] = MLNGTH;
IF (MTYP EQ APPPR$) OR (MTYP EQ APPCMD)
THEN # PROTOCOL RESPONSE #
BEGIN # SM #
MATCH = FALSE;
FOR I = 0 STEP 1 WHILE (NOT MATCH AND I LQ MXPR$)
DO
BEGIN
IF PR$PFCSFC[I] EQ MTX$PFCSFC[0]
THEN
BEGIN
WCB$SMID[0] = I;
MATCH = TRUE; # END SEARCH #
END
END
WCB$WC[0] = MLNGTH + 2; # LENGTH OF ENTRY IN WORDS #
ABHACT[0] = ACTAPR$; # PRESET TO ASYNCHRONOUS PR #
IF MADR NQ 0
THEN # SYNCHRONOUS PROTOCOL RESPONSE #
BEGIN
ABHACT[0] = ACTSPR$;
IF MTX$PFCSFC[0] EQ CTRCHAR # IF CTR/CHAR SM, THE LENGTH IS #
THEN # NUMBER OF OCTETS (NOT WORD #
BEGIN # COUNT), SO... #
WCB$WC[0] = LCTRL + 2; # ADJUST WC ACCORDINGLY #
END
END
END
ELSE # NON PROTOCOL RESPONSE #
BEGIN
IF MTYP EQ 1
THEN # READ VCB FILE #
BEGIN
ABHABN[0] = LOC(P<VCBRDQ>); # RETURN VCB DATA TO *VCBRDQ* #
END
IF MTYP EQ 10 # IF AA VCB READ REQUEST #
THEN
BEGIN
ABHABN[0] = LOC(P<AAVCBRDQ>);
ABHABT[0] = VCBREAD$;
END
IF MTYP EQ 6
THEN # SET HOP ALERT FLAG #
BEGIN
WCB$HAF[0] = TRUE;
END
WCB$WC[0] = MLNGTH / 10 + 2;
ABHACT[0] = ACTTTX$;
END
SSTAQE(QUEUE,WCBUF,ABHBUF,MTEXT); # TRANSFER MESSAGE TO QUEUE #
END # END NVFUMQE #
TERM