A DB2 -204 error might occur when you register DB2 tables via SAS® Management Console or the METALIB procedure


When you use SAS Management Console or PROC METALIB to register DB2 tables, a DB2 -204 error might occur if SAS is on a z/OS system and the DB2 table is located in a DB2 database on a UNIX or Windows platform.


The error might look similar to the following:

DB2 ERROR:
RESULT OF SQL STATEMENT:
A DUMP OF THE SQLCA FOR THE GET DIAGNOSTICS REQUEST FOLLOWS:
          ROW NUMBER: 0 ERROR CONDITION: 1 REASON CODE: 0
          SQLCODE: -204 SQLSTATE: 42704 SQLERRP: SQLNQ1FC

The -204 error occurs when special queries are executed using explicit pass-through to determine what, if any, indexes and foreign keys exist on the DB2 table.

By default, the special query returns information that is stored in DB2 system tables located on the local DB2 subsystem. When the DB2 tables exist on a remote platform, different system tables should be queried by these special queries. The LIBNAME option REMOTE_DBTYPE=LUW is not included in the CONNECT TO statement that is being built by SAS Management Console or PROC METALIB. As a result, the local system tables rather than the remote system tables are queried when SAS Management Console or PROC METALIB submit the DBMS special queries.

The tables are registered but without the indexes and foreign key information for those DB2 tables.

There is no workaround for this issue.