ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaks_5.4.0.1/rzaksjobacctconvert.htm

125 lines
7.9 KiB
HTML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="task" />
<meta name="DC.Title" content="Convert job accounting journal entries" />
<meta name="abstract" content="You can use the OUTFILE parameter on the Display Journal (DSPJRN) command to write the job accounting journal entries into a database file that you can process." />
<meta name="description" content="You can use the OUTFILE parameter on the Display Journal (DSPJRN) command to write the job accounting journal entries into a database file that you can process." />
<meta name="DC.Relation" scheme="URI" content="rzaksmanagejobaccounting.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 2004-2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2004-2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rzaksjobacctconvert" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Convert job accounting journal entries</title>
</head>
<body id="rzaksjobacctconvert"><a name="rzaksjobacctconvert"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Convert job accounting journal entries</h1>
<div><p>You can use the <span class="parmname">OUTFILE</span> parameter on the Display
Journal (<span class="cmdname">DSPJRN</span>) command to write the job accounting journal
entries into a database file that you can process.</p>
<div class="section"><p>The <span class="parmname">OUTFILE</span> parameter allows you to name
a file or member. If the member exists, it is cleared before the records are
written. If the member does not exist, it is added. If the file does not exist,
a file is created using the record format QJORDJE. This format defines the
standard heading fields for each journal entry, but the job accounting data
is defined as a single large field. </p>
<p>To avoid having to process the
accounting data as a single large field, two field reference files are supplied
to help you in processing the job accounting journal entries. The file QSYS/QAJBACG4
contains the record format QWTJAJBE and is used for JB entries. File QSYS/QAPTACG5
contains record format QSPJAPTE and is used for DP or SP™ entries. The same format is used for all
printer file entries regardless if the output is SP (spooled) or DP (nonspooled). The DP entry
for directly printed files contains some fields that are not used; these fields
contain blanks.</p>
<div class="p">The following are some approaches you might use: <ul><li>The basic JB entries and DP or SP entries can be processed by creating two
output files using the supplied field reference file formats and running the <span class="cmdname">DSPJRN</span> command
once for JB and once for DP or SP. This allows you to define a logical file
over the two physical files and use an high-level language program to process
the externally described file. </li>
<li>You can process only the JB entries by creating a file using one of the
supplied field reference files (QSYS/QAJBACG4) to create an externally described
file. This file can then be processed by the query utility or an high-level
language program.</li>
<li>You can convert both types of journal entries using the default <span class="cmdname">DSPJRN</span> format
of QJORDJE. You can then use a program-described file to process the journal
entries in a high-level language program.</li>
</ul>
</div>
<div class="p">The following DDS defines a physical file for the JB journal entries
using the QAJBACG4 field reference file in QSYS. You can create the file (using
the Create Physical File (<span class="cmdname">CRTPF</span>) command) with the same
name (QAJBACG4) as the model file.<blockquote><pre> R QWTJAJBE FORMAT(QSYS/QAJBACG4)</pre>
</blockquote>
The
following DDS defines a physical file for the DP or SP journal entries using the QAPTACG5 field
reference file in QSYS. You can create the file (using the <span class="cmdname">CRTPF</span> command)
with the same name (QAPTACG5) as the model file.<blockquote><pre> R QSPJAPTE FORMAT(QSYS/QAPTACG5) </pre>
</blockquote>
You
can specify a key field in either physical file; however, in this example,
a logical file is used for sequencing. If you create two physical files (one
for JB and one for DP or SP) with the members of the same name, you can issue the
following DSPJRN commands to convert the entries. Assume that you have created
the physical files with the same names as the model files in your library
YYYY. <blockquote><pre>DSPJRN JRN(QACGJRN) JRNCDE(A) ENTTYP(JB)
OUTPUT(*OUTFILE) OUTFILE(YYYY/QAJBACG4)
DSPJRN JRN(QACGJRN) JRNCDE(A) ENTTYP(SP DP)
OUTPUT(*OUTFILE) OUTFILE(YYYY/QAPTACG5)</pre>
</blockquote>
You can control the
use and selection criteria of the <span class="cmdname">DSPJRN</span> command so that
you do not convert the same entries several times. For example, you can select
all entries in a specific range of dates. You can convert all of the entries
at a cutoff point for your job accounting analysis, for example, monthly.
One or more journal receivers might have been used during the month. Note
that each use of the <span class="cmdname">DSPJRN</span> command to the same member
causes the member to be cleared before any new entries are added. Do not use
the <span class="parmname">JOB</span> parameter of the <span class="cmdname">DSPJRN</span> command
as some entries are made for a job by a system job and will therefore not
appear as you expect them to.</div>
<p><strong>Allowing the Processing of Both Physical
Files: </strong></p>
<div class="p">Enter the following DDS to create a logical file to allow
processing of both physical files. This allows you to read a single file in
accounting code order and print a report using a high-level language program: <blockquote><pre>R QWTJAJBE PFILE(YYYY/QAJBACG4)
K JACDE
R QSPJAPTE PFILE(YYYY/QAPTACG5)
K JACDE</pre>
</blockquote>
<strong>Processing Basic Job Accounting Record:</strong> </div>
<div class="p">If
you want to use a logical file to process only the basic job accounting record
in accounting code order by a user name, you can enter the following DDS for
a logical file: <blockquote><pre>R QWTJAJBE PFILE(YYYY/QAJBACG4)
K JACDE
K JAUSER </pre>
</blockquote>
This logical file can be processed by the query
utility or by a high-level language program. If an abnormal system ending
occurs, the qualified job name in the first 30 bytes of the JARES field in
the journal entry describe the system job that wrote the entry at the next
IPL and not the job that used the resources. For this reason, any analysis
done on the JB entries should use the JAJOB, JAUSER, and JANBR fields.</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaksmanagejobaccounting.htm" title="The job accounting function is not active by default. It requires a few initial steps to set it up. The following information describes how to set up job accounting and perform some of the most common tasks associated with job accounting.">Manage job accounting</a></div>
</div>
</div>
</body>
</html>