tibemsLookupContext_Create

Function

Purpose

Create a new EMS lookup context object.

C Declaration

tibems_status tibemsLookupContext_Create(
    tibemsLookupContext* context,
    const char* brokerURL,
    const char* username,
    const char* password );

tibems_status tibemsLookupContext_CreateSSL(
    tibemsLookupContext* context,
    const char* brokerURL,
    const char* username,
    const char* password,
    tibemsSSLParams sslParams,
    const char* pk_password );
tibems_status tibemsLookupContext_CreateOAuth2( tibemsLookupContext* context, const char* brokerURL, tibemsOAuth2Params oauth2Params, const char* username, const char* password, tibemsSSLParams sslParams, const char* pk_password );

COBOL Call

CALL "tibemsLookupContext_Create"
     USING BY REFERENCE context,
           BY REFERENCE brokerURL,
           BY REFERENCE username,
           BY REFERENCE password,
           RETURNING tibems-status
END-CALL.

CALL "tibemsLookupContext_CreateSSL"
     USING BY REFERENCE context,
           BY REFERENCE brokerURL,
           BY REFERENCE username,
           BY REFERENCE password,
           BY VALUE sslParams,
           BY REFERENCE pk-password,
           RETURNING tibems-status
END-CALL.
Note: context and sslParams have usage pointer.

On IBM z/OS systems, the pk-password must always be a null value.

Parameters

Parameter Description
context Store the new lookup context object in this location.
brokerURL URL that the context object uses to connect to the EMS server at this URL. If configuring a fault-tolerant client, enter two of more URLs, as described in Configuring C and COBOL Clients for Fault-Tolerant Connections.
oauth2Params Data that the context object uses to authenticate with the EMS server via OAuth 2.0.
username User name that the context object uses to identify itself to the server. If authenticating via OAuth 2.0, this is the user name of the Resource Owner Password Credentials Grant.
password

Password that the context object uses to identify itself to the server. If authenticating via OAuth 2.0, this is the password of the Resource Owner Password Credentials Grant.

sslParams

Data that the context object uses to create a TLS connection to the EMS server.

pk_password

Password that the context object uses to decrypt its TLS private key.

Remarks

The first call produces a lookup context that communicates with server without encryption. The second call produces a lookup context that communicates using a TLS connection. The third call produces a lookup context that authenticates via OAuth 2.0 and may communicate using a TLS connection.

If the server permits anonymous lookup, you may supply null values for the username and password parameters.