User's Guide

TAB2ORC

Converts a labeled table(LT) file to an Oracle table.

Function:

Converts a labeled table (LT) file to an Oracle table.

Parameters:

INLT
Input labeled table. The name of the labeled table file. The main labeled table can have subfiles, but the subfiles cannort have their own subfiles.

OUTFILE
Output file. The output file is a table within the Oracle database with the name OUTFILE.

ORCUID
Oracle USERID. The user's Oracle USERID.

ORCPWD
Oracle password. The user's Oracle password.

OVER("NO")
Override option. Processing option if an Oracle database table already exists.

  NO    No override will occur.  If an Oracle table of
        name OUTFILE exists for the user, and error 
        will occur and processing will terminate.

  REP   Replace existing table.  All data in table
        will be destroyed, and the table will be 
        rewritten with the new data from INLT.

  APPN  Append exisiting table.  The data from INLT
        will be appended to Oracle table OUTFILE.

Example:

  1. LAS> tab2orc inlt=idxys.dat outfile=idxyt orcuid=smith orcpwd=b123

    The labeled table IDXYS.DAT will be imported into the Oracle database, to a new table called IDXYT under the user SMITH.

Description/Algorithm

The labeled table specified in INLT will be be checked to determine the datatypes and field names. This information is used to create an Oracle database table, and to subsequently place the data into the table. The LAS function TAB2ASC converts the specified labled table if the OVEROPT NO is chosen, the Oracle database is created by the SQL*Plus command create, and it is loaded by the SQL*Loader. If the OVER option REP is chosen, the table is assumed to exist, and the data in database is replaced with that in the specified labeled table. If the OVEROPT option APPN is chosen, then the data from the labeled table is appended to an existing Oracle table.

The fields within the Oracle database will be sized according to the data they are to receive from the Labeled Table files. The fields sizes are as follows:

   LT data type     Oracle field type  Oracle field size
   ------------     -----------------  -----------------
 
        I1               number               4
        I2               number               8
        I4               number              16
        R4               number              20
        R8               number              30

Nonfatal Error Messages:

    None.

Fatal Error Messages:

  1. [tab2orc-cre] Error opening output file

    Cannot open the Oracle table creation file mktable;com. Verify the amount of disk space available and that directory protections are correct.

  2. [tab2orc-ctl] Error opening output file

    Cannot open the Oracle control file tab;ctl for writing. Verify the amount of disk space available and that directory protections are correct.

  3. [TAB2ORC-PAR] Fatal error encountered

    A fatal error was encountered during processing. Processing is terminated. THe erro message that is displayed immediately preceding this message is the specific error that was encountered.

  4. [TAB2ORC-SQL] SQL failed

    An error occured in running the mktable.com within SQL*Plus. The message that is displayed immediatedly preceding this message is the specific error that was encountered.

  5. [TAB2ORC-SQLL] SQL*Loader failed

    An error occured in running the tab.ctl file within SQL*Loader. The message that is displayed immediatedly preceding this message is the specific error that was encountered.

User note:

  1. This is a UNIX specific PDF, to be run only on machines with the Oracle database installed.

  2. Errors may occur when trying to use the REPLACE option of very large tables. It is best to drop the table completely in this case, then recreate it. If problems persist, see the Oracle system administrator.