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 ------------------|
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:
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.
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)
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)