JOBACG          JOB ACCOUNTING                         TAAACGB

 The Job  Accounting tool  is a  series of  commands that  let you  work
 with  the job  accounting entries from  the QACGJRN  journal.   You may
 either  display  the entries  using several  different access  paths or
 print the entries  using different  selection and sequencing  criteria.
 Job  accounting entries  from multiple  systems  may be  stored in  the
 same data base.

 Trying it out
 -------------

 There  are a lot  of things you  can consider with  Job Accounting, but
 if you just want to try it out, do the following:

   **   Create a journal receiver:

               CRTJRNRCV    JRNRCV(QGPL/ACG00001)
                              TEXT('Accounting receiver')

   **   Create a journal  (it must have  the name QACGJRN  and exist  in
        QSYS):

               CRTJRN       JRN(QSYS/QACGJRN)
                              JRNRCV(QGPL/ACG00001)
                              TEXT('Accounting journal')

   **   Use  WRKSYSVAL SYSVAL(QACGLVL).   Use  the Change  option.   The
        value should at least include *JOB.

   **   Create  the files  needed for  the JOBACG tool  in a  library of
        your choice:

             CRTJOBACG   JOBACGLIB(xxx)

   **   Let several new jobs complete  before converting the entries  in
        the next step.

   **   Convert the QACGJRN entries  to the JOBACG files in  the library
        you specified.

              CVTJOBACG   JOBACGLIB(xxx)

   **   Display the entries with the command

              DSPJOBACG   JOBACGLIB(xxx)

   **   Analyze the entries with the command

              ANZJOBACG   JOBACGLIB(xxx)

 More on Job Accounting
 ----------------------

 It is  not necessary to use  job accounting codes to  gain the benefits
 of  the job accounting tool.   You may display the  entries by date, by
 job,  or  by  user without  using  job  accounting  codes.    You  must
 however, have the Job Accounting journal in existence.

 A separate tool (PRTACG) exists to handle print accounting entries.

 The  QACGJRN journal  entries must  be converted  to a  data  base file
 before  the display or print  functions may be used.   Special commands
 exist to create the required  data base files and convert the  journal.

 Additional  tools you  may want  to consider  are DSPACGRCD,  DSPACGSGN
 and CVTJOBACG3.

 Creating the Job Accounting Journal
 -----------------------------------

 If  you  have  not  already  created  the  Job Accounting  journal  and
 specified the  QACGLVL system  value,  do the  following steps  as  the
 Security Officer (the  library QGPL is  used for the  Journal receiver,
 but any user library may be used):

   **   Create a journal receiver:

               CRTJRNRCV    JRNRCV(QGPL/ACG00001)
                              TEXT('Accounting receiver')

        The  Job  Accounting  tool does  not  require  a special  naming
        convention  for the  journal receivers.   However,  a convention
        such as ACG00001 is recommended.

   **   Create a journal  (it must  have the name  QACGJRN and exist  in
        QSYS):

               CRTJRN       JRN(QSYS/QACGJRN)
                              JRNRCV(QGPL/ACG00001)
                              TEXT('Accounting journal')

   **   Use  WRKSYSVAL SYSVAL(QACGLVL).   Use  the Change  option.   The
        value should at least include *JOB.

 Creating the required data base files
 -------------------------------------

 The  CRTJOBACG command creates  the files used by  the JOBACG function.
 A typical command would be:

             CRTJOBACG   JOBACGLIB(xxx)

 You can have multiple  sets of job accounting  files, but only one  set
 per library.  A  single physical file JOBACGP is  created and 5 logical
 files.

 The  default for public  access is *USE  on CRTJOBACG.   You may change
 this to *EXCLUDE or *LIBCRTAUT.

 If you have created  the required files and  then wish to delete  them,
 the special command DLTJOBACG should be used.

 Converting the journal entries
 ------------------------------

 You need to convert  the journal entries to the data  base files before
 displaying or  printing them.  There are two  methods of converting the
 accounting entries:

   **   CVTJOBACG  command which is  part of the JOBACG  tool is a batch
        like function which would be used periodically.

   **   CVTJOBACG3  command  which  is  part  of   the  CVTJOBACG3  tool
        provides  a  solution  for  continuous  conversion  by  using  a
        program  which waits for entries to arrive  on the journal.  See
        the discussion with the CVTJOBACG3 tool.

 The following discussion refers to the CVTJOBACG command.

 To convert the QACGJRN entries from your own system specify:

              CVTJOBACG   JOBACGLIB(xxx)

 CVTJOBACG should  be  specified on  a regular  basis  such as  once  or
 twice a day.  If  you have a 'start of day' or  'end of day' procedure,
 CVTJOBACG  could be included or  as a 'time  dependent scheduling' job.
 If you change  the Job Accounting  journal receiver at  the end of  the
 day, you should follow this process with a CVTJOBACG command.

 An option  exists on CVTJOBACG  to allow a  new journal receiver  to be
 generated.   You may use  this option on  CVTJOBACG and then  a command
 like  the TAA  Tool MTNJRN  to delete  the old  receivers.  If  you use
 both JOBACG  and  PRTACG,  you will  want  to  use both  CVTJOBACG  and
 CVTPRTACG before deleting the old receivers.

 CVTJOBACG  has  the  smarts  to  determine  the  last  entry  that  was
 converted  for the  current system  and will  only convert  the journal
 entries that have occurred  after that point.   Therefore, you may  run
 CVTJOBACG  whenever required  to  convert the  current entries  without
 concerning yourself about duplicating the entries.

 The  process that CVTJOBACG  uses is to  determine the last  entry that
 was converted previously.   The journal  receiver containing the  entry
 will be  converted to a  data base  file and read.   Conversion to  the
 Job  Accounting file does  not start until  entries which do  not exist
 in   the  Job  Accounting  file  are  read.    Therefore,  to  minimize
 conversion  of  the  journal  receivers  during  your  regular  use  of
 CVTJOBACG,  you   should  switch  to   a  new  receiver   before  using
 CVTJOBACG.   This  causes both the  old and  new receivers  to be read.
 Once the entries  from the old  receiver have been  converted, the  old
 receiver will never be converted again.

 In V5R3,  the system CRTJRN  command changed the  default of  MNGRCV to
 *SYSTEM.   This means  the system will  change the journal  receiver at
 each IPL and reset the sequence number to 1 for the new receiver.

 The Job  Accounting  tool  was also  changed  in  V5R3 so  that  it  is
 tolerant of a reset in sequence numbers.

 Note  that  neither DSPJOBACG,  ANZJOBACG,  PRTJOBACG,  nor  PRTJOBACG3
 convert the  journal.  The information  will only be as  current as the
 last use of CVTJOBACG.

 You  must periodically clean out old  entries from the data base files.
 A special command  MTNJOBACG is  provided for this  function.  See  the
 later discussion.

 A  special command CVTJOBACG2  is used  for converting  journal entries
 from other  systems that you want to store in  the same data base.  See
 the later discussion of CVTJOBACG2.

 Displaying the entries
 ----------------------

 The DSPJOBACG  command is  used to  display the  accounting  data in  a
 subfile.  There are two approaches in the use of the command:

   **   Using  the  defaults  (no   selection  criteria)  to  begin  the
        display  with  the  first  job of  the  current  day.   Use  the
        'position to' and F9  key to limit  and resequence the  display.

   **   Specifying selection  criteria to  determine what is  displayed.

 Both approaches may  be used, but it is  generally advisable to not use
 both on the same use of the DSPJOBACG command.

 There  will be will be one journal entry  for each job completed on the
 system  (more  entries may  exist  if  you  use  CHGACGCDE  during  job
 processing).

 Journal  entries have  a  common  set of  standard  fields followed  by
 variable  information termed  'entry data'.   Each journal  entry has a
 one byte  journal code  and a  2 byte  journal entry  type.   Different
 journal codes  may appear  in the  QACGJRN journal,  but you will  only
 see  the 'A'  codes which  are  the 'accounting  entries' and  the 'JB'
 journal entry  types  which are  the  job summary  entries  (See  later
 discussion of Job Accounting Segments caused by CHGACGCDE).

 The F6 key is also  supported to allow you to prompt  for the PRTJOBACG
 command.

 The  DSPACGRCD tool allows  you to  display the  last record for  a job
 name.  See the discussion with the DSPACGRCD tool.

 Using the DSPJOBACG defaults
 ----------------------------

 The  command would be  entered without any  of the selection parameters
 specified using the default STRDATE(*CURRENT):

              DSPJOBACG   JOBACGLIB(xxx)

 A subfile is displayed with  the first record that matches  the current
 date.   The 'job  end date' in  the accounting record  is used  for the
 comparison.   If no record  matches the current  date, the first record
 prior is displayed.  You may  use the 'position to' values to  position
 to a  prior date  and time.   You  may use  the F9  key to  request the
 prompt  that changes the sequence  in which the  records are displayed.

 Using the DSPJOBACG selection parameters
 ----------------------------------------

 DSPJOBACG supports  several  parameters to  allow  you to  select  what
 will appear in  the subfile.  If  you use the selection  criteria, only
 the  accounting records which  are selected  will appear  regardless of
 the  use  of the  'position  to' values  or the  F9  key to  change the
 access path being used.

 A typical  command would  be to display  all accounting  records for  a
 specific job name between a date range such as:

              DSPJOBACG   JOBACGLIB(xxx) STRDATE(yymmdd)
                            ENDDATE(yymmdd) JOB(xxxxx)

 Some selection  options may  be used, but  the information can  only be
 seen  on the detail display.  For  example, you may specify the minimum
 'number of transactions' and  the jobs that meet  the criteria will  be
 displayed  in  the subfile.    However,  the 'number  of  transactions'
 information can only be seen on the detail display.

 Analyzing the entries (ANZJOBACG)
 ---------------------------------

 The  ANZJOBACG  command should  be  used instead  of  the  old versions
 PRTJOBACG and PRTJOBACG3 which are still included in the tool.

 ANZJOBACG defaults  to  display  a  listing of  the  entries  you  have
 selected.  A  variety of sequencing  and selection options exist.   The
 basic  listing   is  one  line  per  data   base  record.    Additional
 information  may  be  listed  on  additional  lines  using  the  EXTPRT
 parameter.   This  includes print  information such  as  how may  pages
 were output  by the program,  but it is  not known whether  the spooled
 file was actually printed to hard copy.

 A  typical command to list  job accounting entries  for a specific user
 in job start time sequence would be:

              ANZJOBACG   SEQBY(*STRDATTIM) USRPRF(xxx)

 Printing the entries (PRTJOBACG and PRTJOBACG3)
 -----------------------------------------------

 The Print  Job  Accounting command  allows  you  to print  the  entries
 using different selection  and sequencing.  For example,  if you wanted
 to  print in order by  user name for  a specific entry  type, you would
 specify:

              PRTJOBACG   SEQ(*USER) JOBACGLIB(xxx)

 SEQ(*USER2) outputs  the  same  listing  with  totals  for  each  user.
 SEQ(*USER3) outputs only the summary lines for each user.

 The command uses  OPNQRYF to select  and sequence the records  and then
 prints the records in a standard format.

 There is  not enough room to  print all of the  possible information in
 a  single line of print.   By default, a fixed  set of fields prints on
 a single line.  Two options exist to change the printing:

   **   AVGRSP(*YES)  may  be   specified  to  substitute   the  Average
        Response  time for the  Auxiliary I/O  field.   AVGRSP(*YES) may
        only  be  specified  when  requesting  all  job  types  or  just
        interactive job types.

   **   EXTPRT(*YES) may  be  specified  to  print  multiple  lines  per
        accounting entry.

 The PRTJOBACG3  command is  similar.   It provides  a simple method  of
 finding the jobs by completion code.

 Maintaining the Job Accounting files
 ------------------------------------

 The  CVTJOBACG command converts  entries into the  job accounting file.
 A separate command MTNJOBACG is used to delete entries.

 You  would  typically   run  MTNJOBACG  periodically   based  on   your
 retention period of Job  Accounting entries.  The command  supports the
 RTNDAYS  parameter which allows  you to  name your retention  period in
 days.

 A typical command would be:

              MTNJOBACG    RTNDAYS(30) JOBACGLIB(xxx)

 This  would  remove all  the  entries that  are  30 days  prior  to the
 current date.

 Swapping a user profile
 -----------------------

 The system program  QWTSETP allows a  swap of a  user profile during  a
 job (see also the simple front end TAA Tool SWPUSRPRF).

 The system job  accounting function is not informed  of a profile swap.
 The  user profile  of the  job is still  considered for  job accounting
 purposes and not the current user.

 Comparison with the Print Accounting tool
 -----------------------------------------

 The Job  Accounting  entry will  contain  summary information  for  the
 number of  print files, pages and  lines written.  This  information is
 based on  what the program does and does  not consider whether any hard
 copy print actually occurred.

 Print Accounting  has  the hard  copy  information.   The  system  will
 generate one journal entry  for every file that is  actually printed to
 hard  copy  either from  a  spooled  file or  directly  printed from  a
 program.

 PRTJOBQTIM Tool
 ---------------

 The  PRTJOBQTIM  tool will  allow an  analysis of  the time  that batch
 jobs have spent on a job queue waiting to go active.

 Locking considerations
 ----------------------

 CVTJOBACG and CVTJOBACG2 require *SHRNUP locks on the JOBACGP file.

 MTNJOBACG requires  an *EXCL  lock  on the  JOBACGP file  (the file  is
 cleared as part of the processing).

 Writing your own programs against the JOBACG files
 --------------------------------------------------

 The PRTJOBACG  and PRTJOBACG3 commands  provide basic listings  and are
 limited to printing the entries from a single system.

 You  may write your own  programs or queries against  the JOBACGP file.
 It is an  externally described file  in arrival sequence.   The  format
 name is ACGRCDR.

 Job Accounting Segments
 -----------------------

 When  Job Accounting  is active,  the  system writes  a job  accounting
 journal  entry at  the  end of  every  job.   A journal  entry  is also
 written whenever CHGACGCDE  is used.   The  intent of  CHGACGCDE is  to
 allow for  different segments of  a job to  be considered in  different
 accounting codes.

 The  Job  Accounting  tool  does  not  do any  special  processing  for
 segments.   It  considers each  journal entry  separately and  does not
 attempt to summarize the entries for a job.

 Converting journal entries from other systems
 ---------------------------------------------

 The JOBACG tool lets  you have a single  data base with job  accounting
 entries from  one or more  systems.  The  high order key field  for all
 logical files is the system name.

 Or  you may want to  use JOBACG for multiple  systems, but would rather
 have unique files for each  system (this would require one library  for
 each system).

 The  steps described  are the  same whether  you have  one or  multiple
 sets of files.

 In  the  following  discussion,  the  term  'master system'  means  the
 system where JOBACG will  be run.  The  term 'remote system' means  the
 system that  is only capturing  job accounting  entries, but not  using
 the JOBACG tool.

 The  CVTJOBACG command is  used to  convert the Job  Accounting entries
 from the master system.

 The  special  command CVTJOBACG2  is  used to  convert  journal entries
 from  the remote  systems.    CVTJOBACG2  must  be run  on  the  master
 system.   The remote system  must do DSPJRN  to get the  Job Accounting
 journal  entries into a data base file  that can be used by CVTJOBACG2.

 Do the following steps:

   **   Use DSPJRN on  the remote system to  convert the Job  Accounting
        journal entries  to a data  base file.  A  good time to  do this
        would be  just after converting to a  new journal receiver.  You
        do not  have to  concern yourself  with ensuring  that the  same
        entry  will only  be  converted once  from  the journal.    When
        CVTJOBACG2  is  run, it  will  bypass any  journal  entries that
        already exist in the JOBACG data base files.

        When  DSPJRN  is used,  you  must specify  OUTFILFMT(*TYPE4) and
        ENTDTALEN(*CALC).  A typical command would be:

             DSPJRN    JRN(QACGJRN) RCVRNG(*CURCHAIN) OUTPUT(*OUTFILE)
                         OUTFILFMT(*TYPE4) OUTFILE(xxx/DSPJRNP)
                         ENTDTALEN(*CALC)

   **   You would then transfer  the DSPJRNP file to the  master system.

   **   Then  run  the  CVTJOBACG2  command  on the  master  system  and
        specify  a system name: You must ensure  that the date format of
        the job that  ran DSPJRN is the  same as the  job that will  run
        CVTJOBACG2.

              CVTJOBACG2    JRNOUTF(DSPJRNP) SYSTEM(sss) JOBACGLIB(xxx)

 The system  name is needed  because the *TYPE4  format is used  for the
 journal outfile which does not contain the system name.

 The  job accounting  information is  then available  to be  reviewed or
 printed.

 Security discussion
 -------------------

 To work with  the Job Accounting  journal, the user  must have  *ALLOBJ
 authority.   JOBACG provides a  method where a  system operator may  be
 authorized to perform the CVTJOBACG function.

 This  occurs by use  of the  TAAJOBACG authorization list  which allows
 an  authorized user  to the  list to  use CVTJOBACG.   CVTJOBACG adopts
 the Security  Officers profile  during the conversion  of the  entries.
 A  user  who has  *USE  authority to  the  authorization  list may  use
 CVTJOBACG to any set of job accounting files.

 The  user authorized to the TAAJOBACG  authorization list does not have
 the automatic right to use DSPJOBACG, PRTJOBACG, and PRTJOBACG3.

 The user who uses  CRTJOBACG becomes the owner  of the data base  files
 that  are  created.   To  minimize  exposures,  you must  have  *ALLOBJ
 special  authority to  use  CRTJOBACG.   The JOBACGP  physical  file is
 created as AUT(*USE).  This prevents  any other user from changing  the
 data in the file  by default (access to the logical  files is *PUBLIC).
 Allowing *USE  means that any  user may use the  functions of DSPJOBACG
 or the DSPACGRCD tool.

 The  MTNJOBACG command  deletes old  entries in  the JOBACGP file.   To
 run the command, the user  must have *ALL authorization to  the JOBACGP
 file.

 The CVTJOBACG2  command adds  records to the  JOBACGP file  from remote
 systems.   A user with *ALLOBJ authority  on the remote system must use
 DSPJRN to  convert the QACGJRN  journal entries  to a  data base  file.
 The file is  then placed on the  master system.  To  run the CVTJOBACG2
 command,  the user  must be authorized  to the  TAAJOBACG authorization
 list.

 To summarize the security:

        CRTJOBACG      *ALLOBJ authority
        CVTJOBACG      *USE to TAAJOBACG authorization list
        CVTJOBACG2     *USE to TAAJOBACG authorization list
        MTNJOBACG      *ALL authority to JOBACGP file
        DLTJOBACG      *ALL authority to JOBACGP file
        DSPJOBACG      *USE authority to JOBACGP file
        PRTJOBACG      *USE authority to JOBACGP file
        PRTJOBACG3     *USE authority to JOBACGP file


 Resetting the journal sequence number
 -------------------------------------

 In V5R3, the  system change to  the CRTJRN command using  a default  of
 MNGRCV(*SYSTEM) causes  the system to  change the  receiver at IPL  and
 restart the sequence number.

 The job  accounting tool was  changed to be  tolerant of this.   You do
 not  have to  clear the  job accounting files  if either  the system or
 you reset the sequence numbers.

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

    JOBACGLIB     The  name of  the  library  where the  Job  Accounting
                  files will  be created.  The physical  file JOBACGP is
                  created along with several logical files.

    SRCLIB        The  source  library  to  use  for  the  QATTDDS  file
                  source.  The  default is *TAAARC.   If a full  license
                  exists, the source  is used from the TAA  Archive.  If
                  a  demonstration license  exists,  the source  is used
                  from the QATTDDS file in the TAATOOL library.

                  A specific user library may  be named, but the  source
                  file must be QATTDDS.

    AUT           The authority  to the  JOBACGP file.   The default  is
                  *USE  which allows any  user to  use DSPJOBACG  or the
                  DSPACGRCD  tool.   *LIBCRTAUT  or *EXCLUDE  could also
                  be entered.


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

    RMVALLLFM     A *YES/*NO  parameter  for  whether the  logical  file
                  members  should be removed  before the  update program
                  runs   and  then  added   back  after.     This  is  a
                  performance  option.    It  is  generally  faster   to
                  remove the members  and then add them back  if a large
                  percentage of records will be added to the file.

                  *NO is  the default which should be  used when a small
                  percentage of records are added.

                  *YES should be  specified to  improve the  performance
                  when adding a large percentage of records.

    GENNEWRCV     Whether to  generate a new  journal receiver.   *NO is
                  the default.

                  *YES may  be specified to cause the  CHGJRN command to
                  occur with JRNRCV(*GEN).

    JOBACGLIB     The  name  of  the library  where  the  Job Accounting
                  files exist.    The default  is  *LIBL.   *CURLIB  may
                  also be used.

    FIRSTENTRY    The  first entry  to  be converted.    The default  is
                  *LASTENTRY  meaning  to  begin  from  the  last  entry
                  converted.   If  this  entry  does not  exist  in  the
                  journal, an  error will  occur.   For example, if  you
                  deleted  a  receiver without  converting  the entries,
                  the last  entry  will  not exist  and  an  error  will
                  occur.    You  can  bypass  the  error  by  specifying
                  *FIRST.

                  *FIRST  causes  all  entries  in  the  journal  to  be
                  output  from DSPJRN.  Only  those entries which do not
                  exist in the JOBACGP file will be converted.


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

    JOBACGLIB     The name  of  the  library where  the  Job  Accounting
                  files  exist.   The  default is  *LIBL.   *CURLIB  may
                  also be used.

    STRDATE       The  job start date  to start the first  display.  The
                  date is compared  against the  'job end  date' in  the
                  accounting record  (not the  'job start date'  nor the
                  'date  the job entered  the system').   The default is
                  *CURRENT which  means the  current  day.   A  specific
                  date may be entered in YYMMDD format.

                  If a record does  not exist for the date  entered, the
                  previous record is displayed.

                  If  *CURRENT is used,  the STRDATE and  STRTIME values
                  are  used as  'position to'  values in  the data base.
                  They   are   not   used   as   'selection   criteria'.
                  Therefore,   when   the   subfile  is   displayed,   a
                  'position  to' date may  be entered  to re-position to
                  an earlier date and time.

                  The  other  selection  parameters  (including  ENDDATE
                  and ENDTIME)  prevent records from being  displayed in
                  the  subfile  regardless of  where  the  'position to'
                  values are set.

                  STRDATE(*START) may  be  used  to  start  the  display
                  with the first  record (oldest job end date)  found in
                  the file.

                  If a  specific date is entered for  STRDATE, the value
                  (and  STRTIME) are considered  as 'selection criteria'
                  and 're-positioning'  prior  to  the date  entered  on
                  the command  will not cause any  additional records to
                  be displayed.

    STRTIME       The  start  time of  the jobs  to  be selected.   This
                  value  is  used   in  conjunction   with  STRDATE   to
                  determine what  accounting records  are selected.   If
                  the  accounting record 'job end  date' matches the the
                  STRDATE  value,  the   STRTIME  value   is  used   for
                  selection.  A  specific time may be entered  in HHMMSS
                  format.

                  For  example, if  you want  all  jobs for  the current
                  day  that fall between 10:00:00  and 11:00:00 take the
                  defaults    for     STRDATE/ENDDATE    and     specify
                  STRTIME(100000) and ENDTIME(110000).

                  If  you  want  all  jobs from  05/10/09  beginning  at
                  18:00:00  and ending  on 05/11/09 at  06:00:00 specify
                  STRDATE(051009)  STRTIME(180000)  ENDDATE(051109)  and
                  ENDTIME(060000).

    ENDDATE       The  job  end  date  to be  included.    The  date  is
                  compared  against  the 'job  end date'  (not  the 'job
                  start  date'  nor  the  'date  the  job  entered   the
                  system').   The default  is *CURRENT  which means  the
                  current  day.    A specific  date  may  be entered  in
                  YYMMDD format.

    ENDTIME       The  end time of  the job to be  selected.  This value
                  is  used in  conjunction  with  ENDDATE  to  determine
                  what  jobs are selected.   The  default is  *END which
                  means   all  jobs   of  the   ENDDATE  day   would  be
                  considered.

                  If the accounting  record 'job  end date' matches  the
                  the  ENDDATE value,  the  ENDTIME  value is  used  for
                  selection.   A specific time may  be entered in HHMMSS
                  format.

    SYSTEM        The system  name  to  be selected.    The  default  is
                  *CURRENT for the current system name.

                  A specific system name may be entered.

    JOB           The job  name to  be selected.   The  default is  *ALL
                  for all job names.

                  A specific job name may be entered.

    USER          The  user profile name  to be  selected.   The default
                  is *ALL for all user names.

                  A specific user name may be entered.

    JOBNBR        The  job number to  be selected.   The default is *ALL
                  for all job numbers.

                  A specific job number may be entered.

    ACGCDE        The accounting code  to be selected.   The default  is
                  *ALL for all accounting codes (or blanks).

                  A specific accounting code may be entered.

    JOBTYP        The  job type  to be  selected.   The default  is *ALL
                  for all job types.

                  A specific job type may be entered of the following:

                               B  =  Batch
                               A  =  Autostart
                               I  =  Interactive
                               M  =  Subsystem monitor
                               R  =  Spool reader
                               S  =  System job
                               W  =  Spool writer
                               X  =  Start CPF

    COMPCODE      The  completion code to  be selected.   The default is
                  *ALL for all completion codes.

                  A specific  completion  code  may  be  entered.    The
                  completion  codes   are  described   in  the   CPF1164
                  message.   For  example,  00 =  Normal, and  20  = Job
                  exceeded   the   End   Severity   (typical    abnormal
                  termination).

    CPUSECS       The number of CPU  seconds used by the job.   The jobs
                  CPU  seconds must  be  GE than  the  number specified.
                  The   default  is  0  which  allows  all  jobs  to  be
                  considered.

                  A specific number  of seconds may  be entered such  as
                  100 or 5.125.

    NBRTRANS      The  number of  transactions used  by the  job.   This
                  applies  only to interactive  jobs (JOBTYP =  I).  The
                  number of  transactions  must be  GE than  the  number
                  specified.   The default  is 0  which allows  all jobs
                  to be considered.

                  A specific number of transactions may be entered.

    AVGRESP       The  average  response time  in seconds  for  the job.
                  This applies only  to interactive jobs  (JOBTYP =  I).
                  The average response  time must be GE than  the number
                  specified.   The default  is 0  which allows  all jobs
                  to be considered.

                  A  specific average response time  may be entered such
                  as 2 (2 seconds) or 1.75 (1.75 seconds).


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

    RTNDAYS       The  number  of days  of  Job  Accounting  entries  to
                  retain.    The default  is  30  meaning  that any  Job
                  Accounting  entries with a  date prior to  30 days ago
                  will be deleted from the file.

    JOBACGLIB     The name  of  the  library where  the  Job  Accounting
                  files  exist.   The  default is  *LIBL.   *CURLIB  may
                  also be used.


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

    STRDATE       The  start date to  be used.   The default  is *TODAY.
                  If a date is entered, it must be in job format.

                  *FIRST may be  entered to  use the date  of the  first
                  job found.

    ENDDATE       The end  date to  be entered.   The  default is  *LAST
                  which  means  the  last journal  entry  found.   If  a
                  specific  date is  needed, it  must be  entered in job
                  format.

    SYSTEM        The system to print  the entries for.  The  default is
                  *CURRENT  meaning  the  current   system.    Only  the
                  entries from a single system may be printed.

    USER          Whether  to print only  a specific user.   The default
                  is *ALL for all  users.  A  specific user name may  be
                  entered.

                  Depending  on the  USRTYP  parameter,  either the  job
                  user   or    the   current   user   is   used.      If
                  USRTYP(*CURUSR) is  entered, all  other references  to
                  'user' refer to the current user of the job.

    USRTYP        The type of user  to be used.  *JOBTYP  is the default
                  meaning  the  user name  in  the  fully qualified  job
                  name.

                  *CURUSR  may be  entered to  mean the  current user of
                  the job.

    JOBTYP        The job  type to be  selected.   *ALL is the  default.
                  The    following   are    supported:   *BATCH,    *INT
                  (interactive),   *SBSMON  (subsystem  monitor),  *AUTO
                  (auto  start   job),  *SPLRDR   (spool  reader),   and
                  *SPLWTR (spool writer).

    SEQ           The sequence of  the report.  The  default is *STRDATE
                  meaning the oldest date is printed first.

                  *USER will  sequence the report by  user with a detail
                  line per job.

                  *USER2  will  sequence  the  report  by  user  with  a
                  detail line per job and a summary for each user.

                  *USER3 will  sequence the report  by user with  only a
                  summary line for each user.

                  *CPU  will  sequence the  jobs  by the  amount  of CPU
                  used  with  the  job  with  the  highest  amount  used
                  first.

                  *TRANS  will  sequence  the  jobs  by  the  number  of
                  transactions  entered.    The  job  with  the  highest
                  number  is  shown first.   Jobs  with  no transactions
                  (e.g.  batch) are excluded.

                  *ACGCDE will  sequence  the  jobs  by  the  Accounting
                  Code  assigned to  the job.   This  causes a  slightly
                  different  format than the  other SEQ  values.  Totals
                  are provided for  each Accounting  Code.   EXTPRT(*NO)
                  must be specified.

                  *ACGCDE2  will sequence  the  jobs by  the  Accounting
                  Code  assigned to  the job  and  provide a  total only
                  for   each  Accounting  Code.    EXTPRT(*NO)  must  be
                  specified.

    AVGRSP        A *YES/*NO value that  defaults to *NO which  causes a
                  column  to  print  for   Auxiliary  I/O  usage.    The
                  average response time does not print.

                  *YES  may be  entered to cause  a column  to print for
                  average   response   time.      The   Auxiliary    I/O
                  information does not print.

    EXTPRT        A  *YES/*NO  value   that  defaults  to  *NO   for  an
                  extended   print  option.     Specifying  *YES  causes
                  multiple  lines   to  be   printed  per   job.     The
                  additional  information   includes  start   date/time,
                  active  and  suspended  time,  data base  writes,  and
                  data base updates/deletes.

    SELTRANS      Select  on the  number of  transactions.   The default
                  is 0.

    SELCPU        Select on the amount of  CPU.  The default is 0.   The
                  value  should be  entered  in seconds  such  as 12  or
                  seconds and hundredths of seconds such as 1.05.

    SELAVGRSP     Select  on the average response time.   The default is
                  0.  The value should  be entered in seconds such as  2
                  or seconds and  hundredths such as 2.14.   The average
                  response  time   does  not  print  if  AVGRSP(*NO)  is
                  specified.

    SELPRTLIN     Select on the number of  print lines.  The default  is
                  0.

    SELDBRDS      Select  on  the  number  of  data  base  reads.    The
                  default is 0.

    SELAUXIO      Select  on the  number  auxiliary I/O  requests.   The
                  default  is 0.   The number of  auxiliary I/O requests
                  does not print unless AVGRSP(*NO) is specified.

    SELJOBTIM     Select on the  amount of job  time (wall clock  time).
                  The  default is  0.   The value  should be  entered in
                  minutes  such  as 35  or  minutes and  tenths  such as
                  35.3.

    JOBACGLIB     The name  of  the  library where  the  Job  Accounting
                  files  exist.   The  default is  *LIBL.   *CURLIB  may
                  also be used.


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

    STRDATE       The  start date to  be used.   The default  is *TODAY.
                  If a date is entered, it must be in job format.

                  *FIRST may be  entered to  use the date  of the  first
                  job found.

    ENDDATE       The end  date to  be entered.   The  default is  *LAST
                  which  means  the  last journal  entry  found.   If  a
                  specific  date is  needed, it  must be  entered in job
                  format.

    SYSTEM        The system to print  the entries for.  The  default is
                  *CURRENT  meaning  the  current   system.    Only  the
                  entries from a single system may be printed.

    USER          Whether  to print only  a specific user.   The default
                  is *ALL for all  users.  A  specific user name may  be
                  entered.

    JOBTYP        The job  type to  be selected.   *ALL is  the default.
                  The    following   are    supported:    *BATCH,   *INT
                  (interactive),  *SBSMON  (subsystem  monitor),   *AUTO
                  (auto  start   job),  *SPLRDR   (spool  reader),   and
                  *SPLWTR (spool writer).

    SEQ           The sequence  of the report.  The  default is *STRDATE
                  meaning the oldest date is printed first.

                  *USER  can be entered to  sequence the report by user.

    COMPCODE      The completion code to  select.  The default  is *ALL.
                  A 2 digit  code may be entered in  the range of 00-99.

    JOBACGLIB     The  name  of  the library  where  the  Job Accounting
                  files exist.    The default  is  *LIBL.   *CURLIB  may
                  also be used.

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

    SEQBY         How to sequence the output.

                   *STRDATTIM is the default for job start date/time
                   *ENDDATTIM - by job end date/time
                   *USER      - by user profile
                   *JOB       - by job name
                   *JOBTYP    - by job type (batch, interactive...)
                   *CMPCDE    - by completion code
                   *ACGCDE    - by accounting code
                   *AVGRSP    - by the average response time
                   *NBRTRANS  - by the number of transactions
                   *SYNAUXIO  - by the synchronous auxiliary I/O count
                   *ASYNAUXIO - by the asynchronous auxiliary I/O count

                  *AVGRSP and  *NBRTRANS values are only  meaningful for
                  interactive jobs.

    USRPRF        The  user  profile  to  be  selected.    *ALL  is  the
                  default.  A  specific name  or a generic  name may  be
                  entered.

    JOB           The job  to  be selected.   *ALL  is the  default.   A
                  specific name or a generic name may be entered.

    BYPSYSJOB     Whether to  bypass system jobs.  *YES  is the default.

                  *NO may be specified to include system jobs.

                  The definition of a system job to the command is:

                       - The job and user name both start with Q

                       -  The job  does not start  with Q,  but the user
                       profile is  supplied by  the system.   This  does
                       not  include the  user  profiles QPGMR,  QSECOFR,
                       QSYSOPR, and QUSER.

    FROMDATE      Whether  to select on  the From date and  time the job
                  was started.  If the  job was started on or after  the
                  specified date  and ended  on or  before the  To date,
                  the accounting record will be selected.

                  The  date  defaults to  *FIRST meaning  the  first job
                  accounting entry.   A  specific date  (in job  format)
                  may  be  entered  or  the  special  value  *TODAY  for
                  todays date.

                  If a  date/time is specified that is  greater than the
                  last   entry   converted  from   the   job  accounting
                  journal, no information will be output.

                  The time  value defaults to  *FIRST meaning the  first
                  time  of the  specified From  date.   A  specific time
                  may be entered in HHMMSS format.

    TODATE        Whether  to select  on the  To date  and time  the job
                  was ended.   If the  job was  ended on  or before  the
                  specified date  and started  on after  the From  date,
                  the accounting record will be selected.

                  The   date  defaults   to   *LAST  meaning   the  last
                  converted job accounting entry.   A specific date  (in
                  job  format)  may  be entered  or  the  special  value
                  *TODAY for todays date.

                  The  time value  defaults  to *LAST  meaning  the last
                  time  of the specified  To date.   A specific time may
                  be entered in HHMMSS format.

                  A typical error  is to not  convert all the  available
                  entries.   Check the listing for the  date/time of the
                  last converted journal entry.

    CMPCDE        Whether  to select  on the  completion code.   *ALL is
                  the default for all completion codes.

                  *NORMAL may  be  specified  to select  the  jobs  that
                  completed normally (00 completion code).

                  *FAILED may be  specified to select the  jobs that did
                  not complete normally.

                  A  single completion  code may  be requested  from the
                  values 00, 10,  20, 30, 40,  50, 60, 70,  80, and  90.
                  For an  explanation of the  completion codes,  see the
                  CPF1164 message ID.

    ACGCDE        Whether  to select on  the accounting  code.   *ALL is
                  the  default which will  select all records regardless
                  of whether they have an accounting code.

    JOBTYPE       Whether to select on the type of job.

                  A specific job type may be entered of the following:

                     B  =  Batch
                     A  =  Autostart
                     I  =  Interactive
                     M  =  Subsystem monitor
                     R  =  Spool reader
                     S  =  System job
                     W  =  Spool writer
                     X  =  Start CPF

    NBRTRANS      Whether  to  select on  the  number  of  transactions.
                  This  is only  meaningful for  interactive jobs.   Any
                  non-interactive  jobs will  have 0  for the  number of
                  transactions.

                  If a number  is entered, any jobs  that have the  same
                  or   a  greater   number  of   transactions  will   be
                  selected.

    AVGRSP        Whether  to  select  on  the  average  response  time.
                  This is  only meaningful  for interactive  jobs.   Any
                  non-interactive jobs  will have  a 0 average  response
                  time.

                  Response  times are in  hundredths of  a second.   For
                  example,  you could  specify '.44'.   Any  jobs with a
                  response time equal or greater would be selected.

    SYNAUXIO      Whether  to  select  on  the  number   of  synchronous
                  auxiliary storage I/O occurrences.

                  If a  number is entered,  any jobs that have  the same
                  or  a greater number of  occurrences will be selected.

    ASYNAUXIO     Whether  to  select  on  the  number  of  asynchronous
                  auxiliary storage I/O occurrences.

                  If a  number is entered, any  jobs that have  the same
                  or  a greater number of  occurrences will be selected.

    SYSTEM        Whether  to  select  on  the  system  where  the   job
                  accounting entry occurred.   *CURRENT is  the default.

                  If  you do  not  convert job  accounting  entries from
                  other  systems to a centralized  JOBACGP file, use the
                  default.

    EXTPRT        Whether to use  one or more extended  print functions.
                  One  or  more  options   may  be  specified  and  each
                  produces an additional line of information.

                    - *NONE is the default for no additional lines
                    - *DATENT - when the job entered the system
                    - *AVGRSP - the average response time
                    - *PRINT - the number of pages, lines, files
                    - *DBF - the number of gets, puts, upd/dlts
                    - *COMM - the number of gets, puts
                    - *AUXIO - the number of synch/asynch aux I/Os

    JOBACGLIB     The  name  of  the library  where  the  Job Accounting
                  files exist.    The default  is  *LIBL.   *CURLIB  may
                  also be used.

    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.


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

    JOBACGLIB     The  name  of  the library  where  the  Job Accounting
                  files will be deleted.


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

    JRNOUTF       The name  of  the  qualified file  that  contains  the
                  journal  entries from  another  system.   The  library
                  defaults to *LIBL and *CURLIB may be used.

                  DSPJRN  must have  been  used to  create the  file and
                  must have  been  specified  as  OUTFILFMT(*TYPE1)  and
                  ENTDTALEN(155).

    SYSTEM        The  system  name  to   be  used  for  the  accounting
                  entries.   This is  a required parameter.   You cannot
                  use  the  current  systems  name  (use  the  CVTJOBACG
                  command instead).

                  The reason  that the system  name is required  is that
                  the  *TYPE1  format is  used  for  the DSPJRN  outfile
                  which does not contain the system name.

    RMVALLLFM     A  *YES/*NO  parameter  for whether  the  logical file
                  members should  be removed  before the update  program
                  runs  and   then  added  back   after.    This   is  a
                  performance  option.     It  is  generally  faster  to
                  remove the members and then  add them back if a  large
                  percentage of records will be added to the file.

                  *NO is the  default which should be used  when a small
                  percentage of records are added.

                  *YES  should be  specified to improve  the performance
                  when adding a large percentage of records.

    JOBACGLIB     The name  of  the  library where  the  Job  Accounting
                  files  exist.   The  default is  *LIBL.   *CURLIB  may
                  also be used.


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

 None.

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

 The following TAA Tools must be on your system:

      ADDDAT          Add date
      ADJVAR          Adjust variable
      CHKALLOBJ       Check *ALLOBJ authority
      CHKACTOBJ       Check active object
      CHKGENERC       Check generic
      CPYTAADDS       TAA Archive
      CVTDAT          Convert date
      CVTJRNA         Convert journal attributes
      CVTTIM          Convert time
      EDTVAR          Edit variable
      EXTLST2         Extract list 2
      FILEFDBCK       File feedback
      HLRMVMSG        HLL Remove message
      RMVALLLFM       Remove all logical file members
      RTVDAT          Retrieve date
      RTVDBFA         Retrieve data base attributes
      RTVIBMPRF       Retrieve IBM profiles
      RTVSYSVAL3      Retrieve system value 3
      SNDCOMPMSG      Send completion message
      SNDDIAGMSG      Send diagnostic message
      SNDESCMSG       Send escape message
      SNDSTSMSG       Send status message
      WRTSRC          Write source

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

 None, the tool  is ready to use.  You must  use CRTJOBACG to create the
 required  files and CVTJOBACG  to convert the  entries before using DSP
 or PRTJOBACG.

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

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

    CRTJOBACG     *CMD                   TAAACGB       QATTCMD
    CVTJOBACG     *CMD                   TAAACGB2      QATTCMD
    DSPJOBACG     *CMD                   TAAACGB3      QATTCMD
    DLTJOBACG     *CMD                   TAAACGB4      QATTCMD
    PRTJOBACG     *CMD                   TAAACGB6      QATTCMD
    MTNJOBACG     *CMD                   TAAACGB6      QATTCMD
    CVTJOBACG2    *CMD                   TAAACGB7      QATTCMD
    PRTJOBACG3    *CMD                   TAAACGB8      QATTCMD
    ANZJOBACG     *CMD                   TAAACGB9      QATTCMD
    TAAACGBC      *PGM       CLP         TAAACGBC      QATTCL
    TAAACGBC2     *PGM       CLP         TAAACGBC2     QATTCL
    TAAACGBC3     *PGM       CLP         TAAACGBC3     QATTCL
    TAAACGBC4     *PGM       CLP         TAAACGBC4     QATTCL
    TAAACGBC5     *PGM       CLP         TAAACGBC5     QATTCL
    TAAACGBC6     *PGM       CLP         TAAACGBC6     QATTCL
    TAAACGBC7     *PGM       CLP         TAAACGBC7     QATTCL
    TAAACGBC8     *PGM       CLP         TAAACGBC8     QATTCL
    TAAACGBC9     *PGM       CLP         TAAACGBC9     QATTCL
    TAAACGBC13    *PGM       CLP         TAAACGBC13    QATTCL
    TAAACGBC15    *PGM       CLP         TAAACGBC15    QATTCL
    TAAACGBR2     *PGM       RPG         TAAACGBR2     QATTRPG
    TAAACGBR3     *PGM       RPG         TAAACGBR3     QATTRPG
    TAAACGBR5     *PGM       RPG         TAAACGBR5     QATTRPG
    TAAACGBR8     *PGM       RPG         TAAACGBR8     QATTRPG
    TAAACGBR9     *PGM       RPG         TAAACGBR9     QATTRPG
    TAAACGBR12    *PGM       RPG         TAAACGBR12    QATTRPG
    TAAACGBR13    *PGM       RPG         TAAACGBR13    QATTRPG
    TAAACGBR15    *PGM       RPG         TAAACGBR15    QATTRPG
    TAAACGBD      *FILE      DSPF        TAAACGBD      QATTDDS
    TAAACGBP      *FILE      PF          TAAACGBP      QATTDDS
    TAAACGBL      *FILE      LF          TAAACGBL      QATTDDS
    TAAACGBM      *FILE      LF          TAAACGBM      QATTDDS
    TAAACGBN      *FILE      LF          TAAACGBN      QATTDDS
    TAAACGBO      *FILE      LF          TAAACGBO      QATTDDS
    TAAACGBX      *FILE      PF          TAAACGBX      QATTDDS
    TAAJOBACG     *AUTL

 The TAAACGBX file is only used to create programs against.

 Note that  the PRTJOBACG2  command does not  exist here  because it  is
 part of the PRTJOBACG2 tool.

 The files created from CRTJOBACG use the following source.

         File          Source       Description
         ----          ------       -----------

         JOBACGP       TAAACGBP     Physical
         JOBACGL       TAAACGBL     LF by system, date, and time
         JOBACGM       TAAACGBM     LF by system, acctg code, date, time
         JOBACGN       TAAACGBN     LF by system, user, date, time
         JOBACGO       TAAACGBO     LF by system, job, date, time
         JOBACGP       TAAACGBQ     LF by system, curr user, date, time

 Structure
 ---------

 CRTJOBACG   Cmd
    TAAACGBC   CL pgm

 CVTJOBACG
    TAAACGBC2  CL pgm
      TAAACGBR12  RPG Pgm
      TAAACGBR2   RPG Pgm

 DSPJOBACG
    TAAACGBC3  CL pgm
      TAAACGBR3  RPG Pgm
        TAAACGBD   Display file
        TAAACGBC15  CL pgm

 DLTJOBACG
    TAAACGBC4  CL pgm

 PRTJOBACG
    TAAACGBC5  CL pgm
      TAAACGBR5  RPG Pgm
      TAAACGBR15  RPG Pgm

 PRTJOBACG3
    TAAACGBC8  CL pgm
      TAAACGBR8  RPG Pgm
      TAAACGBR12  RPG Pgm

 MTNJOBACG
    TAAACGBC6  CL pgm

 CVTJOBACG2
    TAAACGBC7  CL pgm
      TAAACGBR12  RPG Pgm
      TAAACGBR2  RPG Pgm

 ANZJOBACG
    TAAACGBC9  CL pgm
      TAAACGBR9   RPG Pgm
      TAAACGBC13  CL pgm
        TAAACGBR13  RPG pgm

Added to TAA Productivity Tools October 1, 1997


Home Page

Powered by AS/400Powered by AS/400 Last modified on April 14, 2009 © 1995, 2009 - Jim Sloan, Inc.