The CHKSAVRST command checks a job log that uses save/restore
commands and prints a listing with the completion messages and any
error diagnostics. The command essentially 'nets out' the job log
for what is important from a Save/Restore viewpoint.
The intent of this command is that you would include it in your
normal Save/Restore procedures so that a printed file and an optional
data base file is available.
The typical use of the command is without any parameters to access
the job log of the current job.
CHKSAVRST
The printed output occurs to the file SAVRSTMSGS.
A save or restore can produce a large number of confirmation
messages. To net the output even further, ERRORSONLY(*YES) may be
specified as:
CHKSAVRST ERRORSONLY(*YES)
A count of the bypassed messages will occur. The listing will
contain only those messages which are errors.
If multiple job logs exist in the same job (either from a DSPJOBLOG
*PRINT or wrapping of the job log) all are processed. To control
what messages will be processed, see the later discussion of the
STRMSGVAL option.
Parameters exist to print a job log from a different job, to print
more than one line of text (if available) from the MSGIDs that print,
to copy the job log at the same time to a data base file and to print
from a data base file.
For example, to write the job log to a separate data base member you
would specify:
CHKSAVRST FILE(yyy/xxx)
At some later point when you want to review the job log you would
specify:
CHKSAVRST FILE(yyy/xxx) INPUTFILE(*DBFILE)
The STRMSGVAL option will allow you to start the CHKSAVRST function
at a specific point in the job log. This allows you to bypass
previous save messages. For example, if you run multiple saves, you
may want to use CHKSAVRST following each save and avoid the messages
from a previous save in the current listing. The SNDJLGMSG command
is used to set a mark in the job log that can be found by CHKSAVRST.
A typical series of commands would be:
SNDJLGMSG MSG('SAVE2') MSGID(TAA9878)
SAVxxx ...
CHKSAVRST ... STRMSGVAL(SAVE2)
SNDJLGMSG sends the TAA9878 message to the job log. Because the
STRMSGVAL is specified, CHKSAVRST will search for the TAA9878 message
and compare the message text to the STRMSGVAL value. If it matches,
the messages will be listed beginning at that point.
The program which prints the message IDs prints all messages in the
following ranges:
MSGID Range Predominant usage
CPC3700 - CPC3799 Save/Restore completion messages
CPF3200 - CPF3299 Data Base errors
CPF3700 - CPF3799 Save/restore errors
CPF3800 - CPF3899 Save/restore errors
CPF8100 - CPF8199 Damage conditions
The TAA9856 message in TAAMSGF in TAATOOL may also be used to send a
message that will be listed such as:
SNDPGMMSG MSG(TAA9856) MSGF(TAATOOL/TAAMSGF) +
MSGDTA('The backup was completed.')
If you have MSGIDs that you feel are of a general interest and should
be included or excluded, contact the TAA Productivity Tools owner.
If you have a unique situation, you can modify the source for the RPG
program TAASAVBR.
** If there are some MSGIDs that you do not want to print that
are in these ranges, an array (BYP) exists to allow you to
bypass the printing. Just enter the MSGID into the array and
recreate the CHKSAVRST tool.
** Conversely, the array (MSG) exists to allow you to print other
MSGIDs that are not within the ranges described. Some of the
diagnostics which can occur during Save/Restore may be issued
by another component. The Save/Restore component will issue a
general message for each of these occurrences, but the
individual component messages may be more meaningful.
A few MCH messages which should rarely occur are included in the
program. The CPF9898 message is also included which is designed for
user applications and may indicate a S/R error.
Because all of the messages within the ranges defined are printed,
you may find some of these messages (particularly the data base
errors) have been caused by other than Save/Restore commands. If you
have already accumulated a large job log in your job, it may be
worthwhile either a) signoff and signon again before beginning any
commands to be analyzed by the CHKSAVRST command or b) use the
SNDJLGMSG command to set a mark that can be used by CHKSAVRST.
A status message is sent while the CHKSAVRST command is in operation.
Restrictions
------------
Because the job log is copied with CPYSPLF, the CHKSAVRST function is
release dependent. Only the lower and upper case English language
versions are supported. If the format of the job log is changed on a
subsequent release, the program must be modified.
Command parameters *CMD
------------------
JOB The qualified job name who's job log should be
checked. The default is * meaning the current job.
ERRORSONLY A *YES/*NO value which defaults to *NO. *NO causes
all messages to be listed.
*YES minimizes the number of messages that will be
printed by filtering out some of the member and
library completion messages. This parameter is used
by the TAA tool SAVALLCHG which prints summary
information by library. A *YES entry will further
'net out' the job log.
A completion message will print on the listing for
the *YES value describing the number of bypassed
messages.
BYPMSGID A list of up to 40 MSGIDs that should be bypassed.
Any MSGIDs identified will not appear in the
listing. This allows you to further net out the job
log if you see a large volume of messages for a
specific MSGID.
MULTILINE A *YES/*NO value which defaults to *NO. This means
that only one line will be printed for each MSGID
found. This makes the net job log more readable and
in most cases is adequate for problem resolution.
The *YES entry will print as many lines as exist for
a given MSGID in the job log.
STRMSGVAL The default is *NONE meaning all messages found are
considered for printing.
The parameter is designed to work in conjunction
with the SNDJLGMSG command which will allow you to
send a message to the job log to mark where the
CHKSAVRST function should begin. This allows you to
bypass previous messages which are not related to
save/restore or not related to a previous
save/restore.
Up to 20 bytes may be entered. A good value to use
would include the current date and time.
If the value specified matches the message text of a
TAA9878 message, the CHKSAVRST function will begin
considering messages to be printed. For example, if
SNDJLGMSG MSG(SAVE1) is specified prior to the
SAVxxx command, CHKSAVRST can specify
STRMSGVAL(SAVE1) to allow any messages prior to the
TAA9878 message containing this value to be
bypassed.
FILE The qualified file name to be used to store the job
log. The default is QTEMP/TAA132 which will be
created implicitly by the command. If you want to
permanently capture the job log, you can specify a
different file name. Any file other than
QTEMP/TAA132 must already exist. It should be
created as:
CRTPF yyy/xxx RCDLEN(132)
The other use for this parameter is when using the
INPUTFILE(*DBFILE) function. This allows a job log
to be processed that is already in a data base file.
MBR The member to be processed. The default is *FILE.
The member is always cleared before writing the job
log. If you use a file and member other than the
default, the member must exist.
INPUTFILE This determines whether to use a job log as a spool
file or as a data base file. The default is *JOBLOG
meaning to use the job log of the named job (JOB
parameter). The entry of *DBFILE says to ignore the
JOB parameter and use the file and member named in
the FILE and MBR parameters.
FIRSTLINE This optional parameter defaults to *NONE. If a
value other than *NONE is specified, the text
entered will appear at the beginning of the spooled
output before the column headings. Up to 132 bytes
of text may be entered.
The FILE and MBR parameters allow you to capture the job log at the
same time you are printing to SAVRSTMSGS. You must create a file
using RCDLEN(132). It could be a multi-member file. The advantage
of this function is that you can check the same job log information
with the MULTILINE(*YES) value or perform additional analysis against
the same job log.
For example, if you have multiple save operations during the week,
the DP Manager can ensure that each job log is kept by including the
CHKSAVRST command and writing each job log to a different file or
file/member. If a problem arises, a good audit trail exists in
addition to the CHKSAVRST output. Or you could run the CHKSAVRST
command again using the same job log information.
The coding used is predominantly general purpose. If you have a
different reason to examine job logs looking for specific messages or
ranges of messages, you could use the same program as a base and
modify it for your particular needs.
Prerequisites
-------------
The following TAA Tools must be on your system:
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
SNDSTSMSG Send status message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ----- --------- ---------- -----------
CHKSAVRST *CMD TAASAVB QATTCMD
TAASAVBC *PGM CLP TAASAVBC QATTCL
TAASAVBC2 *PGM CLP TAASAVBC2 QATTCL
TAASAVBC3 *PGM CLP TAASAVBC3 QATTCL
TAASAVBR *PGM RPG TAASAVBR QATTRPG
The TAASAVBC2 program executes the CHKSAVRST command by passing in
the ERRORSONLY parameter and using USEADPAUT(*NO).
|