dbexport - Landmark Database File Export

dbexport -o outputDir [OPTIONS] dataArea [name

- or -

dbexport -z zipfile [OPTIONS] ...]dataArea [name ...]

dbexport --showrules zipfile ... [OPTIONS] dataArea [name ...]

If you use -C, you can also use the following options:

[-n] [-D datePattern] [-m delimiterCharacter] [-s separatorCharacter] [-S decimalSeparator] [-T timePattern] [--userfields] [--translations] [--workfile] [--workfilename]

If you use -D datePattern, you can also use the following options:

[-L localeName]

dbexport creates a binary or CSV file containing data from a Landmark-defined database file. You can load this data into the Landmark system using dbimport.

Caution: 
Do not use this utility to export data from a non-Landmark defined database file.
Caution: 
Do not use this utility to copy GEN (Environment) data from one machine to another.
Program Option Description
-o outputDirectory

Export the database to a specified output directory

Note: 

It is also possible to export to stdout and then import from stdin using a single hyphen to represent the file. For example, the following would do a dbexport out of dataArea1 and pipe the output into a dbimport to dataArea2. The data is never written to disk in this case.

dbexport –Co – dataArea1 businessClass | dbimport –CI – dataArea2 businessClass

-z filename.zip Specify the name of a compressed (.zip) file to export data to.
-A fieldAssignmentFile or --faf= fieldAssignmentFile Use information in a specified file to change field or file names, or initialize field values in the destination file. FieldAssignmentFile is the Field assignment file name.
-B Use the business class parser when filtering. The default is to parse against the dictionary rather than the business class spec repository. However, if you are filtering on such things as derived fields, the business class parser may be necessary.
-b or --brief Brief mode (print only summary for each file).
-C or --csv

Create the output in a comma-separated value format.

If you do not use this option, a binary output file will be created. Each record's byte array will be written directly to the file, without a header record.

-d targetDictionary Specify the target dictionary to export.
-f "filterString" or --filter= filterString

Limit the output based on the specified filter value for the index keys of the file. The filter can be a conditional expression, such as

-f "fileName.fieldName=1"

or

-f "relationshipName.fieldName=1"

--firstrow=N Start the export from the specified row.
--gridstatus= ID Publish progress to grid. You can then use managegrid getprogress to see a list of all running programs, or you can use managegrid getprogress ID to see the status of this program. The value you specify for ID must be unique across the system for any programs being run with the gridstatus option.
-i indexName or --index= indexName Use index (for example, -iGLMSET1). Exports the data using an index sequence. The index name must follow the -i.
--ignorefaferrors Ignore most errors in the field assignment file.
-l (lowercase L) or --nolobs Do not export large objects.
--lock Get an exclusive lock on the data area before doing the export.
--maxrows=N Export at most the specified maximum number of rows.
-q or --quiet Quiet mode (print only errors, do not print informational messages)
--showrules Print the field assignment file rules that will be used.
--showtimings Show timings for each file.
--threads=n Run dbexport with the specified number of threads. If you use multiple threads, you may see a performance improvement. However, performance depends on other factors as well. Note that a very large table will be processed in a single thread.
--useupgradenames Use the upgrade names for tables. Only use if directed to by support personnel.
-v or --includeviews Include files that are in isView spaces.
-V errorlevel or --errorlevel= errorlevel

errorlevel, tracelevel, and verbose specified in any order, where:

  • errorlevel = {n}none | {f}atal | {e}rror | {w}arning (warning is the default)

  • tracelevel = 0:6 where 0 is no message and 6 is everything

  • verbose = whether to display exception stacktrace

dataarea Specify the data area for the file(s) that you want to export.
name...

A list of names of dictionary files, business classes, modules, database spaces, or business class patterns to execute the command against.

Use the prefixes file-, pattern-, space-, or module- to resolve ambiguity. Use prefix- and type- to select files by prefix name or types used. File names can be the long or classic name and can include ? and *. Specifying "!" anywhere in the list will complement the selected files. Specifying @path reads names from the file, one per line. A hyphen ( - ) indicates stdin. Wildcard characters may need to be quoted in the command line or they will be interpreted by the command processor. A :L on a file name selects the lobs table. A :B on a file name selects the base table.

Options valid with -C
--classicnames Use classic names for files and columns.
-D datePattern

Specify the date format that you want dates to have in the output file. Do not use this option if you are exporting data from Lawson and plan to import it back into Lawson. Only use this option if you plan to export the Lawson dates into a different format for import into a non-Lawson system. If you do not use this option, the dates will be in the default format yyyyMMdd. When specifying the format, use uppercase M's to indicate the month format, and lowercase d's and y's to indicate the day and year formats, respectively. For example, MM/dd/yyyy is correct but mm/dd/yyyy is not correct.

For a full explanation of supported formats, see the Java API documentation for the java.text.SimpleDateFormat class.

--dumpempty Dump files even when they contain no data (valid only with field headers).
-F field,field,... or --fields= field,field,... Export only the specified fields. This option is valid only with field headers and when you are exporting a single file.
-m delimiterCharacter

Set the field delimiter character.

The default delimiter is a double quote (").

-n or --noheaders Do not create field headers.
-O or --iso ISO data and time patterns. This overrides the -D and -T options.
-s separatorCharacter

Set the field separator character.

The default separator is a comma (,).

-S decimalSeparator Specify the decimal separator.
-T timePattern

Specify the time format that you want times to have in the output file. Do not use this option if you are exporting data from Lawson and plan to import it back into Lawson. Only use this option if you plan to export the Lawson times into a different format for import into a non-Lawson system. If you do not use this option, the times will be in the default format HHmmss. When specifying the format, use uppercase H's for the hour format, and m's, and s's to indicate the minute, and second formats, respectively.

For a full explanation of supported formats, see the Java API documentation for the java.text.SimpleDateFormat class.

Valid only with the -C option.

--userfields

Include user-defined fields in the export to CSV. This applies in two scenarios:

  • One, you want to export the user-defined field data from a delivered business class to which you have added user-defined fields.

  • Two, you want to export the data from a user-defined business class.

--translations

Include translations in a CSV file. If you use this option, the translations will be included in the main export file in a column named in the format: fieldName{locale}, for example name{es_ES}.

If you do not use this option and are exporting specific named files or tables that contains data translations, the data translations will not be included in the export. However, if you do not use this option but export all of the files for a data area, module, or pattern match for files that have data translations, additional files will be created for those translations. The name format of these additional files is fileName_Translation.csv.

--workfile Export workfiles.
--workfilename The name of a workfile to export. The default is the input filename.
Options valid with -D
-L localeName

Specify a locale in the format language[_COUNTRY[_variant]].

For example, en_US

Valid only with the -D option.