These instructions describe how to create the configuration necessary to add a library to replication for a data group, synchronize the library and its contents, and make the configuration changes effective.
If you started the process of adding selection rules for a new library from the Assure UI portal and chose the option to manually synchronize, you can also use these instructions to complete configuration and synchronize the library.
Notes:
-
Perform instructions from a management system unless otherwise directed.These instructions are intended to be used without delays between steps.
-
These instructions assume the following:
-
The library to be added is located on the system specified as system 1 in the three-part data group name.
-
The data group to which the library will be added is configured using best practices. Specifically, the data group should specify the following values: *ALL for Data group type (TYPE), *YES for Use remote journal link (RJLNK), and *USRJRN for Cooperative journal (COOPJRN).
-
For some configurations, you may be able to skip steps in these instructions.
-
If either of these scenarios apply, you can skip Step 6 though Step 13 and Step 21 through Step 23:
-
If the data group type is *OBJ, you do not need data group file entries or object tracking entries.
-
For data groups of type *ALL, if the object entries you create in Step 5 specify COOPDB(*NO), you do not need file entries or object tracking entries.
-
-
If you were directed here from the Assure UI portal when creating library selection rules and chose to synchronize manually, you can skip Step 5.
-
Some steps in these instructions use an advanced user technique that combines specifying an option on a display, using a repeat function key, and specifying parameters on the command line to be passed to the option so that the same action is performed for all items in the list. Be sure to read each step in its entirety before taking action.
Do the following from the management system:
Steps to ensure replication is ended.
-
Perform a controlled end of the data group using the command:
ENDDG DGDFN(dgname) ENDOPT(*CNTRLD) DTACRG(*YES)
-
Display the data group and verify that its replication processes become inactive (red I) using the command:
WRKDG DGDFN(dgname)
The RJ link, reported in Source DB column of the Work with Data Groups display, can remain active.
-
When replication processes have ended, do the following from the Work with Data Groups display to check for any open commit cycles.
-
Type
8
(Display status) next to the data group name and press Enter. Then pressF8
(Database). -
Check the value of the Open Commit column for all listed database apply sessions.
- If *YES is displayed for any apply session, you must complete Step 4.
- If *NO is displayed for all apply sessions, continue with Step 5.
-
-
If open commit cycles exist, this step is necessary to prevent data loss for currently replicated objects. Do the following:
-
Use the following command to start the data group:
STRDG DGDFN(dgname) DTACRG(*YES)
- Take action to resolve the open commit cycles, such as ending or quiescing the application or closing the commit cycle.
- Repeat the controlled end again using Step 1.
If you are unable to end the data group without open commits, you may need to use these instructions when the data group is not as busy.
Steps to create configuration -
-
Use the following commands to create two data group object entries, one for the library itself, and one for its contents. (If you were directed here from the Assure UI portal when creating library selection rules and chose to synchronize manually, you can skip Step 5.)
ADDDGOBJE DGDFN(dgname) LIB1(QSYS) OBJ1(library-name) TYPE(*LIB) ADDDGOBJE DGDFN(dgname) LIB1(library-name) OBJ1(*ALL) TYPE(*ALL)
-
Create data group file entries for any objects of type *FILE in the library using the command:
LODDGFE DGDFN(dgname) CFGSRC(*NONE) LIB1(library-name) BATCH(*YES) SELECT(*NO)
-
Before continuing, confirm the job ran successfully using the command:
WRKJOB LODDGFE
-
Create object tracking entries for any objects of type *DTAARA or *DTAQ in the library using the command:
LODDGOBJTE DGDFN(dgname) LODSYS(*SRC) UPDOPT(*ADD)
-
Before continuing, confirm the job ran successfully using the command:
WRKJOB LODDGOBJTE
Steps to start journaling on source.
-
This step must be performed from the source system of the data group.
-
Use the following command to display object tracking entries created for *DTAARA and *DTAQ objects in the library:
WRKDGOBJTE DGDFN(dgname) OBJ1(library-name/*ALL)
- Type
9
(Start journaling) next to the first tracking entry. Do not press Enter. - Press
F13
(Repeat). - On the command line type the
following:
JRNSYS(*SRC) FORCE(*YES)
-
Press Enter.
-
-
This step must be performed from the source system of the data group.
-
Use the following command to display a list of data group file entries created for *FILE objects in the library.
WRKDGFE DGDFN(dgname) LIB1(library-name)
-
Type
9
(Start journaling) next to the first file entry. Do not press Enter. -
Press
F13
(Repeat). -
On the command line type the following:
JRNSYS(*SRC) FORCE(*YES)
- Press Enter.
Steps that temporarily change environment while synchronizing. These steps prevent MIMIX from attempting to use audits and recoveries that would otherwise attempt actions that may not be desired when manually synchronizing the library.
-
-
Display the data group file entries created for *FILE objects in the library using the command.
WRKDGFE DGDFN(dgname) LIB1(library-name)
-
Do the following to change the status of the listed file entries to *HLD.
a.Type 23 (Hold file) next to the first file entry. Do not press Enter.
b.Press F13 (Repeat).
c.Press Enter.
d.Press F5 (Refresh) and verify that all file entries listed show *HLD as their requested status.
-
Identify and record current policy values for the data group by doing the following:
-
Type the following command and press
F4
(Prompt):SETMMXPCY DGDFN(dgname)
-
Press Enter to display the current values. Record the values displayed for the following fields:
-
Automatic object recovery
-
Automatic database recovery
-
Automatic audit recovery
-
-
Disable automatic recoveries for the data group using the following command:
SETMMXPCY DGDFN(dgname) OBJRCY(*DISABLED) DBRCY(*DISABLED) AUDRCY(*DISABLED)
-
Start the data group and clear pending entries using the command:
STRDG DGDFN(dgname) CLRPND(*YES) SETAUD(*YES) DTACRG(*YES) DBRSYS(*SRC)
Steps to synchronize the library.
-
Verify that there is no user activity on the library on the source system. There should be no locks on the objects in the library on the source or target system.
-
From the target system, do the following:
-
If the library exists on the target system, use the
CLRLIB
command to clear it. -
If the library does not exist on the target system, use the
CRTLIB
command to create it.
-
-
From the source system, synchronize the library using the following command:
SYNCOBJ OBJ(library-name/*ALL) SYS2(target-system-name)
-
Verify the job has completed using the command:
WRKJOB SYNCOBJ
Do not continue until the job has completed. If the library is too large for the SYNCOBJ command, you will need to use media to save/restore the library from one system to another.
Steps to start journaling on target.
-
This step must be performed from a management (*MGT) system:
-
Display object tracking entries for *DTAARA and *DTAQ objects in the library using the command:
WRKDGOBJTE DGDFN(dgname) OBJ1(library-name/*ALL)
-
Type
9
(Start journaling) next to the first tracking entry. Do not press Enter. -
Press
F13
(Repeat). -
On the command line type the following:
JRNSYS(*TGTC) FORCE(*YES)
- Press Enter.
-
-
This step must be performed from the management (*MGT) system.
-
Display data group file entries for *FILE objects in the library using the command.
WRKDGFE DGDFN(dgname) LIB1(library-name)
-
Type
9
(Start journaling) next to the first file entry. Do not press Enter. -
Press
F13
(Repeat). -
On the command line type the following:
JRNSYS(*TGT) FORCE(*YES)
-
Press Enter.
-
-
From the Work with DG File Entries display, do the following to change the status of the file entries for the library to *RLSWAIT.
-
Type
25
(Release file) next to the first file entry. Do not press Enter. -
Press
F13
(Repeat). -
Press Enter.
-
Press
F5
(Refresh) and verify that all file entries listed show *ACTIVE as their current status.
-
-
End the data group using the command:
ENDDG DGDFN(dgname) DTACRG(*YES)
-
Set automatic recovery policies for the data group back to their previous values. Use the values recorded in Step 14 in the following command:
SETMMXPCY DGDFN(dgname) OBJRCY(value) DBRCY(value) AUDRCY(value)
-
Display the data group and verify that its replication processes become inactive (red I) using the command:
WRKDG DGDFN(dgname)
The RJ link, reported in Source DB column of the Work with Data Groups display, can remain active.
-
Start the data group using the command:
STRDG DGDFN(dgname) DTACRG(*YES)
-
Do the following to address expected notifications associated with actions performed in Step 18.
- Display notifications for the data group using the command:
WRNFY DGDFN(dgname)
- If you see a notification from target journal inspection for the CRTLIB or
CLRLIB command, type
46
(Acknowledge) next to it and press Enter.
- Display notifications for the data group using the command: