Import Specification for RMS Text Files
The RMS text file import specification should be used only if your record layouts are not COBOL FD, DIBOL, Formatted DDL, Powerhouse PDL, BASIC, or VAX or Alpha CDD format.
If you have to import many record layouts that are in a non-standard format, it is possible to convert them into the CONNX text file import format. Ti do this, you must write an application that converts your existing record layouts to format specification. If you have only a few small record layouts, it may be faster to manually enter them into a new or existing CONNX Data Dictionary instead of using the text file import.
The first line of each record layout must be the following:
CONNXTABLE, <TableName>, <RMS File Name>,<Record Length>, <optional SQL View Clause>
One import text file can contain multiple record layouts, each starting with the same header line shown above.
Each subsequent line in the file represents a column in the record layout. The format for each line is as follows:
<column name>, <column length>, <column offset>, <column type>, <column scale>, <column base>, <column fraction>, <column comment>
where
Syntax | Description |
<column name> | Name of the column. |
<column length> | Length of the column. |
<column offset> | Offset of the column. |
<column type> | Code for the data type of the column. |
<column scale> | Scale of the column (power of 10). A scale of -2 converts 4.3 to .043. A scale of 2 converts 4.3 to 430. |
<column base> | Reserved. Must be 0. |
<column fraction> | Fraction of the column (negative power of 10). A fraction of -2 converts 4.3 to .043. A fraction of +2 converts 4.3 to 430. |
<column comment> | Comments field. |
Here is an example of an RMS import file that includes an optional SQL View Clause. Inserting a view clause limits the result set. This sample view clause returns only rows where the Company field is not blank. The SQL View Clause text box is located on the Table Properties tab in the CONNX Data Dictionary Manager window.
CONNXTABLE, CompanyTable, COMPTABLE.DAT, 64, Company <> "
Company, 30, 0, 1, 0, 0, 0, This is the Company Field.
Title, 10, 30, 1, 0, 0, 0, This is the Title Field.
Name, 20, 40, 1, 0, 0, 0, This is the Name Field.
Age, 4, 60, 14, 0 ,0 ,2, This is the Age Field.
CAUTION:
When creating an RMS text file, it is recommended that you use the column scale syntax rather than the column fraction syntax.
Follow the steps in
Importing from Different Sources to import your text file.