Programming considerations

If you have more than one outstanding system logger request being processed asynchronously, multiple instances of your complete exit might run concurrently as system logger services process your request completions. Therefore, you should consider coding your complete exit as a reentrant program.

You must make storage for any of the keywords representing output areas accessible at the time of the completion exit, such as the following:
Macro
Keywords
IXGBRWSE
ANSAREA, BROWSETOKEN, BUFFER, BUFFER64, ANSAREA, BLKSIZE, TIMESTAMP, RETBLOCKID
IXGDELET
ANSAREA, OBLOCKID
IXGWRITE
ANSAREA, RETBLOCKID, TIMESTAMP

You may not be able to access the input parameter data area while your complete exit is running. If you want to save the parameter information for later processing, make a copy of it before your complete exit returns control to the system.

Consider obtaining separate storage for each logger request to store output fields and copies of input parameters and passing the storage to the completion exit using the REQDATA parameter. The storage should be accessible by the logger requestor and the completion exit.

The return and reason code for the request is stored in ANSAA_ASYNCH_RETCODE and ANSAA_ASYNCH_RSNCODE.

In certain instances, the system must quiesce the activity of user exits in order to perform cleanup processing. The following illustrates scenarios where this processing occurs:
  • Connection termination

    When a user disconnects while a MODE=SYNCEXIT request is outstanding, the complete exit will not be called.

    If the connecting task terminates, the system will issue a PURGEDQ against SRB that are associated with the connection. Since all complete exit SRBs are associated with the connecting task's TCB, any complete exits that are active when the connecting task terminates could be interrupted with an ABEND x'47B' reason code 0.

  • System logger termination

    When the system logger address space terminates, it attempts to inform active requests of logger termination. If the complete exit has not been scheduled, it is scheduled at this time with a return code and reason code indicating that the system logger address space has terminated.

The system logger initializes a recovery environment before it calls the complete exit. Should the complete exit fail and percolate to the system logger's recovery routine, the task that did the corresponding connection to the log stream is abended and retry is not permitted. The abend code will be 1C5 and the abend reason code 00030006.