Implementing site standards in IBM Db2 Administration Tool
jthyssen 50A79HCRE7 Comment (1) Visits (3409)
April 11, 2019 update
With APAR PH09606 an site invocation exit is now available which provides a method for implementing site standards without having to modify product code.
The table provided in this blog entry is still valid and the variable names listed can be used with APAR PH09606.
The IBM Db2 Administration Tool and IBM Db2 Object Comparison Tool (AOC) have many parameters that control behavior, such as how many rows to show on panels or whether to prompt for DDL execution or use the default values displayed on panels. An example is to generate TEMPLATE statements and use SHRLEVEL CHANGE for an ad hoc REORG. Very few of these parameters are configurable through the IBM Tools Customizer (TCz) as site-wide standards when AOC is customized. In this blog we will discuss two methods of configuring site standards for your use.
Configuring site standards
In this section, we list two possible methods of configuring site standards and discuss the pros and cons for each method listed. Most of the parameters for AOC are saved in the user’s ISPF profile. Some parameters like dataset names for the AOC itself, Db2, etc. are stored in a global ISPF table (ADBTPARM) that is used globally for all users. The user’s ISPF profile is updated when they exit the tool. Hence any changes to parameters will be saved and restored the next time you start AOC.
Distribute a ISPF profile to all users
User's parameters are normally stored in member ISRPROF in the user’s ISPF profile library. However, if you start the ADBL CLIST with the parameter NEWAPPL(xxxx) or have specified an “ISPF application ID” in the “Db2 Parameters” in TCz, then parameters are stored in a separate member xxxxPROF (where xxxx is the ISPF application name).
You can manually edit this member using ISPF 3.16 (ISPF Table Utility) or you can start AOC, modify/set all the site required parameters and exit, which will update your xxxxPROF profile member. Once you are satisfied with all parameters you can distribute your xxxxPROF profile member to all users. Now the users will have the same set of parameters when they start AOC for the first time.
Add custom initialization code – overview
Another alternative is to add custom initialization code in the ADBR CLIST that is invoked when the startup CLIST ADBL is executed.
Step 1: allocate a set of site libraries
Allocate a set of site libraries equivalent to the product libraries hlq.SADB*:
Make sure that your ADBL CLIST is passed parameters USERADD and USERPRE, or that the defaults are set appropriately in the CLIST. In this example, we have used high level qualifier site and low-level qualifier prefix SADB, so datasets have names site.SADBxxxx:
The site libraries will be allocated ahead of the product libraries, so site specific members will be used ahead of the product ones.
The same libraries can be used artifacts for your own AOC line or primary commands. This is the topic of a future blog.
Step 2: Modify ADBR
If you plan to maintain your modifications using an SMP/E USERMOD, please refer to the SMP/E manuals for more details.
Start by copying adb-
Now modify the CLIST ADBR as follows:
Step 3: Create CLIST with site customizations
Create a new CLIST in the site.SADBCLST. For example, we have created a CLIST sit
SET &uso06 = &STR
SET &CMDLINE = &STR(VPUT (uso06) PROFILE)
The variable uso06 is SHRLEVEL for ad-hoc REORGs utility JCLs generated in AOC.
In this is example, we overwrite any previously stored value with “C” (for SHRLEVEL CHANGE). If you want to allow users to keep their parameters, you can add logic to only overwrite non-blank parameters.
To find the name of a variable, you need to look into the ISPF panel code in adb-hlq.SADBPLIB or goc-hlq.SGOCPLIB. First, navigate to the specific AOC panel, issue the primary command panelid so the name of the panel is shown in the upper left corner. Second, locate and browse the panel in adb-hlq.SADBPLIB or goc-hlq.SGOCPLIB. Normally it is easy to find the name of the specific variable, even with minimum ISPF coding skills.
The following is a list of variables that are often customized by AOC customers:
In this blog entry, we have shown how to configure site-wide settings for the IBM Db2 Administration Tool and IBM Db2 Object Comparison Tool. The recommendation is to use the second method described by modifying ADBR to call a user initialization module. This provides the most flexible solution compared to copying a ISPF profile member to all or new users. Optimally your modifications to AOC code should be maintained as a SMP/E USERMOD.