Display the data collected

After collecting data in the job accounting journal, you need to 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.
  1. Create a copy of the system supplied model outfile for the accounting journal. QAJBACG4 is the model outfile for the *TYPE4 outfile format.
    1. Command: Create Duplicate Object (CRTDUPOBJ)
      CRTDUPOBJ OBJ(QAJBACG4) FROMLIB(QSYS) OBJTYPE(*FILE) TOLIB(QTEMP)
         NEWOBJ(MYJBACG4)
  2. 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.
    1. Command: Display Journal (DSPJRN)
      DSPJRN JRN(QACGJRN) ENTTYP(JB) OUTPUT(*OUTFILE) OUTFILFMT(*TYPE4)
         OUTFILE(QTEMP/MYJBACG4)
  3. Start an SQL session. Then use the SELECT command from within the SQL session to choose the fields you want to display.
    1. 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.