$ude ("import")

Import data into the Repository.

$ude("import", "misc", { ZipArchive:}Filename { ,"", OptionsList})

Example: vResult = $ude("import", "misc", prj_full_acme.xml,"","supersede=false")

Parameters

Parameters
Parameter Data Type Description
ZipArchive String Optional name of a zip archive containing one or more XML files, for example ziparchive.zip (the full string would be ziparchive.zip:myxmlfile.xml)
Filename String Name of a Uniface XML file, for example myxmlfile.xml
OptionsList String Associative list containing one or more options that influence how the operation works. See Options.

Arguments can also be a field, variable, or function that evaluates to a string or list.

Results

Items Returned by $procreturncontext
Item Description
Context = Context Context of the information. For $ude("import"), the value is UDE Import.
Error = Number Error number if process failed on error
InputRecords = Number Records to be imported.
OutputRecords = Number Records imported.
SkippedRecords = Number Records not imported due to map file entity mapping to <void>
WriteErrorsContinues = Number Write errors encountered that did not stop the import action.
InputDescriptors=Number Descriptors to be imported. The same descriptor can occur more than once.
OutputDescriptors = Number Signatures actually imported. This can be less than the number of InputDescriptors if void mappings are encountered.
SkippedDescriptors

Entities mapped to <void>

InputTrxFiles = Number TRX files to copy, if a wildcard was specified.
InputXmlFiles = Number XML files to copy, if a wildcard was specified.
DETAILS = String Messages, warnings, and errors encountered during processing, structured as a list.

Items are omitted if their value is zero or an empty string.

Use

$ude("import") requires a fully configured Repository to be available.

Note:  The $ude functions can only be used in components or applications that are run on Windows, and they rely on functionality that is provided in the ide.uar. To use $ude functions, run components and applications with ide.exe, or configure the application to include usys:ide.uar in its resources.

Allowed in all component types except self-contained Services.

Description

The functionality provided by $ude("import") is comparable to that provided by the /imp command line switch.

Note: The $ude("import") function enables you to create components that support your own development processes. It is not intended for importing application data. For this purpose, you can use $ude("copy") or entitycopy.

During the import process, Uniface checks the Uniface version and Repository version to ensure that the data is compatible.

  • If the data is compatible, the data is imported. If necessary, the data is automatically migrated to the current Uniface Repository structures.
  • If the data is not compatible (for example, because it was produced by a version of Uniface that is too old, or too new), Uniface does not allow the data to be imported. It is also considered incompatible if the source XML file was created using the copy facility ($ude("copy") or /cpy) instead of the export functionality.For more information, see Export and Import Facilities.

Importing Data

The following instruction imports the contents of prj_full_acme.xml, overwriting existing occurrences with the same primary key.

vResult  = $ude("import", "misc", "xml:prj_full_acme.xml","","printerinterval=100;commitinterval=100")

The following instruction imports the file specified in field cpt_a_service.xml, but will not overwrite the data if it already exists.

vResult  = $ude("import", "misc", cpt_a_service.xml,"","supersede=false")

Related Topics