BTEQ - MACRO in Teradata

You can use the SQL statements to create a macro and execute this macro at any time. See the following example:
create macro MyMacro1 as (  
 ECHO ‘.set separator “#”’ 
 ; select  * from  students; 
); 


This macro executes one BTEQ command and one SQL request.
execute MyMacro1; 

This SQL statement executes the macro.