Configure Db2 Option Global Administration
Global Administration for the ChangeMan ZMF Db2 Option defines:
-
Physical Db2 subsystems that are available to the Db2 Option.
-
Logical Db2 subsystems that are available to Db2 Application Administration to define automated processing for Db2 components at promotion and install.
-
Library types that are available to Db2 Application Administration to define special Db2 component processing.
-
Connectors that define the relationship between a source and a target logical subsystem.
-
General parameters that are available to Db2 Application Administrators to set options for processing Db2 components.
Type =A.G.O.2 on any Command or Option line and press Enter to display the Db2 Administration Options panel:
CMNGDB2M Db2 Administration Options Row 1 to 28 of 28
Option ===> __________________________________________________ Scroll ===> CSR
1 Physical Identify Db2 physical subsystems
2 Logical Define Db2 logical subsystems
3 Libtypes Define Db2 library type options
4 Connector Define source/target connector
G General Specify Db2 general parameters
This table describes the options on the Db2 Administration Options panel:
Option | Explanation |
---|---|
Physical | Identify Db2 subsystems and define JOB information and Db2 load libraries for Db2 Option jobs. |
Logical | Define rules for modifying BIND PLAN and BIND PACKAGE commands at promotion or install. Define special processing for stored procedures and triggers. |
Libtype | Set Db2 Sub Types to invoke special processing for library types that manage Db2 components. |
Connector | Define the relationship between a source and a target logical subsystem. This is used for the BIND DEPLOY mechanism for distributing Native SQL stored procedures. |
General | Specify options for processing Db2 components at stage and recompile. |
Define Physical Subsystems
Identify the Db2 subsystems where the ChangeMan ZMF Db2 Option executes functions.
Note
If you license the ChangeMan ZMF ERO Option, you must also identify the Db2 subsystem where the ERO Db2 tables are defined.
-
On the Db2 Administration Option panel, choose option 1 Physical and press Enter. The Db2 Physical Subsystems - Part 1 of 2 panel CMNGD2SO is displayed:
CMNGD2S0 Db2 Physical Subsystems - Part 1 of 2 Row 1 to 4 of 4 Option ===> ______________________________________________ Scroll ===> CSR Db2 subsys Site Db2 System Load Library C105 SYS2.DB2810.SDSNLOAD C105 SERT6 SYS2.DB2810.SDSNLOAD C105 SERT6P1 SYS2.DB2810.SDSNLOAD C105 SERT6P2 SYS2.DB2810.SDSNLOAD ***************************** Bottom of data ******************************
This table describes fields on the Db2 Physical Subsystems - Part 1 of 2 panel:
Field Description Line Command Type a line command to the left of a panel row: S Display the Db2 Physical Subsystems - Part 2 of 2 panel for this physical subsystem. I Insert a blank row. R Repeat an existing row. D Delete an existing row. D Delete an existing row. Db2 subsys Type the Db2 subsystem identifier. Site Type the site where this Db2 subsystem runs. Your entry is validated against sites defined in global administration of the base ChangeMan ZMF product. Type * to see the Global Site Selection List panel. This entry must be blank for the first row, and this must reference the physical Db2 subsystem which houses the tables CMNx.CMNADMIN_NAMED and CMNx.CMNADMIN_GENERAL. Db2 System Load Library Type the data set name of the Db2 system load library that is used for this Db2 subsystem. You may leave this field blank if you LINKLIST the Db2 system load library. Also please note that the skeleton CMN$$D2X by default will use this name to build the SDSNEXIT dataset name. See the notes in the skeleton for more information. Important
If you license the ChangeMan ZMF Db2 Option, it is a reqirement that the first row on this panel must identify a local Db2 subsystem where the Db2 Option tables are defined. The SITE field for the first physical subsystem definition on this panel must be blank. This is the physical Db2 subsystem which the ZMF started task connects to (via CAF connect) to access Db2 tables required to support the ZMF Db2 Option.
If you license the ChangeMan ZMF ERO Option, the ERO Db2 tables must also reside on the first physical Db2 subsystem as described above.Define a physical Db2 subsystem for every Db2 subsystem where you want ChangeMan ZMF to manage Db2 components.
-
On the Db2 Physical Subsystems - Part 1 of 2 panel, type S on the Line Command for a physical subsystem row and press Enter. The Db2 Physical Subsystems - Part 2 of 2 panel CMNGD2S1 is displayed:
CMNGD2S1 Db2 Physical Subsystems - Part 2 of 2 Command ===> _________________________________________________ Db2 subsystem: C105 Site: SERT6 Load Library: SYS2.DB2810.SDSNLOAD Job statement information for Db2 binds: //SERT6DB JOB (X170,374),SERT6, // CLASS=A,MSGCLASS=X //* //*
This table describes fields on the Db2 Physical Subsystems - Part 2 of 2 panel:
Field Description Db2 Subsystem Displays the Db2 subsystem identifier. Site Displays the site where this Db2 subsystem runs. Load library Displays the data set name of the Db2 system load library that is used for this Db2 subsystem. Job statement information for Db2 binds Type JOB statement information for batch jobs that perform Db2 Option functions in the Db2 subsystem for promote and install. Type Job Statement Information for every physical Db2 subsystem.
Define Global Logical Subsystems
Configure logical Db2 subsystems that define automated processing for Db2 components at promotion and install.
-
On the Db2 Administration Option panel, choose option 2 Logical and press Enter to display the Db2 Logical Subsystems panel:
CMNGD2LN Db2 Logical Subsystems - Part 1 of 2 Row 1 to 3 of 3 Option ===> ______________________________________________ Scroll ===> CSR Line commands: P Specify miscellaneous parameters T B Bind plan/pkg process named(T) and general(B) templates Q G SQL process named(Q) and general(G) templates V H Bind service process named(V) and general(H) templates Logical Db2 name subsys Site Description SERT7 Q10K SERT7 SERT7 D/P INSTANCE SERT7P1 Q10K SERT7 SERT7 PROMOTION SITE \#1 SERT7P2 Q10K SERT7 SERT7 PROMOTION SITE \#2 **************************** Bottom of data *******************************
This table describes fields on the Db2 Logical Subsystems panel:
Field Description Line Command Type a line command to the left of a panel row. I Insert a blank row. R Repeat an existing row. D Delete an existing row. P Specify miscellaneous processing parameters. T Specify BIND command named parameter templates. B Specify BIND command general token templates. Q Specify SQL process named variable templates. G Specify SQL process general token variable templates. V Specify BIND SERVICE command named parameter templates. H Specify BIND SERVICE command general token templates. Logical name Type a 1-8 character mnemonic for this logical Db2 subsystem. Db2 logical subsystem names must be unique across all physical subsystems. The Logical Name is also called Db2 nickname in this manual. Db2 subsys Type the Db2 physical subsystem where the parameters and templates in this logical subsystem will be used. Type * to display the Db2 Physical Subsystem List to select valid Db2 Subsys and Site combinations. Site Type the site where the Db2 physical subsystem runs. Type * to display the Db2 Physical Subsystem List to select valid Db2 Subsys and Site combinations. Description Type a 30-character description for the logical subsystem. Create a logical subsystem for every promotion level and production environment where the Db2 Option will manage Db2 components.
-
On the Db2 Logical Subsystems panel, type P on the Line Command for a logical subsystem row and press Enter. The Db2 Logical Subsystem nickname Parameter Settings panel CMNGD2PM is displayed:
CMNGD2PM Db2 Logical Subsystems SERT6 Settings Command ===> _________________________________________________ Preferred Libtypes: DBRM . . . . . . . . . . . . . . Plan bind parameters . . . . . . Package bind parameters . . . . Service grants . . . . General Parameters: Enter "/" to select option Bind Failure is significant Recycle Stored Procedures where WLM Environment is . . Maintain Trigger Sequence Use Db2 versioning for Native SQL Stored Procedures
This table describes fields on the Db2 Logical Subsystem nickname Parameter Settings panel:
Field Description Preferred Libtypes These fields are not used unless: 1. You assign Db2 subtypes B (BIND PLAN) or P (BIND PACKAGE) or R (DBRM) to more than one library type in this application. See Define Global Db2 Library Subtypes. 2. You customize promotion, demotion, and installation skeletons to use the library types entered in these fields. The data in these fields is available in ISPF variables NTDBR, NTDBB and NTDBP in tables CMNDB2NN and CMNDB2N1. 3. The service grant libtype is only used when automating BIND SERVICE commands. Bind Failure is significant Select this to stop promote or demote processing if a Db2 bind fails in this logical subsystem. Leave this blank to continue promote or demote processing if a bind fails in this logical subsystem. Recycle Stored Procedures Select this to issue Db2 command VARY WLM...REFRESH to refresh a stored procedure or external user defined function that has changed in this logical subsystem. If not selected, then do not automatically refresh a stored procedure or external user defined function that has changed in this logical subsystem. Where WLM Environment Is If stored procedures are executed in one or more WLM-managed address spaces, type the name (or pattern) for the target WLM environment. The value of this field restricts the refresh of stored procedures to those environments that match the name or pattern you specify. You can wildcard this field by typing an asterisk at the end to specify a pattern for matching WLM environments. For example, C102* targets all WLM-managed environments whose names begin with the characters C102. Maintain Trigger Sequence Select this to drop and recreate all triggers for an event/table combination when one trigger is changed. Triggers are ordered according to the first 10 characters in the COMMENT ON field in the CREATE TRIGGER SQL. If not selected, then do not drop and recreate other triggers for an event/table combination when one trigger is changed. The modified trigger will execute last. Use Db2 versioning for Native SQL Stored Procedures Select this to use Db2 versioning for Native SQL stored procedures. If not selected, then drop/create will be used for this logical subsystem Set parameters, then press Enter to accept panel entries.
Note
The entries on this panel do not restrict entries on the Db2 Logical Subsystem nickname Settings panel at the application level. The entries at the global level provide a model for applications.
-
On the Db2 Logical Subsystems panel, type T on the Line Command for a logical subsystem row and press Enter. The Db2 Logical Subsystem nickname BIND Process Templates panel CMNGD2L2 is displayed:
CMNGD2L2 Db2 Logical Subsystem PROD BIND Process Templates Command ===> ___________________________________________________ Templates Target Source Insert General: Qualifier . . . + + + Owner . . . . . + + + Plan: Name . . . . . Package: Location . . . + + Collection . . + +
This panel defines BIND command templating that is performed for this Db2 logical subsystem.
How you use the fields on this panel to achieve the templating that you need is explained by example in Templating Examples. For an introduction to templating, see Templates.
The two tables that follow explain the field names at the left of the panel and the templating names at the top of the panel.
Note
All data fields on this panel, except for Plan Name, exceed the length of the displayed panel fields. See topic "Working with Long Fields" in the ZMF User's Guide for instructions on how to enter, update, and erase data in long panel fields.
This first table defines the field names at the left of the Db2 Logical Subsystem nickname BIND Process Templates panel.
Syntax of the BIND PLAN and BIND PACKAGE commands referred to in this table:
BIND PLAN(plan-name) PKLIST(location-name.collection-id.package-id) - OWNER(authorization-id) QUALIFIER(qualifier-name)... BIND PACKAGE(location-name.collection-id) - OWNER(authorization-id) QUALIFIER(qualifier-name)...
Field Description Qualifier Template or insert value for qualifier-name in BIND PLAN commands and BIND PACKAGE commands. Qualifier may be up to 128 characters long. Bind Owner Template or insert value for authorization-id in BIND PLAN and BIND PACKAGE commands. Bind Owner may be up to 128 characters long. PLAN Name Template for plan-name in BIND PLAN commands. Plan name may be up to 8 characters long. PACKAGE Location Template for location-name in BIND PACKAGE commands. If the PKLTEMPLATE control statement is input to plan lookup program CMNDB2PL, then the template is also applied to the location-name in the PKLIST parameter of BIND PLAN commands. See the "PKLTEMPLATE" table entry in Keyword Control Statements. Package Location may be up to 128 characters long. PACKAGE Collection Template for collection-id in BIND PACKAGE commands. If the PKLTEMPLATE control statement is input to plan lookup program CMNDB2PL, then the template is also applied to the collection-id in the PKLIST parameter of BIND PLAN commands. See the "PKLTEMPLATE" table entry in Keyword Control Statements. Package Collection may be up to 128 characters long. This second table defines templating fields Target, Source, and Insert on the Db2 Logical Subsystem nickname BIND Process Templates panel in terms of the kind of templating that is performed.
Template Type Field Description Replace characters at an offset Target Placeholder ? characters define the offset for replacement characters. Example: ???S?T replaces the fourth character of a seven-character value with S and the sixth character with T. Source Blank Insert Blank Add characters at end Target Placeholder ? characters define a field that is as long or longer than the actual data, followed by characters to be appended to the parameter value. Example: ???S?T adds ST to the end of a three-character value. Source Blank Insert Blank Replace characters at end Target Character * (asterisk) indicates the start of a literal string n characters long that will replace the last n characters of the parameter value. Example: *ST replaces the last two characters with ST. Source Blank Insert Blank Delete characters at end Target Character ¬ (not) indicates a field character that will be replaced with a space. Since embedded spaces are invalid in a parameter value, use ¬ to delete characters at the end of a value. Example: ????¬¬ deletes the last two characters of a six character value or the last character of a five character value. Source Blank Insert Blank Replace character string Target Literal string that will replace the first occurrence of the string matching the value in the Source field. The matching string and replacing string can be different lengths. Source Literal string to search for. Insert Blank Add an OWNER parameter Target Blank Source Blank Insert Value for the OWNER parameter. Note: There must be no OWNER in the input BIND command, and the following control statement must be input to the plan lookup program CMNDB2PL: AUTHORITY=OWNER,INSERT Add a QUALIFIER parameter Target Source Blank Insert Value for the QUALIFIER parameter. Note: There must be no QUALIFIER in the input BIND command, and the following control statement must be input to the plan lookup program CMNDB2PL: INSERTQUAL Note
The entries on this panel do not restrict entries on the Db2 Logical Subsystem nickname Templates panel at the application level. The entries at the global level provide a model for applications.
-
On the Db2 Logical Subsystems panel, type B on the line command for a logical subsystem row and press ENTER.
The Db2 Logical Subsystem nickname BIND General Templates panel CMNGD2L5 is displayed. From this panel, the BIND process general tokens for that particular logical subsystem can be specified.
Note
This facility is not part of the Core Db2 option. Only named templates are available if you choose to use the Core option.
CMNGD2 Db2 Logical Subsystem SERT7 BIND General Templates Row 1 to 21 of 21 Command ===> _____________________________________________ Scroll ===> CSR Token name + Target template + Source template + CURRENTSERVER ???DSNP ____________________ DEGREE 0 ____________________ EXPLAIN NO¬ ____________________ PATH >REMOVE< EPICPYYY PATH >REMOVE< EPICPXXX PATH ????P??? ____________________ PKLIST CA_PRD CA_TNG ___________________ ____________________ ____________________ ___________________ ____________________ ____________________ **************************** Bottom of data *******************************
You can use I, R, D line commands to insert, repeat and delete rows in the table.
Each row in this table represents a BIND process general token template. The token name must match the particular bind parameter you wish to change. The target and source templates work in exactly the same way as the standard 'named' templates. The new facility within this templating process is the use of the '>REMOVE\<' target template. Use of >REMOVE\< will exclude any sub-parameter in a list for the main parameter in question where any part of that sub-parameter value matches the source template. This is only relevant for parameters which support lists of values. In the above example any PATH values which match either EPICPYYY or EPICPXXX will be removed from the list.
You can define templating for any bind parameter you wish using these general 'token' templates. The bind command is parsed into a distinct set of paramaters and associated values. The general token template 'name' will be matched against these parameters. The value associated with the parameter will be transformed by the template.
If a parameter is associated with a list of subparameter values (e.g. PKLIST etc) then the templates will be applied to each value in turn. If you wish to remove a value from a list you can specify >REMOVE\< as the target template and, if the source template matches one or more subparameter values in the list, then those values will be removed from the list.
There are three kinds of transformations available.
You can unconditionally override a value by using a blank source template together with a non-blank target template. The target template can contain a mixture of wildcard place holders (?) and constant literals. It can also contain the logical not character (¬) which will cause a blank to replace the relevant position in the target string. If a template containing wildcards is longer than the name being transformed then the wildcards are 'squeezed' from the right. The target name is then overlaid with the specified constant literals.
If the template consists of a string of place holders followed by one or more literals, and the string is longer than the target name, then the literals will be appended to the target name.
Alternatively, you can use a blank source template and specify * as the first character of the target template. This will cause the 'n' characters following the * to replace the last 'n' characters of the target name. Note that the wildcard placeholder (?) has no special meaning in this kind of transformation but that ¬ still represents a blank character override.
For example, *QA applied to VAL01 and TKNVAL01 will result in VALQA and TKNVALQA respectively.
You can also conditionally search for strings to replaced. To do this specify the search string in the source template field. Specify the replace string in the target template field. Neither wildcard character (? or *) has any special meaning in this kind of transformation but the ¬ character still represents a blank override. If the replacement string is shorter than the search string then the rest of the name is 'shuffled up' as appropriate. If the replacement string is longer and this results in field length overflow, then the rightmost characters will be lost.
The rules for the token 'name' and how it is searched for follow.
The token 'name' is up to 64 bytes in length and can consist of up to 5 words, each no longer than 16 bytes. If the token name contains imbedded blanks then it must be enclosed in single quotes. This is to fit in with the same facility used in SQL processing. However, unlike SQL general token templating where we are scanning a complete SQL sentence, here we are attempting to match the general token name with a specific bind parameter (e.g. PATH, EXPLAIN etc.).
For example:
Token Name = EXPLAIN Target Template = NO¬ Source Template =
This will scan for the presence of the EXPLAIN parameter and will replace its value with NO (note the not sign is required to avoid replacing YES with NOS in this case).
-
On the Db2 Logical Subsystems panel, type Q on the Line Command for a logical subsystem row and press Enter. The Db2 Logical Subsystem nickname SQL Process Templates (named) panel CMNGD2L3 is displayed:
CMNGD2L3 Db2 Logical Subsystem QAD1 SQL Process Templates (Named) Command ===> ______________________________________________________________ Templates Target Source Deploy Schema . . . . ________________ + _________________ + Collection . . ________________ + _________________ + WLM . . . . . . ________________ + _________________ + Location . . . ________________ + _________________ + ____________ + Qualifier . . . ________________ + _________________ + ____________ + Owner . . . . . ________________ + _________________ + ____________ +
This panel defines SQL templating that is performed for this Db2 logical subsystem. How you use the fields on this panel to achieve the templating that you need is explained by example in Templating Examples. For an introduction to templating, see Templates. The two tables that follow explain the field names at the left of the panel and the templating names at the top of the panel.
!!!! note All data fields on this panel exceed the length of the displayed panel fields. See topic "Working with Long Fields" in the ZMF User's Guide for instructions on how to enter, update, and erase data in long panel fields.
This first table defines the field names at the left of the Db2 Logical Subsystem nickname SQL Process Templates (Named) panel:
Syntax of the CREATE (and other DDL) commands referred to in this table:
``` CREATE PROCEDURE schema.procedure-name...COLLID collection-id... CREATE FUNCTION schema.function-name...COLLID collection-id... CREATE TRIGGER schema.trigger-name...ON qualifier-name.table-name... ```
Field Description Schema Template for explicit schema in procedure-name, functionname, or trigger-name in DDL. Schema may be up to 128 characters long. WLM Template to be applied to any WLM ENVIRONMENT clause found in the DDL for (e.g.) an external stored procedure. Location Template applied to a location identifier in DDL (see more about this in the DEPLOY sections below). Qualifier Template applied to DDL qualifier clauses Owner Template applied to DDL Package Owner clauses **Deploy Fields | Field | Description | |--------|-------------| | LOCATION | This value is used to route the BIND DEPLOY command to the relevant source Db2 subsystem. Its value is picked up from the source logical subsystem of the two tied together by the CONNECTOR definition (more below) | | QUALIFIER | If the usual templates do not generate a non-blank qualifier then whatever is coded here will be used in the QUALIFIER clause of the generated BIND DEPLOY command | | OWNER | If the usual templates do not generate a non-blank owner then whatever is coded here will be used in the OWNER clause of the generated BIND DEPLOY command |
-
On the Db2 Logical Subsystems panel, type G on the Line Command for a logical subsystem row and press Enter. The Db2 Logical Subsystem nickname SQL Process Templates (general) panel CMNGD2L4 is displayed:
CMNGD2L4
CMNGD2L4 B2 Logical Subsys PROD SQL Process Templates (Ge Row 1 to 21 of 21
Command ===> _________________________________________________ Scroll ===>
Token name Target template Source template
___________________ + ___________________ + ___________________ +
___________________ + ___________________ + ___________________ +
___________________ + ___________________ + ___________________ +
___________________ + ___________________ + ___________________ +
...
___________________ + ___________________ + ___________________ +
___________________ + ___________________ + ___________________ +
**************************** Bottom of data *******************************
This panel defines SQL templating that is performed for this Db2 logical subsystem.
You can define templating for any keyword you wish using these general 'token' templates.
ZMF will look for your keyword, i.e. the token name and will then apply the templates to the value associated with that keyword.
The token 'name' is up to 64 bytes in length and can consist of up to 5 words, each no longer than 16 bytes. If the token name contains imbedded blanks then it must be enclosed in single quotes. ZMF will scan the SQL/DDL, squeezing white space, looking for the token words terminated by either a blank or left parenthesis. The value of the word following on from our token name will be templated as requested.
For example:
Token Name = 'SYSTEM TIME SENSITIVE'
Target Template = YES
Source Template =
This will scan for the presence of SYSTEM TIME SENSITIVE in the SQL and will change any value following this (e.g. NO) to YES.
-
On the Db2 Logical Subsystems panel, type V on the Line Command for a logical subsystem row and press Enter. The Db2 Logical Subsystem nickname Bind Service Named Templates panel CMNGD2L6 is displayed:
CMNGD2L6 Db2 Logical Subsystem QAD1 Bind Service Named Templates Command ===> Templates Target Source Collection . . ________________ +__________________ + Qualifier . . . ________________ +__________________ + Owner . . . . . ________________ +__________________ +
These three named parameters are templated in the same way as for package/plan binds (see section 3 above). The underlying processes are different.
-
On the Db2 Logical Subsystems panel, type H on the line command for a logical subsystem row and press ENTER. The Db2 Logical Subsystem nickname BIND Service General Templates panel CMNGD2L7 is displayed, from which the BIND Service process general tokens for that particular logical subsystem can be specified:
CMNGD2L7 Db2 Logical Subsystem QAD1 Bind Service General Temp Row 1 to 13 of 13 Command ===> Scroll ===> CSR Token name + Target template + Source template + ____ ______________________ ______________________ ______________________ ____ ______________________ ______________________ ______________________ ____ ______________________ ______________________ ______________________ ____ ______________________ ______________________ ______________________ ____ ______________________ ______________________ ______________________ ____ ______________________ ______________________ ______________________ ____ ______________________ ______________________ ______________________ ____ ______________________ ______________________ ______________________
This general token processing is described in step 4 above. However, there are some extra features which are applicable only to Bind Service processing.
When a grant SQL component is associated with the bind service process and the token name is >GRANTEE< , the template is applied to the list of grantee userids/groups on the grant SQL supplied to the process.
Also, if you enclose the source template in single quotes, the target template is only used if the value to be replaced exactly matches the source template value.
Define Global Db2 Library Subtypes
Db2 library subtypes invoke special processing for Db2 components. When you defined the Global Library Types for these components, you coded D in the Selectable Option field. Here you assign a Db2 Sub Type to each of those library types.
On the Db2 Administration Option panel, choose option 3 Libtypes and press Enter to display the Db2 Library Types panel:
CMNDGLT0 Db2 Library Types Row 1 to 11 of 11
Command ===> _________________________________________________ Scroll ===> CSR
Db2
Lib sub End SQL
type Description type sentence
PKG Db2 Bind Package Commands P
PRC Cataloged Procedures
DBB Db2 BIND PLAN Commands B
DBR Db2 DBRM R
SPD Db2 Stored Proc Definitions - Non-SQL D
SPN Db2 Stored Proc Source - Native SQL D @
SPQ Db2 Stored Proc Source - SQL Language Q @
STL Db2 Stored Proc Load Modules S
STP Db2 Stored Proc Source - External Lan
TRG Db2 Trigger Definitions T
UDF Db2 User-Defined Function Definitions D
****************************** Bottom of data *********************************
This table describes the fields on the Db2 Library Types panel:
Field | Description |
---|---|
Lib type | Displays the library types from the Global Library Type definition that are defined with a Selectable Option of D. |
Description | Displays the definition from the global library type. |
Db2 sub type | Type the Db2 Sub Type for special Db2 Option processing. Sub type processing is described in the next table below. |
B BIND PLAN command | |
D CREATE statements for stored procedures, external user defined functions. | |
N Native SQL Stored Procedure definition | |
Q BIND PACKAGE command SQL stored procedure source | |
R DBRM Stored procedure load modules, REXX stored procedures | |
T Trigger definition source | |
V BIND SERVICE command or associated GRANT DDL | |
End SQL sentence | Type an alternate SQL statement terminator. If the components in this library type include SQL that uses the semicolon (;) as a statement terminator, specify an alternate terminator for the stored procedure or function so that the semicolon is passed through to the server. You can specify any character except the following: |
- comma | |
- underscore | |
- single quote | |
- double quote | |
- left hand parenthesis | |
- right hand parenthesis | |
If you leave this field blank, the default alternate SQL statement terminator is semicolon (;). |
Define sub types, then press Enter to accept panel entries.
Note
The entries on this panel do not restrict entries on the Db2 Library Types at the application level. The entries at the global level provide a model for applications.
This table shows the processing assigned by Db2 Option library sub types:
Sub Type | Description | Modified Process | Sub Type Processing Description |
---|---|---|---|
B | BIND PLAN command. | Promote Demote Install Backout | Process with plan lookup program CMNDB2PL to template BIND parameters for the target Db2 subsystem. |
D | CREATE statements for stored procedures, external user defined functions. | Promote Demote Install Backout | Process with utility program CMNDB2DD to register the object in the Db2 catalog. Issue a DROP before the CREATE. |
N | Native SQL stored procedure definitions. | Promote Demote Install Backout | Drop/Create, Alter add version, and bind deploy mechanisms supported for this library type. |
P | BIND PACKAGE command. | Promote Demote Install Backout | Process with plan lookup program CMNDB2PL to find applicable BIND PLAN members and template parameters for the target Db2 subsystem. |
Q | SQL stored procedure source. | Promote Demote Install Backout | Process with utility program CMNDB2DQ to remove SQL procedural code, then process the CREATE with utility program CMNDB2DD to register the stored procedure in the Db2 catalog. |
R | DBRM | Process with plan lookup program CMNDB2PL to find applicable BIND PACKAGE and BIND PLAN members and template BIND parameters for the target Db2 subsystem. | |
S | Stored procedure load modules, REXX stored procedures. | Promote Demote Install Backout | If the Recycle Stored Procedure field is YES, issue Db2 commands VARY WLM...REFRESH in the WLM-managed address space to refresh the executable. |
T | Trigger definition source. | Promote Demote Install Backout | Process with utility program CMNDB2DD to extract the table/event/time combinations. If Maintain Trigger Sequence YES, query SYSIBM.SYSTRIGGERS with utility program CMNDB2TR to find multiple triggers defined for the same table/event/time combination, then drop and recreate those triggers to maintain the original firing order. |
V | BIND SERVICE command and associated GRANT SQL | Promote Demote Install Backout | Process with CMNDB2SV to apply templates to incoming BIND SERVICE and GRANT components. The templated BIND SERVICE command is passed to an IKJEFT01 step for processing. Any templated GRANT DDL is passed to CMNDB2GR for action. |
This table shows you how the Db2 Option sub types relate to library types and other Db2 Option parameters. Sub types are shown in bold.
Db2 Component | Like | Target Type | Sel Opt | Sub Typ | BIND/SQL/SERVICE |
---|---|---|---|---|---|
Db2 Application Program Source | S | Db2 Program Load | |||
Db2 Application Program Load | L | B | |||
DBRM | P | D | **R | B | |
BIND PLAN Command | P | D | **B | B | |
BIND PACKAGE Command | P | D | **P | B | |
External Stored Procedure Source | S | Stored Procedure Load | |||
External SQL Stored Procedure Source | S | Stored Procedure Load | D | **Q | S |
External Stored Procedure Load | L | D | **S | B & S | |
Native SQL Stored Procedure | P | D | **N | S | |
General DDL (e.g. CREATE PROCEDURE for external SP) | P | D | **D | S | |
User Defined Function Definition | P | D | **D | S | |
Trigger Definition | P | D | **T | S | |
BIND Service command | P | D | V | V | |
Service GRANT command | P | D | V | V |
*
Db2 Active Library specification for BIND plan/pkg (B), Process SQL (S), and Bind
Service (V).
Define Source/Target Connector
On the Db2 Administration Option panel, choose option 4 Connector and press Enter to display the Logical Subsystem Connectors - Global List panel (CMNGD2CL):
CMNGD2CL Logical Subsystem Connectors - Global List Row 1 to 11 of 11
Command ===> ______________________________________________ Scroll ===> CSR
Connector Source Target
name name name Description
DS2UNIT STUDIO UNITV DATA STUDIO TO UNIT (DSN)
QA2PROD QAD PRODD QAD TO PRODD
QA2PROD1 QAD PRODD1 QAD TO PRODD1 (DSN1)
UNIT2PRD UNITV PRODV UNIT TO PROD (DSN)
UNIT2PR1 UNITV PRODV1 UNIT TO PROD (DSN1)
UNIT2QA UNIT QAD UNIT TO QAD
UNIT2QA1 UNITV QAD1 UNIT TO QAD1 (DSN1)
****************************** Bottom of data *********************************
Db2 Logical Subsystem Connectors - Global List
The BIND DEPLOY mechanism for distributing Native SQL stored procedures requires both a source and a target Db2 environment. This panel is used to 'connect' a source logical subsystem to a target logical subsystem.
Both logical subsystem names must already exist (you can enter an asterisk in either source or target name fields to get a list).
Values from the source logical subsystem are used to identify the stored procedure which will be deployed. Values from the target logical subsystem are used to specify the name and related attributes of the stored procedure when it is deployed to the target.
If you wish to see which values will be used for your choice of source and target then select the row once both names have been entered.
Note
If you change the source and/or target subsystem on a row then you must save the changes before the new values will be displayed using the ’S’ line command.
To invoke the BIND DEPLOY mechanism based on a specific connector name make the connector name the subsystem name associated with the relevant SQL active library.
Field | Description |
---|---|
CONNECTOR NAME (Required) | Select a one to eight-character mnemonic for this connector. This name must be unique. |
SOURCE NAME (Required) | This must be an existing logical subsystem name and specifies the values which will be used to identify the source of the BIND DEPLOY command. |
TARGET NAME (Required) | This must be an existing logical subsystem name and specifies the values which will be used to specify the target of the BIND DEPLOY command. |
DESCRIPTION | Use this field to describe the use intended for this connector. |
Selecting the first of the connector definitions above shows the panel CMNGD2CN thus:
CMNGD2CN Logical Subsystem Connector Global Model - DS2UNIT
Command ===> __________________________________________________________________
DATA STUDIO TO UNIT (DSN)
Source . . . . STUDIO
Subsystem id . DSN
Location . . . DB2V11 +
Templates Target Source
Schema . . . . + +
Target . . . . UNITV
Subsystem id . DSN
Site . . . . . LOCALVER
Templates Target Source Deploy
Collection . . UNIT¬¬¬¬¬¬¬¬¬¬¬¬ + +
Qualifier . . .UNIT¬¬¬¬¬¬¬¬¬¬¬¬ + + UNIT +
Owner . . . . SERD¬¬¬¬¬¬¬¬¬¬¬¬ + + SERD +
Specify Global Db2 General Parameters
Define general parameters that are available to Db2 Application Administrators to set options for processing Db2 components.
On the Db2 Administration Option panel, choose option G General and press Enter to display the Global Db2 General Parameters panel (CMNGDPM0):
CMNGDPM0 Global Db2 General Parameters
Command ===> _____________________________________________________
Enter "/" to select option
_ Use Core Db2 Option Functions Only
_ Use Package Name in Db2 PC version
_ Force Pkg Name in Db2 PC version
This table describes the options and values on the Global Db2 General Parameters panel.
Field | Description |
---|---|
Use Core Db2 Option Functions Only | The full functionality of the ZMF Db2 option allows you to manage various components such as stored procedures, REST services etc. To do this you need to define ZMF Db2 option administration tables. i.e.CMNx.CMNADMIN_NAMED However, if you only need to use the core functionality of the Db2 option, i.e. managing package and plan binds, then you can select this global parameter and the requirement for these tables to exist goes away. If, at some later date, you unselect this option without setting up the relevant tables and re-binding the Db2 option packages then you will encounter runtime SQL errors in ZMF admin and file tailoring functions. |
Use Package Name in Db2 PC version | Type Y or N to set boundaries for entering the “Use Package Name in Db2 PC version” option in Db2 Application Administration. The “Use Package Name in Db2 PC version” option determines whether the VERSION field on the Db2 Physical Subsystems panel (CMNSTG18) is initialized to the package ID in stage and recompile. |
Select to restrict settings for “Use Package Name in Db2 PC version” in Db2 Application Administration to be selected. In all applications, the VERSION field on the Db2 Physical Subsystems panel is initialized to the package ID in stage and recompile, but the field can be changed or blanked out. | |
Omit to allow selection or otherwise for this option in Db2 Application Administration. | |
Force Pkg Name in Db2 PC version | This field is used to set boundaries for entering the “Force Pkg Name in Db2 PC version” option in Db2 Application Administration. The “Force Pkg Name in Db2 PC version” option determines whether the Package ID must be used for the VERSION parameter of the Db2 precompiler on the Db2 Physical Subsystems panel (CMNSTG18) in stage and recompile. This option must be omitted if the “Use Package Name in Db2 PC version” is not selected. |
Select this to restrict settings for “Force Pkg Name in Db2 PC version” in Db2 Application Administration to be selected. In all applications, the VERSION field on the Db2 Physical Subsystems panel is set to the package ID in stage and recompile, and the field cannot be changed. | |
Omit to allow any entry for this option in Db2 Application Administration. |
Type your choices for the general parameters, then press Enter to accept panel entries. Press PF3 to return to the Db2 Options Administration panel.
Configure Db2 Option Application Administration
Application Administration for the ChangeMan ZMF Db2 Option defines:
- Logical Db2 subsystems that define automated processing for Db2 components at promotion and install.
- Active libraries that invoke Db2 Option processes at promotion and install defined by logical subsystems.
- A library type for members containing BIND PACKAGE commands.
- Library types that invoke special Db2 component processing.
- General parameters for processing Db2 components.
Type =A.A.O.2 on any Command or Option line and press Enter to display the application - Db2 Administration Options panel:
CMNLDB2M STEV - Db2 Administration Options
Option ===\>
1 Logical Define application Db2 logical subsystems
2 Library Define application Db2 active library information
3 Libtype Define Db2 library type options
4 Connector Define source/target logical subsystem connector
5 Secondary Define secondary bind requirements
G General Define general Db2 parameters for this application
This table describes the options on the application - Db2 Administration Options:
Field | Explanation |
---|---|
Logical | Define rules for modifying BIND PLAN and BIND PACKAGE commands at promotion or install. Define special processing for stored procedures and triggers. |
Library | Define active libraries that invoke Db2 Option processing at promotion and install as defined by logical subsystems. |
Libtype | Set Db2 Sub Types to invoke special processing for library types that manage Db2 components. |
Connector | Define source/target logical subsystem connector for bind deploy of native-SQL stored procedures. |
Secondary | Associate secondary bind logical subsystems to the primary bind logical subsystem. |
General | Specify the use of package ID in the VERSION parameter for the Db2 precompiler. |