Use the csv2ldif tool to create an LDIF file from a CSV file. You can then use the LDIF file as source input to DXmodify.
csv2ldif directs its output to standard output. To create an LDIF file, redirect the output to a file name.
This command has the following format:
csv2ldif options numfields LDTfile CSVfile
Denotes one or more of the following options:
Specifies the output file name for CSV lines with bad format.
Permits duplicate parent nodes to be generated.
Specifies the number of branching factors. The default is 32.
Note: This is a low-level option. Do not use it unless you are told to by CA Technical Support.
Ignores the first NumberofLines lines of the CSV file.
Defines a field separator (default is a comma)
Specifies the total number of fields defined in the input CSV file.
Specifies the name of the LDT file.
Specifies the name of the input CSV file.
Example: Convert Sample CSV Data Using an LDT File
The following command uses the csv2ldif utility to convert CSV data to LDIF:
csv2ldif -i 1 7 acme.ldt acme.csv > acme.ldi
The output is redirected to the acme.ldi file. The following is a portion of acme.ldi:
dn: o=Acme, c=US oc: organization dn: ou=Administration, o=Acme, c=US oc: organizationalUnit dn: cn=Fred Jones, ou=Administration, o=Acme, c=US oc: organizationalPerson postalAddress: 11 Main Street $ Newtown surname: Jones title: Manager telephonenumber: +1 (123) 456 7890 telephonenumber: +1 (987) 654 3210 dn: ou=Sales, o=Acme, c=US oc: organizationalUnit
Telephonenumber appears twice because it is a multi-valued attribute
Copyright © 2009 CA. All rights reserved. | Email CA about this topic |