Work with Journal Attributes (WRKJRNA)

The Work with Journal Attributes (WRKJRNA) command displays or prints the creation and operational attributes of a journal, including the name of the journal receiver currently attached to the journal. From the primary display, options or functions can be selected to display the names of all objects currently journaled to the journal, the names of all remote journals currently associated with this journal and detailed information about a remote journal, the receiver directory, or detailed information about a journal receiver; or to delete receivers from the receiver directory.

The command can also be used to generate an output file that lists journaled objects.

If output is printed with the job's spooled printer output with DETAIL(*OUTPUT) specified, all of the information that is optionally displayed is printed except:

When OUTPUT(*PRINT) is chosen, the DETAIL parameter can be used to subset the information printed. Specifying one or more of the values of *CURATR, *RCVDIR, *RMTJRN, *JRNFILE, *JRNAP, *JRNDTAQ, *JRNDTAARA, *JRNLIB, and *JRNIFS is allowed.

If output is directed to an output file, then only the journaled object information is written to the output file. When OUTPUT(*OUTFILE) is chosen, the DETAIL parameter can be used to subset the information sent to the output file. Specifying one or more of the values of *JRNFILE, *JRNAP, *JRNDTAQ, *JRNDTAARA, *JRNIFS, *JRNLIB, and *IMPLICIT is allowed.

Parameters

Keyword Description Choices Notes
JRN Journal Single values: *INTSYSJRN
Other values: Qualified object name
Required, Positional 1
Qualifier 1: Journal Name
Qualifier 2: Library Name, *LIBL, *CURLIB
OUTPUT Output *, *PRINT, *OUTFILE Optional, Positional 2
DETAIL Detail Single values: *OUTPUT
Other values (up to 9 repetitions): *CURATR, *RCVDIR, *RMTJRN, *JRNFILE, *JRNAP, *JRNDTAARA, *JRNDTAQ, *JRNIFS, *JRNLIB, *IMPLICIT
Optional
OUTFILE File to receive output Qualified object name Optional
Qualifier 1: File to receive output Name
Qualifier 2: Library Name, *LIBL, *CURLIB
OUTMBR Output member options Element list Optional
Element 1: Member to receive output Name, *FIRST
Element 2: Replace or add records *REPLACE, *ADD
JRNID Journal identification number Character value Optional
ASPDEV ASP device Name, * Optional

Journal (JRN)

Specifies the journal whose attributes are to be displayed.

This is a required parameter.

Single values

*INTSYSJRN
The internal system journal associated with the journal specified on the JRNID parameter is used. Internal system journals are not stored in libraries.

Note: You must have all object (*ALLOBJ) special authority to specify JRN(*INTSYSJRN).

Note: If the *INTSYSJRN value is specified, then OUTPUT(*OUTFILE) can not be specified and DETAIL(*OUTPUT) must be specified.

Note: If the *INTSYSJRN value is specified, the OUTFILE and DETAIL parameters cannot be specified.

Qualifier 1: Journal

name
Specify the name of the journal.

Qualifier 2: Library

*LIBL
All libraries in the library list for the current thread are searched until the first match is found.
*CURLIB
The current library for the job is searched. If no library is specified as the current library for the job, QGPL is used.
library-name
Specify the name of the library to be searched.

Output (OUTPUT)

Specifies where the output from the command is sent.

*
The output is displayed (if requested by an interactive job) or printed with the job's spooled output (if requested by a batch job).
*PRINT
The output is printed with the job's spooled output.
*OUTFILE
The output is directed to the database file specified for the File to receive output (OUTFILE) parameter.

Note: File QPDSPJNA is used for printed output. File QAWRKJRNA is the model output file. The format name is QJOWRKJRNA.

Detail (DETAIL)

Specifies the type of information that is directed to the printer file or output file.

Single values

*OUTPUT
The information sent to the printer file or output file will depend on what value was specified on the OUTPUT parameter. When *OUTPUT is selected, then the DETAIL parameter may not have any other values.

If OUTPUT(*PRINT) was selected, then DETAIL(*OUTPUT) will have the same meaning as selecting all of the following parameter values for DETAIL: *CURATR, *RCVDIR, *RMTJRN, *JRNFILE, *JRNAP, *JRNDTAQ, *JRNDTAARA, *JRNLIB, and *JRNIFS.

If OUTPUT(*OUTFILE) was selected, then DETAIL(*OUTPUT) will have the same meaning as selecting all of the following parameter values for DETAIL: *JRNFILE, *JRNAP, *JRNDTAQ, *JRNDTARA, *JRNLIB, and *JRNIFS.

Other values (up to 9 repetitions)

*CURATR
The printer file will contain the creation and operational attributes of the journal. This value is not valid with OUTPUT(*OUTFILE).
*RCVDIR
The printer file will contain the names of the journal receivers currently associated with the journal. This entry will also contain some attribute information about the journal receiver. This value is not valid with OUTPUT(*OUTFILE).
*RMTJRN
The printer file will contain the current remote journal related attributes of this journal and information about the remote journal(s) that are currently associated with this journal. This value is not valid with OUTPUT(*OUTFILE).
*JRNFILE
The printer file or output file will contain the list of the physical and logical file names and the library names of the files for all files being journaled. Additionally, the printer file will have a count of files and a count of members journaled to this journal.
*JRNAP
The printer file or output file will contain the list of the file names and the library names of the files for all access paths being journaled. Additionally, the printer file will have a count of files and a count of access paths journaled to this journal.
*JRNDTAARA
The printer file or output file will contain the list of data area names and the library names of the data areas for all data areas being journaled. Additionally, the printer file will have a count of data areas journaled to this journal.
*JRNDTAQ
The printer file or output file will contain the list of the data queue names and the library names of the data queues for all data queues being journaled. Additionally, the printer file will have a count of data queues journaled to this journal.
*JRNIFS
The printer file or output file will contain the list of the integrated file system objects for all integrated file system objects being journaled. Additionally, the printer file will have a count of integrated file system objects journaled to this journal.
*JRNLIB
The printer file or output file will contain the list of the library names for all the libraries being journaled. Additionally, the printer file will have a count of libraries journaled to this journal.
*IMPLICIT
The output file will contain the list of all objects implicitly journaled to the journal. This will contain objects such as journal receivers, commit definitions, and objects needed for system recovery purposes. This value is not valid with OUTPUT(*PRINT).

Note: This value must be specified on the DETAIL parameter to get this information.

File to receive output (OUTFILE)

Specifies the database file to which the output of the command is directed. If the file does not exist, this command creates a database file in the specified library. If the file is created, the public authority for the file is the same as the create authority specified for the library in which the file is created. Use the Display Library Description (DSPLIBD) command to show the library's create authority.

Qualifier 1: File to receive output

name
Specify the name of the database file to which the command output is directed.

Qualifier 2: Library

*LIBL
The library list is used to locate the file. If the file is not found, one is created in the current library. If no current library exists, the file will be created in the QGPL library.
*CURLIB
The current library for the thread is used to locate the file. If no library is specified as the current library for the thread, the QGPL library is used.
name
Specify the name of the library to be searched.

Note: If a new file is created, the system uses QAWRKJRNA in QSYS with the format name QJOWRKJRNA as a model.

Member to receive output (OUTMBR)

Specifies the name of the database file member that receives the output of the command.

Element 1: Member to receive output

*FIRST
The first member in the file receives the output. If OUTMBR(*FIRST) is specified and the member does not exist, the system creates a member with the name of the file specified for the File to receive output (OUTFILE) parameter. If the member already exists, you have the option to add new records to the end of the existing member or clear the member and then add the new records.
name
Specify the name of the file member that receives the output. If it does not exist, the system creates it.

Element 2: Replace or add records

*REPLACE
The system clears the existing member and adds the new records.
*ADD
The system adds the new records to the end of the existing records.

Journal identification number (JRNID)

Specifies the five-character journal identification number (ID) of the internal system journal (*INTSYSJRN) to be displayed. Journal IDs are assigned by the system. The first two characters represent the journal type, and the last three characters are the auxiliary storage pool (ASP) identifier.

Note: The JRNID parameter can be specified only if JRN(*INTSYSJRN) is specified.

Following is a listing of journal types:

Journal Types
10
System-managed access-path protection (SMAPP)
20
Directory
30
Spool

ASP device (ASPDEV)

Specifies the auxiliary storage pool (ASP) device where the journal is located.

*
The ASPs that are currently part of the thread's library name space will be searched to find the library. This includes the system ASP (ASP 1), all defined basic user ASPs (ASPs 2-32), and, if the thread has an ASP group, all primary and secondary ASPs in the ASP group.
name
Specify the name of the primary or secondary ASP device to be searched to find the library. The primary or secondary ASP must have been activated (by varying on the ASP device) and have a status of Available'. The system ASP (ASP 1) and defined basic user ASPs (ASPs 2-32) will not be searched.

Note: To specify a specific auxiliary storage pool (ASP) device name, you must have use (*USE) authority for each ASP device in the ASP group.

Examples

Example 1: Simple Command Example

WRKJRNA   JRN(MYLIB/JRNLA)

This command allows you to work with the current journal attributes of JRNLA in library MYLIB.

Example 2: More Complex Commands for *PRINT

WRKJRNA   JRN(YOURLIB2/JRNLB) OUTPUT(*PRINT)
          DETAIL(*OUTPUT)
WRKJRNA   JRN(YOURLIB2/JRNLB) OUTPUT(*PRINT)
          DETAIL(*CURATR *RCVDIR *JRNFILE *JRNAP
                 *JRNDTAQ *JRNDTAARA *JRNIFS *RMTJRN)

These two commands print information related to the journal JRNLB in library YOURLIB2. Specifically they will print journal attribute information, information about the receivers associated with the journal, remote journal information, a list of files being journaled, a list of access paths being journaled, a list of data queues being journaled, a list of data areas being journaled and a list of integrated file system objects being journaled.

Example 3: More Complex Commands for *OUTFILE

WRKJRNA   JRN(YOURLIB3/JRNLC) OUTPUT(*OUTFILE)
          OUTFILE(YOURLIB3/MYOUTFILE)
          DETAIL(*OUTPUT)
WRKJRNA   JRN(YOURLIB3/JRNLC) OUTPUT(*OUTFILE)
          OUTFILE(YOURLIB3/MYOUTFILE)
          DETAIL(*JRNFILE *JRNAP *JRNDTAQ
                 *JRNDTAARA *JRNIFS)

These two commands create an output file named MYOUTFILE in library YOURLIB3 that contains information related to the journal JRNLC in library YOURLIB3. Specifically the information written to the output file includes a list of files being journaled, a list of access paths being journaled, a list of data queues being journaled, a list of data areas being journaled and a list of integrated file system objects being journaled.

Example 4: Selecting Specific Information to Print

WRKJRNA   JRN(YOURLIB4/JRNLD) OUTPUT(*PRINT)
          DETAIL(*CURATR *JRNFILE)

This command prints information related to the journal JRNLD in library YOURLIB4. The information will be a subset of information about the journal. Specifically the information will be the journal attributes and a list of files being journaled.

Example 5: Selecting Specific Information to Output to a File

WRKJRNA   JRN(YOURLIB5/JRNLE) OUTPUT(*OUTFILE)
          OUTFILE(YOURLIB5/MYOUTFILE)
          DETAIL(*JRNFILE *JRNDTAARA *IMPLICIT)

This command creates an output file named MYOUTFILE in library YOURLIB5 that contains information related to the journal JRNLE in library YOURLIB5. The information will be a subset of information about the journal. Specifically the information about journaled files, journaled data areas and objects being implicitly journaled to this journal.

Error messages

*ESCAPE Messages

CPF69A7
DETAIL value specified not allowed with OUTPUT value.
CPF69A9
Internal error detected, error code &2.
CPF70FF
Internal system journal function failed.
CPF701B
Journal recovery of an interrupted operation failed.
CPF702C
An attached receiver has previously been destroyed.
CPF706B
Not authorized to specify JRN(*INTSYSJRN).
CPF706C
Value &1 for JRNID parameter not valid.
CPF708D
Journal receiver found logically damaged.
CPF9801
Object &2 in library &3 not found.
CPF9802
Not authorized to object &2 in &3.
CPF9803
Cannot allocate object &2 in library &3.
CPF9810
Library &1 not found.
CPF9820
Not authorized to use library &1.
CPF9825
Not authorized to device &1.
CPF9860
Error occurred during output file processing.
CPF9871
Error occurred while processing.
CPF9875
Resources exceeded on ASP &1. Press HELP.