The WLM_GET_SERVICE_CLASS_WORKLOAD_OCCURRENCES function returns the list of all workload occurrences running in a specified service class on a particular member. A workload occurrence is a specific database connection whose attributes match the definition of a workload and hence is associated with or assigned to the workload.
Refer to Table 1 for a complete list of information that can be returned.
>>-WLM_GET_SERVICE_CLASS_WORKLOAD_OCCURRENCES--(--service_superclass_name--,--> >--service_subclass_name--,--member--)-------------------------><
The schema is SYSPROC.
None
If an administrator wants to see what workload occurrences are running on the system as a whole, the administrator can call the WLM_GET_SERVICE_CLASS_WORKLOAD_OCCURRENCES function by specifying a null value or an empty string for service_superclass_name and service_subclass_name and -2 for member:
SELECT SUBSTR(SERVICE_SUPERCLASS_NAME,1,19) AS SUPERCLASS_NAME,
SUBSTR(SERVICE_SUBCLASS_NAME,1,18) AS SUBCLASS_NAME,
SUBSTR(CHAR(MEMBER),1,4) AS MEMB,
SUBSTR(CHAR(COORD_MEMBER),1,4) AS COORDMEMB,
SUBSTR(CHAR(APPLICATION_HANDLE),1,7) AS APPHNDL,
SUBSTR(WORKLOAD_NAME,1,22) AS WORKLOAD_NAME,
SUBSTR(CHAR(WORKLOAD_OCCURRENCE_ID),1,6) AS WLO_ID
FROM TABLE(WLM_GET_SERVICE_CLASS_WORKLOAD_OCCURRENCES
(CAST(NULL AS VARCHAR(128)), CAST(NULL AS VARCHAR(128)), -2))
AS SCINFO
ORDER BY SUPERCLASS_NAME, SUBCLASS_NAME, MEMB, APPHNDL,
WORKLOAD_NAME, WLO_ID
If the system has four database members and is currently running two workloads, the previous query produces results such as the following ones:
SUPERCLASS_NAME SUBCLASS_NAME MEMB COORDMEMB ...
------------------- ------------------ ---- --------- ...
SYSDEFAULTMAINTENAN SYSDEFAULTSUBCLASS 0 0 ...
SYSDEFAULTSYSTEMCLA SYSDEFAULTSUBCLASS 0 0 ...
SYSDEFAULTUSERCLASS SYSDEFAULTSUBCLASS 0 0 ...
SYSDEFAULTUSERCLASS SYSDEFAULTSUBCLASS 0 0 ...
SYSDEFAULTUSERCLASS SYSDEFAULTSUBCLASS 1 0 ...
SYSDEFAULTUSERCLASS SYSDEFAULTSUBCLASS 1 0 ...
SYSDEFAULTUSERCLASS SYSDEFAULTSUBCLASS 2 0 ...
SYSDEFAULTUSERCLASS SYSDEFAULTSUBCLASS 2 0 ...
SYSDEFAULTUSERCLASS SYSDEFAULTSUBCLASS 3 0 ...
SYSDEFAULTUSERCLASS SYSDEFAULTSUBCLASS 3 0 ...
... APPHNDL WORKLOAD_NAME WLO_ID
... ------- ---------------------- ------
... - - -
... - - -
... 1 SYSDEFAULTUSERWORKLOAD 1
... 2 SYSDEFAULTUSERWORKLOAD 2
... 1 SYSDEFAULTUSERWORKLOAD 1
... 2 SYSDEFAULTUSERWORKLOAD 2
... 1 SYSDEFAULTUSERWORKLOAD 1
... 2 SYSDEFAULTUSERWORKLOAD 2
... 1 SYSDEFAULTUSERWORKLOAD 1
... 2 SYSDEFAULTUSERWORKLOAD 2
The parameters are, in effect, ANDed together. That is, if you specify conflicting input parameters, such as a service superclass SUP_A and a subclass SUB_B such that SUB_B is not a subclass of SUP_A, no rows are returned.