Data Definition Language (DDL) Reference Manual
DDL Compiler Commands
Data Definition Language (DDL) Reference Manual—529431-004
9-107
TAL
The DDL compiler performs all of the syntax checks listed under the TALCHECK
command before writing the pTAL or TAL source output. If the DDL compiler finds a
syntax error, it does not write the source output for the object with the error; it does
write source output for an object if only a warning is issued.
The lower bound for pTAL or TAL arrays can be set with the TALBOUND command.
In Example 9-54 on page 9-107, the DDL compiler opens the dictionary, opens and
then clears the file \DALLAS.$DATA.SALES.TALSRC, retrieves the record
CUSTOMER from the open dictionary, translates it to pTAL or TAL source code, and
then writes it to the open pTAL or TAL source code file. For the definition of the
CUSTOMER record, see the sample database schema in Appendix B, Sample
Schemas.
Example 9-54. TAL Command
47> DDL
!?DICT
!?TAL \dallas.$data.sales.talsrc !
!OUTPUT RECORD customer.
?SECTION CUSTOMER
?PAGE
STRUCT CUSTOMER^DEF (*);
BEGIN
STRUCT CUSTNUM;
BEGIN STRING BYTE [1:4]; END;
STRUCT CUSTNAME;
BEGIN
STRUCT LAST^NAME;
BEGIN STRING BYTE [1:12]; END;
!Upshift
STRUCT FIRST^NAME;
BEGIN STRING BYTE [1:8]; END;
!Upshift
STRUCT MIDINIT;
BEGIN STRING BYTE [1:2]; END;
!Upshift
END;
STRUCT ADDR;
BEGIN
STRUCT ADDRESS;
BEGIN STRING BYTE [1:22]; END;
STRUCT CITY;
BEGIN STRING BYTE [1:14]; END;
STRUCT STATE;
BEGIN STRING BYTE [1:2]; END;
STRUCT ZIP-CODE;
BEGIN STRING BYTE [1:5]; END;
END;
END;
LITERAL CUSTOMER^CUSTNUM^KEY = %000000;
LITERAL CUSTOMER^CUSTNAME^KEY = %061556; !"cn"