Syntax and options of the DSN1SDMP control statement

The DSN1SDMP utility control statement, with its multiple options, defines the function that the utility job performs.

DSN1SDMP syntax diagram

Read syntax diagramSkip visual syntax diagram START TRACE ( trace-parameters)SELECTfunction, offset, data-specificationACTION( action(X'00E60100')( abend-code))(STTRACE, action(X'00E60100')( abend-code))second-trace-spec1AFTER(1)AFTER( integer)FOR(1)FOR( integer)
second-trace-spec
Read syntax diagramSkip visual syntax diagramACTION2(action(X'00E60100')( abend-code))FILTER(ACEEB)COMMANDcommandAFTER2(1)AFTER2( integer)FOR2(1)FOR2( integer)SELECT2function, offset, data-specification
Notes:
  • 1 The options in the second-trace-spec do not have to be specified immediately following the STTRACE option. However, they can be specified only if the STTRACE option is also specified.

Option descriptions

START TRACE (trace-parameters)
Indicates the start of a DSN1SDMP job. START TRACE is a required keyword and must be the first keyword that is specified in the SDMPIN input stream.

If the START TRACE command in the SDMPIN input stream is not valid, or if the user is not properly authorized, the IFI (instrumentation facility interface) returns an error code and START TRACE does not take effect. DSN1SDMP writes the error message to the SDMPPRNT data set.

Trace Destination: If Db2 trace data is to be written to the SDMPTRAC data set, the trace destination must be an IFI online performance (OP) buffer. OP buffer destinations are specified in the DEST keyword of START TRACE. Eight OP buffer destinations exist, OP1 to OP8. The OPX trace destination assigns the next available OP buffer. Any record destined for the exclusive internal trace table (RES) is not eligible to be evaluated. For example, if you start IFCID(0) DEST(RES), this will not execute DSN1SDMP logic and cannot be acted upon.

The Db2 output text from the START TRACE command is written to SDMPPRNT.

START TRACE and its associated keywords must be specified first. Specify the remaining selective dump keywords in any order following the START TRACE command.

SELECT function,offset,data-specification
Specifies selection criteria in addition to those that are specified on the START TRACE command. SELECT expands the data that is available for selection in a trace record and allows more specific selection of data in the trace record than using START TRACE alone. You can specify a maximum of eight SELECT criteria.

The selection criteria use the concept of the current-record pointer. Db2 initializes the current-record pointer to zero, that is, at the beginning of the trace record. For this instance of the DSN1SDMP trace, the trace record begins with the self-defining section. The current-record pointer can be modified by Px and LN functions, which are described in the list of functions below.

You can specify the selection criteria with the following parameters:

function
Specifies the type of search that is to be performed on the trace record. The specified value must be two characters. The possible values are:
DR
Specifies a direct comparison of data from the specified offset. The offset is always calculated from the current-record pointer.
GE
Specifies a comparison of data that is greater than or equal to the value of the specified offset. The offset is always calculated from the current-record pointer. The test succeeds if the data from the specified offset is greater than or equal to data-specification, which you can specify on the SELECT option.
LE
Specifies a comparison of data that is less than or equal to the value of the specified offset. The offset is always calculated from the current-record pointer. The test succeeds if the data from the specified offset is less than or equal to data-specification, which you specify on the SELECT option.
P1, P2, or P4
Selects the 1-, 2-, or 4-byte field that is located offset bytes past the start of the record. The function then moves the current-record pointer that number of bytes into the record. P1, P2, and P4 always start from the beginning of the record (plus the offset that you specify).

This offset is saved as the current-record pointer that is to be used on subsequent DR, LE, GR, and LN requests.

For example, suppose that the user knows that the offset to the standard header is 4 bytes long and is located in the first 4 bytes of the record. P4,00 reads that offset and moves the current-record pointer to the start of the standard header.

LN
Advances the current-record pointer by the number of bytes that are indicated in the 2-byte field that is located offset bytes from the previous current-record pointer.

This offset is saved as the current-record pointer that is to be used on subsequent DR, LE, GR, and LN requests.

offset
Specifies the number (in decimal) of bytes into the trace record where the comparison with the data-specification field begins. The offset starts from the beginning of the trace record after a P1, P2, or P4, and from the current-record pointer after a GE, LE, LN, or DR.
The format of the Db2 trace record at data-specification comparison time is shown in the following figure.
Figure 1. Format of the Db2 trace record at data specification comparison time
Begin figure summary. Format of the DB2 trace record comprises a self defining section, data sections, and a product section. Detailed description available.
  • The format of the self-defining section depends on the trace type.
  • The format and content of the data sections depend on the IFCID that is being recorded. Each record can have one or more data sections. Each data section can have multiple repeating groups.
  • The format and content of the trace header section depends on the trace type.
data-specification
Specifies that the data can be hexadecimal (for example, X'9FECBA10') or character (C'FIELD').
ACTION
Specifies the action to perform when a trace record passes the selection criteria of the START TRACE and SELECT keywords.
Attention: The purpose of the ACTION keyword is to facilitate problem analysis. You should use it with extreme caution because you might damage existing data. Not all abends are recoverable, even if the ABENDRET parameter is specified. Some abends might force the Db2 subsystem to terminate, particularly those abends that occur during end-of-task or end-of-memory processing due to the agent having experienced a previous abend.
action(abend-code)
Specifies a particular action to perform. Possible values for action are:
ABENDRET
ABEND and retry the agent.
ABENDTER
ABEND and terminate the agent.

An abend reason code can also be specified on this parameter. The codes must be in the range X'00E60100' to X'00E60199'. The default value is X'00E60100'.

STTRACE
Specifies that a second trace is to be started when a trace record passes the selection criteria.

If you do not specify action or STTRACE, the record is written and no action is performed.

AFTER(integer)
Specifies that the ACTION is to be performed after the trace point is reached integer times.

integer must be between 1 and 32767.

The default value is AFTER(1).

FOR(integer)
Specifies the number of times that the ACTION is to take place when the specified trace point is reached. After integer times, the trace is stopped, and DSN1SDMP terminates.

integer must be between 1 and 32767 and includes the first action. If no SELECT criteria are specified, use an integer greater than 1; the START TRACE command automatically causes the action to take place one time.

The default value is FOR(1).

ACTION2
Specifies the action to perform when a trace record passes the selection criteria of the START TRACE, SELECT, and SELECT2 keywords.
Attention: The ACTION2 keyword, like the ACTION keyword, should be used with extreme caution, because you might damage existing data. Not all abends are recoverable, even if the ABENDRET parameter is specified. Some abends might force the Db2 subsystem to terminate, particularly those that occur during end-of-task or end-of-memory processing due to the agent having experienced a previous abend.
action(abend-code)
Specifies a particular action to perform. Possible values for action are:
ABENDRET
ABEND and retry the agent.
ABENDTER
ABEND and terminate the agent.

An abend reason code can also be specified on this parameter. The codes must be in the range X'00E60100-00E60199'. If no abend code is specified, X'00E60100' is used.

If you do not specify action, the record is written and no action is performed.

FILTER
Specifies that DSN1SDMP is to filter the output of the second trace based on either an ACE or an EB.
(ACE)
Specifies that DSN1SDMP is to include trace records only for the agent control element (ACE) that is associated with the agent when the first action is triggered and the second trace is started.
(EB)
Specifies that DSN1SDMP is to include trace records only for the execution block (EB) that is associated with the agent when the first action is triggered and the second trace is started.
COMMAND
Indicates that the specified command is to be issued when a trace record passes the selection criteria for the first trace and a second trace is started. You can start a second trace by specifying the STTRACE option.
command
Specifies a specific command to be issued.
FOR2(integer)
Specifies the number of times that the ACTION2 is to take place when the specified second trace point is reached. After integer times, the second trace is stopped, and DSN1SDMP terminates.

integer must be between 1 and 32767 and includes the first action. If no SELECT2 criteria are specified, use an integer greater than 1; the STTRACE option automatically causes the action to take place one time.

The default value is FOR2(1).

AFTER2(integer)
Specifies that the ACTION2 is to be performed after the second trace point is reached integer times.

integer must be between 1 and 32767.

The default value is AFTER2(1).

SELECT2 function,offset,data-specification
Specifies selection criteria for the second trace. This option functions like the SELECT option, except that it pertains to the second trace only. You can start a second trace by specifying the STTRACE option.