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 many record layouts to import from a non-standard format, it is possible to convert them into the CONNX text file import format. This will require that you write an application to convert 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 text file import specification is described below.
The first line of each record layout should be as follows:
Note: Inclusion of a SQL View Clause is optional.
One import text file may 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>
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. |
The following is an example of an RMS import file. It 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.
Important: When creating an RMS text file, it is recommended that you use the column scale syntax rather than the column fraction syntax.