COMPARE command
The COMPARE command allows you to compare the content of two resource groups. Additional options allow you to create new resource groups and change packages based on the differences.
Syntax
>>-COMPARE--| Resource group 1 |--,-| Resource group 2 |--------> >--+-------------------------------------------------------------+->< '-,-| Update change package |-+-----------------------------+-' '-,-| Update resource group |-' Resource group 1 |--INPUT1(--RG(rgname1)--+---------------+----------------------> '-,IMSID(imsid)-' >--,DDNAME(REPOSITORY,ddname)--)--------------------------------| Resource group 2 |--INPUT2(--RG(rgname2)--+---------------+----------------------> '-,IMSID(imsid)-' >--,DDNAME(REPOSITORY,ddname)--)--------------------------------| Update change package |--UPDCP(--NAME(cpname)--+---------------+----------------------> '-,IMSID(imsid)-' .-,MATCH(INPUT1)-. >--+----------------+-------------------------------------------> '-,MATCH(INPUT2)-' .-,NOMATCH(INPUT2(DELETE_RES),INPUT1(CREATE_RES))-------------. >--+-------------------------------------------------------------+--> '-,NOMATCH(INPUT2(-+-CREATE_RES-+-),INPUT1(-+-CREATE_RES-+-))-' '-DELETE_RES-' '-DELETE_RES-' .-,UPDREPOS(INPUT2)-. >--+-------------------+--)-------------------------------------| '-,UPDREPOS(INPUT1)-' Update resource group |--UPDRG(--NAME(rgname)--+---------------+----------------------> '-,IMSID(imsid)-' .-,MATCH(INPUT1)-. >--+----------------+-------------------------------------------> '-,MATCH(INPUT2)-' .-,NOMATCH(INPUT2(DELETE_RES),INPUT1(CREATE_RES))-------------. >--+-------------------------------------------------------------+--> '-,NOMATCH(INPUT2(-+-CREATE_RES-+-),INPUT1(-+-CREATE_RES-+-))-' '-DELETE_RES-' '-DELETE_RES-' .-,UPDREPOS(INPUT2)-. >--+-------------------+--+----------+--)-----------------------| '-,UPDREPOS(INPUT1)-' '-,REPLACE-'
Parameters
- INPUTn()
- The COMPARE command compares the resource group
specified in the INPUT1 statement with the resource
group specified in the INPUT2 statement. Both the INPUT1 and INPUT2 statements
must be present, and their command syntax is the same. The following
options are available for an INPUT1 or INPUT2 statement:
- RG(rgname)
- The name of the common or system-level resource group to be compared. If specifying a system-level resource group, the IMSID parameter is required.
- IMSID(imsid)
- Only specify the IMSID if you have specified a system-level resource group in the RG parameter. Do not include the IMSID parameter if the resource group is simply associated with a particular IMS™ system.
- DDNAME(REPOSITORY,ddname)
- Identifies the ddname of the IMS
Configuration Manager repository containing
the specified resource group. For example, if the ddname of the IMS
Configuration Manager repository is specified
as:
then specify://GPLREPOS DD DISP=SHR, // DSN=GPL.V210.MYREPOSDDNAME(REPOSITORY,GPLREPOS))
- Example
COMPARE INPUT1(RG(’UPDATED’), + DDNAME(REPOSITORY,REPOS1)), + INPUT2(RG(’ORIGINAL’), + IMSID(ICXX), + DDNAME(REPOSITORY,REPOS1))
- UPDCP()
- The UPDCP parameter creates a new command change
package based on the difference between the resource group specified
in INPUT1 statement, and the resource group specified
in the INPUT2 statement. The following options are
available for a UPDCP statement:
- NAME(cpname)
- The NAME parameter is an optional statement that allows you to place a description of your change package within the command. Change packages are automatically named with the current date and time by IMS Configuration Manager.
- IMSID(imsid)
- The ID of the IMS system on which to deploy the newly created change package.
- MATCH(INPUTn)
Specify which input resource group (INPUT1 or INPUT2) takes priority when a resource is found in both groups with the same name and type, but with different attributes. For example, if the INPUT1 and INPUT2 resource groups have a number of matching resources, specify MATCH(INPUT2) to select the resources from INPUT2 for use in the change package.
Default: INPUT1
- NOMATCH(INPUT2(action),INPUT1(action))
When comparing resource groups, situations can occur where resources might be present in one group but not the other (for example, a new resource is added to the INPUT1 resource group which is not present in the existing resource group, INPUT2). When the COMPARE command encounters a resource that is found in one group but not the other, the NOMATCH parameter is used to specify the user's required course of action when creating the change package.
The NOMATCH parameter requires the user to specify an action for both the INPUT2 and INPUT1 resource groups. The action specified for each group instructs IMS Configuration Manager on how to handle a resource when it is found within that group. Users have two options for action:
- CREATE_RES
- Create an entry in the change package that adds the resource from the input resource group.
- DELETE_RES
- Create an entry in the change package that will delete the resource.
new
resources in INPUT1 and removes all theold
resources in INPUT2, use NOMATCH(INPUT2(DELETE_RES),INPUT1(CREATE_RES)).Default: NOMATCH(INPUT2(DELETE_RES),INPUT1(CREATE_RES)) if NOMATCH parameter not specified.
- UPDREPOS(INPUTn)
- The IMS
Configuration Manager repository
(specified as INPUT1 or INPUT2)
in which to store the new change package.
Default: INPUT2
- Example 1
COMPARE INPUT1(RG('NEW TAKEUP'), + DDNAME(REPOSITORY,ICMREP01)), + INPUT2(RG('EXISTING RG'), + DDNAME(REPOSITORY,ICMREP01)), + UPDCP(NAME('IMSC CP 2013 JAN'), + IMSID(IMS1), + UPDREPOS(INPUT2))- Example 2
COMPARE INPUT1(RG(’UPDATED’), + DDNAME(REPOSITORY,REPOS1)), + INPUT2(RG(’ORIGINAL’), + IMSID(ICXX), + DDNAME(REPOSITORY,REPOS1)), + UPDCP(NAME('UPDATED CP'), + IMSID(ICXX), + MATCH(INPUT1), + NOMATCH(INPUT2(DELETE_RES),INPUT1(CREATE_RES)), + UPDREPOS(INPUT1))
- UPDRG()
- The UPDRG parameter creates a new resource group
(or updates an existing one) based on the difference between the resource
group specified in INPUT1 statement, and the resource
group specified in the INPUT2 statement. When using
the UPDRG parameter, an UPDCP statement
must also be present.
- NAME(rgname)
- The name of the new resource group.
- IMSID(imsid)
- The ID of the IMS system on which to deploy the newly created (or updated) resource group.
- MATCH(INPUTn)
Specify which input resource group (INPUT1 or INPUT2) takes priority when a resource is found in both groups with the same name and type, but with different attributes. For example, if the INPUT1 and INPUT2 resource groups have a number of matching resources, specify MATCH(INPUT2) to select the resources from INPUT2 for use in the new (or updated) resource group.
Default: INPUT1
- NOMATCH(INPUT2(action),INPUT1(action))
When comparing resource groups, situations can occur where resources might be present in one group but not the other (for example, a new resource is added to the INPUT1 resource group which is not present in the existing resource group, INPUT2). When the COMPARE command encounters a resource that is found in one group but not the other, the NOMATCH parameter is used to specify the users required course of action when creating the new (or updated) resource group.
The NOMATCH parameter requires the user to specify an action for both the INPUT2 and INPUT1 resource groups. The action specified for each group instructs IMS Configuration Manager on how to handle a resource when it is found within that group. Users have two options for action:
- CREATE_RES
- Adds the resource to the new resource group.
- DELETE_RES
- Delete the resource from the new resource group.
new
resources in INPUT1 and removes all theold
resources in INPUT2, use NOMATCH(INPUT2(DELETE_RES),INPUT1(CREATE_RES)).Default: NOMATCH(INPUT2(DELETE_RES),INPUT1(CREATE_RES)).
- UPDREPOS(INPUTn)
- The IMS
Configuration Manager repository
(specified as INPUT1 or INPUT2)
in which to store the new (or updated) resource group.
Default: INPUT2
- REPLACE
- If the resource group specified with the NAME parameter already exists, specifying REPLACE allows that resource group to be replaced with the new resource group. If, in this scenario, the REPLACE parameter is not specified, the COMPARE command will fail.
- Example 1
COMPARE INPUT1(RG('NEW TAKEUP'), + DDNAME(REPOSITORY,ICMREP01)), + INPUT2(RG('EXISTING RG'), + DDNAME(REPOSITORY,ICMREP01)), + UPDCP(NAME('IMSC CP 2013 JAN'), + IMSID(IMS1), + UPDREPOS(INPUT2)), + UPDRG(NAME('EXISTING RG'), + UPDREPOS(INPUT2), + REPLACE)- Example 2
COMPARE INPUT1(RG(’UPDATED’), + DDNAME(REPOSITORY,REPOS1)), + INPUT2(RG(’ORIGINAL’), + IMSID(ICXX), + DDNAME(REPOSITORY,REPOS1)), + UPDCP(NAME('UPDATED CP'), + IMSID(ICXX), + MATCH(INPUT1), + NOMATCH(INPUT2(DELETE_RES),INPUT1(CREATE_RES)), + UPDREPOS(INPUT1)), + UPDRG(NAME('ORIGINAL'), + IMSID(ICXX), + MATCH(INPUT2), + NOMATCH(INPUT2(DELETE_RES),INPUT1(CREATE_RES)), + UPDREPOS(INPUT1), + REPLACE)
