dataimport - Import non-Lawson XML data file

dataimport [-h|-da dataarea -f filename|-u url [-t filetype]] [-halt|-nohalt] [-action classname actionname [-action ...]] [-field classname|all fieldname value [-field...]] [-fieldmap sourceclass sourcefield targetclass targetfield][-isa] [-rs] [-sf] [-ats size] | [-layout] [-metadata] classname [action] [-ignoreerrors [dn]]

dataimport imports non-Lawson data from an XML file into the Lawson database. You must create the XML import file conforming to the specifications outlined in the administration guide for your Landmark application prior to running this utility. During the import, you can specify actions to be performed on the data and field override values to be used.

Program Option Description
h Display help for this utility.
da

Required.

Type the data area that the data will be imported to.

f filename

Either -f or -u is required.

Specify the full or relative path and file name for the file that contains data to be imported.

u url

Either -f or -u is required.

Specify a URL pointing to the file that contains data to be imported.

t filetype

The type of file.

Specify the file type, to override the default specified in the dataimportFactory.properties file, which is delivered from Lawson set to XML.

Currently XML is the only supported file type.

halt|nohalt

Optional.

The default is -nohalt.

-halt specifies that if an error occurs, data import stops. Any successful imports are committed but no further processing is done. This option forces -sf to be off.

-nohalt specifies that if an error occurs, processing should continue. Items that can't be imported will be skipped.

action classname actionname

Specify an action to be performed for a business class (file) during the data import. If the -action flag is used, a full business class name and an action name are required.

Note: 

Do not include _Manager in the name. Business class and action names are case sensitive.

Multiple -action specifications can be included, but only one action can be applied per record.

How Actions Are Determined

When determining the action to apply to a business class, the dataimport utility uses most-to-least specific hierarchy, shown in the following table.

Order Description

4

Most specific.

If an action is present in the XML file as an attribute of the view tag, and the -isa flag has not been specified, use the action in the XML file.

This method is the only way to specify separate actions for different records of the same business class.

3 Use an action for the business class specified as a parameter using the -action flag.
2 Use an action for the business class specified in the dataimportFactory.properties file that overrides the first create action in the business class.

1

Least specific; default method.

Use the first create action for the business class that does not require any parameters. This is the least specific method of specifying an action, and is the default method used by the dataimport utility.
-fieldmap sourceclass sourcefield targetclass targetfield Specify auto-sequenced field mappings for non-nested fields.
isa

Ignore any actions specified in the import source.

Overrides the default action hierarchy and forces any actions in the file to be ignored.

field classname|all fieldname value

Optional.

Specify one or more field values to override when importing the data, based on fields for a business class, where fieldname is the field to override and value is the value to put in that field.

If this parameter is used, it must contain either the keyword all, or a full business class name, a field name, and an override value.

This parameter can be specified more than once, and the importer supports the ability to set field values in multiple ways. The most common is setting the value in-line as part of the record definition. The following hierarchy is used to process field value overrides:

Order Description

5

Most specific.

Specify a value using the -field flag for a specific business class.
4 Specify a value in the import file specific to the business class in the fieldContext section of the data import file.
3 Specify a value using the -field flag and all keyword, rather than a business class name.
2 Specify a value in the fieldContext section of the data import file, containing no className attribute.

1

Least specific; most common method.

Specify a value in the import file within a view for a field.
r

Report successful import records.

This flag causes the importer to report successful imports in a text file, listing the business class name, the action used, and the key fields affected. The text file name is a randomly generated Java temporary file name.

File location (Unix): $LAPRTDIR

File location (Windows): %LAPRTDIR%

sf

Report import failures.

This flag causes the importer to report failed import attempts in a text file. The file contains the XML from the source file, and can be modified to correct issues and resubmitted to the dataimport utility for processing. The text file name is a randomly generated Java temporary file name.

Note: 

This flag forces the -nohalt option.

File location (Unix): $LAPRTDIR

File location (Windows): %LAPRTDIR%

ats size

Specify the approximate transaction size for data commits to the database.

For performance reasons, the dataimport utility does not commit after each record is processed; data is committed when the import buffer reaches the size specified with the size parameter.

Type an approximate value, as the utility cannot commit data in the middle of a processing a nested set of data.

layout filename Returns a sample import file layout for a business class.
metadata classname Returns the sample import file layout metadata for a business class.
-ignoreerrors [dn] Ignore errors (d for duplicates, n for "not found" errors).