NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-122
Enscribe Field Formats
°
If the file is an EDIT file and the record ends in the middle of a field, SQL
adds enough blanks to the end of the input record to fill the field. In such a
case, blanks must be acceptable in that column of the source record. For
example, a DECIMAL column would not accept blanks; a CHAR column
would.
°
If the record contains an array defined by an OCCURS DEPENDING ON
clause and at least one element of the array is present, then the field that
contains the count must be present and the number of elements in the record
must be equal to the value of the field that contains the count.
Enscribe Field Formats
If an Enscribe file is the source or target, COPY copies only fields whose DDL
definitions conform to the following rules:
The field must be elementary unless it is the special DDL group that represents a
variable-length character string, in which case it is treated as one field during the
COPY operation. This DDL group has the following structure and is converted to a
column with data type VARCHAR:
02 A-VARCHAR.
03 LEN PIC S9(4) COMP.
03 VAL PIC X(len).
The field must not be a FILLER field.
COPY ignores the following DDL clauses:
Level-88 CONDITION-NAME clause
Level-66 RENAMES clause
Unless you specify a REDEFINES clause in the REDEFINE option of the COPY
command, COPY ignores the clause and uses the original field definition.
Field Conversions
For any COPY operation, the data type of each source field must be compatible with the
data type of its corresponding target field. The details of data type compatibility and
Enscribe-to-SQL and SQL-to-Enscribe field conversions are identical for COPY and
LOAD; see LOAD Command
on page L-17 for details.
Examples—COPY
Suppose that in addition to the table EMPLOYEE described in the catalog
$VOL1.PERSNL, you have created an identical table EMPLOYEE described in a
catalog named $VOL2.TESTC. You must qualify the table names enough to identify
the location of each one uniquely. COPY determines which catalogs to use, such as
in the following command:
>> COPY $VOL1.PERSNL.EMPLOYEE, $VOL2.TEST.EMPLOYEE;