tibx_MVSConsole_SetConsumer

Function

Purpose

Exit from a blocking listener.

C Declaration

tibx_MVSConsole_SetConsumer(
    void* pConsole,
    tibemsMsgConsumer tibemsMsgConsumer,
    char* tibems_MVS_BreakFunction);

signed long int tibems_MVS_BreakFunction(
   void* pConsole );

COBOL Call

SET WS-PROCEDURE-PTR TO ENTRY 'tibems_MVS_BreakFunction'

CALL "tibx_MVSConsole_SetConsumer"
     USING BY VALUE   pConsole,
           BY VALUE   tibemsMsgConsumer,
           BY VALUE   pFunction,
           RETURNING  tibems-status
END-CALL.
Note: pConsole has usage pointer.

Before this call, you must set the entry to the MVS break function.

Parameters

Parameter Description
pConsole Set the consumer of this MVS console object.
tibemsMsgConsumer Use this message consumer.
pFunction In COBOL, use this tibems_MVS_BreakFunction function address.
tibems_MVS_BreakFunction In C, use this break function name.

Remarks

Programs in single-threaded environments (such as COBOL) need a way to interrupt blocking receive calls (such as tibemsMsgConsumer_Receive).

After registering this function in COBOL, a console stop or shut command causes the receive call to return with a status code TIBEMS_USER_INTR (54).