Dump SQL Database Monitor (QQQDSDBM) API
Required Parameter Group:
1 | Memory handle to dump | Input | Char(10) |
2 | Job or memory handle name | Input | Char(26) |
3 | Number of types to dump | Input | Binary(4) |
4 | Subtypes and files array | Input | Array(*) of Char(30) |
5 | Error code | I/O | Char(*) |
Service Program Name: QQQDSDBM
Default Public Authority: *USE
Threadsafe: Conditional; see Usage Notes.
The Dump SQL Database Monitor (QQQDSDBM) API dumps the SQL database monitor that has been gathered. The data that is gathered will be all data that has been committed (if the job is under commitment control) or based on a 5-minute timer. Associated APIs include the following:
- Clear SQL Database Monitor Statistics (QQQCSDBM)
- End SQL Database Monitor (QQQESDBM)
- Query SQL Database Monitor (QQQQSDBM)
- Start SQL Database Monitor (QQQSSDBM)
Authorities and Locks
- Current User Profile
- *JOBCTL
- Library Authority for New File
- *ADD and *READ
- Library Authority for Existing File
- *EXECUTE
- Existing File
- *CHANGE and *OBJALTER
Required Parameter Group
- Memory area to dump
- INPUT; CHAR(10)
Memory area to dump. The possible values are:
*ALL Dump the monitor data associated with the *ALL monitor (the monitor started against all jobs). The Start SQL Database Monitor (QQQSSDBM) must have been started with job name *ALL. *NAMED Dump the memory handle named by the job or memory handle name parameter (and matches the name of a memory handle specified on the QQQSSDBM API). Only the first 6 characters will be used for naming the memory handle. If QQQSSDBM started the monitor with *JOB, you can also name the job to be dumped with this parameter by giving the 6-character memory handle that contains the job number. *JOB Dump the job-specific data associated with the job named by the job or memory handle name parameter.
- Job or memory handle name
- INPUT; CHAR(26)
This parameter depends on the value specified for the memory area to dump parameter. If the value is:
*ALL This parameter is ignored. *NAMED The CHAR(6) name of a memory handle whose data is to be dumped. Only the first 6 characters will be used for naming the memory handle. *JOB The CHAR(26) qualified job name of a job-specific monitor to dump. The qualified job name has three parts:
Job name CHAR(10). A specific job name, a generic name, or one of 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.
- Number of types to dump
- INPUT; BINARY(4)
The number of types passed in the subtypes and files array.
- Subtypes and files array
- INPUT; Array(*) of CHAR(30)
The list of all subtypes to dump and their associated receiving files. The format of each array element is:
- CHAR(10). Key to Dump.
-
The possible values are:
KEYT_3000 Summary: Arrival sequence KEYT_3001 Summary: Index used KEYT_3002 Summary: Index created KEYT_3003 Summary: Sort KEYT_3004 Summary: Temporary file KEYT_3007 Summary: Optimizer time-out or all access paths considered KEYT_3008 Summary: Subselect processing KEYT_3010 Summary: Host variable values KEYT_3030 Summary: Materialized query tables considered KEYT_TEXT SQL statement text 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. Although it is always monitored, it will not be dumped unless requested.
- CHAR(20). File name.
-
The name of the file to receive the data. The first 10 characters contain the file name, and the second 10 characters contain the library name. A member name of *FIRST is assumed. The following special values can be used for the library name:
*CURLIB The job's current library *LIBL The library list If the file already exists, it will be cleared prior to dumping the data. The files will be created with authority of owner(*ALL) and PUBLIC(*CHANGE), and they are owned by the profile of the job calling QQQDSDBM.
Note: If a subtype is specified multiple times, only the first occurrence of the subtype and the associated file name is honored. The duplicates are ignored.
- 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.
The QQQDSDBM API does not force a clear operation (QQQCSDBM) of the memory. Data will continue to be added to memory until the QQQCSDBM or QQQESDBM API is called.
Error Messages
Message ID | Error Message Text |
---|---|
CPD0172 D | Parameters passed on CALL do not match those required. |
CPD222E E | &1 special authority is required. |
CPF3012 E | File &1 in library &2 not found. |
CPF3084 E | Eror clearing member &3 in file &1. |
CPF3130 E | Member &2 already in use. |
CPF3CF1 E | Error code parameter not valid. |
CPF9822 E | Not authorized to file &1 in library &2. |
API introduced: V4R3
[ Back to top | Database and File APIs | APIs by category ]