expsysdb - Export System Data

expsysdb -BCcdElopsZz DataArea/DataID DumpFile [SystemCode....] [-M MaxSizePerFile] [-m MaxRecordsPerFile] [-f filename] [-L exclusionList] [-w FilterFieldValue...]

To export system data. expsysdb also dumps any related attachment files. You can choose to import just one or a few files, but if you do, you must know your database well so that you preserve relational integrity.

Program Option Description
B Dump in binary mode. Cannot be used with -C.
C Dump comma-separated values. Cannot be used with -B.
c

Do calculations before dump, check on the number of files dumped. Report if pre-dump calculations do not match actual dump counts.

The exported files will have numbers of equal length appended to file name. This ensures that files sort properly when a directory or file listing is performed.

d Use System Delivery Files. System delivery files include all files you select for delivery with a system. You must use the System Files Definition form to define these files. This is the preferred way to create an export file. See sysdelfile - System Files Definition.
l Use a default exclusion list exclusionList.cfg (for use with -s).

This allows you to use the default exclusion list delivered in $LAWDIR/system/exclusionList.cfg when exporting by system code.

The -l option lets you export all of the system code except for the tables specified in the default exclusion list. You can also choose to modify and customize the file, but take note that a single line in the custom exclusion list must not have more than 300 characters.

For example:

PR=file1, file2, file3, file4, file5, file6

PR=file7,file8,file9

Where file1, file2, etc. are actual filenames in the PR system code.

o Use Owned By Files. Owned by files are files that are defined in the database under a given product line.
p

Use Program files (Default). Program files include all files that the programs in a system use. Lawson does not deliver program file records with the source code. You must create the program files before using the program files export method. To create program file records, compile the system using the Compile System option. For more information, see Doc for Developers: Application Development Workbench.

s Use System Files. System files include all files used by the programs in an application system, as well as all files that are directly related to those files.
E Exclude IsView objects.
M Specify maximum size per dump file in megabytes.
m

Specify maximum records per dump file. This allows you to set a limit on the number of records included in each output file.

Using the -m option may cause several numbered output files to be created for a system code or table being exported. For example, if the -m option is specified for the output filename PRdata.exp, the files created will be PRdata1.exp, PRdata2.exp, PRdata3.exp, and so on. By using the -m option, the data import on the target system can be executed concurrently for each output file, thereby improving efficiency.

f File to dump. This allows you to export an individual table (file) that you may have excluded from an earlier running of expsysdb (using the -l or -L option). If you use the -f option, you must also use the -s (system files) option.
L

Use a user-specified exclusion list file to exclude a table (file) from a system code dump. Specifies files that are excluded from the system code dump. This allows you to create a custom exclusion list for when exporting by system code. The -L option lets you export all of the system code except for the table (file) you specified in the custom exclusion list. You cannot use this option and the -l option simultaneously.

When creating a custom list, you must specify the name of the exclusion file (which must also be in $LAWDIR/system) and follow the same format as the default exclusionList.cfg file.

When creating a long list of files to be excluded for a system code, take note that you can have multiple lines for a particular system code, but a single line in the exclusion file must not have more than 300 characters just like in the -l option.

w

Filter on field value(s).

Examples:

-w COMPANY=4321 (matching string)

-w COMPANY=4321,9100 (list of matching strings)

-w COMPANY!=4321 (not matching string)

-w COMPANY=4321,9100 BUYER-CODE=B3 (multiple fields)

-w ISO-CTRY-NBR=50:200 (range values)

-w "ISO-CTRY-NBR>0" (greater than or less than)

Can be used for a system code in addition to a single file. Tables will be filtered on specified field values if one or more of the fields exist in the table, otherwise all records for the table are dumped.

Z

Use zlib to compress one or several dump files.

The resulting files will use the same naming conventions as the non-compressed dump files but will have a .zlib extension.

z Use gzip to compress dump files.

The resulting files will use the same naming conventions as the non-compressing dump files but will have the .gz extension.

At the command line, specify the information above.

or

  1. From the Database Administration menu, choose Data Export/Import.

  2. From the Data Export/Import menu, choose Export System Data.

  3. Specify or select the following data.

    Field Description
    Program Options See program options above.
    Product Line Product line whose system data you want to export.
    Export File Name Flat file to load the system data to.
    System Code(s) System codes whose data you want to export. Leave blank to export data from the entire product line.
    I/O Options Optional. Display the output or redirect it to a file.
  4. Press Enter.

Note: $LAWDIR/system/secadmin.log file. Date, time, username, type, utility name and key field activities of this utility are logged in the

For more information, see Lawson Administration: Server Setup and Maintenance.