PROCESS_PENDING_REPLICATION_CRITERIA procedure

The PROCESS_PENDING_REPLICATION_CRITERIA procedure handles a set of pending replication criteria rules in the Replication Criteria List (RCL) by either changing the APPLY_STATE to ACTIVE or permanently removing the pending entries for the specified apply-label.

When apply-action is set to COMMIT, the rules are evaluated to determine whether any objects are now subject to replication. These identified objects are checked to ensure the replication action can be applied to the object without encountering an error and causing the commit request to fail. For more information about the cause of the failure, use the QSYS2.EVALUATE_PENDING_REPLICATION_CRITERIA table function.

When committing a group of rules, a large number of objects might need to be replicated. Consider setting the parallel degree value for your job before calling this procedure to allow multiple threads to be used for the resynchronization portion of this operation. This value can be set using CHANGE_MIRROR procedure.

Start of change
Authorization: The privileges held by the authorization ID of the statement must include the following1:
  • For the authority needed to use this procedure, see Authorization.
  • *EXECUTE authority on the QSYS2 library.
  • *OBJOPR, *ADD, and *DLT authority on QSYS2/MIRROR_RCL
End of change
Read syntax diagramSkip visual syntax diagram PROCESS_PENDING_REPLICATION_CRITERIA ( IASP_NAME => iasp-name, APPLY_ACTION =>  apply-action ,APPLY_LABEL => apply-label )
The schema is QSYS2.
iasp-name
A character or graphic string expression that identifies the name of the auxiliary storage pool (ASP) group for the apply-label. Can contain the following special value:
*SYSBAS
The replication criteria rule is associated with the system ASP (ASP 1) and any basic user ASPs (ASPs 2-32).
apply-action
A character or graphic string expression that identifies the action to perform for the group of pending replication criteria rules.
COMMIT
Each pending replication criteria rule with the specified apply-label for this iasp-name is applied to the RCL to implement the rule as defined by calls to the ADD_REPLICATION_CRITERIA or REMOVE_REPLICATION_CRITERIA procedures.
ROLLBACK
Each pending replication criteria rule with the specified apply-label for this iasp-name is permanently removed from the list of pending replication criteria rules.
apply-label
A character or graphic string expression that identifies the label associated with a group of pending replication criteria rules.
The apply-label identifies pending replication criteria rules that have been created by add or remove requests with this label.
*GENERATE
Use the apply-label generated by the system for this job. The generated value is always the same for a specific job. This behavior allows multiple rule changes within a job to be added or removed in PENDING state and then processed in a single operation. This is the default.
label-identifier
The name of the label to use.

Examples

  • After verifying that the pending rules associated with label TESTGROUP2 have the intended effect, promote the rules into production.
    CALL QSYS2.PROCESS_PENDING_REPLICATION_CRITERIA(IASP_NAME => '*SYSBAS',
                                                    APPLY_ACTION => 'COMMIT',
                                                    APPLY_LABEL => 'TESTGROUP2');
  • Remove the set of pending rules associated with label TESTGROUP1.
    CALL QSYS2.PROCESS_PENDING_REPLICATION_CRITERIA(IASP_NAME => '*SYSBAS',
                                                    APPLY_ACTION => 'ROLLBACK',
                                                    APPLY_LABEL => 'TESTGROUP1');
1 For each database IASP, a separate RCL table exists in library QSYS2nnnnn/MIR_RCLnnn; the authorization rules apply to these tables as well.