TAA Tools
SCNJOBLOG       SCAN JOB LOG                           TAALOGJ

The Scan Job  Log command is intended to  'net out' a job log  to allow
a review  by selection criteria.   It allows a display or  listing of a
subset  of the  messages from  a specific  job log.   The  selection of
messages  may  be done  by  a  list  of  message  IDs,  message  types,
date/time range, severity, or by scanning the message text.

For  standard job  logs  such as  created  by PTF  processing, you  may
develop  a set of selection criteria  and package the SCNJOBLOG command
in a CL program or with a TAA Tool such as FAVCMD.

SCNJOBLOG  uses the  sub  tool  CVTJOBLOG  which  is  English  language
dependent (either upper or lower case).

A typical command would be:

             SCNJOBLOG  JOB(xxx) MSGID(CPFnnnn CPFnnnn)
                           MAXMSGLIN(4)

A display would appear  of the job log containing  only the message IDs
that matched  the specified list.   Because MAXMSGLIN(4) was specified,
only the first 4 lines of any  message would be listed.  The  MAXMSGLIN
parameter  can  further 'net  out'  the  job  log if  you  are  already
familiar with the message text.

The  formatting of  the  listed messages  is similar  in  appearance to
that  of  a system  job log.   The  selection  criteria appears  at the
beginning of the output.

Selection processing
--------------------

If all defaults  are used for  the selection criteria,  a full job  log
is generated.

If a  single selection parameter  is specified, only the  messages that
meet  the criteria  will be listed.   For  example, if MSGTYPE(*ESCAPE)
is specified, only the 'Escape' messages will appear in the output.

If multiple selection  criteria are specified,  only the messages  that
meet all  of the criteria  will be listed.   For example, if  a message
ID is  specified and a From  program name, both the  message ID and the
From program name must match for the message to be listed.

When a message  is selected for  listing, the first  line will  contain
the  message ID,  the  message type,  etc  as is  normally  shown in  a
system  job  log.   The  second line  will  contain the  first  line of
message  text for the message.   These two lines  will always appear if
a message is selected.

The subsequent lines (if any)  may not appear depending on  the setting
of the  MAXMSGLIN parameter.   This allows  a further 'netting'  of the
job log if you are already familiar with the message text.

If  a  message  is  not  selected,  no  information  about the  message
appears.

The SCNVAL  parameter allows  a scan  for a  string  within the  actual
message  text  and is  handled  differently  than the  other  selection
criteria.   If  a scan  value is specified  and is  found in  a message
line, the  line is  always  listed regardless  of the  other  selection
criteria or  the MAXMSGLIN value.   %%% is  used to identify  a message
text line where the scan was found.

If  the  scan value  appears  in  the first  line  of text,  processing
occurs  normally (meaning  that may  be the only  line of  text that is
listed).

If the scan  value is found  in one of  the following lines  of message
text and  the first two lines  of message information have  not already
been  listed,  the first  two  lines are  listed followed  by  the line
containing the scan value.

SCNJOBLOG escape messages you can monitor for
---------------------------------------------

None.  Escape messages from based on functions will be re-sent.

SCNJOBLOG Command parameters                          *CMD
----------------------------

   JOB           The qualified  name  of the  job  log to  be  scanned.
                 The  default  is  *  meaning  the  current  job.    If
                 multiple  job logs  exist for  the  same job,  see the
                 SPLNBR parameter.

   MSGID         A list of up  to 100 message IDs  to be searched  for.
                 The default is *ALL.

   MSGTYPE       A list of up  to 20 message types to  be searched for.
                 The default  is *ALL.   Typical values are  *ESCAPE or
                 *DIAG.   Use the  command prompter for  the full list.

   SEV           The severity of  the message to  select.  The  default
                 is *ALL.   If a value is entered,  any messages with a
                 severity  equal  or  greater than  the  value  will be
                 selected.   Some  messages  do not  have  a  severity.
                 They are treated as a severity of 0.

   FROMPGM       The From  program name  that sent  the message.   *ALL
                 is the default.

   TOPGM         The To  program name that received  the message.  *ALL
                 is the default.

   SCNVAL        A string  of  text  to  scan the  message  for.    The
                 default  is  *NONE meaning  no  scanning  will  occur.
                 Both  the  value  entered  and  the message  text  are
                 folded to upper case before scanning.

                 If  the scan  value is found,  the message information
                 is always  listed along with  the line containing  the
                 scan  value  regardless  of  the the  other  selection
                 criteria.   %%%  is  used to  identify a  message text
                 line where the scan was found.

                 If the  scan  value is  found  in  the first  line  of
                 message   text,   the   message   information   prints
                 normally.

                 If  the scan value  is found  in one of  the following
                 lines of  message  text and  the  first two  lines  of
                 message  information  have not  already  been  listed,
                 the first  two lines are listed followed  by any lines
                 containing  the scan  value.   The line  with the scan
                 value will appear  regardless of the MAXMSGLIN  value.

   DATETIME      The  range of  date and  time to  list messages.   The
                 default   is  to  list   all  messages  regardless  of
                 date/time.

                 The From  date defaults  to *FIRST  meaning the  first
                 message in  the log  log.   A date  may be entered  in
                 job format.  The From time defaults to 000000.

                 The  To  date  defaults  to  *LAST  meaning  the  last
                 message in the  job log.   A  date may  be entered  in
                 job format.  The To time defaults to 235959.

   MAXMSGLIN     The  maximum number  of  lines to  print  for any  one
                 message.   *ALL is  the default.   A number  between 1
                 and  9 may be  entered.  If the  message takes 6 lines
                 in the job log and  a max of 3 is specified,  only the
                 first  3  lines  of   text  will  appear.    The  line
                 containing  the message ID,  message type  etc, is not
                 considered in the maximum.

   SPLNBR        The spooled file number of  the job log.  The  default
                 is *ONLY meaning  the only QPJOBLOG file  for the job.
                 A  specific  number may  be  entered in  the  range of
                 000001 to 999999  or the special  value *LAST  meaning
                 the last job log for the job.

   OUTPUT        How  to output  the  results.   *  is the  default  to
                 display  the spooled  file if  the command  is entered
                 interactively.   The spooled file  is deleted after it
                 is displayed.

                 If the  command  is  entered  in batch  or  *PRINT  is
                 specified,  the spooled file  is output  and retained.


Restrictions
------------

SCNJOBLOG  uses  the  sub  tool  CVTJOBLOG  which  is English  language
dependent (either upper or lower case).

Prerequisites
-------------

The following TAA Tools must be on your system:

     CHKSPLF         Check spooled file
     CVTJOBLOG       Convert job log
     CVTDAT          Convert date
     CVTTIM          Convert time
     EXTLST2         Extract list 2
     RSNLSTMSG       Resend last message
     RTVJOBSTS       Retrieve job status
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     SNDESCMSG       Send escape message

Implementation
--------------

None, the tool is ready to use.

Objects used by the tool
------------------------

   Object        Type    Attribute      Src member    Src file
   ------        ----    ---------      ----------    ----------

   SCNJOBLOG     *CMD                   TAALOGJ       QATTCMD
   TAALOGJC      *PGM       CLP         TAALOGJC      QATTCL
   TAALOGJR      *PGM       RPG         TAALOGJR      QATTRPG
					

Added to TAA Productivity tools January 15, 2010


Home Page Up to Top