Writing a Secondary Exit

The secondary exit is called by your region with Register 1 containing the address of a parameter list which is always ten consecutive full words in length.

Depending upon the reason for the call, some of these words can be set to binary zeroes.

The first word of the secondary exit parameter list is always the address of a full word that contains a function code identifying the type of call being made.

The other parameters passed depend upon the value of this function code, and the exit must therefore determine the function code first in order to decide which parameters to expect.

The parameter list passed to the exit is also used as a parameter returned from the exit, allowing the exit to indicate the processing required and to pass the appropriate information to your region.

Note: On a call to the exit, addresses are included in the parameter list of various fields. Only these fields can be used to return information from the exit; the exit cannot pass parameters back to your region in any other locations.

Specifying Initialization Processing

Initialization processing indicates to the secondary exit that a link has become active. There is no indication whether a primary exit exists in the remote system, or, if there is, whether that exit is going to attempt to communicate with the secondary exit. The secondary exit must therefore be written to expect whatever processing is implemented in the remote primary exit.

Initialization Call Parameter List

On entry to the secondary exit, Register 1 points to a list of ten full words, as shown in this diagram.

The diagram shows the parameter list for the Initialization call to an INMC secondary exit.

Return Codes from the Initialize Call

The secondary exit does not have an opportunity to respond to the initialize call. On completion of any processing it chooses to perform when passed control, the secondary exit should return to your region with its ten full word parameter list unchanged.

Specifying Message Delivery Processing

When the primary exit sends a message to the secondary exit the message is presented to the secondary exit for processing using the Deliver Call.

The secondary exit performs whatever processing is required and then returns to your region. On return, your region expects the secondary exit to have set the message-length and message-text areas pointed to by words 6 and 7 of the parameter list with which it was called.

The secondary exit can, if necessary, indicate that a null message is to be returned to the primary exit, perhaps as an acknowledgment to the message sent by the primary.

Deliver Call Parameter List

On entry to the secondary exit, Register 1 points to a list of ten full words, as shown in this diagram.

The diagram shows the parameter list for the Delivery call to an INMC secondary exit.

Return Codes from Secondary Exit Deliver Call

The secondary exit should set the full word pointed to by word 6 of the call parameter list to the length of the message text that is to be returned to the primary exit as a reply to the message just delivered.

The message length has a range of 0 to 256 in hexadecimal. Any text outside the specified range is truncated to 256 bytes decimal. A zero length is accepted. Negative length settings are forced to a zero value.

Word 7 of the call parameter list points to a 256-byte area in which the secondary exit can place the text of the message to be returned to the primary exit. The format and content of the message returned is decided by the installation.

No other return information is accepted from the secondary exit.

Specifying Termination Processing

When the primary exit in a remote system decides that the primary/secondary exit exchange of information is complete, it returns to your region, indicating that exit processing is to terminate, and also specifies whether the link is to be activated or closed down.

The decision to finish communication is reported to the secondary exit as a disconnect call. This allows the secondary exit to determine that no further messages are to be received from the primary exit and to release any exit dependent resources it acquired.

The disconnect call is also issued when the link to the primary exit's remote system is lost.

Disconnect Call Parameter List

On entry to the secondary exit, Register 1 points to a list of ten full words, as shown in this diagram.

The diagram shows the parameter list for the Disconnect call to an INMC secondary exit.

Return Codes from the Disconnect Call

The secondary exit should clean up any resources allocated during the conversation with the primary exit and perform any required termination processing. No further communication is possible with the primary exit.

No parameters can be returned to your region.

On return to management service, the link either is out of action (if caused by a link outage) or is activated or deactivated according to the choice of the primary exit in the remote system.


Copyright © 2010 CA. All rights reserved.