For C or C++ strings of character set identifiers (CCSIDs) that an object passes to, or receives from, XMS might require conversion. The XMSC_CLIENT_CCSID property of the object tells XMS which code page the object is using.
When an object in a C or C++ application passes a string of character data to XMS across the API XMS converts (if necessary) the character data in the string from the code page used by the object into the code page required by XMS for the data. Similarly, when an object receives a string of character data from XMS across the API XMS converts (if necessary) the character data in the string from the code page that the data is currently in into the code page used by the object. Therefore, in order to convert the character data in a string, XMS must identify which code page an object is using.
The XMSC_CLIENT_CCSID property of a ConnectionFactory, Connection, Session, MessageProducer, or MessageConsumer object specifies which code page the object is using. The value of the XMSC_CLIENT_CCSID propertyis a CCSID which identifies a code page. XMS sets the property when an application creates one of these objects, but the application can change its value subsequently.
When an application starts, XMS derives an appropriate CCSID for the application from the environment in which the application is running. This CCSID is called the process CCSID. At any time, the application can change the process CCSID by calling xmsSetClientCCSID(). This is a C function that does not belong to any class, but C++ applications can use the function as well.
When an application creates a connection factory, XMS sets the XMSC_CLIENT_CCSID property of the object. If the connection factory is created from an object definition retrieved from a repository of administered objects, and the object definition specifies a value for the XMSC_CLIENT_CCSID property, XMS uses this value to set the property. Otherwise, XMS sets the property to the special value XMSC_CCSID_PROCESS, which means that the connection factory is using the code page identified by the process CCSID.
When an application uses a connection factory to create a connection, XMS copies the XMSC_CLIENT_CCSID property of the ConnectionFactory object to the newly created Connection object. XMS copies the property only at the time the application creates the connection. If the application subsequently changes the value of the XMSC_CLIENT_CCSID property of the ConnectionFactory object, XMS does not propagate the change to the XMSC_CLIENT_CCSID property of the Connection object.
In the same way, when an application uses a connection to create a session, XMS copies the XMSC_CLIENT_CCSID property of the Connection object to the newly created Session object. When an application uses a session to create a message producer or message consumer, XMS copies the XMSC_CLIENT_CCSID property of the Session object to the newly created MessageProducer or MessageConsumer object. In each case, XMS copies the property only at the time the application creates the object.
This is a special value of the property and is not an actual CCSID.
This is a special value of the property and is not an actual CCSID.
This is a special value of the property and is not an actual CCSID.
When XMS converts the strings in an outgoing message, it uses the code page associated with the session that created the message. When XMS converts the strings in an incoming message, it uses the code page associated with the message consumer that receives the message. XMS determines the code page from the value of the XMSC_CLIENT_CCSID property of the relevant Session or MessageConsumer object.