When you create a journal receiver either with iSeries™ Navigator or the Create Journal Receiver (CRTJRNRCV) command, you assign a name to the journal receiver.
When you use iSeries Navigator or the Change Journal (CHGJRN) command to detach the current journal receiver and create and attach a new receiver, you can assign a name or have the system generate one. If you use system journal-receiver management, the system generates the name when it detaches a receiver and creates and attaches a new one.
If you plan to have more than one journal on your system, use a naming convention that links each journal with its associated receiver.
To simplify recovery and avoid confusion, make each journal receiver name unique for your entire system, not unique within a library. If you have two journal receivers with the same name in different libraries and they both become damaged, the reclaim storage operation renames both journal receivers when they are placed in the QRCL library. When you use the Move Object (MOVOBJ) command for a journal or journal receiver in the QRCL library, you can move an object from QRCL back to its original library. You cannot change the name of the journal or the journal receiver.
When you detach the receiver from the journal and attach a new one, you can have the system generate the name for the new receiver by incrementing the previous receiver name. If you use system change-journal management by specifying MNGRCV(*SYSTEM) for the journal, the system also generates a new receiver name when it changes journal receivers. The default for the Create Journal (CRTJRN) command is to use system change-journal management.
The following table shows the rules the system uses to generate a new receiver name. It applies these rules in the sequence shown in the table.
Current name | System action | Example |
---|---|---|
Last 4 characters are numeric. | Adds 1 | DSTR0001 to DSTR0002 |
Last character is not numeric. | Truncates the name to 6 characters, if necessary. Adds 0001 | DSTRCVR to DSTRCV0001 |
Last character is numeric. Last non-numeric character is in position 5 or less. | Adds 1 | DSTR01 to DSTR02 |
Last character is numeric. Last non-numeric character is in position 6 or higher. | Truncates to 6 characters, if necessary. Adds 0001. | DSTRCVR01 to DSTRCV0001 |
If you restore a journal to your system, the system creates a new journal receiver and attaches it to the journal. The system generates a name for the new journal receiver based on the name of the journal receiver that was attached when the journal was saved. The following table shows the rules the system uses to generate a new receiver name when you restore a journal:
Current name | System action | Example |
---|---|---|
Last 4 or more characters are numeric. | Adds 1 to the leftmost digit of the numeric portion. | DSTR0001 to DSTR1001 |
Last character is not numeric. | Truncates to six characters, if necessary. Adds 1000. | DSTRCVR to DSTRCV1000. |
Ending numeric portion is less than 4 digits. | Pads the left portion of the numeric portion with zeroes to create a 4-digit suffix. Adds 1 to the leftmost digit. | DSTRCV01 to DSTRCV1001. |
If the name generated by the system is the same as the name of a journal receiver already on the system, the system adds 1 to the name until it creates a name that is not a duplicate. For example, assume a journal receiver named RCV1 was attached when the journal was saved. When the journal is restored, the system attempts to create a new journal receiver named RCV1001. If that name already exists, the system tries the name RCV1002.
The following table shows examples of how the system generates new receiver names:
Last journal receiver known to the system1 | Created by change journal2 | Created by restoring journal |
---|---|---|
A | A0001 | A1000 |
ABCDEF | ABCDEF0001 | ABCDEF1000 |
ABCDEFG | ABCDEF00013 | ABCDEF10003 |
ABCDEF1234 | ABCDEF1235 | ABCDEF2234 |
A0001 | A0002 | A1001 |
A1 | A2 | A1001 |
A9 | A10 | A1009 |
ABCDEF7 | ABCDEF00013 | ABCDEF10073 |
ABCDEF9999 | Error4 | ABCDEF0999 |
A1B15 | A1B16 | A1B1015 |
Notes:
1If the journal exists on the system, the last journal receiver known to the system is the journal receiver that is currently attached. If the journal does not exist, the last journal receiver known to the system is the journal receiver that was attached when the journal was saved. 2Either when a user issues the CHGJRN command with JRNRCV(*GEN) or when the journal is changed by system change-journal management. 3The last character of the current name is dropped because it exceeds 6 characters. 4If the journal is set up as MNGRCV(*SYSTEM), the receiver name wraps around to 0's (ABCDEF0000). If the journal is set up as MNGRCV(*USER), an error occurs because adding 1 to 9999 causes an overflow condition. |