*DECK NETPUTS
USETEXT AIPDEF
USETEXT HEADER
USETEXT NP$GETS
USETEXT NP$GMB
USETEXT NP$MODE
USETEXT NP$NWL
PROC NETPUTS(HA,ATA,OPTWD);
#
*1DC NETPUTS
*
* 1. PROC NAME AUTHOR DATE
* NETPUTS E. GEE 01/30/85
*
* 2. FUNCTIONAL DESCRIPTION.
* CHECK ASYNCHRONOUS SUPERVISORY MESSAGES TO SEE IF THEY
* AFFECT MESSAGES IN THE UPLINE DATA QUEUE.
*
* 3. METHOD USED.
* IF NO MESSAGE FOUND,
* RETURN NULL BLOCK TO APPLICATION.
* ELSE (DATA MESSAGE FOUND IN DATA BUFFER),
* IF APP BUFFER IS NOT BIG ENOUGH AND TRUNCATION NOT ALLOWED,
* SET IBU BIT IN ABH WORD.
* ELSE ( DATA MSG CAN BE DELIVERED),
* SET TRUNCATION BIT IF DATA MSG IS TRUNCATED.
* IF FRAGMENTED GET REQUEST,
* COPY TEXT INTO FRAGMENTED BUFFERS.
* ELSE (DELIVER MSG INTO ONE BUFFER),
* COPY TEXT INTO APPLICATION BUFFER.
* ADJUST AIP POINTERS FOR UPLINE DATA BUFFER.
*
* 4. ENTRY CONDITIONS.
* HA ADDR OF WORD CONTAINING ABH OF MSG
* ATA ADDR OF BUFFER CONTAINING TEXT OF MSG
* OPTWD ADDR OF WORD PROVIDING ADDITIONAL OPTIONS.
*
* 5. EXIT CONDITIONS.
* NONE.
*
* 6. COMDECK DECKS AND SYMPL TEXT USED.
* AIPDEF CONSTANT DEFINITIONS
* HEADER ABH AND SUP MSG TEMPLATE
* NP$GETS GLOBAL VARIABLES
* NP$GMB UPLINE MESSAGE BUFFER TABLE
* NP$MODE GLOBAL VARIABLES
* NP$NWL NETWORK WORKLIST PROCESSING VARIABLES
*
* 7. PROCEDURES/FUNCTIONS CALLED.
* NETPUT SEND NETWORK MSG DOWNLINE
* NP$ERR ISSUE DAYFILE MSG AND ABORT APP
* NP$GETQ REMOVE DATA MSGS FROM UPLINE DATA BUFFER
*
* 8. DAYFILE MESSAGES OR OTHER IMPORTANT INFORMATION.
* * NETWORK APPLICATION ABORTED, RC = 38. *
* * NETPUTS: REQUEST INVALID BEFORE NETON. *
#
BEGIN
#
EXTERNAL ROUTINES CALLED
#
XREF
BEGIN
PROC NP$ERR; # ISSUE ERROR MSG AND ABORT APP #
PROC NP$GETQ; # REMOVE MSGS FROM DATA BUFFER #
PROC NETPUT; # SEND MSG TO NETWORK #
END
#
INPUT VARIABLES
#
ITEM HA; # APPLICATION BLOCK HEADER ADDR #
ITEM ATA; # APPLICATION TEXT AREA ADDRESS #
ARRAY OPTWD S(1); # ADDR OF WD CONTAINING OPTIONS #
BEGIN
ITEM OPTWDD U(0,58,01); # GET DATA FROM QUEUE BEFORE #
# GETTING SUP MSG FROM NIP #
ITEM OPTWDQ U(0,59,01); # GET MSG FROM DATA QUEUE ONLY #
END
#
LOCAL VARIABLES
#
ITEM SAVEGMB B; # SAVE VALUE OF GMBUSE #
#**********************************************************************#
CONTROL EJECT;
#
EXECUTABLE CODE BEGINS HERE
#
IF NOT ACCEPTED
THEN # APPLICATION HAS NOT NETTED ON #
BEGIN
NP$ERR("38"); # ISSUE DAYFILE MSG AND ABORT AP#
END
P<HEADER> = LOC(HA); # ADDR OF ABH #
P<SUPMSG> = LOC(ATA); # ADDR OF TEXT #
#
IF THE AIP UPLINE DATA BUFFER FEATURE IS BEING USED, THEN AIP
NEEDS TO CHECK IF THE APPLICATION IS ISSUING A CON/END, FC/BRK,
LST/OFF, LST/ON, LST/HDX, LST/FDX, OR DC/TRU ASYNCHRONOUS
SUPERVISORY MESSAGE. IF IT IS, AIP MAY HAVE TO ADJUST OR REMOVE
MESSAGES IN THE AIP UPLINE DATA BUFFER.
#
IF GMBUSE AND # UPLINE DATA QUEUE EXISTS #
(ABHABT[0] EQ APPCMD) AND # SUPERVISORY MESSAGE #
(ABHADR[0] EQ 0) # ASYNC SUPERVISORY MESSAGE #
THEN # NEED TO CHECK PFC/SFC #
BEGIN
ACLN = SPACN[0]; # APP CONNECTION NUMBER #
IF (PFCSFC[0] EQ CONEND) OR
(PFCSFC[0] EQ FCBRK)
THEN # APP ISSUED CON/END OR FC/BRK #
BEGIN
NP$GETQ(GMMDCN); # DISCARD MSG IN QUE FOR THIS CN#
END
ELSE # OTHER SUPERVISORY MESSAGE #
BEGIN
IF PFCSFC[0] EQ DCTRU
THEN # TOO LARGE MSGS TO BE TRUNCATED#
BEGIN
GMBTRUNC = TRUE; # SET TRUNCATE TOO LARGE MSG FLG#
END
END
END
SAVEGMB = GMBUSE; # SAVE OF GMBUSE #
GMBUSE = FALSE; # SO NETPUT WILL NOT ABORT APP #
NETPUT(HA,ATA); # SEND MSG TO NETWORK #
GMBUSE = SAVEGMB; # RESTORE VALUE OF GMBUSE #
RETURN;
END
TERM