I have bteq .RUN command sandwiched by .OS calls which log the start and end date times of the .RUN. The dates are gotten by calls to UNIX 'date' command. The START date is fine, however, my COMPLETED date is always equal to my START date. I don't see how that's possible because the 'date' command is invoked fresh on the COMPLETED line. How can I fix this to get the real, actual COMPLETED date to print?
Here's the code:
.OS echo Running TERADATA script <script name> on `date`>&2; <=========== this date is correct.
.RUN FILE = <script file> ;
.IF ERRORCODE <> 0 THEN .GOTO BADEXIT;
.OS echo TERADATA file <script name> COMPLETED on `date` >&2; <=========== this date is equal to the date above, even though it should be several minutes later.