Command Line Import

You can use the Command Line Utilities to export and import object definitions from one Optim™ Directory to another. Command line processing is available in all Optim environments.

Guidelines

The following guidelines apply:

When importing in a UNIX environment, the following conditions apply:
  • Determine the DB Alias, Optim Directory, and Creator ID for the objects you want to import. In the pstlocal.cfg and pstserv.cfg files, ensure that definitions exist for both the source and target DB Alias, Optim Directory, Creator ID and password. See Installation and Configuration Guide, Appendix A - Install and Configure the Server under UNIX or Linux.
  • Before you attempt to import any other objects, import only the DB Alias in a separate process.
  • z/OS object definitions, Primary Keys, and Foreign Keys are unavailable for import.

Syntax Conventions

KEYword
Uppercase letters indicate the minimum abbreviation for a keyword, while lowercase letters indicate the optional portion. In practice, a command line keyword can be specified in upper, lower, or mixed case.
text
Variable text is shown in lowercase italics.
( )
Statement delimiter to group a series of qualifiers for a parameter.
[ ]
Indicates an optional parameter.
{ }
Indicates a choice of two or more settings from which one (and only one) must be selected.
|
Separates options.

The syntax conventions used to describe the command line import are:

Import Syntax and Keywords

Use the following command line syntax to import Optim Directory object definitions.

Note: If viewing this document in Portable Document Format (PDF), you can select a keyword in the following syntax to navigate to the explanatory text. Use Go To Previous View to return to the syntax on this page.
PR0CMND /IMPORT INput=impfilename 
   [ { PSTdirectory= | Directory=} pstdirectory ] 
   [ Output=rptfilename ]
   [ OVERWrite[ + | - ] ]
   [ ContinueOnError[ + | - ] ]
   [ DBAlias=(currentdbalias, newdbalias, ...) ]
PR0CMND
Type PR0CMND to initiate command line processing. Note: the character following PR is the number 0 (zero).
Note: The command line IMPORT utility does not run in a UNIX or Linux environment.
/IMPORT
Command to run the Import Process. Specify /IMPORT or –IMPORT.
INput=
Name of the file that contains the objects to be imported.
filename
Name of file. Provide full path if file is not in the default Data Directory, specified in Personal Options.
PSTdirectory= | Directory=
The Optim Directory to which objects are imported. The current Optim Directory is the default.
pstdirectory
Name of the Optim Directory for the request.
Output=
File for the Import Process report.
rptfilename
Name of the file for the process report. Provide the full directory path to save the file in a directory other than the default Data Directory (specified in Personal Options). You may append one of the following to the file name.
+
Option to append the report to an existing file.
Option to overwrite an existing file (default).
OVERWrite
Option for processing object definitions of the same name and type.
+
Overwrite any object definitions in the Optim Directory.
Do not overwrite existing object definitions in the Optim Directory (default).
ContinueOnError
Option for continued processing upon an error condition.
+
Continue processing upon an error condition.
-
Stop processing upon an error condition (default).
DBAlias=
DB Aliases for object definitions you want to import.
currentdbalias
A DB Alias associated with object definitions in the input file.
newdbalias
A valid DB Alias for the object definitions after import.
During the Import Process, each new DB Alias is substituted for the current DB Alias with which it is paired.

Example

Use the following command line syntax to import objects in the X:\FORIMPORT.TXT file from the command line, without overwriting any object definitions already in the Optim Directory. The process report is written to a file named X:\RESULTS.TXT and processing will continue in the event of an error. The example will also change the DB Alias xxx to yyy, and xxx2 to yyy2 for the imported objects.

PR0CMND /IMPORT INPUT=X:\FORIMPORT.TXT
OUTPUT=X:\RESULTS.TXT OVERWRITE-
CONTINUEONERROR+ DBALIAS
=(xxx, yyy, xxx2, yyy2)