| Where allowed to run: All environments (*ALL) Threadsafe: Yes |
Parameters Examples Error messages |
The Copy From LDIF (CPYFRMLDIF) command is used to copy directory entries from a LDAP Data Interchange Format (LDIF) stream file to the directory for a Directory Server instance. The Directory Server provides a Lightweight Directory Access Protocol (LDAP) server on IBM i. The command can only be used to add new entries to the directory, it cannot change or delete entries already in the directory.
Restriction: You must do or satisfy one of the following conditions to use this command:
| Top |
| Keyword | Description | Choices | Notes |
|---|---|---|---|
| LDIFSTMF | LDIF stream file | Path name | Required, Positional 1 |
| INSTANCE | Instance | Name, QUSRDIR | Optional, Positional 2 |
| ADMIN | Administrator | Element list | Optional |
| Element 1: Distinguished name | Character value | ||
| Element 2: Password | Character value | ||
| REPLICATE | Replicate imported data | *YES, *NO | Optional |
| Top |
Specifies the integrated file system path to the LDAP Data Interchange Format (LDIF) stream file.
This is a required parameter.
| Top |
Specifies the Directory Server instance name whose directory the directory entries are copied to.
| Top |
Specifies the Directory Server administrator. If not specified, the user must have *ALLOBJ and *IOSYSCFG special authorities.
Element 1: Distinguished name
Element 2: Password
| Top |
Specifies whether copied directory entries should be replicated to replica Directory Servers. This option could be used, for example, when initializing an additional master server so that it does not attempt to replicate data to Directory Servers already containing these directory entries.
| Top |
Example 1: Copy to the QUSRDIR Directory
CPYFRMLDIF LDIFSTMF('/ldap/qusrdir.ldif') INSTANCE(QUSRDIR)
This command copies the directory entries from the qusrdir.ldif stream file in the ldap directory to the Directory Server directory for the QUSRDIR instance. The user running the command this way must have all object (*ALLOBJ) and input/output system Configuration (*IOSYSCFG) special authorities.
Example 2: Copy to the QUSRDIR Directory and Replicate
CPYFRMLDIF LDIFSTMF('/ldap/qusrdir.ldif') INSTANCE(QUSRDIR)
REPLICATE(*YES) ADMIN('cn=admin' 'secret')
This command copies the directory entries from the qusrdir.ldif stream file in the ldap directory to the Directory Server directory for the QUSRDIR instance. The copied data will be replicated to the replica Directory Servers.
Example 3: Copy to the DOGGIES Directory
CPYFRMLDIF LDIFSTMF('/ldap/doggies.ldif') INSTANCE(DOGGIES)
ADMIN('cn=fluffy' 'poodle')
This command copies the directory entries from the doggies.ldif stream file in the ldap directory to the Directory Server directory for the DOGGIES instance.
| Top |
*ESCAPE Messages
| Top |