tibx_MVSConsole_Create

Function

Purpose

Create or destroy an MVS console.

C Declaration

signed long int tibx_MVSConsole_Create (
    void** pConsole,
    char** pConsoleMsg,
    Console_Response pCallBack)

signed long int tibx_MVSConsole_Destroy(
    void* pConsole );

COBOL Call

CALL "tibx_MVSConsole_Create"
     USING BY REFERENCE pConsole,
           BY REFERENCE pConsoleMsg,
           BY VALUE     TIBEMS-NULLPTR,
           RETURNING    tibems-status
END-CALL.

CALL "tibx_MVSConsole_Destroy"
     USING BY VALUE pConsole,
     RETURNING tibems-status
END-CALL.
Note: pConsole and pConsole-Msg have usage pointer.

Parameters

Parameter Description
pConsole The create call stores the MVS console handle in this location.

The destroy call destroys this MVS console.

pConsoleMsg When the return status code is non-zero, the function stores an error message in this location.
pCallBack C programs define this callback function to receive the results of MVS console commands.

Remarks

Some consumer application programs wait indefinitely for messages to arrive. You can use this function in conjunction with tibems_MVS_BreakFunction to arrange console input to such programs, in order to interrupt them from waiting to receive a message, so they can exit cleanly (see tibx_MVSConsole_SetConsumer()).

C programs can receive console command results through a callback function. COBOL programs cannot receive console command results, but can react to the MVS stop and shut commands.