DSPJOBLOG5      DISPLAY JOB LOG 5                      TAALOGI

 The Display Job  Log 5 command  provides a different method  of viewing
 a  job  log  and attempts  to  display  the  last  escape message  (and
 associated  messages) first.  The messages  are displayed on an 80 byte
 wide display using a  subfile with one line  per message plus a  detail
 display  option.    Different  positions  within  the  subfile  can  be
 quickly  displayed  along  with  a  scanning  capability  to  find  any
 character string.

 A typical command would be:

              DSPJOBLOG5   JOB(xxx)

 The job log would be converted and then displayed as:

 ***********************************************************************

                             Display Joblog 3 - TAA              TAASYS7
                                                       2/06/09  18:36:15
  Position to Msg Nbr . . _______1     Job:  FAIL      SLOAN      035017
  Scan value .  _________________      Total messages: 7   Comp Code: 20
   First message: 02/03/09 08:47:15    Last message: 02/03/09 08:47:15
  Type options, press Enter.
    5=Display     6=Print

  Opt  MsgNbr  Msg ID   Type     Text
   _        3  *NONE    *RQS     CALL PGM(SYSYSYS)
   _        4  CPD0170  *DIAG    Program SYSYSYS in library *LIBL not fo
   _        5  CPF0001  *ESCAPE  Error found on CALL command.
   _        6  CPC2402  *COMP    Job ended. Cancel message received at c
   _        7  CPF1164  *COMP    Job 035017/SLOAN/FAIL ended on 02/03/09

  F3=Exit    F11=View 2     F12=Cancel     F16=Scan     F18=Bottom
 ***********************************************************************

 The first  message  displayed is  the  message  prior to  the  messages
 associated  with the  last  escape message.   In  this  case, MsgNbr  5
 caused the  failure (*ESCAPE), and MsgNbr 4  (*DIAG) is associated with
 the escape.

 Message types  that may  be  associated with  the last  escape  message
 are:

          - *ESCAPE
          - *DIAG
          - *SEND
          - RPYL

 A later section describes more complex examples.

 Because of  the technique used,  the assumption as  to where the  error
 that caused the job to fail, may not always be accurate.

 Option 5 displays the details of a specific message.

 All Option  6 selections are printed  when the Enter Key  is pressed to
 a  single  spooled file  named TAAJOBLOG.   This  allows you  to select
 only certain messages to be printed to make a subset joblog.

 DSPJOBLOG5  is an  option  on the  WRKALLSPL2  command.   If  you  have
 existing  job logs  for  your user  profile,  and would  like a  simple
 demonstration,  use  WRKALLSPL2 and  Option  27 on  a  QPJOBLOG spooled
 file.

 More complex examples
 ---------------------

 The example shown is  a simple case involving  a program that does  not
 exist and  therefore the  job fails.   More  complex situations  exists
 where  a series  of programs  are in  the program  stack and  one fails
 causing a cascading effect  of errors if no  program is monitoring  for
 escape messages.

 DSPJOBLOG5 works backwards  from the last escape message  attempting to
 determine from  the previous messages  found, where the  error actually
 occurred.

 For  example, assume you  submitted PGM1 to batch  and PGM1 calls PGM2.

 If PGM2 receives  and escape message  and neither program monitors  for
 errors, the following would occur:

   **   The CPA0701 message  would be sent to QSYSOPR for  PGM2.  If 'C'
        (cancel)  is responded,  PGM2  would end  and an  escape message
        would be sent to PGM1.

   **   The CPA0701 message would be sent  to QSYSOPR for PGM1.  If  'C'
        (cancel)  is responded,  PGM1 would  end and  an escape  message
        would be sent to PGM1.

   **   The CPF9999 Function Check message would end the job.

 The messages that would be displayed by DSPJOBLOG5 would be:

           xxx          The message prior to the PGM1 error occurrence
           *DIAG        A *DIAG  may occur describing the error
           *ESCAPE      The escape that caused PGM1 to end
           *SEND        CPA0701 message sent to QSYSOPR for PGM2
           *RPYL        Cancel request
           *SEND        CPA0701 message sent to QSYSOPR for PGM1
           *RPYL        Cancel request
           *ESCAPE      CPF9999  Function check
           *COMP        CPC2402 Job ended by cancel message
           *COMP        CPF1164 Job completion message

 The  first  escape  has  caused  the  problem.    Since no  program  is
 monitoring for  errors  and a  'C'  cancel response  is  received,  the
 cascading of errors occurs.

 DSPJOBLOG5 lets  you  easily see  the escape  message  that caused  the
 problem.

 If an *ESCAPE  message is monitored for in a  job (but not removed from
 the  job log), the message will not be  considered if it is followed by
 a least one message that is not one of the types tested for.

 Differences with DSPJOBLOG3
 ---------------------------

 DSPJOBLOG3  uses  the  same  display  format,  but  always  begins  the
 subfile with the first message in the job log.

 DSPJOBLOG5  begins the  subfile with  the  first message  prior to  the
 messages associated with the last escape.

 Multiple jobs of the same name
 ------------------------------

 If  multiple jobs exist that  satisfy the JOB and  STATUS parameters, a
 subfile of  jobs is  displayed using  the TAA  Tool  DSPDUPJOB and  the
 user can select the  required job to be processed  by DSPJOBLOG5.  When
 DSPJOBLOG5, the return is to the DSPDUPJOB display.

 QPJOBLOG requirements
 ---------------------

 The QPJOBLOG  spooled file must exist.  Only  job logs written in upper
 or lower case English and can be copied by CPYSPLF are supported.

 The job  log  can be  in  any  output queue  as  long as  the  user  is
 authorized.

 It is  possible that multiple job  logs exist for  the same job.   This
 would  typically occur if  the system  DSPJOBLOG command was  used with
 OUTPUT(*PRINT)  and the job completion function  also caused a job log.
 DSPJOBLOG5  selects  the last  QPJOBLOG  file  written  for  a  job  by
 default.  This will most likely be the job completion version.

 It  is possible  that multiple  job logs  will exist  while the  job is
 still active.

 It  is also possible for  a user with *JOBCTL  special authority to use
 DSPJOBLOG OUTPUT(*PRINT) for  a job other  than his own.   The  spooled
 file is  named QPJOBLOG  and will  be owned  by the  current user  (not
 necessarily the user of the job).

 Assume  the name  of the  current job  is  DSP01 and  the job  that was
 specified  for  DSPJOBLOG  was  XX1.    If  the  DSP01  user   requests
 DSPJOBLOG5 JOB(*), he would  see the QPJOBLOG spooled file  of job XX1.

 Authorization requirements
 --------------------------

 A  user  may display  his  own  QPJOBLOG file,  but  must have  *JOBCTL
 authority to display job logs for a different user.

 DSPJOBLOG5 escape messages you can monitor for
 ----------------------------------------------

 DSPJOBLOG5  does not send  any escape messages  that could be monitored
 for.  However,  the escape messages from  CPYSPLF will be re-sent  such
 as:

         CPF3303     No QPJOBLOG spooled file exists for the job
         CPF3342     Job not found
         CPF3429     File cannot be copied

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

    JOB           The qualified name  of the job to display  the job log
                  for.   The  default  is *  for the  current job.   The
                  last  QPJOBLOG  spooled  file  for  the  job  will  be
                  displayed.

    SPLNBR        The file  number of the  spooled file.   This defaults
                  to  *LAST.     *ONLY  or  a  specific  number  may  be
                  specified.

    STATUS        The status  of  the job  requested.   The  default  is
                  *ALL for all status conditions.

                  A  specific  status   may  be  entered  if   you  have
                  multiple  jobs of the  same name  and did not  enter a
                  fully qualified job name.

                  *ACTIVE  may be specified if  the job is still active.
                  The QPJOBLOG spooled file  must exist which means  the
                  job  must have  run the  DSPJOBLOG system  command and
                  specified   OUTPUT(*PRINT).    The   last  version  of
                  QPJOBLOG will be displayed.

                  *OUTQ may be  specified if the  job has completed  and
                  the job log is in an output queue.

    JOBLOGPLIB    The   library  for   the  JOBLOGP   file  created   by
                  CVTJOBLOG.  QTEMP is the default.

                  A  specific library may  be named if  you have already
                  done  CVTJOBLOG  to  create   a  JOBLOGP  file  in   a
                  specific library.

                  The intent  of  this function  is to  allow large  job
                  logs which  may need to be reviewed  multiple times to
                  have the conversion done once.

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

 DSPJOBLOG5  uses the  CVTJOBLOG TAA Tool  which operates  only on upper
 and lower case English.

 CVTJOBLOG also  uses CPYSPLF  which  prevents some  spooled files  from
 being copied  such as  those with ASCII  data.  The  restrictions would
 be rare in a job log spooled file.

 Because  there is no  foolproof method of determining  the actual error
 that caused the  job to  fail, DSPJOBLOG5 must  make assumptions  based
 on the messages found.

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

 The following TAA Tools must be on your system:

      ADJVAR          Adjust variable
      CVTDAT          Convert date
      CVTTIM          Convert time
      CVTJOBLOG       Convert job log
      CVTSPLNBR       Convert spool number
      DSPDUPJOB       Display duplicate job
      FILEFDBCK       File feedback
      HLRMVMSG        HLL Remove message
      RTVJOBSTS       Retrieve job status
      RTVSYSVAL3      Retrieve system value 3
      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
    ------        ----    ---------      ----------    ----------

    DSPJOBLOG5    *CMD                   TAALOGI       QATTCMD
    TAALOGIC      *PGM       CLP         TAALOGIC      QATTCL
    TAALOGIR      *PGM       RPG         TAALOGIR      QATTRPG
    TAALOGIR2     *PGM       RPG         TAALOGIR2     QATTRPG
    TAALOGIR3     *PGM       RPG         TAALOGIR3     QATTRPG
    TAALOGIR4     *PGM       RPG         TAALOGIR3     QATTRPG
    TAALOGID      *FILE      DSPF        TAALOGID      QATTDDS

Added to TAA Productivity Tools September 15, 2006


Home Page

Powered by AS/400Powered by AS/400 Last modified on July 15, 2010 © 1995, 2010 - Jim Sloan, Inc.