Viewing, submitting, and saving recommended actions
To view, submit, and save the actions recommended for alert objects identified during policy evaluation, call the Db2® stored procedure SYSPROC.DSNACCHR, which is created by the DSNTIJCC installation job. DSNACCHR is a stored procedure which determines the recommended actions for alert objects identified during policy evaluation and generates a JCL job that will execute the recommended actions.
About this task
The following syntax diagram shows the SQL CALL statement for invoking DSNACCHR. Because the linkage convention for DSNACCHR is GENERAL WITH NULLS, if you pass parameters in host variables, you need to include a null indicator with every host variable. Null indicators for input host variables must be initialized before you execute the CALL statement.
Syntax
query-type
- 0 - View recommended actions on alert objects as a JCL job
- 1 - Submit the JCL job that executes the recommended actions on alert objects
- 2 - Submit the JCL job that executes the recommended actions on alert objects, and put the job on the hold queue
- 3 Save recommended actions on alert objects as a JCL job in a library member
health-ind
- RS - Restricted State
- EX - Extents Exceeded
- RR - REORG Required
- CR - COPY Required
- RT - RUNSTATS Required
- SS - STOSPACE Required
health-ind is an input parameter of type VARCHAR(4).
policy-id
Specifies an object maintenance policy. policy-id is an input parameter of type VARCHAR(7).
work-set
Specifies the work set of an object maintenance policy that identified the alert objects that DSNACCHR includes in the JCL job. This work set must be identified with the policy and type of alert specified in the parameters policy-id and health-ind. work-set is an input parameter of type INTEGER.
dataset-name
Specifies a fully qualified partitioned data set (PDS) or partitioned data set extended (PDSE) name. This value must be specified if query-type is 3. dataset-name is an input parameter of type VARCHAR(44).
member-name
Specifies a member of the partitioned data set (PDS) or partitioned data set extended (PDSE) specified in the dataset-name parameter where the object maintenance JCL job will be saved.This value must be specified if query-type is 3. member-name is an input parameter of type VARCHAR(8).
save-opt
- R - Replace
- A - Append
- NM - New member
trace-flag
- Y - Turn trace on
- N - Turn trace off
job-ID
When query-type is 1 or 2, specifies the job ID of the submitted job. job-id is an output parameter of type VARCHAR(8).
jobname
When query-type is 1 or 2, specifies the name of the submitted job. jobname is an output parameter of type VARCHAR(8).
jcl-proc-time
Specifies the time request was processed. jcl-proc-time is an output parameter of type TIMESTAMP.
last-statement
When DSNACCHR returns a severe error (return code 12), this field contains the SQL statement that was executing when the error occurred. last-statement is an output parameter of type VARCHAR(2500).
return-code
- 0 - DSNACCHR executed successfully
- 12 - DSNACCHR terminated with severe errors. The error-msg parameter contains a message that describes the error. The last-statement parameter contains the SQL statement that was executing when the error occurred.
error-msg
When DSNACCHR returns a severe error (return code 12), this field contains error messages, including the formatted SQLCA. error-msg is an output parameter of type VARCHAR(1331).
| Column name | Data type | Description |
|---|---|---|
| JCLSEQNO | INTEGER | Sequence number of the table row
(1,...,n) |
| JCLSTMT | VARCHAR(80) | Specifies a JCL statement |
