CL Command Reference - DSPJRN

CL Command List > DSPJRN Reference

Description:

The Display Journal (DSPJRN) command allows you to convert journal entries (contained in one or more receivers) into a form suitable for external representation. Output of the command can be displayed or printed with the job¡¯s spooled printer output or directed to a database output file. If the database output file exists, records may either replace or be added to the current data in the indicated file member. The system creates the specified database file and member if they do not exist. Database files created by the system have a standard format. A warning message is sent and the records are truncated if any of the entries are longer than the specified maximum record length of the output files.

The contents of selected entries in the journal receivers may be converted for output. It is also possible to selectively limit the entries that are displayed. If no journal entries satisfy the selection or limitation criteria, an escape message is sent indicating that fact.

Gaps may exist in the sequence numbers of the entries converted. These occur because some of the journal entries represent internal system information. These internal entries can be shown by specifying INCHIDENT(*YES).

It is possible to show journal entries whose journal sequence numbers are reset in the chain of receivers being specified.

Restrictions:

. The file specified for the database output file must not be journaled to the same journal.

. If the sequence number is reset in the range of the receivers specified, the first occurrence of FROMENTLRG, FROMENT, TOENTLRG, or TOENT is used, if they are specified.

. The JOB, PGM, and USRPRF parameters cannot be used to specify selection criteria if one or more journal receivers in the specified receiver range was attached to the journal when a receiver size option (RCVSIZOPT) or a fixed length data option (FIXLENDTA) that would have omitted this data was in effect.

. The FILE, JRNCDE, ENTTYP, JOB, PGM, USRPRF, CCIDLRG, CMTCYCID, and DEPENT parameters can be used to specify a subset of all available entries within a range of journal entries.
¨C If no values are specified using these parameters, all available journal entries are converted for output.
¨C If more than one of these parameters are specified, then a journal entry must satisfy all of the values specified on these parameters, except when *IGNFILSLT is specified on the JRNCDE parameter.
¨C If a journal code is specified on the JRNCDE parameter and *IGNFILSLT is the second element of that journal code, then journal entries with the specified journal code are selected if they satisfy all selection criteria except what is specified on the FILE parameter.

. If more than the maximum number of objects is identified (32767 objects), an error occurs and no entries are received. This restriction is ignored if *ALLFILE is specified.

. When journal caching is being used, entries that are in the cache are not displayable.


Examples:

Example 1: Converting Journal Entries for Display

DSPJRN JRN(MYLIB/JRNLA)

When issued at a work station, this command converts and shows the first journal entries in the journal receiver currently attached (when the converting of journal entries is started) to the journal JRNLA in library MYLIB. Subsequent entries are shown by pressing the Page Down key. When entered from a batch job, the above command prints all converted journal entries with the job¡¯s spooled printer output. The entry-specific data portion of the journal entries are shown in character format.



Example 2: Converting Journal Entries to an Output File

DSPJRN JRN(MYLIB/JRNLA)
FILE((LIB1/A MBR3) (LIB1/C) (LIB2/*ALL *ALL))
RCVRNG((RCVLIB/RCV27 RCVLIB/RCV30))
FROMENT(4736) ENTTYP(UP DL)
JOB(000666/QPGMR/WORKST01)
PGM(TSTPGMA) ENTDTALEN(280)
OUTPUT(*OUTFILE) OUTFILE(MYLIB/JRNENTFIL1)

This command converts selected journal entries in the journal receiver chain (from receiver RCV27 in library RCVLIB to receiver RCV30 in library RCVLIB) that are attached to JRNLA in library MYLIB and places them in the first member of the database file JRNENTFIL1 in library MYLIB. If the database file does not exist, it is created with a format of QJORDJE. The last field in the format is 280 bytes in length. The journal entry that has a sequence number of 4736 is the first entry written to the output file. Only entries for record updates and deletes made by program TSTPGMA in the job 000666/QPGMR/WORKST01 to member MBR3 of file A in library LIB1, the first member of file C in library LIB1, and all members of all files in library LIB2 are written to the output file.



Example 3: Converting Journal Entries for a Specific User Profile

DSPJRN JRN(SS/J) FILE(SS1/PF) RCVRNG((SS/R1 *CURRENT))
JRNCDE(F) USRPRF(MAC7)
OUTFILE(FMTLIB/ENTFILE) OUTFILFMT(*TYPE2)

This command converts selected journal entries in the journal receiver range. The range begins with journal receiver R1 in library SS and ends with the journal receiver currently attached (when the converting of journal entries is started) to journal J in library SS. The entries are placed in the first member of the database file ENTFILE in library FMTLIB. If the file does not exist, it is created with the QJORDJE2 format. The last field of the format is 100 bytes in length. Only entries with file-level information made by the user MAC7 to the first member of file PF in library SS1 are written to the output file.



Example 4: Converting Journal Entries with Null Value Field Length Specified

DSPJRN JRN(LIBPROD/PRODJRN) FILE(APPLIB/PFILE)
OUTFILFMT(*TYPE3) OUTFILE(JRNLIB/ENTFILE)
ENTDTALEN(*VARLEN 500 100) NULLINDLEN(25)

This command converts selected journal entries that are in the range from the journal receiver currently attached (when the converting of entries is started) to the journal PRODJRN in library LIBPROD. The entries are placed in the first member of the database file ENTFILE in library JRNLIB. If the file does not exist, it is created with the QJORDJE3 format. The entry-specific data field is a variable-length field with a maximum field length of 500 characters and an allocated length of 100 characters. The null value indicators field is a fixed-length field of 25 characters. Only entries with file-level information for the first member of file PFILE in library APPLIB are written to the output file.




Example 5: Converting Journal Entries with Null Value Field Length Calculated

DSPJRN JRN(JRNLIB/JRNA) FILE(FILLIB/FILEA)
FROMENT(4736) ENTTYP(UP DL)
JOB(000666/QPGMR/WORKST01) PGM(TSTPGMA)
ENTDTALEN(280) OUTPUT(*OUTFILE)
OUTFILFMT(*TYPE3) OUTFILE(ENTLIB/ENTFILE)
ENTDTALEN(*CALC) NULLINDLEN(*VARLEN *CALC *FLDLEN)

This command converts journal entries with file-level information for the first member of file FILEA in library FILLIB in the range from the journal receiver currently attached (when the converting of entries is started) to the journal JRNA in library JRNLIB. The entries are written to the first member of database file ENTFILE in library ENTLIB. If the file does not exist, it is created with the QJORDJE3 format. The system calculates the length of the fixed-length, entry-specific data field. The system also calculates the length of the variable-length null value indicators field. The allocated length of this field is the same as the maximum field length.



Example 6: Converting Journal Entries Using *IGNFILSLT and *CURCHAIN

DSPJRN JRN(JRNLIB/JRNA) FILE(FILLIB/FILEA)
RCVRNG(*CURCHAIN)
JRNCDE((F *ALLSLT) (R *ALLSLT) (U *IGNFILSLT))
OUTPUT(*PRINT)

This command converts journal entries with:
. File-level information for the first member of file FILEA in library FILLIB
. Record-level information for the first member of file FILEA in library FILLIB
. User-generated journal entries regardless of whether the entry is associated with any journaled file member

Journal entries are converted from the chain of journal receivers, which are the journal receivers in the range from the latest chain break through the journal receiver currently attached when the converting of entries is started, associated with the journal JRNA in library JRNLIB. The converted entries are written to a print file.