ADD

LANSA Integrator

ADD

This command allows you to add an LDAP entry.

 

 ADD ------------- DN -------------- entry name ------------------|

 

Keywords

DN

The entry name you want to add.

This keyword is mandatory.

Lists and Variables

The application must supply a working list from which the ADD command will pass the new attributes. The working list must contain either one or two fields as follows:

  • The first field is mandatory and will contain the attribute name for each added attribute.
    Suggested field length: you will need to ensure that the field is long enough to hold the longest possible attribute name for your LDAP Server. The field length will be character.
  • The second field is optional. If supplied, it will contain the attribute value for each added attribute.
    Suggested field length: you will need to ensure that the field is long enough to hold the longest possible attribute value for your LDAP Server. The field length will be character.

Refer to the following examples to see how this works. For information on how to supply a working list to service commands from RDML, RDMLX or 3GL applications, refer to Java Service Manager Clients.

Examples

RDML

 

DEFINE FIELD(#ATNAME) TYPE(*CHAR) LENGTH(050)

DEFINE FIELD(#ATVALUE) TYPE(*CHAR) LENGTH(050)

DEF_LIST NAME(#WRKLST) FIELDS(#ATNAME #ATVALUE) TYPE(*WORKING)

CHANGE FIELD(#JSMCMD) TO('''ADD DN(cn=John, cn=users, o=ibmteldir) SERVICE_LIST(ATNAME,ATVALUE)''')

USE BUILTIN(JSM_COMMAND) WITH_ARGS(#JSMCMD) TO_GET(#JSMSTS #JSMMSG #WRKLST)

 

RDMLX

 

Define Field(#ATNAME) Type(*CHAR) Length(050)

Define Field(#ATVALUE) Type(*CHAR) Length(050)

Def_List Name(#WRKLST) Fields(#ATNAME #ATVALUE) Type(*Working)

#JSMCMD := 'Add DN(cn=John, cn=users, o=ibmteldir) Service_List(ATNAME,ATVALUE)'

Use Builtin(JSMX_COMMAND) With_Args(#JSMHND #JSMCMD) To_Get(#JSMSTS #JSMMSG #WRKLST)