*DECK HPKDISP
USETEXT ACB
USETEXT NIPDEF
USETEXT AT
USETEXT PT
USETEXT KDIS
USETEXT DISTAIL
USETEXT SUPMSG
USETEXT AHEADER
USETEXT OVERLAY
USETEXT PARAMS
USETEXT APPSTAT
PRGM HPKDISP;
STARTIMS;
#
*1DC HPKDISP
*
* 1. PROC NAME AUTHOR DATE
* HPKDISP A. BEN-ARTZI 81/12/08
*
* 2. FUNCTIONAL DESCRIPTION
* PROCESS THE HOP SUPERVISORY MESSAGES COMING FROM APPLICATIONS.
*
* 3. METHOD USED
* DECODE THE SFC FROM THE NWLENTRY.
* SET UP CORRECT COMMON FIELDS IF ALERT.
* CALL OMSG IF "LG"
* CALL OVERLAY KHOPDIS FOR HOP/DIS.
*
* 4. ENTRY PARAMETERS
* WLADDR - NWL ENTRY ADDRESS
* ACBADDR - ADDRESS OF APPLICATION ACB
*
* 5. EXIT PARAMETERS
* OVLNAME - KHOPDIS OVL NAME IF APPROPRIATE
*
* 6. COMDECKS CALLED AND SYMPL TEXTS USED
* NIPDEF KDIS DISTAIL SUPMSG
* AHEADER ACB OVERLAY APPSTAT
* AT PT PARAMS
*
* 7. ROUTINES AND OVERLAYS CALLED
* CONSOL - EXECUTE NOS CONSOLE MACRO
* MGETS - ALLOCATE BUFFER
* XTRACE - TRACE PROCEDURE CALL
* OMSG - ISSUE DAYFILE MESSAGE
* KHOPDIS OVL PROCESS HOP/DIS
* BLINK - LINK MESSAGE ON DATA RING
* OSCHAPP - SCHEDULE APPLICATION
* HLGLERR OVL ISSUE ERR/LGL
*
* 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
* MESSAGES SENT BY APPLICATION WITH HOP/LG
*
* THIS PROGRAM IS A PRIMARY OVERLAY LOADED BY SUBROUTINE OVLCALL.
* WHEN EXECUTION HAS COMPLETED A JUMP IS MADE TO LOCATION RJMAIN
* TO RETURN TO THE CALLING PROGRAM.
*
* W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY
*CALL OPSIZE
*
* THIS OVERLAY IS CALLED BY HPPUT.
*
*
#
STOPIMS;
#
EXTERNAL VARIABLES
#
XREF
BEGIN
LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL #
PROC CONSOL; # EXECUTE CONSOLE MACRO #
PROC XTRACE;
PROC OMSG; # PUT A MESSAGE IN NIP-S DAYFILE #
PROC MGETS;
PROC BLINK;
PROC OSCHAPP;
PROC OVLCALL;
END
ARRAY KREQU S(3);
BEGIN
ITEM KREQ C(0,0,20) = ["$REQUEST *K* DISPLAY"] ;
ITEM KREQEND U(2,0,60) = [0] ;
END
BASED ARRAY LGMSG S(1) ;
BEGIN
ITEM LGMSGWD U(0,0,60) ;
END
ITEM BUFADDR U ; # ADDR OF MGET BUFFER #
SWITCH KLAB K1,K2,K3,K4,K5 ;
BEGIN
CONTROL IFEQ DEBUG,1;
XTRACE("HPKDS");
CONTROL FI;
#**********************************************************************#
#
LET-S PUT OURSELVES ON RELEVANT DATA
#
P<SUPMSG> = WLADDR + AIPHSIZE + ABHSIZE ;
P<ACB> = ACBADDR;
# #
IF SFC[0] EQ ALT
THEN
BEGIN # WE HAVE A HOP/ALERT SM IN HAND #
# #
IF KDNAL EQ 5 # NO ROOM FOR MORE ALERTS #
OR
ACBAN[0] EQ KDAN[0] # THIS APP IS PROCESSED RIGHT NOW #
OR
ACBAN[0] EQ KDALAN1[0] OR#APPLICATION IS ALREADY IN ALERT Q #
ACBAN[0] EQ KDALAN2[0] OR
ACBAN[0] EQ KDALAN3[0] OR
ACBAN[0] EQ KDALAN4[0] OR
ACBAN[0] EQ KDALAN5[0]
# #
THEN # JUST IGNORE IT #
GOTO EXIT ;
ELSE
BEGIN
P<AT> = PTAT[0]; # ADDRESS OF AT #
IF ATI[ACBAN[0]]
THEN
BEGIN # THIS APP IS NOT ALLOWED FOR ALERTS NOW #
#
WE SEND THE APPLICATION ONE MORE HOP/IGNORE
#
MGETS(LHOPIG+BLKHSIZE+ABHSIZE); # GET A BLOCK #
#
FILL IMPORTANT FIELDS
#
P<AHEADER> = BUFADDR+BLKHSIZE;
ABHABT[0]=APPCMD;
ABHACT[0]=CT60TRANS;
ABHABN[0]=0;
ABHADR[0]=0;
ABHTLC[0]=LHOPIG;
P<SUPMSG> = BUFADDR+BLKHSIZE+ABHSIZE;
PFCSFC[0] = HOPIG;
#
AND SEND IT TO APPLICATION
#
BLINK(BUFADDR,ACBADDR) ;
OSCHAPP(ACBADDR) ;
GOTO EXIT;
END
ELSE
#
OK. NOW WE ARE READY TO ACCEPT THE ALERT
#
BEGIN
KDNAL[0] = KDNAL[0]+1;
IF NOT KDVW[0]
THEN
OMSG(KREQU,2); # PUT A MESSAGE ON THE B-DISPLAY #
# #
GOTO KLAB[KDNAL[0]-1] ; # TO PUT INFO ABOUT THE ALERT #
END
# #
K1: KDALAN1[0]=ACBAN[0]; # APP. NUMBER IN ALERT LIST #
KAPALT1[0]=ACBANAME[0];# APPL NAME IN DISTAIL BUFFER #
GOTO EXIT ;
# #
K2: KDALAN2[0]=ACBAN[0];
KAPALT2[0]=ACBANAME[0];
GOTO EXIT ;
# #
K3: KDALAN3[0]=ACBAN[0];
KAPALT3[0]=ACBANAME[0];
GOTO EXIT ;
# #
K4: KDALAN4[0]=ACBAN[0];
KAPALT4[0]=ACBANAME[0];
GOTO EXIT ;
# #
K5: KDALAN5[0]=ACBAN[0];
KAPALT5[0]=ACBANAME[0];
GOTO EXIT ;
# #
END
END # END HOP/ALERT PROCESSING #
ELSE
BEGIN
IF SFC[0] EQ LG
THEN
BEGIN # THIS IS A HOP/LG FOR NAM DAYFILE #
P<LGMSG> = WLADDR+AIPHSIZE+ABHSIZE + 1 ;
OMSG(LGMSG,0) ;
GOTO EXIT ;
END
# #
ELSE # NOT HOP/LOG EITHER #
BEGIN
IF KDAN[0] NQ ACBAN[0]
THEN # K-DISPLAY IS NOT ASSIGNED TO THIS APP #
BEGIN
GOTO EXIT; # IGNORE SUPERVISORY MESSAGE #
END
ELSE # K-DISPLAY IS ASSIGNED TO THIS APP #
BEGIN
IF SFC[0] EQ DIS
THEN # THIS IS A HOP/DIS SUPERVISORY MESSAGE #
BEGIN
#
PROCESS HOP/DIS SUPERVISORY MESSAGE
#
OVLNAME = KHOPDISP; # NAME OF OVERLAY TO LOAD #
OVLCALL; # LOAD AND EXECUTE OVERLAY #
IF PARAMS1 NQ 0
THEN # BAD HOP/DIS SUPERVISORY MESSAGE #
BEGIN
OVLNAME = HLGLERRP; # NAME OF OVERLAY TO LOAD #
OVLCALL; # LOAD AND EXECUTE OVERLAY #
END
END # END HOP/DIS PROCESSING #
ELSE # NOT HOP/DIS SUPERVISORY MESSAGE #
BEGIN
#
PROCESS HOP/DAY SUPERVISORY MESSAGE
#
KDDAYF[0] = NOT HOPDAYF[0]; # UPDATE DAYFILING TYPIN FLG#
CONSOL(KDWDCON); # EXECUTE CONSOLE MACRO #
END
END
END
END
EXIT: GOTO RJMAIN ;
END # HPKDISP OVERLAY #
TERM