Skip to content

CMNEX101 Bind Control Statement Processor

Exit program CMNEX101 lets you modify BIND PLAN and BIND PACKAGE commands beyond what is allowed by logical subsystem templating in the ChangeMan ZMF Db2 Option. You can create BIND commands that are not found in staging and baseline libraries.

Plan lookup program CMNDB2PL can call the user exit program CMNEX101 twice during the processing of a BIND command record set:

  1. CMNEX101 is called if no BIND command members are found for a staged DBRM and if keyword CREATECC is input to CMNDB2PL. User code in the exit can create the missing BIND command, which is passed back to CMNDB2PL and written to the output ddname stssysBCTL.

  2. CMNEX101 is called before each templated BIND command record set is written to ddname stssysBCTL. The exit can examine the BIND command records passed from CMNDB2PL and:

    1. Accept the BIND command records and let CMNDB2PL write the records to the output BIND command file as they are.

    2. Modify or replace the BIND command records and pass them back to CMNDB2PL for output.

    3. Reject the BIND command set, tell CMNDB2PL to exclude the records from the output BIND command file, but let CMNDB2PL to continue processing the next BIND command.

    4. Reject the BIND command set, tell CMNDB2PL to exclude the records from the output BIND command file, let CMNDB2PL to continue processing the next BIND command, but have CMNDB2PL terminate with a return code that will stop job processing.

    5. Reject the BIND command set and tell CMNDB2PL terminate immediately with a return code that will stop job processing.

Important

Keyword operands in a BIND command that CMNDB2PL sends to exit program CMNEX101 may be in a different order than in the original BIND command in a staging, promotion, baseline, or production library. See BIND Command Keyword Option Order.

CMNDB2PL Parameter Passed to CMNEX101

CMNDB2PL passes data to exit program CMNEX101 in the communication area defined by copybook CMNEX101, which is delivered in the CMNZMF ASMCPY library.

See copybook CMNEX101 for a list of the fields passed to CMNEX101 and a description of each field or indicator.

Activating CMNEX101

Activate exit program CMNEX101 by commenting out the line of code displayed below:

CMNEX101 RMODE ANY 
* Comment (or delete) the following 1 line to activate this exit.
        DC Y(2046)                 inactive module

CMNEX101 Process

See the program comments for a description of CMNEX101 processing, particularly the comments under these headings:

  • Accessing PKLIST elements

  • Accessing DBRM list elements

CMNEX101 Usage Scenarios

As the following three scenarios illustrate, three types of CMNDB2PL requests are passed to CMNEX101. These request types reside within the CMNEX101 copybook and are represented by the X101$IND indicator and X101CNT field.

Scenario 1

  • Input Request: TM X101$IND,X101$CC

    • Create bind control statements for members not found in the specified staging or baseline libraries.

    • X101WORK is provided to CMNEX101 as a work area to build the necessary bind control statements.

  • Output Request: OI X101$IND,X101$CC

    • RETCODE field must be set to a value of ‘4’.

    • The X101WORK work area must contain the bind control statements created for the members not found in the processed staging or baseline libraries.

    • X101CNT is required to contain the number of bind control statements placed in the work area represented by X101WORK.

  • Example of a Create Request:

    • Activate CMNEX101. See Activating CMNEX101.

    • Assemble and link edit using the reentrant parameter.

    • Create a DBB member that does not exist in the target DD names DBBSSTG and DBBSBAS.

    • Specify SYSIN parameter CREATCC.

    • Invoke CMNDB2PL with this DBB member name.

    • The ___BCTL DD output will contain an example of bind control cards that have been created for the DBB member.

Scenario 2

  • Input Request: TM X101$IND,X101$CHK

    • A set of bind control statements are passed to CMNEX101.

    • X101BIND work area contains the set of bind control statements.

    • X101CNT contains the number of bind control statements passed in the X101BIND work area.

  • Output Request A: OI X101$IND,X101$REP

    • RETCODE field must be set to a value of ‘4’.

    • X101WORK work area must contain the set of bind control statements that will replace the set of bind control statements represented in the X101BIND work area.

    • X101CNT is required to contain the number of bind control statements passed in the X101WORK work area.

  • Example of a Replace Request:

    • Activate CMNEX101. See Activating CMNEX101.

    • Assemble and link edit using the reentrant parameter.

    • Create a DBB member named TSTMBR2 in the staging library.

    • Invoke CMNDB2PL with this DBB member name.

    • The ___BCTL DD output will contain an example of bind control cards that have been replaced the original contents of the TSTMBR2 member.

  • Output Request B: OI X101$IND,X101$ADD

    • RETCODE field must be set to a value of ‘4’.

    • 101WORK work area must contain the bind control statements that will be added (appended) to the bind control statement set represented in the X101BIND word area.

    • X101CNT is required to contain the number of bind control statements passed in the X101WORK work area.

  • Example of an Add Request:

    • Activate CMNEX101. See Activating CMNEX101.

    • Assemble and link edit using the reentrant parameter.

    • Create a DBB member named TSTMBR1 in the staging library.

    • Invoke CMNDB2PL with this DBB member name.

    • The ___BCTL DD output will contain an example of bind control cards that have been added the original contents of the TSTMBR1 member.

Scenario 3

  • Input Request: X101CNT equal to =F’1’

  • This is a request for the set of bind control statements that was previously passed to CMNEX101. If needed, CMNDB2PL allows CMNEX101 to perform a cleanup process.

CMNEX101 Return Codes

Before returning to CMNDB2PL, CMNEX101 will issue one of the following return codes (in register 15).

Code Explanation
00 The BIND command records passed by CMNDB2PL are acceptable and to be used as is.
04 CMNEX101 made changes to the BIND command records and placed them in the third work area. The number of records in the third work area is indicated in the communications area. CMNDB2PL will write the modified records to ddname stssysBCTL.
08 Indicates that CMNEX101 rejects the passed BIND command record set. CMNDB2PL will not write this set of BIND command records to the output ddname stssysBCTL, but it will continue processing with the next set of BIND command records. CMNDB2PL will issue the warning return code.
12 CMNEX101 rejects the passed BIND command record set, but CMNDB2PL is to continue processing with the next set of BIND command records. CMNDB2PL will terminate with RC=12 after processing all BIND command sets.
16 Indicates that CMNEX101 rejects the passed BIND command record set, and CMNDB2PL will terminate immediately with RC=12.