ODBC-Access under z/OS: SYSCAT.TABLES is undefined...

Michael Knigge

ODBC-Access under z/OS: SYSCAT.TABLES is undefined...
All,

I've tried to use the ODBC-compliant API of DB2 to access a DB2 database.

I was able to create a table using this API (using the SQLExecDirect()
function) but if I try to do a SELECT or DELETE I get the following:

42S02 (-204:834) DSNT408I SQLCODE = -204, ERROR: SYSCAT.TABLES IS AN
UNDEFINED NAME

DSNT418I SQLSTATE = 42704 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNXOTL SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = -500 0 0 -1 0 0
SQL DIAGNOSTIC INFORMATION
DSNT416I SQLERRD = X'FFFFFE0C' X'00000000' X'00000000' X'FFFFFFFF'
X'00000000' X'00000000'
SQL DIAGNOSTIC INFORMATION ERRLOC=1:13:1


Any idea what is happening here? I'm no DB2 professional but as far I
was able to "google", SYSCAT.** is a view and doesn't exis on DB2 for
z/OS (I'm running V9.1.0).

I'm also wondering why the "ODBC-Driver" DSNAOCLI itself repots version
"DSN0601" using the SQLGetInfo(SQL_DRIVER_VER) function (wasn't the
driver changed since V6?).

I used the IBM Plan "DSNACLI" with no success and also a self
created/bound plan with all the DBRMs also used in the sample JCL
DSN910.SDSNSAMP(DSNTIJCL).


Any ideas anyone?

Thank you very much!

Bye,
Michael

P.S.: If it matters, this is my DSNAOINI:

[COMMON]
MVSDEFAULTSSID=DB9G
;
[DB9G]
MVSATTACHTYPE=CAF
PLANNAME=DSNACLI

______________________________________________________________________

* IDUG 2009 Melbourne, Australia * 18-20 March * http://IDUG.ORG/Events *
______________________________________________________________________




IDUG.org was recently updated requiring members to use a new password. You should have gotten an e-mail with the temporary password assigned to your account. Please log in and update your member profile. If you are not already an IDUG.org member, please register at http://www.idug.org/component/juser/register.html

Jack Campbell

Re: ODBC-Access under z/OS: SYSCAT.TABLES is undefined...
(in response to Michael Knigge)
Michael

first, SYCAT.TABLES is a view used by DB2 UDB (linux, unix, windows). The
DB2 catalog structure is different for DB2 z/os - the nearest equivalent table
is SYSIBM.SYSTABLES.

I would check your driver settings....are you connecting to DB2 for z/os or did
you choose DB2 UDB. I have seen people make this mistake in the past, and
the driver thinks it is connecting to DB2 UDB and not DB2 z/os and generates
the wrong SQL requests

Regards

Jack

______________________________________________________________________

* IDUG 2009 Melbourne, Australia * 18-20 March * http://IDUG.ORG/Events *
______________________________________________________________________




IDUG.org was recently updated requiring members to use a new password. You should have gotten an e-mail with the temporary password assigned to your account. Please log in and update your member profile. If you are not already an IDUG.org member, please register at http://www.idug.org/component/juser/register.html