In this example, the installation has the following situation:
- MVS™ JCL procedures for DB2® stored procedure servers: PAY1,
PAY2, PER1, PER2
These are the JCL procedures that workload management uses to
start the DB2 servers that handle
stored procedure calls.
- DB2 subsystem names: DB2A
and DB2B
These are the subsystem names used when the DB2 subsystem connects to workload management.
- Activate STARTED and SERVER classes (if not already done):
SETR CLASSACT(STARTED) RACLIST(STARTED) GENERIC(STARTED)
SETR CLASSACT(SERVER) RACLIST(SERVER) GENERIC(SERVER)
- Establish an arbitrary user ID to use in a subsequent RDEFINE command
to tie an MVS procedure name
to a server.
ADDUSER DB2SERV NOPASSWORD
The NOPASSWORD keyword
here is important, it makes DB2SERV a protected user.
- Associate the user ID with the started task name.
RDEFINE STARTED PAY*.* STDATA(USER(DB2SERV) GROUP(SYS1))
RDEFINE STARTED PER*.* STDATA(USER(DB2SERV) GROUP(SYS1))
- Define server profiles in the form:
subsys_type.subsys_name.applenv[.subsys_node]
where,
- subsys_type
- is the subsystem type, as specified in the service definition
- subsys_name
- is the instance name of the subsystem associated with this server.
Refer to subsystem reference information for how to determine the
subsystem name. The subsystem uses this name when establishing itself
as the work manager for application
environment server
requests.
- subsys_node
- is the node name of the server when Work_Manager=Yes is specified.
This is an optional parameter.
- applenv
- is the application environment name, as specified in the service
definition
RDEFINE SERVER DB2.DB2A.* UACC(NONE)
RDEFINE SERVER DB2.DB2B.* UACC(NONE)
Note: The
maximum length of a server profile name passed to a SAF product is
restricted to 41 characters. WLM cannot start server address spaces
for application environments that do not follow this restriction.
If you ensure that the applenv is at maximum 27 characters long, it
is guaranteed that the maximum server profile name length does not
exceed 41 characters.
- Permit the userid to the servers. This completes the association
between the MVS procedure names
and the servers:
PERMIT DB2.DB2A.* CLASS(SERVER) ID(DB2SERV) ACCESS(READ)
PERMIT DB2.DB2B.* CLASS(SERVER) ID(DB2SERV) ACCESS(READ)
- Refresh the classes to refresh the RACF® data
base and make these changes go into effect:
SETR RACLIST(STARTED) REFRESH
SETR RACLIST(SERVER) REFRESH