eimSetConfiguration()--Set EIM Configuration


  Syntax
 #include <eim.h>

 int eimSetConfiguration(int              enable,
                         char           * ldapURL,
                         char           * localRegistry,
                         char           * kerberosRegistry,
                         int              ccsid,
       EimRC          * eimrc)
 
  Service Program Name: QSYS/QSYEIM

  Default Public Authority: *USE

  Threadsafe: Yes

The eimSetConfiguration() function sets the configuration information for use by the system.


Authorities and Locks

The caller of the API must have *SECADM special authority.


Parameters

enable  (Input)
Indicates if this system is able to establish new connections in order to participate in an EIM domain. This parameter is passed by value. Possible values are:



ldapURL  (Input)
A uniform resource locator (URL) that contains the EIM configuration information for the EIM domain controller. This information will be used for all EIM operations. The maximum size for this URL is 1000 bytes.

Possible values are:

This URL has the following format:

    ldap://host:port/dn
          or
    ldaps://host:port/dn

where:

  • host:port is the name of the host on which the EIM domain controller is running with an optional port number.
  • dn is the distinguished name for the domain entry.
  • ldaps indicates that this host/port combination uses SSL and TLS.

Examples:

  • ldap://systemx:389/ibm-eimDomainName=myEimDomain,o=myCompany,c=us
  • ldaps://systemy:636/ibm-eimDomainName=thisEimDomain


localRegistry  (Input)
The local EIM system registry name. The maximum size for this registry name is 256 bytes.

Possible values are:



kerberosRegistry  (Input)
The EIM Kerberos registry name. The maximum size for this registry name is 256 bytes.

Possible values are:



ccsid   (Input)
The ccsid of the input data. If the ccsid is 0 or 65535 the default job ccsid will be used. This parameter is passed by value.

eimrc  (Input/Output)
The structure in which to return error code information. If the return value is not 0, eimrc is set with additional information. This parameter may be NULL. For the format of the structure, see EimRC--EIM Return Code Parameter.


Return Value

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.

0
Request was successful.

EACCES
Access denied.


EBADDATA
eimrc is not valid.

EBUSY
Unable to allocate internal system object.


ECONVERT
Data conversion error.


EINVAL
Input parameter was not valid.


ENAMETOOLONG
ldapURL or registry name is too long.


ENOMEM
Unable to allocate required space.


EUNKNOWN
Unexpected exception.


Related Information


Example

The following example sets the configuration information but it is not enabled.

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;

    char * ldapURL=
      "ldap://mysystem:389/ibm-eimDomainName=myEIMDomain,o=mycompany,c=us";
    char * local   = "mysystem";
    char * kerberos= "krbprin";

    /* Set up error structure.                  */
    memset(eimerr,0x00,100);
    err = (EimRC *)eimerr;
    err->memoryProvidedByCaller = 100;

    /* Set config info, but it is disabled.     */
    if (0 != (rc = eimSetConfiguration(0,
                                       ldapURL,
                                       local,
                                       kerberos,
                                       0,
                                       err)))
        printf("Set configuration error = %d", rc);

    return 0;
}

In this example, the configuration information is not changed but it is now enabled for use.

#include <eim.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
    int           rc;
    char          eimerr[100];
    EimRC       * err;

    /* Set up error structure.                  */
    memset(eimerr,0x00,100);
    err = (EimRC *)eimerr;
    err->memoryProvidedByCaller = 100;

    /* Enable configuration info.               */
    if (0 != (rc = eimSetConfiguration(1,
                                       NULL,
                                       NULL,
                                       NULL,
                                       0,
                                       err)))
        printf("Set configuration error = %d", rc);

    return 0;
}


API introduced: V5R2

[ Back to top | Security APIs | APIs by category ]