Previous Topic: Specify the TODD Operand

Next Topic: Setting up for Split File Time Processing

Writing Split Exits

Through the use of the EXIT parameter on the SPLIT statement, you can filter SMF records even more precisely than with the operands indicated on a SPLIT statement. The exit will be called at the following times in the dump process:

The primary purpose of the exit is to allow a further examination of records that are to be written to a split file to determine if they should be written to a split file. The exit will be called in primary mode, with no locks held. An exit can be shared by multiple SPLIT statements and split files, but we recommend, if this is done, that the exit be written so that it does not modify itself and that the exit be linked re-entrant. The exit should not obtain any locks, and it should not hold any enqueues that are issued between calls. The exit should be written in assembler language. Other languages and environments may work but are not supported. The exit may provide recovery, but we strongly recommend that the exit recovery only handle errors within the exit and percolate any errors outside its perview. The exit must follow standard 31-bit z/OS linkage conventions. Upon receiving control, the following values are set in the registers:

R0

The function call. The register will be set to one of these values:

00000000

A split definition is about to be processed for the first time.

00000001

The split file has just been opened

00000002

A record is about to be written to the split file.

00000003

The split file has been closed; the product is terminating.

It is expected that the 00000000 call will be used to allocate any addtional resources the exit needs, and that the file closed call will be used for clean up.

R1

A three-word parameter list:

+0

Address of the SMF record about to be written, if any. This value is set only if R0 is set to 00000002. The value, otherwise, should be ignored.

+4

Address of a 128-byte work area preallocated for the exit's use. If more memory is needed, it can be obtained using standard z/OS memory services. The memory can safely be released when the 00000003 call is made as the exit will not be called after that. Do not release this 128-byte work area at termination time.

+8

Address of the DDNAME from the TODD field in the SPLIT statement.

R13

Save Area. Upon entry, the exit must save the registers passed to it, and restore them upon return. Failure to do so can produce unpredictable results.

R14

The return address and AMODE. The exit must return using a BSM 0,R14 instruction.

R15

The entry point and AMODE of the exit. The exit will be called in the AMODE it was linked with.

Upon your return to CA SMF Director, Register 15 must contain one of the following return codes:

0

Normal return. If the function is 2, this will allow the record to be written.

4

Normal return. If the function is 2, this will suppress the writing of the record.

8

This return code will deactivate the exit and, if the function is 2, allow the record to be written.

12

This return code will deactivate the exit and, if the function is 2, suppress the writing of the record.

16

This return code will deactivate the SPLIT statement and the exit.

For functions 0 and 1, only return codes 0, 8, 12, and 16 are valid. For function 3, the return code is ignored. In all cases, any return code value that differs from one of these indicated values will be treated the same as setting a return code of 0.