*DECK DLREP USETEXT DLFPDEF USETEXT DIERR USETEXT DIRTBL USETEXT DIRTBLH USETEXT DIRTBLM USETEXT DIRTBLS USETEXT ERRMSG USETEXT MISRES USETEXT OFETB USETEXT OUTCDA USETEXT ZCIOBB USETEXT ZFETB USETEXT ZHRCD PROC DLREP; # REPORT GENERATING PROGRAM # *IF DEF,IMS # *1DC DLREP * * 1. PROC NAME AUTHOR DATE * DLREP P.C.TAM 78/12/12 * * 2. FUNCTIONAL DESCRIPTION. * REPORT GENERATING ROUTINE * * 3. METHOD USED. * INITIALIZE COUNTER OF NUMBER OF ENTRIES WRITTEN TO OUTPUT * AND CLEAR COMPLETE FLAG. * READ DEBUG LOG FILE INFORMATION. * DETERMINE IF AIP OR NIP DEBUG LOG FILE. * CALL DLRT TO COMPUTE MIDNIGHT OFFSET. * ADD INITIAL RT VALUE TO COMPUTE RT VALUE. * IF BD PARAMETER EXISTS IN PARAMETER TABLE, CALL DLCND TO * COMPUTE NUMBER (IN SECONDS) OF FULL 24 HOUR PERIODS FROM * DATE IN HEADER TO BD DATE (NUMBER = 0 IF BD DATE @ HEADER * + 1). NUMBER IS ADDED TO MIDNIGHT RT VALUE TO GET BD RT * VALUE. * IF BT PARAMETER EXISTS IN PARAMETER TABLE, CALL DLRT TO * CONVERT IT TO A RT VALUE AND ADD SRTMILS (START TIME) * AND ADD BEGIN DATE OFFSET TO COMPUTE BT RT VALUE. * IF BT PARAMETER DOES NOT EXIST AND BD PARAMETER DOES * THEN BT RT VALUE IS SET TO START TIME. IF BT PARAMETER * DOES NOT EXIST AND BD PARAMETER DOES NOT EXIST, THEN * PARAMETER TABLE BT VALUE IS LEFT AT ZERO. * ZERO BD PARAMETER IN PARAMETER TABLE. * IF ED PARAMETER EXISTS IN PARAMETER TABLE, CALL DLCND TO * COMPUTE NUMBER OF FULL 24 HOUR PERIODS IN SECONDS FROM * DATE IN HEADER TO ED DATE (NUMBER = - MIDNIGHT RT VALUE * IF ED DATE @ HEADER DATE). NUMBER IS ADDED TO MIDNIGHT RT * VALUE TO GET ED RT VALUE. * IF ET PARAMETER EXISTS IN PARAMETER TABLE, CALL DLRT TO * CONVERT IT TO A RT VALUE AND ADD TO SRTMILS (START * TIME) AND TO END DATE OFFSET TO COMPUTE ET RT VALUE. * ZERO ED PARAMETER IN PARAMETER TABLE. * IF AIP LOG FILE, ZERO DN AND SN ENTRIES IN PARAMETER TABLE. * IF NIP LOG FILE, ZERO T, U, AND B ENTRIES IN PARAMETER TABLE, * AND INITIALIZE THE CONNECTION TABLE. * COPY FIRST 6 ENTRIES OF PARAMETER TABLE, IF NONZERO, * TO MESSAGE PROCESSING TABLE. * COPY NEXT 11 ENTRIES OF PARAMETER TABLE, IF NONZERO, * TO ABH/NBH PROCESSING TABLE (INCLUDING CN) * COPY LAST 5 ENTRIES OF PARAMETER TABLE, IF NONZERO, * TO SUPMSG PROCESSING TABLE (INCLUDING CN) * IF LE PARAMETER EXISTS IN PARAMETER TABLE, STORE IN LENGTH. * OTHERWISE, SET LENGTH TO TLWMAX (410 WORDS). * SET SM TO SM PARAMETER IN PARAMETER TABLE. THIS WILL SET * SM TO ZERO IF THE SM PARAMETER DOES NOT EXIST. * CALL DLSCAN TO PROCESS DEBUG LOG FILE * IF END OF FILE IS ENCOUNTERED SET COMPLETE FLAG TO * FALSE TO PROCESS THE NEXT FILE (MAY HAVE MULTI-FILE FILES). * CALL DLFLUSH TO WRITE EOR TO OUTPUT FILE * IF NIP DEBUG LOG FILE AND MESSAGES HAVE BEEN OUTPUT, * THEN CALL DLREST TO WRITE AVERAGE RESPONSE TIME TO * OUTPUT FILE. * * 4. ENTRY PARAMETERS. * NONE. * * 5. EXIT PARAMETERS. * NONE. * * ARGTBL NCIOBB NFETB * 6. COMDECKS CALLED AND SYMPL TEXTS USED. * DIERR DIRTBL DIRTBLH DIRTBLM * DIRTBLS MISRES OFETB OUTCDA * SYSDATEX ZCIOBB ZFETB ZHRCD * ERRMSG * * 7. ROUTINES CALLED. * DLABEND ABORT PROGRAM * DLCND CALCULATE DATE OFFSET IN SECONDS * DLDFM DAYFILE MESSAGE PROCESSOR * DLFLUSH WRITE EOR ON OUTPUT FILE * DLINT INITIALIZE READ FOR ANOTHER EOR * DLRECL RECALL ON COMPLETION BIT * DLREST NIP RESPONSE TIME AVERAGES * DLRT COMPUTES REAL TIME FROM CLOCK TIME * DLSCAN SCAN DEBUG LOG FILE * DLRDW RECORD A SPECIFIED NO OF WORDS FROM FILE * DLUPTM CALCULATE THE CLOCK TIME FROM OFFSET * * 8. DAYFILE MESSAGES. * *BAD FILE CONTENT* * # *ENDIF # EXTERNAL VARIABLES # XREF BEGIN PROC DLABEND; # ABORT MAIN PROGRAM # PROC DLCND; # CALCULATE OFFSET DATE IN SECONDS # PROC DLDFM; # DAYFILE MESSAGE PROCESSOR # PROC DLFLUSH; # WRITE EOR ON OUTPUT FILE # PROC DLINT; # INITIALIZE READ # PROC DLRECL; # RECALL ON COMPLETION BIT # PROC DLREST; # NIP RESPONSE TIME AVERAGES # PROC DLRT; # COMPUTES REAL TIME FROM CLOCK TIME # PROC DLSCAN; # SCAN DEBUG LOG FILE # PROC DLRDW; # READ RECORD FROM CIO BUFFER # PROC DLUPTM; # CALCULATE CLOCK TIME # PROC DLWRT; # DIRECT WRITE TO CIO BUFFER # END # COMMON VARIABLES # CONTROL NOLIST; # SEE DLFP FOR LISTING OF ARGTBL # *CALL ARGTBL CONTROL LIST; CONTROL NOLIST; # SEE DLFP FOR LISTING OF NCIOBB # *CALL NCIOBB CONTROL LIST; CONTROL NOLIST; *CALL NFETB CONTROL LIST; *CALL SYSDATEX # LOCAL VARIABLES # ITEM BRTIME, # BEGIN REAL TIME # ERTIME, # END REAL TIME # RSIZE I, # READ IN DATA SIZE # OFF$DATE, # DATE OFFSET IN SECONDS # J, # TEMPORARY VARIABLE # I I; # TEMPORARY VARIABLE # BASED ARRAY DUMMY; ; # ******************************************************************** # BEGIN # INITIALIZE LOCAL VARIABLES # PAGE$COUNT = 0; MSG$COUNT = 0; OUMSGNO = 0; COMPLETE = FALSE; FOR I = I WHILE NOT COMPLETE DO BEGIN LINE$COUNT = MAXNO; DLRDW(ZFET, ZHSIZE, TEMPB1, RSIZE);# READ IN HEADR # IF RSIZE EQ 0 OR RSIZE LS 0 THEN BEGIN # EOF, EOI OR EMPTY RECORDS ENCOUNTERED # COMPLETE = TRUE; TEST I; END IF RSIZE NQ ZHSIZE THEN BEGIN # BAD DEBUG LOG FILE CONTENT # DLDFM(BAD$ZFILE); DLABEND; END L1NAME[0] = ZHNAME[0]; # PRESET HEADER INFORMATION # FOR I = 0 STEP 1 UNTIL 7 DO BEGIN # CONVERT ZERO BYTES TO BLANK # IF CL1NAME[0] EQ 0 THEN CL1NAME[0] = " "; END L1DATE[0] = SYSDATE[0]; L2DATE[0] = ZHYMD[0]; SRTSEC = ZHSEC[0]; SRTMILS = ZHMILS[0]; SCLHHMMSS = ZHWD2[0]; SDTYYMMDD = ZHWD3[0]; IF C<0,3>ZHNAME[0] EQ "NIP" THEN # CHANGE THE PRESET VALUE # NIP = TRUE; DLRT("240000",BRTIME); MIDNITE = SRTMILS + BRTIME; # WRITE NEW DEBUG LOG FILE IF NECESSARY # IF ARGFLAG[NFILE] THEN BEGIN # HEADER FOR NEW DEBUG LOG FILE # DLWRT(NFET, TEMPB1, RSIZE); NMSGCNT = 0; END # BEGIN TIME PROCESSING # IF DIRID[ID$BD] NQ 0 THEN BEGIN # BEGIN DATE SPECIFIED # DLCND(DIRWD0[ID$BD],OFF$DATE); # COMPUTE BEGIN DATE OFFSET # IF DIRID[ID$BT] NQ 0 THEN BEGIN # BEGIN TIME SPECIFIED # DLRT(DIRWD0[ID$BT],BRTIME); # COMPUTE BEGIN TIME OFFSET # BRTIME = SRTMILS + OFF$DATE + BRTIME; END ELSE BRTIME = MIDNITE + OFF$DATE - 86400000; IF BRTIME LS SRTMILS THEN BRTIME = SRTMILS; END ELSE BEGIN # BEGIN DATE NOT SPECIFIED # IF DIRID[ID$BT] NQ 0 THEN BEGIN # BEGIN TIME SPECIFIED # DLRT(DIRWD0[ID$BT],BRTIME); # COMPUTE BEGIN TIME OFFSET # IF BRTIME LS 0 THEN BRTIME = 0; BRTIME = SRTMILS + BRTIME; END ELSE BRTIME = 0; END # END TIME PROCESSING # IF DIRID[ID$ED] NQ 0 THEN BEGIN # END DATE SPECIFIED # DLCND(DIRWD0[ID$ED],OFF$DATE);# COMPUTE DATE OFFSET # IF DIRID[ID$ET] NQ 0 THEN BEGIN # END TIME SPECIFIED # DLRT(DIRWD0[ID$ET],ERTIME); # COMPUTE TIME OFFSET # ERTIME = SRTMILS + OFF$DATE + ERTIME; END ELSE ERTIME = MIDNITE + OFF$DATE - 86400000; IF ERTIME LS SRTMILS THEN ERTIME = SRTMILS; END ELSE BEGIN # END DATE NOT SPECIFIED # IF DIRID[ID$ET] NQ 0 THEN BEGIN # END TIME SPECIFIED # DLRT(DIRWD0[ID$ET],ERTIME); # COMPUTE TIME OFFSET # IF ERTIME LS 0 THEN ERTIME = SRTMILS ; # END TIME BEFORE NETON TIME # ELSE ERTIME = SRTMILS + ERTIME ; END ELSE ERTIME = 0; END IF NOT NIP THEN # AIP LOG FILE, ZERO DN, SN # BEGIN DIRWD0[ID$DN] = 0; DIRWD0[ID$SN] = 0; END ELSE BEGIN # NIP LOG FILE, ZERO T,U,B # DIRWD0[ID$T] = 0; DIRWD0[ID$U] = 0; DIRWD0[ID$B] = 0; FOR I = 0 STEP 1 UNTIL MAXCN DO BEGIN # ZERO RESPONSE TIME AVERAGE TABLE # CNWD0[I] = 0; CNWD1[I] = 0; END END # SET MESSAGE PROCESSING TABLE # J = 0; IF DIRID[ID$NM] NQ 0 THEN BEGIN # NM= DIRECTIVE # J = J + 1; DIRMID[J] = ID$NM; DIRMVAL[J] = DIRVALU[ID$NM]; END IF ERTIME NQ 0 THEN BEGIN # SET ET= VALUE # J = J + 1; DIRMID[J] = ID$ET; DIRMVAL[J] = ERTIME; END IF DIRID[ID$N] NQ 0 THEN BEGIN # N DIRECTIVE # J = J + 1; DIRMID[J] = ID$N; END IF BRTIME NQ 0 THEN BEGIN # SET BT= VALUE # J = J + 1; DIRMID[J] = ID$BT; DIRMVAL[J] = BRTIME; END DIRNUMM = J; # SET ABH/NBH PROCESSING TABLE # J = 0; FOR I = ID$B STEP 1 UNTIL ID$CN DO IF DIRID[I] NQ 0 THEN BEGIN J = J + 1; DIRHID[J] = DIRID[I]; DIRHVAL[J] = DIRVALU[I]; END DIRNUMH = J; # SET SUPERVISORY PROCESSING TABLE # J = 0; FOR I = ID$CN STEP 1 UNTIL ID$PS DO IF DIRID[I] NQ 0 THEN BEGIN J = J + 1; DIRSID[J] = DIRID[I]; DIRSVAL[J] = DIRVALU[I]; END DIRNUMS = J; IF DIRWD0[ID$LE] NQ 0 THEN # MAXIMUM LENGTH OF MESSAGE TO BE OUTPUT # LENGTH = DIRVALU[ID$LE]; ELSE LENGTH = TLWMAX; # START MESSAGE AFTER THIS MESSAGE NUMBER # SM = DIRVALU[ID$SM]; # PROCESS LOG FILE # DLSCAN; IF EOFFLAG THEN BEGIN # (EOF) ENCOUNTERED # COMPLETE = FALSE; # PROCESS NEXT FILE # EOFFLAG = FALSE; PAGE$COUNT = 0 ; NMSGCNT = 0 ; OUMSGNO = 0 ; END IF NTOFF THEN BEGIN # NETOFF ENCNTERED, CHK EOR # DLRDW(ZFET, ZHSIZE, TEMPB1, RSIZE); IF RSIZE EQ 0 THEN BEGIN DLINT(ZFET, READNR); # INTIALIZE READ AFTER EOR # IF ARGFLAG[NFILE] THEN BEGIN DLFLUSH(NFET); DLRECL(NFET); END COMPLETE = FALSE; END END END IF NOT ARGFLAG[NFILE] THEN BEGIN # N= OPTION NOT SELECTED # IF MSG$COUNT EQ 0 THEN BEGIN P = LOC(D$EM0[D$NMF]);# NO MESSAGES FOUND # DLWRT(OFET,DUMMY,5); END ELSE IF NIP THEN # NIP TRACE FILE # DLREST; # WRITE NIP RESP TIME AVG # DLFLUSH(OFET); # WRITER ON FILE # END END # DLREP # TERM