ODBC call from BASIC

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
leomauer
Premium Member
Premium Member
Posts: 100
Joined: Mon Nov 03, 2003 1:33 pm

ODBC call from BASIC

Post by leomauer »

Does anybody know how to call ODBC from BASIC routine?
I need to connect and query SQL server from Linux to do some housekeeping tasks in batch.
We are migrating from Windows. On Windows we used OS call to osql wrapped in DS routine.
So far we can't find a similar executable on Linux.
My thought is that if I can invoke ODBC driver from DS routine, then I do not have to change the calls to this routine in many places.
Thanks.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You will have to change, on the basis that you are not already calling from BASIC. There is a suite of functions collectively called the BASIC SQL Client Interface, or BCI, that mimics the ODBC API. Search the forum for more information. The BCI manual is downloadable from IBM's online UniVerse manuals web site.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Unless this has changed in 8.x you are not licensed to use the ODBC drivers that ship with the product outside of the GUI on a UNIX server. Any such BCI code will work for 30 days and then stop working. You'd need to purchase 3rd party drivers to make this work.

Right? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You might be better off tracking down a UNIX-based variant of osql.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply