*DECK NP$RESP USETEXT AIPDEF USETEXT NP$MODE USETEXT NP$NWL USETEXT NP$STAT *IF DEF,XFR USETEXT NX$ACBF *ENDIF *IF,DEF,DEBUG USETEXT NP$DB *ENDIF PROC NP$RESP; *IF DEF,IMS # *1DC NP$RESP * * 1. PROC NAME AUTHOR DATE * NP$RESP S.KRULEVITCH 77/3/21 * * 2. FUNCTIONAL DESCRIPTION * THIS ROUTINE PROCESSES THE EXPECTED RESPONSE FROM NIP. * * 3. METHOD USED * NIP RESPONSE IS EXPECTED IN AIP"S WORKLIST AFTER THE HEADER * WORDS. NP$RESP RESETS THE NP$NWL HEADER WORD AND TABLE * POINTER WORDS: NEXT AND SPACE$LEFT. THE POSSIBLE WORKLIST * RESPONSES ARE TREATED AS FOLLOWS: * * A NETON RESPONSE IS TREATED IN NP$ON. * * FOR A GET/GETL/GTFL/GETF RESPONSE, NP$RESP WILL PASS THE * APPLICATION BLOCK HEADER OF THE DATA MESSAGE TO THE APPLICATION * HEADER ADDRESS (HA). NP$RESP WILL LOG THE MESSAGE ON AIP * DEBUG FILE VIA ROUTINE NP$DBG. IF STAT IS DEFINED * THEN THE NUMBER OF MESSAGES OF A SPECIFIC ABT IS INCREMENTED. * * FOR A GETSM RESPONSE, THE SMB POINTERS ARE UPDATED AND THE * NEXTSMLEN WORD ( WHICH SPECIFIES THE LENGTH * OF THE NEXT SUPERVISORY MESSAGE IN NIP"S FIELD LENGTH WAITING * FOR ROOM IN THIS APPLICATION"S SMB) IS SET. * IF THE APPLICATION HAD PREVIOUSLY REQUESTED A SUPERVISOR * MESSAGE, THEN NP$GSM IS CALLED. LTAA IS SET TO ZERO, AND * DEFER$GSM IS SET TO FALSE. * * IF THE DOWNLINE BUFFER FEATURE IS IN USE, RESET THE WORKLIST * TABLE POINTER WORDS FOR THE APPLICATION-SUPPLIED DOWNLINE * BUFFER. * * 4. ENTRY CONDITIONS * AWL$NEXT[NHDR] - AWL WORD COUNT. * LOC$HA - LOCATION FOR THE HEADER ADDRESS. * * 5. EXIT CONDITIONS * HA - CONTAINS ABH IF THERE WAS A GET/GETL/GETF. * NEXTSMLEN - ZERO IF NO SUPERVISORY MESSAGES AVAILABLE FOR USER. * OTHERWISE, LENGTH OF THE NEXT MESSAGE. * * 6. COMDECKS CALLED AND SYMPL TEXTS USED. * AIPDEF NP$CRT NP$DB NP$MODE * NP$NWL NP$STAT * * 7. ROUTINES CALLED * NP$GSM * NP$DBG * NP$ON * NP$SN - INCREMENTS STATISTICS COUNTER * * 8. DAYFILE MESSAGES * NONE * # *ENDIF BEGIN # # *CALL NP$CRT # # # ROUTINE CALLED: # # # XREF BEGIN *IF DEF,DEBUG PROC NP$DBG; #OUTPUT MESSAGE TO ZZZZZDN # *ENDIF PROC NP$GSM; #DELIVERS A SUP MSG TO APP # PROC NP$ON; #PROCESSES NETON RESPONSE # *IF DEF,STAT PROC NP$SN; #INCREMENTS STATISTICS COUNTER# *ENDIF END ITEM I I, #TEMPORARY VARIABLE # J; # TEMPORARY VARIABLE # BASED ARRAY MEM[0:O"77777"] S(1); ITEM HA I (0); #HEADER AREA # #**********************************************************************# # # # NP$RESP EXECUTION BEGINS HERE # # # *CALL NP$RST FOR I=NEXT WHILE N$AWL[0] NQ 0 DO BEGIN IF N$GETAWL[0] NQ 0 THEN BEGIN # GET/GETL/GETF/GETFL AWL RESPONSE # P = LOC$HA; HA[0] = ABH[I+1]; *IF DEF,DEBUG NP$DBG; # WRITE TO ZZZZZDN FILE # *ENDIF *IF DEF,STAT J = TYPE"INB" + ABH$ABT[I+1]; NP$SN(J); # UPDATE STATISTICS # *ENDIF N$GETAWL[0] = 0; TEST I; END I = I + AWLESIZE; # GMM AWL ALWAYS 2ND AWL ENTRY # IF N$GMMAWL[0] NQ 0 THEN # GETMM AWL RESPONSE # BEGIN GMBFOOT = GMBFOOT + GMM$NW[I+1]; # UPDATE FOOT OF DATA BUF # GMBLN = GMM$ALN[I+1]; # LIST NUMBER OF DATA IN AIP QUEUE # *IF,DEF,STAT STAT[TYPE"GMD"] = STAT[TYPE"GMD"] + GMM$NM[I]; STAT[TYPE"GMWD"] = STAT[TYPE"GMWD"] + GMM$NW[I+1]; *ENDIF N$GMMAWL[0] = 0; # END GETMM PROCESING # END IF N$GSMAWL[0] NQ 0 THEN # GSM AWL RESPONSE # BEGIN I = I + AWLESIZE; # GSM AWL ALWAYS 3RD AWL ENTRY # *IF,DEF,STAT STAT[TYPE"GSD"] = STAT[TYPE"GSD"] + GMM$NM[I]; STAT[TYPE"GSWD"] = STAT[TYPE"GSWD"] + ABH$TLC[I+1]; *ENDIF FOOT = FOOT + ABH$TLC[I+1]; # UPDATE FOOT PTR OF SMB # NEXTSMLEN = NWL$RC[I+1]; # SIZE OF NEXT AVAIL SM # N$AWL[0] = 0; # END AWL PROCESSING # IF DEFER$GSM THEN BEGIN NP$GSM; # SEND SM TO APPLICATION # LTAA = 0; DEFER$GSM = FALSE; END TEST I; END IF N$NETONAWL[0] NQ 0 THEN # NETON AWL RESPONSE # BEGIN NP$ON; N$AWL[0] = 0; # END AWL PROCESSING # END *IF DEF,XFR IF N$XFRAWL[0] NQ 0 THEN BEGIN NET$AWL$XFR = NWL$RC[NEXT] ; N$AWL[0] = 0 ; END *ENDIF END #END FOR LOOP # IF DOWNUSE THEN # DOWNLINE BUFFER FEATURE IS IN USE # BEGIN P = LOC$APBUF; # POINT WORKLIST TO APPL BUFFER # NEXT = 0; SPACE$LEFT = AB$SIZE[0]; END RETURN; END #NP$RESP# TERM