All Forums Tools
mukuljain015 1 post Joined 03/15
26 Mar 2015
Merging of Bteq and shell scripts

I want to use shell variables in bteq commands and shell commands in bteq script. e.q  create table $variable (some xyz column list); and some sort of shell  commands within bteq scripts.
So can you please assit me in doing it.

ULICKERT 3 posts Joined 10/09
28 Mar 2015

you may just use a 'Here-script'

LOGON='.logon $TDPID/$user,$tdwallet($user)'
bteq <<-END
create table $variable ( some xyz column list);
.remark  $(date)

all UNIX-variables will be expanded before giving the text to bteq.
Hope it helps

MaximeV 19 posts Joined 11/13
14 Aug 2015

ULICKERT : great help on this, was kinda blocked and didnt think of creating a variable for .logon command.
(that you forgot to call under your bteq  command )
thank you

You must sign in to leave a comment.