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.

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

Read syntax diagramSkip visual syntax diagram >>-CALL DSNACCHR (--query-type,--health-ind,--policy-id,--work-set,--> >--+-dataset-name,-+--+-member-name,-+--+-save-opt,-+----trace-flag,---->    '-NULL----------' '-NULL---------' '-NULL------'     >--job-id,--jobname,--jcl-proc-time,--trace-flag,--last-statement,--> >--return-code,--error-msg )-----------------------------------><

query-type

Specifies what you want to do with the actions recommended for objects identified to be in alert state during policy evaluation. Possible values are:

query-type is an input parameter of type INTEGER.

health-ind

Specifies the type of alert that DSNACCHR includes in the JCL job. Possible values are:

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

Specifies how to save the object maintenance JCL job. This value must be specified if query-type is 3. Possible values are:

save-opt is an input parameter of type VARCHAR(2).

trace-flag

Specifies whether tracing will be turned on or off. Possible values are:

trace-flag is an input parameter of type CHAR(1).

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

The return code from DSNACCHR execution. Possible values are:

return-code is an output parameter of type INTEGER.

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).

DSNACCHR returns one result set when the query-type parameter is 0. The result set contains the JCL job generated by DSNACCHR. The DSNACCHR result set table is created by the DSNTIJCC installation job. Table 1 shows the format of the result set.
Table 1. DSNACCHR result set format
Column name Data type Description
JCLSEQNO INTEGER

Sequence number of the table row
(1,...,n)

JCLSTMT VARCHAR(80) Specifies a JCL statement