TAA Tools
CVTJOBLOG       CONVERT JOB LOG                        TAALOGD

The Convert  Job Log command  converts a  job log to  an outfile.   The
system DSPJOBLOG  command provides a  similar function, but  is limited
to  operating on the current job  and produces an outfile with variable
length fields.   CVTJOBLOG works  on any  job log and  produces a  file
that can be read by a normal RPG program.

The  outfile is  always  named JOBLOGP  in  a specified  library.   The
model file is TAALOGDP with a format name of JOBLOG.

You  must  have  *JOBCTL  special  authority  to  use  CVTJOBLOG for  a
spooled file other than your own.

A typical command would be:

             CVTJOBLOG   JOB(xxx) OUTLIB(yyy)

The JOBLOGP file would be  created in the named  file.  If the job  log
file did  not exist, a temporary  one would be created  using DSPJOBLOG
and then deleted at the end of the command.

At least  one record would be written for  each message.  Most messages
require multiple records.  The JGRCDT  field has a 'P' for the  primary
record and an  'O' for each overflow  record.  All records  contain the
standard information  such as job name, message  ID, message type, etc.

The  JGMSGL field contains  the text of  the message.   Each record has
one line of text from the job log.

Only the  lower and  upper case English  language versions  of the  job
log  are supported.   If  the printed  format changes,  the  program to
read the printed output may have to be changed.

Saving - Restoring - Reprinting
-------------------------------

CVTJOBLOG  provides a method of  converting the job log  to a data base
file/member so  that the  file  may be  saved and  restored.   You  may
re-print  the  information  from  the job  log  by  using  the  command
DSPJOBLOG2.

Completion code field in outfile
--------------------------------

The  JGCMPC field in  the outfile is  the job completion  code from the
CPF1164 message if  it can be  determined.  The  value does not  appear
in the  first CPF1164  record written  to the JOBLOGP  file, but  every
CPF1164 record written after.

Because the  program is converting job log spooled  records as they are
read,  the completion code is  not known until the  3rd line of the job
log  CPF1164  information.    The  completion  code  is  determined  by
scanning the text  (either upper or lower case  English) for the string
'end code'.

If  the completion code cannot be determined,  the field will be blank.

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

   JOB           The qualified name  of the  job log  to be  converted.
                 The  default  is  *  meaning the  current  job.    The
                 spooled file must be named QPJOBLOG.

   OUTLIB        The  library   in  which  the  file  JOBLOGP  will  be
                 placed.  The default  is *LIBL.   If the JOBLOGP  file
                 does not already exist, a library must be named.

   OUTMBR        The member  of the JOBLOGP  file to be  used.  If  the
                 member does  not exist, it  is added.   The default is
                 JOBLOGP.

                 The  special  value *JOB  may be  entered to  create a
                 member by the  name of JOBnnnnnn  where nnnnnn is  the
                 job number assigned to the job.

   REPLACE       A  *YES/*NO value  for  whether the  member should  be
                 cleared  before writing records into  it.  The default
                 is *YES.

                 *NO  will  add  records  to  the  same  file.     Your
                 processing function  must recognize that  multiple job
                 logs exist.

   SPLNBR        The  spooled file number.   The default is *.   If the
                 job is  active,  *  causes DSPJOBLOG  to  be  used  to
                 create a temporary  job log for use with  the command.
                 At the end of the command, the job log is deleted.

                 If  the job is  not active, the  last job log  for the
                 job  is used if it  exists.  If it  does not exist, an
                 error occurs.

                 The  other  values   (*LAST,  *ONLY,  or  a   specific
                 number) have the same definition as on CPYSPLF.

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

Only  the lower and  upper case  English language  versions of  the job
log  are supported.    If the  printed format  changes, the  program to
read the printed output may have to be changed.

Unit of work information is bypassed.

*JOBLOG special  authority is  required to  read a  spooled file  other
than your own.

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

The following TAA Tools must be on your system:

     CVTDAT          Convert date
     CVTSPLNBR       Convert spooled file number
     EDTVAR          Edit variable
     RTVJOBSTS       Retrieve job status
     SNDCOMPMSG      Send completion 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
   ------        ----    ---------      ----------    ----------

   CVTJOBLOG     *CMD                   TAALOGD       QATTCMD
   TAALOGDC      *PGM       CLP         TAALOGDC      QATTCL
   TAALOGDR      *PGM       RPG         TAALOGDR      QATTRPG
   TAALOGDP      *FILE      PF          TAALOGDP      QATTDDS
					

Added to TAA Productivity tools May 1, 1998


Home Page Up to Top