Chapter 6. Developing a wrapper 103
Now the PDC user program is defined (see Figure 6-15). You now have two user
programs (Main and PDC) in place as shown in Figure 6-15.
Figure 6-15 User Programs Information - Main and PDC
c. Click the Variables tab. This tab allows you to configure the variables needed in
deploying your application. See Figure 6-16.
We need to define two variables that will be exposed to a user during the deployment
process: DB2UserID and DB2UserPassword.
Figure 6-16 Application Variable tab
104 IBM Express Runtime V2.1
i. In the Application Variables section, click Add.
ii. Select String Variable as the variable type.
iii. Type DB2UserID as the variable name.
iv. Enter DB2 Administrator User ID in the Variable Description field. You should have
a pop-up window that look like Figure 6-17. Click Finish.
Figure 6-17 Add Variable pop-up window
v. Define the Variable Validation Configuration for the variable DB2UserId as follows:
Minimum Length: 2
Maximum Length: 30
Validation rules:
Valid characters: “@#$_abcdefghijklmnopqrstuvwxyz0123456789”
Invalid values: “ADMINS”
Invalid values: “GUESTS”
Invalid values: “USERS”
Invalid values: “PUBLIC”
Invalid values: “LOCAL”
Invalid prefix: “IBM”
Invalid prefix: “SQL”
Invalid prefix: “SYS”
Invalid prefix: “_”
Note: Variable validation should depend on the validation rules used by DB2.
For instance, refer to DB2 validation rules for the variables DB2UserId and
DB2UserPassword.
Chapter 6. Developing a wrapper 105
To add Validation rules, click Add on the Validation rules field (Figure 6-18).
Figure 6-18 Add validation rules
In the Add Validation Rule window, select Specify a valid value if you need to
create an entry for a valid value, or select Specify an invalid value for creating an
entry for an invalid value. Click Next (Figure 6-19).
Figure 6-19 Adding a valid value
106 IBM Express Runtime V2.1
In the next window (Figure 6-20), choose the following options accordingly and click
Next:
- Specific characters: Valid characters
“@#$_abcdefghijklmnopqrstuvwxyz0123456789”
- Complete string: Invalid characters “ADMINS”, “USERS”, “PUBLIC”, and “LOCAL”
- Prefix: Invalid prefix “IBM”, “SQL”, “SYS”, and “_”
Figure 6-20 Validation type
In the next window (Figure 6-21), enter the appropriate values and click Finish.
Repeat this process until you have configured all validation rules for this variable.
Figure 6-21 Validation value
Chapter 6. Developing a wrapper 107
See Figure 6-22 as an example of a completed variable validation configuration.
Figure 6-22 Variable Validation Configuration
Variable Associations Configuration
After you complete the basic configuration of a variable, configure the variable associations.
Variable associations make the variable values available to the user programs by including
these values in response files or properties files (see more details in 6.2.2, “Response file
(properties file)” on page 110).
There are four types of association:
򐂰
CID response file association. The Configuration, Installation, and Distribution response
file format supported by DB2 applications.
򐂰
ISMP response file association. The response file format for InstallShield MultiPlatform
Edition installations.
򐂰
ISS response file association. The response file format for InstallShield installations.
򐂰
Properties association. Standard properties file format. Java-based user programs can
access the value of a variable through this type of association, using the support
framework.
Our application wrapper will be responsible for deploying and configuring the Trade6
application. This does not require an InstallShield or CID process, so we will use the simple
properties association only. This ensures that the variables we just defined get passed into
our user programs through the Trade.prop properties file.

Get IBM Express Runtime V2.1 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.