Special considerations for WLM-managed stored procedures in coexistence
The WLM-managed stored procedure address space (WLM-SPAS) that processes a stored procedure or UDF program always connects to the DB2® member that processes the SQL call request. Therefore, the DB2 code that is executed in the WLM-SPAS must match the DB2 release of the DBM1 address space, or an error occurs.
When running in a data sharing group, each member has a different DBM1 address space. This means that the DB2 code in the WLM-SPAS will have to match more than one DB2 release level. This can cause a problem when you want to use a single JCL definition for the procedure name listed in the WLM definition.
To define one JCL procedure to reference DB2 code data sets at different release levels, use a simple data set and alias naming convention. If the procedure library is shared throughout the SYSPLEX, this allows for a single JCL definition for the Procedure Name that is listed in the WLM definition.
In the following example, the DB2SSN parameter is used as a part of the data set name in STEPLIB. This allows redirection to a data set name based on the SSN of the member that is invoking the stored procedure or UDF.
Application Environment Name . : DB2GROUP1
Description . . . . . . . . . . GROUP 1 APPS
Subsystem Type . . . . . . . . . DB2
Procedure Name . . . . . . . . . DB2AWLM1
Start Parameters . . . . . . . . DB2SSN=&IWMSSNM
________________________________________
Limit on starting server address spaces for a subsystem instance:
1 1. No limit
2. Single address space per system
3. Single address space per Sysplex
//DB2AWLM1 PROC RGN=0M,DB2SSN=,NUMTCB=1,APPLENV=DB2GROUP1
//IEFPROC EXEC PGM=DSNX9WLM,REGION=&RGN,TIME=NOLIMIT,
// PARM='&DB2SSN,&NUMTCB,&APPLENV'
//STEPLIB DD DISP=SHR,DSN=DSNT2.&DB2SSN..SDSNEXIT
// DD DISP=SHR,DSN=DSNT2.&DB2SSN..SDSNLOAD
// DD DISP=SHR,DSN=DSNT2.&DB2SSN..SDSNLOD2
// DD DISP=SHR,DSN=DSNT2.RUNLIB.LOAD
DSNT2.DT21.SDSNLOAD *ALIAS
As
members are migrated, the ALIAS can be changed to reflect the new
release that the member is running.