The VSAM text file import specification should be used only if your record layouts are not COBOL FD, Formatted DDL, or Powerhouse PDL format.
If you have many record layouts to import from non-standard formats, 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 the CONNX text file 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:
CONNXTABLE, <TableName>, <VSAM File Name>,<Record Length><SQL
View Clause>
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> |
Name for the data type of the column. |
<column scale> |
Scale of the column (power of 10). A scale of 2 would convert 4.3 to 430. |
<column base> |
Reserved - must be 0. |
<column fraction> |
Fraction of the column (negative power of 10). A fraction of 2 would convert 4.3 to .043. A fraction of -2 would convert to 4.3 to 430. |
<column comment> |
Comments field. |
Important:
When creating a VSAM text import specification file, it is recommended
that you use the column scale syntax rather than the column fraction syntax.
The following is an example of a VSAM 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 Properties tab in the CONNX
Data Dictionary Manager window:
CONNXTABLE, CompanyTable, [CICS file name], 64, Company <>"
Company, 30, 0, Text (Right Space Padded), 0, 0, 0, This is the Company Field.
Title, 10, 30, Text (Right Space Padded), 0, 0, 0, This is the Title Field.
Name, 20, 40, Text (Right Space Padded), 0, 0, 0, This is the Name Field.
Age, 4, 60, Text (Right Space Padded), 0 ,0 ,2, This is the Age Field.
For more information about CONNX for VSAM data types, see IBM Mainframe Data Types.