Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 13 Apr 2007 @ 18:33:55 GMT


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


Subj:   Re: Accessing 2 Tdata servers from single UNIX BOX
 
From:   Anomy Anom

<-- Anonymously Posted: Friday, April 13, 2007 12:22 -->

Samar,

I am not sure host file change can be part of the shell script if that is what you want to do.

There is actually simplier way to do that.

Use multiple logon file with different tdpid in each. Use your condition logic in your shell script to run any one of those logon script based on the condition evaluated. Most utility above TTU 8.1 allow .run function now including fastload.

You would have $logon in place of your current .logon statement in your script if you have the following to define your $logon variable prior to your application scripts:

     If  true
     Then $logon=`cat logon1`
     Elseif  true
     Then $logon=`cat logon2`
     Elseif  true
     Then $logon=`cat logon3`
     Else
     $logon=`cat logondefault`
     Fi

     ....

     Bteq < bteq.out
     $logon

     ;

     .quit;
     !

Each of the logon files can be as following:

     .logon /,;

The tdpx will change with the logon file to the appropriate tdpid.


Hope this helps



     
  <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