Considerations for logger log stream disconnected

See 'System Logger Processing at Disconnection' in z/OS MVS Programming: Assembler Services Guide for additional details on log stream disconnect processing and log stream tokens.

Log stream disconnects can occur for a variety of reasons;
  • An application explicitly or implicitly disconnects from a log stream
  • The result of a CFRM policy
  • System environmental conditions
  • From internal (system logger component) errors.
System logger will issue an ENF 48 signal for most of the conditions listed above. The IXGENF mapping, which is input to the ENF 48 listen exit routine is organized as follows:
event
Main indication of services or resource state change
event reason
Incident that occurred causing the state change
event specific reason
More details on event reason

However, note that there is a special case for the ENF 48 events when the "event specific reason" actually designates the significant state of the log stream resource. That is when a log stream is disconnected and deemed unavailable and an ENF 48 event with IxgEnfLogstreamsNotAvailable and IxgEnfLogstreamDisconnected are both set on.

The following are ENF 48 events that relate to a log stream being disconnected:
  • The log stream connector disconnects from the log stream by issuing an IXGCONN REQUEST=DISCONNECT,STREAMTOKEN value.

    System logger will issue an ENF 48 event that indicates that a connector has disconnected from the log stream.

    ENF 48 event indicators:    
    IxgenfEvents (IxgenfEventsByte0): IxgEnfLogstreamConnDisc
    IxgenfConnDiscInfo section will identify the system and log stream name for the disconnect event along with some additional indicators:
    • IxgEnfConnDiscFlags
    • IxgenfConnDiscDisConnect
  • For structure-based log streams, system logger can disconnect a requestor when certain structure failure conditions occurs. An ENF 48 event is issued informing the connectors that they have been disconnected (CFRM policy action), and any future system logger service requests using the same log stream token received the return code 8, reason code 82D response.
    ENF 48 event indicators:    
    IxgenfEvents (IxgenfEventsByte0): IxgEfLogstreamsNotAvailable
    IxgenfEventReasons (IxgenfEventReasonsByte0): IxgEnfXESRecommendAction
    IxgenfEventSpecificInfo (IxgenfEventSpecificInfoByte0): IxgEnfLogstreamDisconnected and IxgEnfLossOfConnectivity
  • When system logger is unable to allocate a new staging data set when an I/O or access error occurs for DASD-only logstreams the log stream is automatically disconnected.

    System logger issues an ENF 48 informing the connectors that they have been disconnected (staging data set error), after which any system logger that uses the same log stream token receives the return code 8, reason code 82D response.

    ENF 48 event indicators:    
    IxgenfEvents (IxgenfEventsByte0): IxgEnfLogstreamsNotAvailable
    IxgenfEventReasons (IxgenfEventReasonsByte0): IxgEnfReqLogResNotAvail
    IxgenfEventSpecificInfo (IxgenfEventSpecificInfoByte0): IxgEnfLogstreamDisconnected and IxgEnfStgAllocErr
  • System logger disconnects all connectors on the target system as a result of an operator SETLOGR FORCE,DISConnect,LSN=logstremname command. System logger issues an ENF 48 informing all the connectors that they have been disconnected (operator command), after which any system logger that uses the same log stream token receives the return code 8, reason code 82D response.
    ENF 48 event indicators:    
    IxgenfEvents (IxgenfEventsByte0): IxgEnfLogstreamsNotAvailable
    IxgenfEventReasons (IxgenfEventReasonsByte1): IxgEnfSetLogrForceDisconnect
    IxgenfEventSpecificInfo (IxgenfEventSpecificInfoByte0): IxgEnfLogStreamDisconnected
  • When the system logger server address space terminates and is restarted while the log stream connector is persistent (for example, when application address space and connecting task remained intact) then any subsequent use of a log stream token obtained before system logger terminated would be considered expired. See Logger server address space availability considerations for more details pertaining to this condition.

    When system logger becomes available again, system logger will issue an ENF 48 and the application should connect to the log stream and not make use of the expired stream token.

    ENF 48 event indicators:    
    IxgenfEvents (IxgenfEventsByte0): IxgEnfSystemLoggerAvail
  • There are also severe error conditions that can occur within the system logger component that might cause the log stream to be disconnected unexpectedly.

    An ENF 48 event is issued informing the connectors that they have been disconnected (component error) and any future Logger service requests using the same log stream token will receive the rc8,rsn82D response.

    ENF 48 event indicators:    
    IxgenfEvents (IxgenfEventsByte0): IxgEnfLogstreamsNotAvailable
    IxgenfEventReasons (IxgenfEventReasonsByte1): IxgEnfComponentError
    IxgenfEventSpecificInfo (IxgenfEventSpecificInfoByte0): IxgEnfLogstreamDisconnected

    When system logger completes the disconnection processing for all connectors on a system and the log stream will no longer appear "actively" connected on that system, the system issues an ENF 48 event. For example, if a DISPLAY LOGGER,CONN,LSN=logstreamname command is issued after the ENF 48 event, the resulting IXG601I message indicates the percent of the connectors to the log stream for the log stream as zero (num_conn =0).

    The ENF 48 event indicates that it is a "system level" log stream disconnect along with the number of systems in the sysplex still connected to this log stream.

    ENF 48 event indicators:    
    IxgenfEvents (IxgenfEventsByte0): IxgEnfLogStreamConnDisc
    IxgenfEventReasons (IxgenfEventReasonsByte1): IxgEnfSystemLevelDisc

    IxgEnfConnDiscInfo section identifies the system and log stream name for the disconnect event along with some additional indicators:

    ENF 48 event indicators:  
    IxgenfConnDiscFlags IxgEnfConnDiscDisConnect
    IxgenfConnDiscCount Contains the number of systems still connected to this log stream in the sysplex.
    Note: A common problem in the early coding is that a non-persistent task will be used in the log stream connecting address space. The address space establishes an initialization task to obtain resources. It stores the log stream token in persistent storage, but then the task terminates. For this situation, Logger will automatically disconnect from the log stream since the "owning" task terminated (via task termination resource manager operation). The correction for this is to simply connect to the log stream in an address space persistent task (at least keep the task persistent for as long as the connection, that the STREAMTOKEN, is expected to be kept for use). Logger will not issue an ENF 48 event for this specific condition. However, the "system level" disconnect event described above will be issued.