Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 62
TYPE Clause
SQL VARCHAR Field Output for Pascal. The following examples show how DDL
translates definitions and descriptions of SQL VARCHAR fields into Pascal source
code:
SQL VARCHAR Field Output for TACL. The following examples show how DDL
translates definitions and descriptions of SQL VARCHAR fields into TACL source code:
DDL Type
Pascal Type
DEF name TYPE SQL VARCHAR 25
VALUE "Mary".
DEF customer.
02 customer-name TYPE name.
02 address TYPE SQL VARCHAR 29
OCCURS 10 TIMES.
END
TYPE NAME_DEF = STRING(25);
TYPE CUSTOMER_DEF = RECORD
CUSTOMER_NAME: NAME_DEF;
ADDRESS:ARRAY[1..10] OF STRING(29);
END;
DDL Type
TACL Type
DEF name TYPE SQL VARCHAR 25
VALUE "Mary".
?SECTION name STRUCT
BEGIN
INT len;
STRUCT val;
BEGIN
CHAR byte(0:24);
END;
END;
DEF customer.
02 customer-name TYPE name.
02 address TYPE SQL VARCHAR 29
OCCURS 10 TIMES.
END
?SECTION customer STRUCT
BEGIN
STRUCT customer^name;
BEGIN
INT len;
STRUCT val;
BEGIN
CHAR byte(0:24);
END;
END;
FILLER 1;
STRUCT address(0:9);
BEGIN
INT len;
STRUCT val;
BEGIN
CHAR byte(0:28);
END;
FILLER 1;
END;
END;