Exit Function Codes

The function code contained in a fullword addressed by the first word of the parameter list is a binary value that is right-aligned, with all high-order bits set to zero. The following function codes are used:

Function Code 0

This indicates that the region has just been initialized. Any initialization processing that the exit needs to do, such as opening required data sets, should be done now.

The second word of the parameter list passed to the exit for function code 0, contains the address of an area, formatted as described next.

Byte

Description

00-03

In this fullword, the exit can store the address of a message to log to the activity log and send to Monitor class operators. On return from any call to the exit, this word is checked; if the value is non-zero, it is assumed to be the address of a message.

04-04

Operating system indicator. Value is:

 

X'10'

z/OS

05-05

SMF record identifier set by the SYSPARMS SMFID= command.

06-17

System identifier set by the SYSPARMS ID= command.

When processing completes successfully, the exit returns control to the caller with a completion code of 0 in register 15. Any other value in R15 is regarded as indicating that processing was unsuccessful and the exit subtask is terminated abnormally and assigned User Abend reason code 75D-01.

Function Code 4

This indicates that a session record has been placed on the NTS output queue. For this function code only, the second word of the parameter list contains the address of the record passed to the exit.

The session record passed to the exit is formatted as an SMF Type 39 system record. The full record layout is available in the macro DSECT $NMSMF, which is located in the distributed management services macro library.

To map the NTS session record description, code the following:

label $NMSMF TYPE=NTS

Note that the area after the SMF record header contains variable information relating to the offset and length of those subsections present in the record. As the various data subsections are not always available to NTS, their inclusion is not guaranteed. This means that all access to such data subsections must proceed through the offset and length fields which relate to the subsections that are present. All offsets are from the first byte of the entire area passed (that is, the start of the SMF record header).

Record Subtype Identification

A copy of the session information is passed to the user exit and this data can be modified in any way without affecting subsequent NTS output processing. A halfword field labeled SMFNSUBT in the DSECT macro $NMSMF, and located at an offset of 22 bytes from the start of the record, contains the record subtype. NTS sets this field as follows:

01

The record passed contains RTM data collected for the session and was force-closed by the operator or closed during session awareness termination, but the session had not ended.

02

The record passed is a session end notification for a session that required NTS accounting.

03

The record passed is a session start notification for a session that requires the NTS accounting facility.

04

The record passed was force-closed by the operator, or closed during session awareness termination, but the session had not ended.

05

The record passed contains all data available at session end.

06

The record passed contains notification of a BIND rejection at session initialization.

07

The record passed contains notification of a session initialization failure that occurred before a BIND request was sent.

255

The record passed contains resource-based information. The type of information contained is indicated in the SMFNPSUB field. For more information, see the Reference Guide.

The processing performed by the exit on the record received is unrestricted, but it should be noted that exit processing is serialized and no additional NTS session records are processed on the output queue until the exit returns control to NTS.

Return Code Values

When control is returned by the exit, R15 must be set to one of the following (hexadecimal) return codes:

00

Processing complete. NTS continues processing the session record and passes the next record to the exit when it is available.

04

Processing complete. If this is a normal end of session record (record subtype 5) NTS does not log the record, otherwise this return code is treated in the same way as return code 0.

08

Processing complete. NTS processes the record but no further calls are made to the exit.

0C

Processing complete. As for return code 04, but no further calls are made to the exit.

Any other value in R15 is regarded as indicating unsuccessful processing and the exit subtask is abnormally terminated and assigned User Abend reason code 75D-02.

Function Code 8

This indicates that your region is terminating. It alerts the exit to perform any cleanup processing required, such as closing data sets. The termination of your region cannot proceed until the exit returns control.

On successful completion of processing, the exit returns control to the caller with a completion code of 0 in register 15. Any other value in R15 is regarded as indicating unsuccessful termination and the exit subtask is abnormally terminated and assigned User Abend reason code 75D-03.


Copyright © 2010 CA. All rights reserved.