#include <eim.h> int eimSetAttribute(EimHandle * eim, enum EimHandleAttr attrName, void * attrValue, EimRC * eimrc)Service Program Name: QSYS/QSYEIM
The eimSetAttribute() function is used to set attributes in the EIM handle structure.
None.
EIM_HANDLE_CCSID (0) | This is the CCSID of character data passed by the caller of EIM APIs using the specified EimHandle. This field is a 4 byte integer. When a handle is created, this is set to the job default CCSID. |
The return value from the API. Following each return value is the list of possible values for the messageCatalogMessageID field in the eimrc parameter for that value.
EIMERR_NOLOCK (26) | Unable to allocate internal system object. |
EIMERR_ATTR_INVAL (5) | Attribute name is not valid. |
EIMERR_CCSID_INVAL (8) | CCSID is outside of valid range or CCSID is not supported. |
EIMERR_HANDLE_INVAL (17) | EimHandle is not valid. |
EIMERR_PARM_REQ (34) | Missing required parameter. Please check API documentation. |
EIMERR_PTR_INVAL (35) | Pointer parameter is not valid. |
EIMERR_ATTR_NOTSUPP (6) | Attribute not supported. |
EIMERR_UNKNOWN (44) | Unknown error or unknown system state. |
The following example will set the CCSID attribute in the EIM handle.
Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.
#include <eim.h> #include <stdio.h> int main(int argc, char *argv[]) { int rc; char eimerr[100]; EimRC * err; EimHandle * handle; unsigned int ccsid = 37; /* Get eim handle from input arg. */ /* This handle is already connected to EIM. */ handle = (EimHandle *)argv[1]; /* Set up error structure. */ memset(eimerr,0x00,100); err = (EimRC *)eimerr; err->memoryProvidedByCaller = 100; /* Change the CCSID for this handle. */ if (0 != (rc = eimSetAttribute(handle, EIM_HANDLE_CCSID, (void *)&ccsid, err))) printf("Set Attribute error = %d", rc); return 0; }
[ Back to top | Security APIs | APIs by category ]