15.10 - LAB6 and LAB7 Macros Source Code - Preprocessor2 for Embedded SQL

Teradata Preprocessor2 for Embedded SQL Programmer Guide

prodname
Preprocessor2 for Embedded SQL
vrm_release
15.10
category
Programming Reference
featnum
B035-2446-035K

Two macros are required for the embedded SQL examples LAB6 and LAB7. Sample source code for creating the two macros is shown below. This code resides in the LABSBTEQ file.

DROP MACRO LAB6;
CREATE MACRO LAB6 AS
   (INSERT EMPLOYEE
         VALUES ( 2001,
                  1003,
                  2215,
                  9567,
                  ’TIME’,
                  ’SUMMER’,
                  ’74/12/02’,
                  ’55/06/06’,
                  62000););
DROP MACRO LAB7;
CREATE MACRO LAB7 AS
   (SELECT  EMPLOYEE_NUMBER,
            MANAGER_EMPLOYEE_NUMBER,
            DEPARTMENT_NUMBER,
            JOB_CODE,
            LAST_NAME,
            FIRST_NAME,
            HIRE_DATE,
            BIRTHDATE,
            SALARY_AMOUNT
   FROM EMPLOYEE
   ORDER BY 1;
SELECT EMPLOYEE_NUMBER,
      MANAGER_EMPLOYEE_NUMBER,
      DEPARTMENT_NUMBER,
      JOB_CODE,
      LAST_NAME,
      FIRST_NAME,
      HIRE_DATE,
      BIRTHDATE,
      SALARY_AMOUNT
   FROM EMPLOYEE
   ORDER BY 1 DESC;);
.quit