*DECK DLMSG
USETEXT DLFPDEF
USETEXT DIRTBLM
USETEXT ERRMSG
USETEXT OUTCDA
USETEXT ZHRCD
PROC DLMSG; # SEARCH MESSAGE DIRECTIVE TABLE #
BEGIN
*IF DEF,IMS
#
*1DC DLMSG
*
* 1. PROC NAME AUTHOR DATE.
* DLMSG S.KRULEVITCH 79/01/10
*
* 2. FUNCTIONAL DESCRIPTION.
* SEARCH FOR MESSAGES ACCORDING TO MESSAGE DIRECTIVES.
*
* 3. METHOD USED.
* LOOP THROUGH MESSAGE PROCESSING TABLE PROCESSING EACH
* ENTRY AS FOLLOWS UNTIL EITHER THE CHOSEN FLAG IS
* CLEARED OR EVERY ENTRY HAS BEEN PROCESSED.
*
* NM CHECK IF NUMBER OF ENTRIES WRITTEN TO OUTPUT MATCHES
* THIS VALUE. IF SO, CLEAR CHOSEN FLAG AND SET COMPLETE
* FLAG.
* BT CHECK IF TIME OF CURRENT MESSAGE IS GREATER THAN OR
* EQUAL TO THIS TIME. IF NOT, CLEAR CHOSEN FLAG. IF
* SO, ZERO TABLE ENTRY SO IT WILL NOT BE PROCESSED
* ANYMORE.
* ET CHECK IF CURRENT MESSAGE IS GREATER THAN OR EQUAL
* TO THIS TIME. IF SO, CLEAR CHOSEN FLAG AND SET
* COMPLETE FLAG.
* N CHECK IF NETLOG MESSAGES ARE DE-SELECTED OR NOT.
*
* 4. ENTRY PARAMETERS.
* DIRNUMM - NUMBER OF ENTRIES IN MESSAGE PROCESSING TABLE.
* DIRTBLM - MESSAGE PROCESSING DIRECTIVE TABLE.
* TEMPB1 - ADDRESS OF LOG FILE ENTRY
*
* 5. EXIT PARAMETERS.
* CHOSEN - FALSE IF CONDITIONS NOT SATISFIED.
* COMPLETE - TRUE IF SEARCH COMPLETE.
*
* 6. COMDECKS CALLED AND SYMPL TEXTS USED.
* DIRTBLM DLFPDEF ERRMSG OUTCDA
* ZHRCD
*
* 7. PROCEDURES CALLED.
* DLABEND ABORT PROGRAM
* DLDFM ISSUE DAYFILE MESSAGE
*
* 8. DAYFILE MESSAGES.
* BAD DIRECTIVE TABLE ENTRY.
*
#
*ENDIF
#
EXTERNAL PROCEDURES
#
XREF
BEGIN
PROC DLABEND; # ABORT PROGRAM #
PROC DLDFM; # ISSUE DAYFILE MESSAGE #
END
#
LOCAL VARIABLES
#
ITEM
I; # TEMPORARY LOOP VARIABLE #
BASED ARRAY DATLINE P(4);
*CALL NP$DLA
SWITCH PROCESS ERR,NM,ET,BT,ERR,ERR,N,ERR,ERR,ERR,ERR,ERR,ERR,
ERR,ERR,ERR,ERR,ERR,ERR,ERR,ERR;
#**********************************************************************#
#
DLMSG EXECUTION BEGINS HERE
#
P<DATLINE> = LOC(TEMPB1);
FOR I = 1 STEP 1 WHILE CHOSEN AND I LQ DIRNUMM DO
BEGIN
GOTO PROCESS[DIRMID[I]];
NM:
IF DIRMVAL[I] LQ MSG$COUNT
THEN
BEGIN
CHOSEN = FALSE;
COMPLETE = TRUE;
END
GOTO CONTN;
N:
IF DL$OPC[0] EQ OP$LOG
THEN
CHOSEN = FALSE; # IGNORE APP LOG MESSAGES #
GOTO CONTN;
BT:
IF ZNMILS[0] LS DIRMVAL[I]
THEN
CHOSEN = FALSE;
ELSE
BEGIN # REMOVE BT ENTRY #
DIRMWD[I] = 0;
DIRNUMM = DIRNUMM - 1;
END
GOTO CONTN;
ET:
IF ZNMILS[0] GQ DIRMVAL[I]
THEN # ENDING TIME FOUND #
BEGIN
CHOSEN = FALSE;
COMPLETE = TRUE;
END
GOTO CONTN;
ERR:
DLDFM(BAD$DNTRY); # BAD DIRECTIVE TABLE ENTRY #
DLABEND; # ABORT PROGRAM #
CONTN:
END # LOOPING THROUGH MESSAGE DIRECTIVE TABLE #
END # DLMSG #
TERM