Import Using the Interface

The Import dialog has four tabs. Each tab and menu command available on the dialog serves a unique purpose.

Process
Select object types, identify the Input File, and provide parameters for Import Processing.
Options
Provide parameters needed to import definitions obtained from the MVS™ platform.
DB Aliases
Map DB Aliases for the imported objects.
Objects
Designate names to be assigned to the imported objects.

Menu Commands

In addition to standard File and Edit options, you can choose the following options from the File and Tools menus on the Import dialog:

File Menu

Set as Default
Save your entries on the Import dialog as the default specifications. The settings for the following are saved:
  • Overwrite existing definitions on the Process tab.
  • Continue import if error(s) on the Process tab.
  • Default Qualifier on the Options tab.
  • Specify two-part Access Definition name on the Options tab.

If no dialog defaults are established, the Import dialog displays application default settings for the check boxes.

Tools Menu

Select All Definitions
Select all object definitions in the Input File.
Note: If you select individual definitions, the subordinate definitions are not included automatically. To import subordinate definitions, you must select them explicitly from the Definitions list.
Deselect All Definitions
Clear the check boxes that are shaded and selected, making all definitions in the Input File available for selection.
Note: Import overwrites the definition in the Directory if the object exists and Overwrite existing definitions is selected.
Show Process Log
Display the Import Process Log generated by the last execution of Import.
Read input file
Refresh the display with information from the Input File. For example, if an Input File is opened simultaneously in Export and a text editor, the file is locked and Import Processing cannot proceed. When the application or dialog causing the sharing violation is closed, choose the Read input file command to reread its contents.

Run Import

To Import definitions, choose Run from the File menu. The Import Progress pane displays the progress of the processing.

Note: To run the Import Utility, at least one available object must be selected.

When Import Processing is finished, the status bar displays the message: “Ready.”

Process Tab

The tab is populated with the defaults you have specified. If you have not established defaults, the Import dialog displays application default settings for the check boxes, and the Input File box is populated with the name of the last Input File designated in the Import dialog.

Note: If the Input File is unavailable due to a sharing violation, select Read input file on the Tools menu to automatically revise the definitions list.
import process tab display, showing numbers of each type of object imported

Definitions

The Import Utility populates the list of objects by:

  • Identifying the objects in the Input File. If there are no objects of a specific type (e.g., no Access Definitions), the check box for the object type is shaded. Otherwise, you can expand to display a list of objects of the type by clicking on the plus (+) sign.
  • Scanning the Optim Directory and identifying the objects in the Input File that exist in the Directory and those that do not. The check box to the left of each listed object is selected or not according to the Overwrite existing definitions setting.
    • If Overwrite existing definitions is not selected, the check boxes to the left of objects that exist in the current Optim Directory are shaded and selected and are unavailable for Import.
    • If Overwrite existing definitions is selected, all check boxes to the left of each definition are cleared and any definition can be selected. If a selected object exists in the Optim Directory, Import overwrites it.

At least one available object must be selected to run the Import Utility.

Import Progress

Statistics detail the current and total number of objects of particular types imported, and the current and total numbers of errors encountered (the “total” numbers are the composite counts for all Import Processes performed in the session). This display is updated during processing. The status bar displays information about the object being processed.

Input File

Specify an Input File. The Input File for Import is generally an Output File generated by Export (see Export for details about creating this file).

  • To select from a list of recent file names, click the down arrow or use the browse button. You may also copy a name into the box or type a name directly.
  • If you do not provide a fully qualified path, the path from Personal Options is used.
  • If no path is given in Personal Options, the current drive and directory are assumed.

Overwrite existing definitions

Indicate the action taken when the name of an imported object definition matches that of an object already in the current Optim Directory:

  • To select any or all objects and overwrite existing definitions in the Directory, select the check box.
  • To prevent overwriting objects, clear the check box. Duplicate definitions, indicated by check boxes that are shaded and selected, are not imported.
Note: The Import Utility never overwrites database object definitions. If a primary key or relationship name conflicts with a name in the database, an error message is written to the log file. Processing continues according to the specification for Continue import if error(s).

Continue import if error(s)

Indicate processing if an error occurs. Errors are written to the Import Process Log and displayed on the message bar.

  • To continue processing if an error occurs, select the check box.
  • To halt processing if an error occurs, clear the check box.

Options Tab

Use the Options tab to provide defaults for amending the names of object definitions imported from MVS.

import options tab where you supply default names for objects imported

Default Qualifier

Enter a DB Alias and Creator ID as the Default Qualifier. The Default Qualifier is assigned automatically to objects imported from MVS. Objects on these platforms do not use qualifiers. If the DB Alias is explicitly mapped on the DB Aliases tab, it overrides any default DB Alias specified on the Options tab.

Generate required constraint names

Select this check box to automatically generate a constraint name for any object definition that has “Requires Constraint Name” as the last part of the qualified name. The first eight characters of the first column name for the child table are used as the constraint name, unless the name does not result in a unique Optim relationship name. Otherwise, one of the following characters is appended to the column name or used to replace the eighth character:

123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ.

Each character is applied in turn until a unique name is generated.

If you want to be prompted for a constraint name, clear the check box. The Supply a Relationship Constraint Name dialog is displayed when a name is required.

supply a relationship constraint name prompts you when a name is required

Specify two-part Access Definition name

Choose elements of a three-part Access Definition name (from an MVS definition) that should be used when the Access Definition is migrated to the two-part (identifier.name) Optim naming system.

Group.User
Use the Group and User portions. Drop the Name portion.
Group.Name
Use the Group and Name portions. Drop the User portion.
User.Name
Use the User and Name portions. Drop the Group portion.

If Access Definition names are explicitly mapped on the Objects tab, these names override the naming choice specified here.

DB Aliases Tab

Use the DB Aliases tab to map explicit DB Aliases for the imported objects.

import db aliases tab where you map alias for imported objects

Current DB Alias

This grid column is populated with the name of each DB Alias associated with objects in the Input File.

New DB Alias

You can provide a new DB Alias for objects to be imported. During Import Processing, the New DB Alias is substituted for the corresponding Current DB Alias. For example, the importing Optim Directory may include a DB Alias that corresponds to a database referenced in the import file by a different DB Alias name. You can specify the appropriate DB Alias for the importing Optim Directory and import the objects and use them without further change. Right-click to select from the following shortcut commands:

Copy Name
Right-click in the Current DB Alias column and select Copy Name to use the same name in the new DB Alias column.
Populate
Clear
Removes all DB Alias names and inserts the default DB Alias names.
Add
Inserts the default DB Alias names in any blank grid cells.
Empty
Click to remove all DB Alias names (change to blanks).

Objects Tab

Use the Objects tab to review the objects in the Input File and specify new names for imported objects.

import objects tab showing object types and names

Object Type

Abbreviations for object types:

Abbreviation Object
AD Access Definition
AFC Archive File Collection
ARCH Archive Request
CALENDAR Calendar
CM Column Map
CMPROC Column Map Procedure
COMP Compare Request
CONV Convert Request
CURRENCY Currency Table
DBALIAS DB Alias
DEL Delete Request
ED Edit Definition
EXTR Extract Request
LOAD Load Request
PK Primary Key
REL Relationship
REPT Report Request
REST Restore Request
STORPROF Storage Profile
TM Table Map
UPIN Update or Update/Insert Request

Object Name

The names of the objects available for importing. The number of parts in the name depends on the object type and the platform of origin for the object.

Reqs Chg

If an object name requires changes before Import (e.g. the name already exists), the Utility selects the check box for that object. If you have specified values on the Options and/or DB Aliases tabs that resolve all discrepancies for the selected objects, you need not make changes on the Objects tab.

New Object Name

Specify a new name for the object. The name must comply with the naming conventions for that object type in Optim. For information on naming conventions, refer to the section that discusses the specific object type. Right-click to select from the following shortcut commands:

Copy Name
Right-click in the Object Name column and select Copy Name to use the same name in the New Object Name column.
Populate
Clear
Removes all object names and inserts the default object names.
Add
Inserts the default object names in any blank grid cells.
Empty
Click to remove all object names (change to blanks).

Import Errors

If Import encounters errors, processing continues according to the specification for the Continue import if error(s) option. Errors are displayed on the message bar and represented visually by a red “X” beside each object in error. Errors are written to the Import Process Log after Import Processing is finished. You can review and print the Import Process Log for diagnostic information about errors.

If some objects fail to be imported due to errors, check the specifications, and try Export and Import again. For details about the format of the Export/Import File, see Output/Input File Format.

Import Process Log

When Import Processing finishes, select Show Process Log from the Tools menu to display the Import Process Log.

import process log, explained below
Creation Date
Date and time the Import Process Log was created.
List of errors
Explanatory text for each error if errors were encountered.
List of imported objects
Names of the imported object definitions, listed by object type and name.

Print the log by choosing Print from the File menu. Each execution of Import clears the log before information for the current execution is written. Previous log information is not retained.