# Managing journal resource definitions - IBM - AS/400

When a file is defined in the FCT, you can specify whether or not activity on that file is to be journaled and the ID of the journal file. Journal files are identified by a number in the range 1 through 99. In the journal control table (JCT), you define the characteristics of each journal file.

Flowchart

Notes:

1. The JRNLIB parameter, RECLMT parameter, NEWJRN parameter, and USRJOB parameter are valid only when JRNSWT(*YES) is specified.
2. The JRNLIB parameter is required when JRNSWT(*YES) is specified.
3. The SBMUSRJOB parameter is valid only when USRJOB(*NONE) is not specified.
4. The JRNFILE parameter and JRNMBR parameter are valid only when JRNSWT(*NO) is specified.
5. The JRNFILE parameter is required when JRNSWT(*NO) is specified.
6. All parameters preceding this point can be specified positionally.

Function
Required parameters

1. Library (LIB)
2. Enter the name of the OS/400 library that contains the group. Possible values are:
*LIBL: The library list is used to locate the first OS/400 library that contains the group.
*CURLIB: The current library contains the group. If no current library is specified, the QGPL library is used.
library-name:The name of the OS/400 library that contains the group.
3. Group (GROUP)
4. Enter the name of the group to which this JCT entry is to be added.
group-name:The group name may have a maximum length of 10 characters. The first character must be alphabetic, or one of the special characters, $, @, or #. The remaining characters can be alphanumeric or$, @, or #.
5. Number (JFILE)
6. Enter the user journal number. This user journal may also be used for automatic journaling of file activity. The number is also used to identify this JCT entry.
journal:A number in the range 1 through 99.

Optional parameters

1. Status (JRNSTS)
2. Indicates whether or not the journal number can be used.
Possible values are:
*ENABLED: The journal number can be used.
*DISABLED: The journal number cannot be used.
3. Automatic switching (JRNSWT)
4. Indicates whether or not the journal can be switched automatically, when it is full, to the next file generation
Possible values are:
*YES: The journal will be switched automatically when it is full.
*NO: The journal will not be switched automatically when it is full.
5. Library (JRNLIB)
6. The OS/400 library name that will contain the journal. This parameter is valid only when the JRNSWT parameter contains *YES.
Note: The OS/400 file name that is used will be generated by the CICS/400 control region. The OS/400 file name is composed of the mask: AEGJCnnxxx, where nn is the journal number and xxx is the generation number.
library-name:The library name may have a maximum length of 10 characters. The first character must be alphabetic, or one of the special characters, $, @, or #. The remaining characters can be alphanumeric or$, @, or #.
7. Record capacity (RECLMT)
8. The number of records accumulated in order to switch to the next generation of the journal. This parameter is valid only when the JRNSWT parameter contains *YES.
Possible values are:
1: The journal is switched when one record is accumulated.
number-of-records-per-file:A number in the range 1 through 99 999.
9. Switch journal at startup (NEWJRN)
10. Indicates whether or not the journal will be switched to the next generation
when the CICS/400 control region is started. This parameter is valid only when the JRNSWT parameter contains *YES.
Possible values are:
*NO: Switch only when the journal is full.
*YES: Switch when the CICS/400 control region is started normally and when the journal is full.
Submit user job when switched (USRJOB)
The OS/400 program that is submitted via the SBMUSRJOB CL command when the journal is switched. This parameter is valid only when the JRNSWT parameter contains *YES.
Note: This OS/400 submitted program will not accept any parameters and the program object must exist in the library list associated with the CICS/400 control region.
Possible values are:
*NONE: No OS/400 job is submitted when the journal is switched.
job-submit-when-switched:The maximum length is 10 characters. The first character must be alphabetic, or one of the special characters, $, @, or #. The remaining characters can be alphanumeric or$, @, or #.
11. Submit user job at shutdown (SBMUSRJOB)
12. Indicates whether the OS/400 job is submitted when the CICS/400 control region ends. This is not valid when the USRJOB parameter contains *NONE.
Possible values are:
*NO: Do not submit the OS/400 job when CICS/400 control region ends.
*YES: Submit the OS/400 job when CICS/400 control region ends.
13. File (JRNFILE)
14. The name of the file that will be utilized by the journal number. This parameter is valid only when the JRNSWT parameter contains *NO.
Possible library values are:
*LIBL: The library list for the job that is associated to the CICS/400 control region is used to locate the file.
*CURLIB: The current library for the job that is associated to the CICS/400 control region is used to locate the file. If no library is specified as the current library, the QGPL library is used.
library-name:Specify the name of the library where the file is located.
journal-name:Specify the name of the file.
15. Member (JRNMBR)
16. The name of the member in the file that will be utilized by the journal number.
This parameter is valid only when the JRNSWT parameter contains *NO.
Possible values are:
*FIRST: No file member is specified. The first member in the file is used.
journal-member-name:Specify the name of the file member.

Examples

LIB (CICSWORK)

GROUP (ACCT)

JFILE (50)

JRNSTS (*DISABLED)

JRNSWT (*NO)

JRNFILE ( CICSWORK/JRNLFIL )

This command adds a JCT entry called 50 to group ACCT in OS/400 library CICSWORK. The journal file status at control region startup is DISABLED. The journal will not be switched when full and, by default, when the control region is started. The name of journal file 50 is JRNLFIL.

Using the CHGCICSJCT command
Flowchart

Notes:

1. The JRNLIB parameter, RECLMT parameter, NEWJRN parameter, and USRJOB parameter are valid only when JRNSWT(*YES) is specified.
2. The JRNLIB parameter is required when JRNSWT(*YES) is specified.
3. The SBMUSRJOB parameter is valid only when USRJOB(*NONE) is not specified.
4. The JRNFILE parameter and JRNMBR parameter are valid only when JRNSWT(*NO) is specified.
5. The JRNFILE parameter is required when JRNSWT(*NO) is specified.
6. All parameters preceding this point can be specified positionally.

Function
Use the Change CICS/400 Journal Control Table (CHGCICSJCT) command to change a JCT entry.

Required parameters

1. Library (LIB)
2. Enter the name of the OS/400 library that contains the group. Possible values are:
*LIBL: The library list is used to locate the first OS/400 library that contains the group.
*CURLIB: The current library contains the group. If no current library is specified, the QGPL library is used.
library-name:The name of the OS/400 library that contains the group.
3. Group (GROUP)
4. Enter the name of the group containing the JCT entry to be changed.
group-name: The group name may have a maximum length of 10 characters. The first character must be alphabetic, or one of the special characters, $, @, or #. The remaining characters can be alphanumeric or$, @, or #.
5. Number (JFILE)
6. Enter the user journal number. This user journal may also be used for automatic journaling of file activity. The number is also used to identify this JCT entry. journal:A number in the range 1 through 99.

Optional parameters

1. Status (JRNSTS)
2. Indicates whether or not the journal number can be used.
Possible values are:
*SAME: Keep the value currently specified in the JCT entry.
*ENABLED: The journal number can be used.
*DISABLED: The journal number cannot be used.
3. Automatic switching (JRNSWT)
4. Indicates whether or not the journal can be switched automatically, when it is full, to the next file generation
Possible values are:
*SAME: Keep the value currently specified in the JCT entry.
*YES: The journal will be switched automatically when it is full.
*NO: The journal will not be switched automatically when it is full.
5. Library (JRNLIB)
6. The OS/400 library name that will contain the journal. This parameter is valid only when the JRNSWT parameter contains *YES.
Note: The OS/400 file name that is used will be generated by the CICS/400 control region. The OS/400 file name is composed of the mask: AEGJCnnxxx, where nn is the journal number and xxx is the generation number.
Possible values are:
*SAME: Keep the value currently specified in the JCT entry.
library-name: The library name may have a maximum length of 10 characters. The first character must be lphabetic, or one of the special characters, $, @, or #. The remaining characters can be alphanumeric or$, @, or #.
7. Record capacity (RECLMT)
8. The number of records accumulated in order to switch to the next generation of the journal. This parameter is valid only when the JRNSWT parameter contains *YES.
Possible values are:
*SAME: Keep the value currently specified in the JCT entry.
number-of-records-per-file:A number in the range 1 through 99 999.
9. Switch journal at startup (NEWJRN)
10. Indicates whether or not the journal will be switched to the next generation when the CICS/400 control region is started. This parameter is valid only when the JRNSWT parameter contains *YES.
Possible values are:
*SAME: Keep the value currently specified in the JCT entry.
*NO: Switch only when the journal is full.
*YES: Switch when the CICS/400 control region is started normally and when the journal is full.
11. Submit user job when switched (USRJOB)
12. The OS/400 program that is submitted via the SBMUSRJOB CL command when the journal is switched. This parameter is valid only when the JRNSWT parameter contains *YES.
Note: This OS/400 submitted program will not accept any parameters and the program object must exist in the library list associated with the CICS/400 control region.
Possible values are:
*SAME: Keep the value currently specified in the JCT entry.
*NONE: No OS/400 job is submitted when the journal is switched.
job-submit-when-switched:The maximum length is 10 characters. The first character must be alphabetic, or one of the special characters, $, @, or #. The remaining characters can be alphanumeric or$, @, or #.
13. Submit user job at shutdown (SBMUSRJOB)
14. Indicates whether or not the OS/400 job will be submitted when the CICS/400 control region ends. This is not valid when the USRJOB parameter contains *NONE.
Possible values are:
*SAME: Keep the value currently specified in the JCT entry.
*NO: Do not submit the OS/400 job when CICS/400 control region ends.
*YES: Submit the OS/400 job when CICS/400 control region ends.
15. File (JRNFILE)
16. The name of the file that will be utilized by the journal number. This parameter is valid only when the JRNSWT parameter contains *NO.
Possible library values are:
*SAME: Keep the value currently specified in the JCT entry.
*LIBL: The library list for the job that is associated to the CICS/400 control region is used to locate the file.
*CURLIB: The current library for the job that is associated to the CICS/400 control region is used to locate the file. If no library is specified as the current library, the QGPL library is used.
library-name:Specify the name of the library where the file is located.
Possible file name values are:
*SAME: Keep the value currently specified in the JCT entry.
journal-name:Specify the name of the file.
17. Member (JRNMBR)
18. The name of the member in the file that will be utilized by the journal number. This parameter is valid only when the JRNSWT parameter contains *NO.
Possible values are:
*SAME: Keep the value currently specified in the JCT entry.
*FIRST: No file member is specified. The first member in the file is used.
journal-member-name:Specify the name of the file member.

Examples
CHGCICSJCT

LIB( CICSWORK )

GROUP( ACCT )

JFILE( 50 )

JRNSTS( *ENABLED )

JRNSWT( *YES )

RECLMT( 50000 )

This command changes the JCT entry called 50 located in group ACCT in OS/400 library CICSWORK. Journal file 50 is now enabled. The journal will switch to the next generation when the record limit of 50 000 is reached or the journal file is full, and on control region startup.

Using the DSPCICSJCT command
Flowchart

Notes:

1. All parameters preceding this point can be specified positionally.

Function
Use the Display CICS/400 Journal Control Table (DSPCICSJCT) command to display a JCT entry. You can only view this entry; you can neither make changes to it nor delete it.

Optional parameters

1. Library (LIB)
2. Enter the name of the OS/400 library that contains the group.
Possible values are:
*LIBL: The library list is used to locate the first OS/400 library that contains the CICS/400 group.
*CURLIB: The current library contains the CICS/400 group. If no library is specified as the current library, the QGPL library is used.
library-name:Specify the name of the OS/400 library that contains the group.
3. Group (GROUP)
4. Enter the name of the group containing the JCT entry to be displayed.
Possible values are:
*FIRST: No group is specified. The first group found is used.
group-name:The group name may have a maximum length of 10 characters. The first character must be alphabetic, or one of the special characters, $, @, or #. The remaining characters can be alphanumeric or$, @, or #.
5. Number (JFILE)
6. The name of the JCT entry to be displayed.
Possible values are:
*FIRST: Display the first JCT entry.
*ALL: Display all the JCT entries.
journal:A number in the range 1 through 99.
7. Location of output (OUTPUT)
8. Enter the location of the output from this command.
Possible values are:
*: The output is either displayed (if requested by an interactive job) or printed with the job spool output (if requested by a batch job).
*PRINT: The output is printed with the job spool output.

Examples
DSPCICSJCT LIB(CICSWORK) GROUP(ACCT) JFILE(*ALL)
This command displays all JCT entries located in group ACCT in OS/400 library CICSWORK.

Using the RMVCICSJCT command
Flowchart

Notes:

1. All parameters preceding this point can be specified positionally.

Function
Use the Remove CICS/400 Journal Control Table (RMVCICSJCT) command to delete an entry from the JCT.

Required parameters

1. Library (LIB)
2. Enter the name of the OS/400 library that contains the group. Possible values are:
*LIBL: The library list is used to locate the first OS/400 library that contains the group.
*CURLIB: The current library contains the group. If no current library is specified, the QGPL library is used.
library-name:The name of the OS/400 library that contains the group.
3. Group (GROUP)
4. Enter the name of the group containing the JCT entry to be removed.
Possible values are:
*FIRST: No group is specified. The first group found is used.
group-name:The group name may have a maximum length of 10 characters. The first character must be alphabetic, or one of the special characters, $, @, or #. The remaining characters can be alphanumeric or$, @, or #.
5. Number (JFILE)
6. The name of the JCT entry to be removed.
Possible values are:
*FIRST: Remove the first JCT entry.
*ALL: Remove all JCT entries.
journal:A number in the range 1 through 99.

Examples
RMVCICSJCT

LIB(CICSWORK)

GROUP(ACCT)

JFILE(02)
This command removes the JCT entry called 02 from group ACCT in OS/400 library CICSWORK.

Using the WRKCICSJCT command
Flowchart

Notes:

1. All parameters preceding this point can be specified positionally.

Function
Use the Work with CICS/400 Journal Control Table (WRKCICSJCT) command to list entries in the JCT. You can change, remove, copy or display entries in the list, or add new entries to the list.

Optional parameters

1. Library (LIB)
2. Enter the name of the OS/400 library that contains the group.
Possible values are:
*LIBL: The library list is used to locate the first OS/400 library that contains the CICS/400 group.
*CURLIB: The current library contains the CICS/400 group. If no library is specified as the current library, the QGPL library is used.
library-name:Specify the name of the OS/400 library that contains the group.
3. Group (GROUP)
4. Enter the name of the group containing the JCT entries to be listed.
Possible values are:
*FIRST: No group is specified. The first group found is used.
group-name:The group name may have a maximum length of 10 characters. The first character must be alphabetic, or one of the special characters, $, @, or #. The remaining characters can be alphanumeric or$, @, or #.
5. Number (JFILE)
6. Enter the name of the JCT entry to be listed. This is also the journal number used for automatic journaling of files.
Possible values are:
*ALL: List all JCT entries.
*FIRST: List the first JCT entry.

Notes:
1 All parameters preceding this point can be specified positionally.

Examples
WRKCICSJCT

LIB(CICSWORK)

GROUP(ACCT)

This command lists all JCT entries located in group ACCT in OS/400 library CICSWORK.