RDB/VMS SQL INCLUDE — VMS RDB_4.1_M
INCLUDE ──┬──>
S
Q
L
C
A ──────────────────────────────┬─> typebox (;) ├──>
S
Q
L
D
A ──────────────────────────────┤ ├──>
S
Q
L
D
A
2 ─────────────────────────────┤ ├──> file-spec ──────────────────────────┤ └──>
F
R
O
M
D
I
C
T
I
O
N
A
R
Y path-name ───────┐ │ ┌────────────────────────────────┘ │ └─┬────────────────────────────┬─┐ │ ├─>
F
I
X
E
D ─────────────────┬─┘ │ │ └─>
N
U
L
L
T
E
R
M
I
N
A
T
E
D
B
Y
T
E
S ─┘ │ │ ┌────────────────────────────────┘ │ └─┬─────────────┬───────────────────┘ └─>
A
S name ──┘
Additional information available:
More Information
The INCLUDE statement inserts declarations or code into a host
program. It operates on source files, not text libraries. You
can use the INCLUDE statement only in precompiled programs, not
in interactive SQL or as part of an SQL module language
procedure.
The file specification must refer to a standard VMS text file.
SQL does not support INCLUDE from text libraries (extension
.TLB).
You can use the INCLUDE statement to insert:
o Host language declarations for the SQLCA and a message
vector
o Host language declarations for the SQLDA
o Host language source code
o Host language declarations for data dictionary record
definitions
The FIXED and NULL TERMINATED BYTES clauses tell the compiler
how to interpret C language CHAR fields derived from the data
dictionary.
FIXED specifies that they be interpreted as fixed character
strings.
NULL TERMINATED BYTES, the default, specifies that CHAR fields
are null-terminated. The module processor assumes that the last
character of the string is for the null terminator. Thus, a
field that the dictionary lists as 10 characters can only hold a
9-character SQL field from the module language. (Other module
languages could fit a 10-character SQL field into it.)
The AS clause specifies a name given to override the structure
name of the record from the dictionary. Currently the structure
name is taken from the CDD record name. The name in the AS
clause overrides this value.