Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 17 Aug 2010 @ 22:06:07 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   .IF ..THEN statement
 
From:   JAMES PARK

Dear users,

Teradata 13.0 on Windows.

I have 6 macros. I'd like to create a BTEQ script to execute these 6 macros to generate a report.

Say, the macros are A, B,C,D,E and F. I'd like each macro to stop when it fails. How can I do that using .IF ... THEN statement?

Is the below script correct?

     Exec macro A;
     .IF ERRORCODE<> 0 THEN .QUIT

     Exec macro B;
     .IF ERRORCODE<> 0 THEN .QUIT

     Exec macro C;
     .IF ERRORCODE<> 0 THEN .QUIT

     Exec macro D;
     .IF ERRORCODE<> 0 THEN .QUIT

     Exec  macro E;
     .IF ERRORCODE<> 0 THEN .QUIT

     Exec macro F;
     .IF ERRORCODE<> 0 THEN .QUIT

     .Quit 0

Besides above script

1. What is the difference between .Quit and .Quit 0 and .Quit 99?

2. Are the expressions '.IF ERRORCODE<> 0' and '.IF ACTIVITYCOUNT > 0' same? Can I use them interchangeably?


Thanks,

James Park
Database Specialist II



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023