Importing Objects

Warning:
You should use the import function with care. It can delete definitions from or add definitions to your database.

Start of instruction setTo import objects

  1. In the object workspace, select the General node and choose Import/Export from the context menu.

    A user-specific Import/Export window similar to the example below opens:

    graphics/export2.png

    The window lists all processing requests submitted for the objects to be imported (or exported). The list is empty if no requests exist.

    The list indicates the current processing status and whether a request has been completed successfully.

    The functions available in the Import/Export window are described in Functions: Import/Export Window.

  2. Choose Add Import.

    An Import Objects window similar to the example below opens:

    graphics/import_objects.png

    The input fields available are described in Fields and Options: Import Objects Window.

  3. If required, specify the range of objects to be imported from the specified import file and change the import option.

    Choose OK when you are finished.

    The window closes and the new import request is listed in the Import/Export window.

    If the import operation is successful, the objects are added, modified or deleted in the appropriate object node(s) of the object workspace.

    The syntax that applies to the entries in the import file is explained in Syntax in Import/Export Files and Object Processing Rules.

This document covers the following topics:


Fields and Options: Import Objects Window

The fields and options provided in the Import Objects window are described in the following table.

All values entered in this window are checked for their validity. If a Natural object is specified as import file, the file existence is also checked.

Field Description
Location The location of the file to be imported.

Select either of the following options:

Natural source Import from a Natural text object. See also the fields Library and Member.
Text file Import from a text file.
Library Only for Natural source locations.

Enter the name of the library, where the Natural objects reside.

Member Only for Natural source locations.

Enter the prefix of the Natural object you want to import.

Node Only for Text file locations.

Enter the name of the node through which the specified text file can be accessed. The text file must exist.

Text file Only for Text file locations.

Enter the name of the text file to be used for the import.

Favorites This option button is only available if Text file is selected: see Using Favorites for Text Files.
User ID Only for Text file locations.

Enter the default user ID if defined for the specified node.

Group Only for Text file locations.

Enter the UNIX group or Windows domain (optional) if defined for the specified node.

Initial Mode         The mode to be used when starting to import the object definitions contained in the file to the Entire Operations database. The mode can change during import if the file contains mode commands.

Select one of the following options:

Check Objects  Check syntax of objects.
Add objects  Add objects to the database (default).
Update objects  Update objects on the database.
Replace objects Replace objects on the database, or add them if they do not exist.
Delete objects  Delete object from the database.
Owner

Network

Job

These fields can be used to define a range of objects to be imported from the import file.
Enter the required owner, network and job.

Notes:

  1. A selection on a lower level is accepted only if exactly one object is selected on the higher level (i.e. if you have not already used a wildcard).
  2. Selections cannot be verified against the target database, since they usually do not exist there. If nothing can be imported, check your selections.
  3. The selection is valid for all objects in the import file which contain Owner, Network and Job within their key fields.
Stop after ... errors Enter the number of errors which can occur before terminating the import process. Valid range is 1 through 99999. Default is 5.
or ... warnings Enter number of warnings which can occur before terminating the import process. Valid range is 1 through 99999. Default is 10.

Using Favorites for Text Files

You can define favorite text files to be used by default for both the import operation and the export operation.

Start of instruction setTo select, add and delete favorite text files

  1. In the Import Object or Export Objects window, select Text file for Location and enter a name (or name range) in the Text file field, select a name from the drop-down list box, or leave the field blank.

  2. Choose Favorites.

    A Text File Favorites dialog similar to the example below opens:

    graphics/import_export_favorites.png

    The name (if entered) in the Text file field of the Import/Export Objects is contained in the Text file field of the dialog.

  3. To add a favorite file:

    In the Text file field, enter the name of a text file (maximum is 250 characters) or change the name already entered in the field.

    Choose Add.

    The new file is added to the Favorites list.

    The Add button is deactivated if the maximum of five file names is reached or if the specified name is already contained in the Favorites list.

    If the maximum number of file names is reached, you have to a delete an existing file before you can add a new one.

  4. To select a favorite file:

    From the Favorites list, select the file you want to use for the current import/export operation.

    The file name is copied into the Text file field of the dialog.

  5. To remove favorite files:

    In the Favorites list, select one or more file names and choose Delete.

    The selected file is removed from the Favorites list.

  6. Choose OK to save your changes or double-click on a file in the Favorites list.

    (Cancel cancels any changes. A confirmation window asks you to save the changes if the Show confirmation dialog option is selected in your user profile.)

    The changes are saved and the Text File Favorites dialog closes.

    The file entered in the Text file field of the Text File Favorites dialog is copied into the Text file field of the Import/Export Objects and is used for the current import/export operation.

Functions: Import/Export Window

The Import/Export window provides the following functions to add import and export requests, obtain information on a selected request or remove a request from the list.

Function Description
Add Import Opens the Import Objects window to specify the object you want to import.
Add Export Opens the Export Objects window to specify the object you want to export.
Display Displays a log file for a completed or aborted import or export request listed in the window to view information and error messages (if any) on the import or export process.
Delete Deletes a request (not the resulting output!) from the list to clear the queue after a request has been processed.
Properties Displays the properties of a request which correspond to the information shown in the Import Objects or Export Objects window.

Error Handling during Import

If at least one error occurs within the object, the whole object is rejected. Errors and warnings are counted for single objects during the import. If the error or warning limit is reached, the whole import is cancelled.

Whenever an object is rejected, it is saved with prefix ERR- and an ascending number (ERR-0001, ERR-0002, ...). These objects contain the rejected object and the errors which caused the rejection. The error text is written directly above the line which contains the error.

Note:
You have to specify a Natural library name for storing these objects. Otherwise, errors are only protocolled in the job log.

In addition, a header is written to the object informing you about the:

  • Number of errors or warnings in this object;

  • User who started the import;

  • Date and time when the object was rejected.

    (See also Date and Time Formats in the User's Guide.)

You can edit these error objects manually and reimport them again.

This section covers the following topics:

Error Severity

There are three levels of error severity:

  • Warnings
    Warnings are displayed, but do not cause the rejection of the object.

  • Errors
    Errors cause rejection of the object but do not cause termination of the import. Import continues with the next object within the file, if the error/warning limit has not been reached.

  • Fatal errors
    Fatal errors are serious problems which cannot be ignored and cause immediate termination of the import. A fatal error occurs, for example, when it is impossible for the parser to continue at a new point.

Causes of Errors

If errors or warnings occur during import, some of the possible causes could be, for example:

Syntax Errors
  • A value has invalid format.

  • A character in a numeric field.

  • A keyword was invalid or non-existing.

  • The value of a field exceeds valid length.

  • A non-existing object type was specified.

These errors should not occur when importing an unchanged exported object. If you edit the exported object online or create a new object manually, these errors could occur.

Logical Errors
  • Value has correct syntax but does not meet the requirements of Entire Operations.

  • A Job type is specified, which is not allowed in Entire Operations.

  • The field has a special range (e.g. only Y or N).

  • Adding an object to Entire Operations which already exists.

  • Deleting a non-existing object.