MODIFY

LANSA Integrator

MODIFY

You will use this command to modify an LDAP entry. This command has three operations that may be performed - add, delete, and replace. It is important to note that these operations occur at the attribute level and not the DN record level. If you need to add or delete an entire DN then you should use the ADD or DELETE commands.

 

 MODIFY ---------- DN -------------- entry name ------------------|

 

Keywords

DN

The entry name that is to be modified.

This keyword is mandatory.

Lists and Variables

The application must supply a working list from which the MODIFY command will pass the modified attributes. The working list must contain three fields as follows:

  • The first field is mandatory and will contain the operation to be performed.
    Suggested field length: Character field of length 1.
    The three possible values for this field are:
  • A for Add
  • D for delete
  • R for Replace.
  • The second field is mandatory and will contain the attribute name for each modified 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 third field is mandatory. It will contain the attribute value for each modified 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(#ATMOD) TYPE(*CHAR) LENGTH(001)

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

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

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

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

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

 

RDMLX

 

Define Field(#ATMOD) Type(*CHAR) Length(001)

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

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

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

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

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