CL Command Reference - CHGJRNOBJ
CL Command List > CHGJRNOBJ Reference
Description:
The Change Journaled Object (CHGJRNOBJ) command changes the journaling attributes of a journaled object without the need to end and restart journaling for the object.
The command can be used to change the Images (IMAGES) value for a database file (*FILE) or a data area (*DTAARA) object without the need to end and restart journaling for the object. Otherwise the Start Journal Physical File (STRJRNPF) can be used to set this value for database files. The Start Journal (STRJRN) or the Start Journal Object (STRJRNOBJ) can be used to set this value for data areas.
The command can be used to change the Omit journal entry (OMTJRNE) value for a database file (*FILE), an integrated file system stream file (*STMF) or directory (*DIR) object without the need to end and restart journaling for the object. Otherwise the Start Journal Physical File (STRJRNPF) can be used to set this value for database files. The Start Journal (STRJRN) can be used to set this value for integrated file system objects.
The command can be used to change the New objects inherit journaling (INHERIT) value for an integrated file system directory (*DIR) object without the need to end and restart journaling for the object. Otherwise the Start Journal (STRJRN) can be used to set this value for integrated file system objects.
The command can also be used to allow a database file (*FILE), that contains changes for partial transactions, to be used. Partial transactions can only exist for an object that can be changed under commitment control. Database file objects (*FILE) are the only objects that can be opened using commitment control.
Partial transactions can exist for two reasons:
1. The most common reason that an object may have partial transactions is that the object was saved while it was in the middle of a transaction and this saved version has been restored. In this case, the preferred method to complete all partial transactions is to use the Apply Journaled Changes (APYJRNCHG) or Remove Journaled Changes (RMVJRNCHG) command. If the journal receivers needed for APYJRNCHG or RMVJRNCHG are not available, then as a last resort, the Partial transactions (PTLTNS) parameter can be used to allow the database file to be opened and used, without completing the transactions.
2. The other reason that partial transactions may exist is that the object was involved in a long running rollback operation that was interrupted. In this case, APYJRNCHG and RMVJRNCHG cannot be used to complete the partial transactions. If there is no saved version of the file to restore, then as a last resort, the Partial transactions (PTLTNS) parameter can be used to allow the file to be opened and used, without completing the transaction.
If a change does not apply to an object type, the objects of that type are ignored and processing continues with the next object. Also, if the object already has the correct value for the attribute being changed no error will be returned.
Restrictions:
. Only one journaling attribute can be changed at a time.
. Changing the IMAGES, OMTJRNE and INHERIT parameters can only be done if the object specified is currently being journaled.
. All object (*ALLOBJ) special authority is required if PTLTNS(*ALWUSE) is specified.
Examples:
Example 1: Change File Journaling Attribute IMAGES
CHGJRNOBJ OBJ((LIBA/FILEA *FILE)) ATR(*IMAGES) IMAGES(*BOTH)
This command will change the attribute of file FILEA in library LIBA to now journal both before and after images for the file without having to end journaling and start journaling of the file.
Example 2: Change File Journaling Attribute OMTJRNE
CHGJRNOBJ OBJ((LIBB/FILEB *FILE)) ATR(*OMTJRNE) OMTJRNE(*OPNCLOSYN)
This command will change the attribute of file FILEB in library LIBB to now omit open and close entries.
Example 3: Change Object Journaling Attribute OMTJRNE
CHGJRNOBJ OBJFID(00000000000000007E09BDB000000009)
ATR(*OMTJRNE) OMTJRNE(*OPNCLOSYN)
This command will change the attribute of the object represented by the specified file identifier to now omit open, close and force entries. This object can be an object of type *DIR or *STMF.
Example 4: Change File Attribute PTLTNS
CHGJRNOBJ OBJ((LIBC/FILEC *FILE)) ATR(*PTLTNS) PTLTNS(*ALWUSE)
This command will change the file so that it can be used again, however the partial transactions are not themselves completed. This method should only be used in rare circumstances when the file could not be recovered by applying or removing the journaled changes.