Create a dedicated Workload Manager (WLM) application environment for the Db2 Data
Gate stored procedures.
Before you begin
Make sure that the required Db2 program temporary
fixes (PTFs) for Db2 Data
Gate support have been
installed.Important: If you have installed IBM® Db2 Analytics Accelerator for use with the same Db2 for z/OS® system, you already have a WLM environment for
the Db2 Data
Gate stored procedures. In this case,
you can skip this task.
About this task
The following placeholders
are used for specific high-level qualifiers in the steps and examples that follow. Replace these
with the actual high-level qualifiers used in your system.
- <HLQBASE>
- HLQ for your Db2 libraries
- <HLQSP>
- HLQ for the Db2 Data
Gate stored-procedure
libraries
- <HLQDb2SSN>
- HLQ for Db2 subsystem-specific libraries
- <HLQACTIVE>
- A suggested HLQ for copies of
<HLQSP>
. To work on copies is
recommended because these are independent of the original libraries under SMP/E control. If needed,
you can create new copies from the unchanged originals.
Having completed the SMP/E
Apply steps, the parts for the stored procedures can be
found in the following libraries:
<HLQSP>.SAQTSAMP
- Contains a job for the installation of the stored procedures, installation verification jobs,
sample jobs for calling stored procedures, and XML samples as input for the stored procedures.
<HLQSP>.SAQTDBRM
- Contains database request modules (DBRMs) that must be bound to Db2.
<HLQSP>.SAQTMOD
- Contains shared libraries and load modules for the stored procedures.
Procedure
-
Copy the <HLQSP>.SAQTMOD load-module data-set as
<HLQACTIVE>.SAQTMOD for reference in your WLM procedure. Also copy the
<HLQSP>.SAQTSAMP(AQTENV) member as
<HLQACTIVE>.SAQTSAMP(AQTENV). This way, you can install updates on the
data sets that are controlled by SMP/E under <HLQSP> without affecting
your running database environment.
-
Create a separate Workload Manager (WLM) environment for the Db2 Data
Gate stored procedures. Use the following
properties:
Appl Environment Name . . DSNWLMV9
Description . . . . . . . Db2 V11 default Stored Procedures for Data Gate
Subsystem type . . . . . Db2
Procedure name . . . . . DSNWLM
Start parameters . . . . Db2SSN=&IWMSSNM,APPLENV=DSN
. . . . . . . . . . . . . WLMV9
Important:
DSNWLMV9
is an example. The value that you must enter here is the one used for
the !WLMENV!
placeholder in the AQTTIJSP job.
- The procedure name (in this example: DSNWLM) must match the name of the defined procedure that
you use to start the WLM-managed address space.
- The task that is started by the WLM-managed address space is run under a certain user ID. An
OMVS segment must be defined for this user ID.
- Do not specify a value for
NUMTCB
in the Start parameters
section of the definition because this value takes precedence, and thus makes it impossible to set
the value by running the JCL that is discussed in the next paragraph.
You might want to modify the following template,
which contains a procedure for the WLM-managed address space started task. The template includes the
required STEPLIB and DD
names.
//*************************************************************
//* PROCEDURE NAME = DSNWLM
//*
//* JCL FOR RUNNING THE WLM-ESTABLISHED STORED PROCEDURES
//* ADDRESS SPACE
//* RGN -- THE MVS REGION SIZE FOR THE ADDRESS SPACE.
//* Db2SSN -- THE Db2 SUBSYSTEM NAME.
//* NUMTCB -- THE NUMBER OF TCBS USED TO PROCESS
//* END USER REQUESTS.
//* APPLENV -- THE MVS WLM APPLICATION ENVIRONMENT
//* SUPPORTED BY THIS JCL PROCEDURE.
//*
//* Db2VERS -- Db2-VERSION (I.E. V110)
//* SET BY APPLICATION ENVIRONMENT
//* DSNWLMV9 ==> V110
//*
//* The user ID that is used to start the task must have
//* read access to the <HLQs> in the STEPLIB statement
//*
//*************************************************************
//DSNWLMV9 PROC RGN=0K,APPLENV=DSNWLMV9,NUMTCB=15
//IEFPROC EXEC PGM=DSNX9WLM,REGION=&RGN,TIME=NOLIMIT,
// PARM='&Db2SSN,&NUMTCB,&APPLENV'
//STEPLIB DD DISP=SHR,DSN=<HLQDb2SSN>.SDSNEXIT
// DD DISP=SHR,DSN=<HLQBASE>.SDSNLOAD
// DD DISP=SHR,DSN=<HLQBASE>.SDSNLOD2
// DD DISP=SHR,DSN=<HLQACTIVE>.SAQTMOD
//SYSTSPRT DD SYSOUT=A
//CEEDUMP DD SYSOUT=H
//OUT1 DD SYSOUT=A
//UTPRINT DD SYSOUT=A
//DSSPRINT DD SYSOUT=A
//SYSPRINT DD SYSOUT=A
//AQTENV DD DSN=<HLQACTIVE>.SAQTSAMP(AQTENV),DISP=SHR
//AQTDEF6 DD DSN=<HLQACTIVE>.SAQTSAMP(AQTDEF6),DISP=SHR
Important:
- To avoid conflicts with environment variables
that are set for stored procedures of other applications, create a WLM application environment that
is exclusively used by the Db2 Data
Gate stored
procedures.
The stored procedures occasionally use the SYSPRINT output for diagnostic messages.
For example, restart attempts for DSNUTILU, which might indicate inappropriately configured workload
classes, are recorded here. Make sure to define a valid destination for SYSPRINT that grants write
access to all users of the stored procedures. Otherwise, authorization failures will be recorded
even if SYSPRINT was not used at all.
- The Db2 Data
Gate stored procedures call the
following Db2 for z/OS stored procedures:
- SYSPROC.ADMIN_INFO_SYSPARM
- SYSPROC.DSNUTILU
In addition, the Db2 stored procedure
SYSPROC.ADMIN_COMMAND_DB2 is called by the AQTTIJSP installation job and by the web interface on
IBM Cloud Pak® for Data.
Run these Db2-supplied stored procedures in a separate WLM application
environments that is not shared with the Db2 Data
Gate stored procedures.
- If your system has more than one IP stack, you must unequivocally identify the stack that the
Db2 Data
Gate stored procedures are supposed to use.
To do so, add the following statement to the procedure that starts the address
space:
//SYSTCPD DD DISP=SHR,DSN=<TCPIP.DATA file>
Make sure that
the z/OS
UNIX System Services are configured to use the same IP stack.
Connectivity from UNIX System Services to the Db2 Data
Gate is required for diagnostic and service
purposes.
- You might want to change the default settings for Db2 Data
Gate stored procedures, especially if you want to
use parallel processing for loading tables. To do so, you must set the environment variables in the AQTENV data set
accordingly.
Notes:
- If you must set environment
variables, use the sample AQTENV data set member that came with this
version of the product. Do not re-customize an older version of AQTENV because fundamental settings
might have changed and using an old configuration might lead to problems.
- The value of NUMTCB must be in the range between 15 and 30 (inclusively), so as
not to exceed the 31-bit memory limits of the stored procedures.
For more information, in particular about the relationship between NUMTCB and
AQT_MAX_UNLOAD_IN_PARALLEL, see Environment variables.