Migration of commands

Migration of commands extends the concepts involved in migration of resource definitions.

In addition to packaging resource definitions, you can package the following commands:

Add
Adds a resource definition to a resource group (RESGROUP) in a context-based target CICSĀ® configuration.
Remove
Removes a resource definition from a resource group in a context-based target CICS configuration.
Delete
Deletes a resource definition from either a CSD-based or a context-based target CICS configuration.

A change package can contain resource definitions, commands, or both.

Each command identifies:

When migrating resource definitions, CICS Configuration Manager selects candidate resource definitions based on the specified migration scheme, transforms them (if the migration scheme refers to any transformation rules), and then applies the (possibly transformed) candidates to the target CICS configurations. CICS Configuration Manager uses the same approach for migrating commands: it selects candidate commands based on the specified migration scheme, transforms them, and then applies them to the target CICS configurations.

There is one significant difference in the way that CICS Configuration Manager selects candidate resource definitions and candidate commands:

CICS Configuration Manager applies candidate commands to the target CICS configurations of a migration scheme, never to the source CICS configurations. For example, suppose you package a Delete command and associate it with a CICS configuration in your development environment. Migrating the change package from development to the test environment deletes the specified resource definition from the test environment; it does not delete it from the development environment.

When you mark a change package that contains commands as "ready", CICS Configuration Manager calculates and stores checksums of the commands. Later, when you migrate the change package, CICS Configuration Manager checks whether the list of commands has changed: if it has, CICS Configuration Manager does not allow the migration.

Transformation of commands

If the CICS configuration associated with a command matches the source CICS configuration of a migration path, then before applying the command to the target CICS configuration, CICS Configuration Manager transforms the command according to any rules specified by the migration path. CICS Configuration Manager does not transform a command if its associated CICS configuration matches only the target CICS configuration.

For commands, CICS Configuration Manager ignores any transformation rules that refer to resource definition details that are not specified in the command. Specifically:

For Add commands, CICS Configuration Manager applies transformation rules to both the name of the resource group to which a resource definition already belongs, and the name of the target resource group (to which you want to add the resource definition).

You can, for example, define a transformation rule with qualification criteria that refer to resource definition group, type, and name, and that transforms group names. Suppose the names of resource groups in your test environment have the prefix TEST and the names of resource groups in the production environment have the prefix PROD. You have a change package that contains an Add command to add a resource definition in group TESTA to group TESTB. You can define a transformation rule that changes group names of TEST* to PROD*. When you migrate the change package from test to production, CICS Configuration Manager transforms the Add command so that it refers to groups PRODA and PRODB.

Command processing rules

The following rules apply to migrating a change package that contains commands:

Example

The following figure shows the migration of a Delete command to CICS configurations that refer to CSD files or contexts:

Figure 1. Migrating a Delete command

The change package specifies that the Delete command is associated with CICS configuration DEVT. This matches the source CICS configuration of both migration paths in the "development to test" migration scheme.

If, as in this example, a command is associated with the source CICS configuration of a migration path, CICS Configuration Manager transforms the command before invoking it. In this example, the migration paths refer to a transformation rule set containing a rule that transforms group names from *DEVT to *TEST. So the command that CICS Configuration Manager invokes on the target CICS configurations TESTA and TESTB refers to the transformed group name PAYTEST, not the group name PAYDEVT of the original command.

If the specified resource definition had existed in both of the target CICS configurations, CICS Configuration Manager would have deleted them from both (TESTA and TESTB). However, the resource definition existed only in TESTB.

When packaging the command before migration, we could have associated the Delete command with the test environment instead of development. In that case, we would have needed to package two similar Delete commands: one applying to TESTA, and another applying to TESTB. Also, because the commands would have been associated with the target CICS configurations, they would not have been transformed before being invoked. So the commands would have had to refer to the group name PAYTEST.

After migration, CICS Configuration Manager automatically adds to the change package a Delete command associated with TESTA and a Delete command associated with TESTB (notice that these are the transformed commands, referring to the group PAYTEST):

Figure 2. After migrating a Delete command

This automatic propagation of the command enables you to reuse the change package with other migration schemes, such as migration schemes that refer to TESTA and TESTB as source CICS configurations, so that you can progressively migrate the deletion to other target CICS configurations without having to package new commands.