OSQL Import

PURPOSE:  OSQL IMPORT imports all records from an Oracle table to a DB-MACH2 or RMS table.  The column names and data types must be identical in the source and destination table names.  If the DEFINE PM clause is included, then the Process Module (PM) created to execute the command will be saved in the current Data Base Library (DBL) under the object name specified.

Syntax

OSQL IMPORT FROM source_table_name

TO destination_table_name

[DEFINE PM process_module_name [ONLY]]

source_table_name

is the name of the Oracle table from which data will be imported.

destination_table_name

is the name of the DB-MACH2 or RMS table in which the imported data will reside.

DEFINE PM process_module_name

specifies that the PM containing the code generated to execute the OSQL command will be saved and named as an object in the current DBL.  This PM is made up of ACCENT R SPL statements and is useful for prototyping applications.

ONLY

specifies that the PM will be created without being executed by OSQL.  This clause is used primarily by the OSQL BUILD command but may also be used for on-line prototyping.  If the ONLY clause is included, the PM may be invoked interactively or from a Command Module (CM).

EXAMPLE

*OSQL IMPORT FROM STORES TO NISDATA:STORES

NOTES:  All records of the source table will be inserted into the destination table.  The records previously in the destination table will be cleared.  The Oracle data base must be declared before this command is issued.

SEE ALSO:  OSQL EXPORT, OSQL CREATE DS