Start SQL Database Monitor (QQQSSDBM) API


  Required Parameter Group:

1 Qualified job name Input Char(26)
2 Memory handle Input Char(10)
3 Storage size Input Binary(4)
4 Free storage method Input Char(10)
5 Number of types to monitor Input Binary(4)
6 Subtypes to monitor Input Array(*) of Char(10)
7 Error code I/O Char(*)

  Default Public Authority: *USE

  Threadsafe: Conditional; see Usage Notes.

The Start SQL Database Monitor (QQQSSDBM) API starts the memory-based SQL database monitor. Associated APIs include the following:


Authorities and Locks

Current User Profile
*JOBCTL

Required Parameter Group

Qualified job name
INPUT; CHAR(26)

The job to be monitored. The qualified job name has three parts:

Job name CHAR(10). A specific job name, a generic name, or one of the following special values:
* or *CURRENT Only the job that this program is running in. The rest of the qualified job name parameter must be blank.
*ALL All jobs. The rest of the job name parameter must be blank.
User name CHAR(10). A specific user profile name.
Job number CHAR(6). A specific job number.

Memory handle
INPUT; CHAR(10)

The handle used for consolidating data. This parameter is only valid when the qualified job name parameter is not *ALL (that is, you are starting the monitor on a specific job). If multiple jobs are monitoring with the same memory handle, their database activity will be consolidated together.

If *JOB is specified, the job's database activity will be monitored in its own memory area (the activity will not be consolidated with any other job's database activity, unless the other job explicitly specifies this job's job number as the memory handle.). For example, assume QQQSSDBM is issued by job 111111 with a memory handle of *JOB. This implies a memory handle of 111111 is used. If job 999999 issues QQQSSDBM and names a memory handle of 111111, then both jobs 111111 and 999999 will use memory area 111111. Consequently, the database monitor data for both jobs will be summarized within this memory area.

The possible values are:

User defined Up to 6-character value to name a memory area that will contain consolidated data. Only the first 6 characters will be used for a named memory.
*JOB Use the memory area associated with the job, and do not consolidate data with any other job.

Storage size
INPUT; BINARY(4)

The maximum amount of storage to use for in-memory data (specified in megabytes). A value of -1 implies no maximum.

Free storage method
INPUT; CHAR(10)

When maximum storage is reached in the storage size parameter, the method used to free storage. The possible value is:

*LRU Free the statement least recently used

Number of types to monitor
INPUT; BINARY(4)

The number of types passed in the subtypes to monitor array.

Subtypes to monitor
INPUT; Array(*) of CHAR(10)

The list of all subtypes that should be monitored. The possible values are:

KEYT_3000 Summary: Arrival sequence (file QAQQ3000)
KEYT_3001 Summary: Index used (file QAQQ3001)
KEYT_3002 Summary: Index created (file QAQQ3002)
KEYT_3003 Summary: Sort (file QAQQ3003)
KEYT_3004 Summary: Temporary file (file QAQQ3004)
KEYT_3007 Summary: Optimizer time-out or all access paths considered (file QAQQ3007)
KEYT_3008 Summary: Subselect processing (file QAQQ3008)
KEYT_3010 Summary: Host variable values (file QAQQ3010)
Start of ChangeKEYT_3030 Summary: Materialized query tables considered (file QAQQ3030)End of Change
KEYT_TEXT SQL statement text (file QAQQTEXT)
KEYT_QRYI Summary: General SQL information including statement count, maximum runtime, time last used, and so forth. This subtype is always monitored because it is required for monitoring all other subtypes (file QAQQQRYI). It should still be specified, and is required if it is the only subtype to be monitored.
*EDSQL Monitor all subtypes. If this option is specified, the number of types to monitor should be set to 1, and no other subtypes should be requested.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error Code Parameter.


Usage Notes

This function is threadsafe but not thread enabled. Database monitor data is collected in the threaded process but summarized at the job level.


Error Messages

Message ID Error Message Text
CPD0172 D Parameters passed on CALL do not match those required.
CPF1321 E Job &1 user &2 job number &3 not found.
CPF222E E &1 special authority is required.
CPF3CF1 E Error code parameter not valid.
CPF436C E Job specified is already being monitored.
CPF436E E Job &1 user &2 job number &3 is not active.


API introduced: V4R3
Top | Database and File APIs | APIs by category