cwbCO_GetHostCCSID

Purpose

Returns the associated CCSID of the iSeries™ system that is represented by the given system object that was in use when the signon to the iSeries system occurred, and that is associated with the user ID that is set in the system object.

Syntax

 
UINT CWB_ENTRY cwbCO_GetHostCCSID(
                             cwbCO_SysHandle         system,
                             PULONG                  pCCSID );

Parameters

cwbCO_SysHandle system - input
Handle that previously was returned from cwbCO_CreateSystem or cwbCO_CreateSystemLike. It identifies the iSeries system.
PULONG pCCSID - output
The host CCSID is copied into here if successful.

Return Codes

The following list shows common return values:

CWB_OK
Successful completion.
CWB_INVALID_API_HANDLE
Invalid system handle.
CWB_INVALID_POINTER
the CCSID pointer is NULL.
CWB_DEFAULT_HOST_CCSID_USED
Host CCSID 500 is returned because this API is unable to determine the host CCSID appropriate for the user ID as set in the system object.
CWB_USER_TIMEOUT
CWB_SSL_JAVA_ERROR
CWB_USER_TIMEOUT_SENDRCV

Usage

This API does not make or require an active connection to the host system to retrieve the associated CCSID value. However, it does depend on a prior successful connection to the host system by using the same user ID as is set in the specified system object. This is because the CCSID that is returned is the one from the specific user profile, NOT the iSeries system's default CCSID. To retrieve a host CCSID without requiring a user ID, call cwbNL_GetHostCCSID.