HP DDL D40 Reference Manual page 147

Data definition language
Table of Contents

Advertisement

Definition Attributes
DDL starts each SQL VARCHAR field on a word boundary, generating a
one-byte filler character if necessary.
DDL starts each occurrence generated by an OCCURS clause on a word
boundary, generating a one-byte filler character, if necessary, before the
next occurrence.
In the supported host languages (C, COBOL, FORTRAN, Pascal, pTAL,
TACL, and TAL), DDL outputs an SQL VARCHAR field as a group with two
elementary items. The elements are:
LEN
VAL
The LEN item has a data type that corresponds to a DDL BINARY field.
The VAL item has a data type that corresponds to a DDL CHARACTER
field.
SQL DATETIME data type:
The syntax for the SQL DATETIME data type differs from the
corresponding SQL syntax. For DDL, you do not use parentheses around
the end-field-precision item; for SQL you do enclose end-field-
precision in parentheses.
The language output for an SQL DATETIME, SQL DATE, TIME, or SQL
TIMESTAMP field corresponds to a DDL CHARACTER data type.
DDL generates a field whose length is the maximum byte length required
for the longest possible DATETIME string for the SQL DATETIME type in
ANSI format. See
SQL DATETIME byte lengths.
If you specify a VALUE clause for an SQL DATETIME field, its value must
be SYSTEM, CURRENT, or datetime-literal. You cannot specify
VALUE ZERO or VALUE ZEROES for an SQL DATETIME field. See
VALUE Clause
Data Definition Language (DDL) Reference Manual—426798-002
If an SQL VARCHAR field is defined in or referenced by a RECORD
statement, the maximum field length is the maximum record length,
which depends on the file type:
Entry-Sequenced files
Key-Sequenced files
Relative files
Unstructured files
The maximum length leaves room for a two-byte length field.
The length of the data element
The actual value
Appendix D, Dictionary Database
on page 6-79, for additional information about these values.
4,072 bytes
4,062 bytes
4,072 bytes
4,096 bytes
6- 53
TYPE Clause
Structure, for a list of

Advertisement

Table of Contents
loading

Table of Contents