Connectivity to bteq through Perl Script

Tools & Utilities
Enthusiast

Connectivity to bteq through Perl Script

I want to connect to bteq using Perl script and i am unaware of how to do this?
In Shell script it is very simple,
Bteq<<-END
.logon .....
...
.quit ...
END

but what is the syntex for perl?

Please help me out .

Thanks
Kunal
1 REPLY
Teradata Employee

Re: Connectivity to bteq through Perl Script

Here are your free choices:

1. Use the open source from CPAN

http://search.cpan.org/~grommel/Teradata-SQL-0.05/SQL.pm

2. Write your own by piping to BTEQ. Something like: open("BFH","|bteq") || die $!;

Suggest you get a Perl book to learn about piping to processes.