Using Macros in ITEQ
A macro can contain one or more Teradata SQL statements and certain ITEQ commands, listed below. A user may:
Only the following ITEQ commands can be executed from a macro:
ITEQ commands in macros must be embedded in Teradata SQL ECHO statements. For example:
ECHO ’SET WIDTH 72;’;
When the Teradata DBS encounters an ECHO statement during execution, it sends a response parcel containing the character string to the client system. ITEQ then interprets the character string as an ITEQ command. If the character string is not one of the commands acceptable to ITEQ, ITEQ ignores it.
If a macro is executed in Format mode, only the formatted results of SELECT statements contained in the macro are displayed at the user’s terminal. Processing, status, and statistics of individual statements are not displayed.
If a macro is executed in Unformat mode, ITEQ displays the following:
For a detailed description of how macros are created, defined, and executed, see Database Administration and SQL Data Definition Language.