Example 1: IF, ELSE, and ENDIF - FastExport

Teradata® FastExport Reference

Product
FastExport
Release Number
17.00
Published
September 30, 2020
Language
English (United States)
Last Update
2020-09-02
dita:mapPath
ups1544831946863.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
B035-2410
lifecycle
previous
Product Category
Teradata Tools and Utilities

FastExport is case sensitive when comparing &SYS system variables. In this example, the RUN FILE command does not execute because the substituted values returned are all capitals:

0003 .IF ’&SYSDAY’ = ’Fri’ THEN;
14:10:28 - FRI MAY 09, 1993
UTY2402 Previous statement modified to:
0004 .IF ’FRI’ = ’Fri’ THEN;
0005.RUN FILE UTNTS38;
0006 .ENDIF;  

Always consider this factor when creating a script to force the execution of a predetermined sequence of events. If ‘FRI’ is substituted in line 0003, the compare would work and the RUN FILE command would execute.