How to create BTEQ Script in LINUX environment??

Teradata Applications
Enthusiast

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

5 REPLIES
Enthusiast

Re: How to create BTEQ Script in LINUX environment??

Please respond
Teradata Employee

Re: How to create BTEQ Script in LINUX environment??

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.

Enthusiast

Re: How to create BTEQ Script in LINUX environment??

####################################
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
Teradata Employee

Re: How to create BTEQ Script in LINUX environment??

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?

Enthusiast

Re: How to create BTEQ Script in LINUX environment??

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