Skip to content

Demote

Drop/Create

The current action for a demote of a DDL/SQL component is that CMNDB2DD will attempt to re-instate the prior version of the component via DROP/CREATE. To do this it searches the concatenation allocated to the SQLIN ddname (which is built starting from the next highest level library), using the first matching member name it finds to do the create. If the member name was not found when searching the SQLIN concatenation then CMNDB2DD picks up the DDL from the STGLIB ddname (which points at the current level promotion library) and uses the information found within to issue a DROP request only (i.e. it assumes that this SP was a new one and there is nothing to replace it with once it has been demoted).

Once CMNDB2DD has completed the target component is then removed from the current level promotion library.

Some sites may prefer to use mechanisms other than CMNDB2DD to process the DDL. In order to make this easier an option is available to pass the DDL built by CMNDB2DD to an external file which can then be processed by whatever utility the site wishes (this was also mentioned above for promote).

Alter Add Version

If versioning is active then CMNDB2DD will not attempt to drop/create using the concatenation hierarchy. Instead we will use the information maintained in the 'Db2 Object Attribute' table to take steps to activate the prior version. The version being demoted will be dropped and the SP component will be removed from the promotion library. The relevant row in the 'Db2 Object Attribute' table will also be deleted.

CMNDB2DD keyword SPVERSION=YES is used to generate the relevant activation transactions required for CMNDB2AV to activate the recorded prior version for this SP. The version being demoted is also dropped.

Bind Deploy

SPVERSION=UNDO causes CMNDB2DD to generate version activation transactions which will reverse the activation sequence so that the prior recorded version is activated. This is different from SPVERSION=YES only in that different templates are used to identify the schema of the target SP as there are two values to take into account (the source and target Db2 locations).