NBABEND
NETBATCH ABEND LOCATOR
PURPOSE
This utility displays the NETBATCH run log for jobs which ABEND. It
accepts a date range, then searchs the NETBATCH log files on
$SYSTEM.NETBATCH.LOGxxx (where xxx is a string of 3 alphabetic characters
in the series AAA thru ZZZ) whose modification dates put them within the
date range. It then searches these log records looking for ABENDs that
fall within the range. Once all ABENDs are found, it repeats the search
within the range looking for all references to the job number and lists
them in job number order.
SYNTAX:
NBABEND------------------------------------- - - -
| | | |
|-> /OUT filename/ ->| |-> ? ->|
- - - ---------------------------------------------------- - - -
| | | |
|->FROM--nbpdatetime->| |->THRU--nbpdatetime->|
- - - ---------------------
| |
|->TERMWIDTH->|
where:
-
filename is the name of the output spooler location
-
TERMWIDTH specifies the terminal width should override the output device width and output should be
formatted for an 80 character wide device
-
? displays help
-
nbpdatetime is the date and time of the NETBATCH PLUS log records as defined by:
- - -----ddmonyear------------------------- - -
| | | |
|->TODAY----->|-> hr:mn->|->:sc ->|
| |
|->YESTERDAY->|
where
- is the day of the month
is the three-letter name of the month
is the 4-digit year
is the hour of the time
is the minute of the time
is the second of the time
NOTE: the only spaces in are between the date
and the time
\NEW
SYNTAX (CONTINUED)
Specific dates and times may be specified (going back as far as there are
NETBATCH LOGxxx files present) or the shorthand TODAY or YESTERDAY may be
used. If TODAY is used after the FROM keyword, the start date is today's
date and the start time is (if none is supplied) is assumed to be
00:00:00. If TODAY is used after the THRU keyword, the end date is
today's date and the end time (if none is supplied) is assumed to be
23:59:59. The YESTERDAY keyword operates exactly like the TODAY keyword
as far as what the default time is based upon whether YESTERDAY is the
FROM date or the THRU date.
EXAMPLES:
The first THREE examples show a run stream that could be run either from
within NETBATCH (at the end of a shift) or from a TACL session.
The first example's output is being sent to a dummy location in the
spooler, so it will be formatted for a 132 column printer (default).
> NBABEND /OUT $S.#NB.ABENDS,NOWAIT/ FROM TODAY
In the second example, the output is being sent to the spooler for a
specific printer, so the output will be formatted for the WIDTH
specified in the spooler.
> NBABEND /OUT $S.#REAL.PRINTER,NOWAIT/ FROM TODAY
The third example shows output being sent to a dummy spooler location,
but being formatted for viewing on a terminal (TERMWIDTH option). The
fourth example shows the utility being run with the output going
directly to the TACL's output device (the terminal, by default) and the
output will be formatted for an 80 character terminal.
> NBABEND /OUT $S.#NB.ABENDS,NOWAIT/ FROM TODAY TERMWIDTH
This last example is not recommended unless you don't mind your terminal
being tied up for the 15 to 30 minutes it takes to run and produce
output.
> NBABEND FROM TODAY
\NEW
SAMPLE OUTPUTS
The first sample shows output that was sent to a dummy spooler location
with the TERMWIDTH option used so the output could be viewed more easily
with PERUSE. The output is formatted as follows: first is the NETBATCH
job number; the second and third columns contain the date and time of the
action; the third column shows the NETBATCH action; the final column shows
the message. Note that the message "wraps" so that it always appears in
the same columns on the listing.
Job# Date and Time Action Message
___ ________________ ____ ________________________________________
| | | | | | | |
NETBATCH ABEND Log Viewer Version 1.3
4626 27MAR2005 00:02:37 ADD JOB PMQ1-REGADEL C_Q1:3 J_4626 U_191,250
H_\MHS.$ZBAT
27MAR2005 18:00:21 LIST JOB PMQ1-REGADEL READY J_4626
27MAR2005 18:09:56 BEGIN JOB (LWQ1.OPER)PMQ1-REGADEL:1 E_EXNPR2
L_4690 J_4626 P_ENTRUDE
\MHS.$X052:7964213929 U_191,25
. . .
27MAR2005 18:09:58 ABEND CC_5 EXECUTOR-PROGRAM STOP-ON-ABEND J_4626
\MHS.$X052:7964213929
27MAR2005 18:09:58 ABORT JOB PMQ1-REGADEL by NetBatch J_4626
P_ENTRUDE \MHS.$X052:7964213929
27MAR2005 18:09:58 DOSTOP \MHS.$X052:7964213929 J_4626
27MAR2005 18:09:59 FINISH JOB PMQ1-REGADEL T_0:0:0:142 J_4626
P_ENTRUDE
27MAR2005 18:09:59 DELETE JOB PMQ1-REGADEL J_4626
4636 27MAR2005 00:02:45 ADD JOB PMQ1-INSDEL C_Q1:3 J_4636 U_191,250
H_\MHS.$ZBAT
27MAR2005 19:00:16 LIST JOB PMQ1-INSDEL READY J_4636
27MAR2005 19:01:17 BEGIN JOB (LWQ1.OPER)PMQ1-INSDEL:1 E_EXNPR2
L_7293 J_4636 P_ENTRUDE
\MHS.$X371:7964303273 U_191,25
27MAR2005 19:01:17 LIST JOB PMQ1-INSDEL EXECUTING J_4636
27MAR2005 19:01:21 START EXECUTOR-PROGRAM U_197,250 J_4636
27MAR2005 19:01:21 ABEND CC_5 EXECUTOR-PROGRAM STOP-ON-ABEND J_4636
. . .
4733 27MAR2005 23:45:11 DOSTOP \MHS.$Z974:7965002921 J_4733
27MAR2005 23:45:11 FINISH JOB PMQ1-FRONT-END-DEBLOCK T_0:0:2:453
J_4733 P_TACL
27MAR2005 23:45:11 DELETE JOB PMQ1-FRONT-END-DEBLOCK J_4733
>>>> 0004 NETBATCH JOBS ABENDED DURING THIS TIME <<<<
---- End of Report ----
\NEW
SAMPLE OUTPUTS (CONTINUED)
This second sample shows the output going directly to the terminal. The
column positions are the same as in the sample sent to the spooler, except
that the output pauses at the end of each screen's output and prompts to
either STOP or CONTINUE. In either case the number of abended jobs found
is shown at the end of the output.
Job# Date and Time Action Message
___ ________________ ____ ________________________________________
| | | | | | | |
NETBATCH ABEND Log Viewer Version 1.3
4636 27MAR2005 19:01:17 BEGIN JOB (LWQ1.OPER)PMQ1-INSDEL:1 E_EXNPR2
L_7293 J_4636 P_ENTRUDE
\MHS.$X371:7964303273 U_191,25
27MAR2005 19:01:17 LIST JOB PMQ1-INSDEL EXECUTING J_4636
27MAR2005 19:01:21 START EXECUTOR-PROGRAM U_197,250 J_4636
27MAR2005 19:01:21 ABEND CC_5 EXECUTOR-PROGRAM STOP-ON-ABEND J_4636
27MAR2005 00:02:45 ADD JOB PMQ1-INSDEL C_Q1:3 J_4636 U_191,250
H_\MHS.$ZBAT
27MAR2005 19:00:16 LIST JOB PMQ1-INSDEL READY J_4636
27MAR2005 19:01:17 BEGIN JOB (LWQ1.OPER)PMQ1-INSDEL:1 E_EXNPR2
L_7293 J_4636 P_ENTRUDE
\MHS.$X371:7964303273 U_191,25
27MAR2005 19:01:17 LIST JOB PMQ1-INSDEL EXECUTING J_4636
27MAR2005 19:01:21 START EXECUTOR-PROGRAM U_197,250 J_4636
27MAR2005 19:01:21 ABEND CC_5 EXECUTOR-PROGRAM STOP-ON-ABEND J_4636
. . .
4733 27MAR2005 23:45:11 DOSTOP \MHS.$Z974:7965002921 J_4733
27MAR2005 23:45:11 FINISH JOB PMQ1-FRONT-END-DEBLOCK T_0:0:2:453
J_4733 P_TACL
27MAR2005 23:45:11 DELETE JOB PMQ1-FRONT-END-DEBLOCK J_4733
Enter 'S' to STOP, RETURN to Continue=>
. . .
Enter 'S' to STOP, RETURN to Continue=>
NETBATCH ABEND Log Viewer Version 1.3
>>>> 0004 NETBATCH JOBS ABENDED DURING THIS TIME <<<<
---- End of Report ----
\NEW
INTERNAL OPERATION
The only arguments (besides an output location) that need to be passed to
the NBABEND utility is the date range within which to look for ABENDs.
The NBABEND utility assumes that NETBATCH log files are on
$SYSTEM.NETBATCH.
The utility requires that at least the FROM argument be supplied. An
exact date (and optional time) may be supplied to delimit one end or the
other of the search. Under normal circumstances, only jobs from today or
yesterday would be of interest, so the keywords TODAY or YESTERDAY may be
used to delimit the search. TODAY defaults to today's DATE only and
YESTERDAY defaults to yesterday's DATE only. The following table
describes the assumed values (shown in parenthesis) when any part of the
argument is omitted:
FROM THRU
----------------------------------- -----------------------------------
ddmmmyyyy hr:mn:sc(.000000) ddmmmyyyy hr:mn:sc(.999999)
ddmmmyyyy hr:mn(:00.000000) ddmmmyyyy hr:mn(:59.999999)
ddmmmyyyy (00:00:00.000000) ddmmmyyyy (23:59:59.999999)
TODAY hr:mn:sc(.000000) TODAY hr:mn:sc(.999999)
TODAY hr:mn(:00.000000) TODAY hr:mn(:59.999999)
TODAY (00:00:00.000000) TODAY (23:59:59.999999)
YESTERDAY hr:mn:sc(.000000) YESTERDAY hr:mn:sc(.999999)
YESTERDAY hr:mn(:00.000000) YESTERDAY hr:mn(:59.999999)
YESTERDAY (00:00:00.000000) YESTERDAY (23:59:59.999999)
Omitted - INVALID Omitted (31DEC3000 23:59:59.999999)
Once the arguments are parsed and the desired date range established, the
utility makes a list of all files matching the $SYSTEM.NETBATCH.LOG???
template , sorts them into alphabetical order (in case the names were not
returned in order) and checks their last modification dates. Any files
whose dates fall outside the established range are discarded.
The next task of the utility is to search all of those files for the word
"ABEND" appearing in the "function" columns of the report. Only records
containing date strings within the date range are checked. Any records
found to contain "ABEND" are scanned for their job number (J_nnnn) and
that job number is recorded in an internal structure called ABEND_LOG.
The ABEND_LOG structure is sorted by job number.
Once the task of gathering abended job numbers is complete another pass is
made through the log files (only looking at records whose date and time
are within the desired date range) looking for strings that match the
template "J_????". Each time a matching string is found it is checked
against all the entries in the ABEND_LOG. If a match is found, the record
is written to a Key-Sequenced (Guardian) temporary (#nnnnnnn) file whose
primary key is the job number plus the timestamp of the record.
Once this last pass has been made through the log files the temporary file
is read back in and the report formatted for the particular output
(dummy spooler location, spooler location associated with a device, or the
terminal) and is output.
Back to Products
|