TAA Tools
SCNALLJLG       SCAN ALL JOB LOGS                      TAALOGK

The Scan All  Job Logs command will  scan all or selected job  logs for
various criteria  such as message  IDs, message types, and  a string of
text.    SCNALLJLG assists  in finding  information when  the specified
job  log  is   not  known.     Selection  criteria  is  a   significant
performance  consideration  if  many  job  logs are  scanned  (see  the
discussion on performance).

A  single spooled file containing the information  from all job logs is
the default.  Unique abbreviated job logs may be requested.

A typical command would be:

             SCNALLJLG USER(xxx) MSGID(yyyyyyy)

All job logs (QPJOBLOG) for  the named user would be found  (regardless
of the  output queue)  and scanned  for the  specified message  ID.   A
single spooled  file would be output containing  the messages where the
message ID exists.

The selection criteria of USER,  JOB, USRDTA, and DATETIME are  handled
in an  'and' relationship  and determine  if the spooled  file will  be
scanned for  the other selection  criteria.  For example,  if both USER
and  USRDTA  are  specified, the  spooled  file  must have  both  to be
scanned.  Note  that the DATETIME  value is the  date/time the job  log
was opened which is typically when the job ends.

If  USER(*ALL) is  specified, and  defaults used  for JOB,  USRDTA, and
DATETIME,  an escape  message will occur.   This  prevents scanning all
job logs.

If the  spooled  file  is to  be  scanned, the  selection  criteria  of
MSGID, MSGTYPE,  SEV, and SCNVAL are  handled in an  'or' relationship.
For example,  if the spooled file  is to be scanned  and both MSGID and
MSGTYPE are  specified,  any  message  having  either  value  would  be
listed.

If  some selection  exists  for USER,  JOB,  USRDTA, or  DATETIME,  and
defaults  are taken for  MSGID, MSGTYPE,  SEV and SCNVAL,  all messages
in the job log are listed.

Performance considerations
--------------------------

SCNALLJLG  uses  the  TAA command  CVTWRKSPLF  internally.   CVTWRKSPLF
creates one record per selected  spooled file.  CVTWRKSPLF uses  an API
which  will run  significantly  faster if  a  JOB and/or  USER name  is
entered.    This  reduces the  number  of spooled  files  that  will be
output to a temporary file in QTEMP.

If USRDTA and/or DATETIME are  entered, the number of spooled files  in
the internal file that must be scanned can be further reduced.

Reducing  the number  of  spooled files  that must  be  scanned is  the
major factor determining the performance of the tool.

The  other  selection  criteria  including  message  ID, message  type,
severity, or a string  to be scanned for  are determined by  converting
the job logs to a temporary file in QTEMP and then scanned.

If  OUTPUTTYPE(*UNQSPLF) is  specified,  the listing  approach  assumes
that  any job  log to be  scanned will  be output  to a  JOBLOG spooled
file  without  first checking  the selection  criteria.   Each  file is
output as HOLD(*YES).  If  none of the selection criteria are  met, the
spooled file is deleted.

SCNALLJLG escape messages you can monitor for
---------------------------------------------

      TAA9891    No job logs were found with the selection criteria

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

SCNALLJLG Command parameters                          *CMD
----------------------------

   USER          The  name of  the  user who  owns  the job  log to  be
                 scanned.   A specific  name may be  entered to achieve
                 the best performance.

                 *ALL may be entered to mean all users.

                 *NONSYSUSR may be entered to  mean any user name  that
                 does not begin with Q.

                 *NONSYSUS2 may be  entered to mean any  user name that
                 does  not  begin  with  Q,  but  QUSER and  QPGMR  are
                 included.

   JOB           The name  of  the  job which  has  the  spooled  file.
                 *ALL is  the  default meaning  all jobs.   A  specific
                 name may  be entered to achieve  the best performance.

   USRDTA        The  string of  'user data'  as seen  on commands such
                 as WRKOUTQ.   *ALL is  the default  meaning all  'user
                 data'.   A  specific name  may be  entered  to achieve
                 better performance.

   DATETIME      The  range  of date  and  time  that the  job  log was
                 opened.  This  is typically  when the job  ends.   The
                 default  is   to  list  all  messages   regardless  of
                 date/time.

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

                 The To  date defaults to  *LAST meaning the  last date
                 a  job log was  opened.   Typically this would  be the
                 current  date.  A  date may be  entered in job format.
                 The To time defaults to 235959.

   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.

   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.

   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.

   OUTPUTTYPE    The type of output to be created.

                 *ONESPLF  is  the  default  meaning  it  will  contain
                 messages  from  different  job  logs  that  match  the
                 selection criteria.

                 *UNQSPLF  may be  specified to  create an  abbreviated
                 job  log for  each job  log that  contains a  match of
                 the selection criteria.


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

*ALLOBJ special authority is required.

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

The following TAA Tools must be on your system:

     CHKALLOBJ       Check *ALLOBJ special authority
     CVTJOBLOG       Convert QPJOBLOG to an outfile
     CVTTIM          Convert time
     CVTWRKSPLF      Convert WRKSPLF to an outfile
     EDTVAR          Edit variable
     EXTLST2         Extract list 2
     RTVSYSVAL3      Retrieve system value 3
     SNDCOMPMSG      Send completion message
     SNDESCINF       Send escape information
     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
   ------        ----    ---------      ----------    ----------

   SCNALLJLG     *CMD                   TAALOGK       QATTCMD
   TAALOGKC      *PGM       CLP         TAALOGKC      QATTCL
   TAALOGKR      *PGM       RPG         TAALOGKR      QATTRPG
   TAALOGKR2     *PGM       RPG         TAALOGKR2     QATTRPG
					

Added to TAA Productivity tools July 15, 2011


Home Page Up to Top