All Forums Teradata Applications
Govind3331 6 posts Joined 12/15
04 Dec 2015
How to create BTEQ Script in LINUX environment??

HI ,
Could someone hep in creating BTEQ Scripts in LINUX Operating system(NOT in UNIX). can we execute BTEQ script in LINUX or is their any issue while running in LINUX environment.
 
Help me creating .RUN file, if servername/username,password --> are credentials.
select * from dbc.tables-->is select statement

Govind3331 6 posts Joined 12/15
05 Dec 2015

Please respond

Fred 1096 posts Joined 08/04
06 Dec 2015

I don't understand your question. There's no difference between connecting from some flavor of Linux vs some flavor of Unix, as long as there is TTU support for the platform and the appropriate client components are installed.
Whether you place the the .LOGON and SELECT in BTEQ's stdin directly, or put them in a separate file and then put a .RUN referencing that file in BTEQ's stdin is up to you.

Govind3331 6 posts Joined 12/15
06 Dec 2015
####################################
bteq <<EOF
.LOGON servername/username,********
/* sql code on next line(s) */
select  databasename from dbc.databases where databasename="P_EIW_S_LIS_01";
.export reset
.LOGOFF ;
EOF
###################################

Above is the BTEQ Script:
When i am executing the above script i am getting below error:

CLI:Message catalog open failed!: No such file or directory
The file "errmsg.cat" cannot be opened.
There may be problems with your installation.
 *** CLI error: -1 Message Not Found!
 *** Return code from CLI is: -1
 *** Error: Fatal error from CLI.
 ***        Program exiting!

 *** Exiting BTEQ...
 *** RC (return code) = 16

 

Fred 1096 posts Joined 08/04
07 Dec 2015

The COPERR environment variable needs to point to the CLIv2 errmsg.cat file. The install process normally sets the correct COPLIB and COPERR values in the default profile, which is why the message suggests an improper installation.
Did you install all the required components: tdicu, TeraGSS, cliv2, piom, and bteq?

Govind3331 6 posts Joined 12/15
08 Dec 2015

The issue got resolved , the installation was not proper. Thanks Fred for ur support.

You must sign in to leave a comment.