Use the editor on the system to include a BTEQ macro in script or input stream file. To execute the deptdisplay macro from a script, for example, enter the Teradata SQL EXECUTE statement after the LOGON statement in the script:
.LOGON tdpid/userid, password EXECUTE deptdisplay; .LOGOFF