Skip to content

MDADDORR - Add Replication Rules to Object Request command

MDCMS is delivered with a command-based API that allows external tools or applications to add object-level replication rules to existing Object Requests within MDCMS.

The MDCMS command is named MDADDORR and is located in library MDCMS. It is not necessary to have the MD libraries in the library list prior to using this command.

All MDADDORR API transactions are logged to file MDCMS/MDDAORR.

To match the rules to the object request, the APPL, LVL, OBJT, ATTR, OBJN and USER values must be identical. The RFP, RFPD or REQN parameters can be used to uniquely identify the request in case multiple requests for the same object name and type could exist. Also, the matched Object Request must be in status '00' or '01' and the Object Type must be for objects residing in libraries.

MDADDORR Parameter Table

Name Type Length Description
KEYWORD Description Type Length
APPL The MDCMS Application code for the request CHAR 6
LVL The MDCMS Promotion Level for the request INTEGER 3
OBJT The System or MDCMS Object Type code for the request CHAR 7
OBJA The MDCMS Attribute that the existing Object Request is assigned to CHAR 10
OBJN The name of the Object that the replication rules should be added to CHAR 128
USER Specifies the user profile to whom the object request is assigned.
*USER - the job user is the assigned user
CHAR 10
GENR The general rule to apply to libraries defined in the Object Replication Template that is applied to the object request's attribute for a given application level.
Any libraries listed in the specific rules take precedence over the general rules.
*DFT - The add and update rules defined on the template will be used
*ALL - replicate to every library listed for a template unless omitted by a specific rule
*NONE - ignore every library listed for a template unless included by a specific rule
*NOADD - ignore every library listed for a template if the object doesn't already exist in the library, unless included by a specific rule
*NOUPD - ignore every library listed for a template if the object already exists in the library, unless included by a specific rule
CHAR 6
SPCR A list of up to 80 specific rules to add or remove from the list for a specific object request. Each rule consists of 2 elements:
Library - the name of a specific library, or *generic* name for any libraries matching the name pattern. The rule to apply is prioritized by specific library, then generic library and finally general rule.
Option
*INCLUDE - Include the library or libraries for replication
*OMIT - Exclude the library or libraries for replication
*REMOVE - Remove the specific rule for the library or libraries
from the list. The general rule will apply instead for the library or libraries.
0 to 80 entries of
CHAR(10)
+
CHAR(8)
2000
RFP Specifies the RFP that the Object Request is assigned to. This is in case multiple objects of the same name are currently requested at the same level. INTEGER 7
RFPD Specifies the description of the RFP that the Object is currently assigned to. This is in case multiple objects of the same name are currently requested at the same level. CHAR 160
REQN The Request Number to uniquely identify the Object to add the rules to, if known. INTEGER 11
ENV MDCMS Environment ID
*CUR - same MDCMS instance as current library list
*DFT - the default MDCMS instance (no suffix)
CHAR 4
VREF Specifies the Vendor Generated Identifier in order for an external process to easily identify the transaction record in the MDDAORR table. CHAR 20
EMSG Specifies if and to what extent an exception message should be returned to the calling program. An exception message occurs when an input parameter value is invalid, causing the execution to fail.
*DIAG - A diagnostic message will be placed in the calling program's message queue in the following format:
MDADDORR Exception. Object=, Vendor Reference=, Reason=
If the Vendor Reference isn't passed to MDADDORR, it won't be included in the diagnostic message.
*ESCAPE - The full diagnostic message as described above will be placed in the calling program's message queue and then followed by escape message CPF0001 for which the calling program can monitor.
*NONE - An exception message will not be returned to the calling program's message queue.
CHAR 7