After collecting data in the job accounting journal, you
can write the journal entries to a file and display them.
To do this, follow these steps:
Note: In the following example, the job accounting journal
name is QACGJRN.
- Create a copy of the system supplied model outfile for
the accounting journal. QAJBACG4 is the model outfile for the *TYPE4
outfile format.
- Command: Create Duplicate Object (CRTDUPOBJ)
CRTDUPOBJ OBJ(QAJBACG4) FROMLIB(QSYS) OBJTYPE(*FILE) TOLIB(QTEMP)
NEWOBJ(MYJBACG4)
- Dump the journal entries to the outfile that you just created.
In the following example only the 'JB' or job type journal entries
are being dumped.
- Command: Display Journal (DSPJRN)
DSPJRN JRN(QACGJRN) ENTTYP(JB) OUTPUT(*OUTFILE) OUTFILFMT(*TYPE4)
OUTFILE(QTEMP/MYJBACG4)
- Start an SQL session. Then use the SELECT command from
within the SQL session to choose the fields you want to display.
- Command: Start Structured Query Language (STRSQL)
STRSQL
SELECT JAJOB, JAUSER, JAUSPF, JACDE, JACPU FROM QTEMP/MYJBACG4
You can display a list of field names interactively or to
a file by creating and running a query using the Work with Queries
(WRKQRY) command.