CMNDB2AV
This program is designed to aid the automation of the activation of various versions of the same stored procedure. It is driven by SYSIN parameters (described below) which are, normally, prepared by CMNDB2DD. CMNDB2DD passes these parameters to a subsequent job step which submits a new job to activate the new version of the SP.
CMNDB2AV requires the presence of the CMNZMF.CMNDB2_ATTRIBS table in the target Db2 subsystem. It also requires the CMNDB2AT package to be bound using the CMNZMF collection id.
Here is a description of the sysin parameters followed by the actions taken for each function type.
Parameter | Description |
---|---|
FUN=ADDNEW / REACTIVATE / BACKOUT | Specifies which function is being performed. If FUN= is not set to one of these three values then CMNDB2AV will end without doing anything. Specifically, if CMNDB2DD has decided there is nothing to do it will pass FUN=DO_NOTHING to this program. |
ZMF=CMNx | This specifies the ZMF subsystem under whose direction the current action is taking place. Note that it is possible that the same Db2 subsystem could be targeted by more than one ZMF. This value ensures that rows written to the CMNDB2_ATTRIBS table are unique to each ZMF. |
PKG=aaaannnnnn | The package associated with the current action. |
DB2=ssss | The Db2 subsystem which is the target of this action. |
SCM= | The schema of the SP whose version is to be activated. |
NAM= | The name of the SP whose version is being activated. |
VER= | The SP version. This has different meanings depending on the FUN= type. E.g. for ADDNEW it is the version to be activated. For REACTIVATE it indicates the version of the SP which is being deactivated. For BACKOUT it is ignored (and not generated by CMNDB2DD). |
Note the last three parameters may be longer than will fit on one 80 byte card image. If this is the case then a non-blank character (which is ignored) is placed in col 80 and the value is continued from the start of the next card image. E.g.
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
SCM=AREALLY8101234567820123456783012345678401234567850123456786012345678701234R+
EALLYLONGSCHEMA
What each function type does:
Function | Description |
---|---|
ADDNEW | Extracts the current active version for the SP from the target Db2 catalog. Writes a row to CMNDB2_ATTRIBS to note this version was the 'prior active' version for the SP. Issues the activation request for the new version as indicated by the VER= sysin parameter. |
BACKOUT | 1) Gets the current active version of the SP from the Db2 catalog. 2) Extracts the recorded 'prior version from the CMNDB2_ATTRIBS row for this zmfid/zmf package/location/schema/SP name. 3) Issues the activation request for the 'prior version' as obtained in 2). 4) Drops the version obtained in 1). 5) Removes the CMNDB2_ATTRIBS row for this zmfid/zmf package/location/schema/SP name. |