Writing a Primary Exit

The primary exit is called by your product 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 might be set to binary zeroes.

The first word of the 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 list returned from the exit, allowing the exit to indicate the processing required and to pass the appropriate information to your product region.

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

Specifying Initialization Processing

Initialization processing notifies the primary exit of two things:

To provide this functionality in your exit, you must code the initialization call to correspond with the parameter list in the following section.

You must take into consideration any special processing you want to perform, such as, password exchange between the connecting systems.

Initialization Call Parameter List

On entry to the Primary 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 primary exit.

Return Codes from Initialization Call

On return from the initialization call, the primary exit signals what it wants done next. The choices that are available are:

The exit indicates which option is required by using the same ten full words of the parameter list with which it was called, to pass back its own instructions to your region. When the exit returns therefore, the ten full word parameter list must be formatted as follows:

Specifying Message Delivery Processing

When the primary exit sends a message to the secondary exit in a remote system, the secondary exit always responds with a reply. That reply can be a null message of zero length. The reply message is presented to the primary exit for processing by using a Deliver Call.

The primary exit performs whatever processing is required and then returns to your region with the ten full word parameter list set to indicate the processing required next.

On return, the exit can request one of two options:

Delivery Call Parameter List

On entry to the primary 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 primary exit.

Return Codes from Delivery Call

When the primary exit completes its processing of the message returned from the secondary exit it formats the ten word parameter list to indicate the processing required next and then returns to your region.

The parameter list must be set exactly.

More information:

Return Codes from Initialization Call

Specifying Termination of Link Notification Processing

If a link to a remote system is lost before a reply is received from the secondary exit, your region indicates this to the primary exit via a notify call. This call tells the primary exit that no further communications can be received from the secondary exit and that the INMC link to the remote system has been lost.

A notify call is also made in response to the primary exit attempting to communicate with a secondary exit when the remote system is not configured with a secondary exit or the secondary exit failed to initialize.

When the exit has been notified of a lost link, it should then perform whatever termination processing it needs to do then return to your region, indicating that exit processing is to terminate. Any other action results in repetitive notify calls until the exit signals that exit processing is to end.

Notify Call Parameter List

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

The diagram shows the parameter list for the Notify call to an INMC primary exit.

Return Codes from Notify Call

When the primary exit completes its processing of the notify call it should format the ten word parameter list as follows:

The remaining nine full words should be returned unchanged.


Copyright © 2010 CA. All rights reserved.