[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: esqlOC error

From: Michael Potter
Subject: Re: esqlOC error
Date: Tue, 16 Nov 2021 08:58:06 -0500

Thanks for the response James.

We just commented them out inorder to proceed with intention of modifying esql to ignore them.

What is interesting is: DB2 on z/OS uses them; DB2 LUW (linux unix windows) does not recognize it.

On Sun, Nov 14, 2021 at 3:38 PM James K. Lowden <> wrote:
On Mon, 8 Nov 2021 00:53:22 -0500
Michael Potter <> wrote:

> I got this error:
> unsupported VAR construction in DECLARE SECTION:
> On this code:
>            EXEC SQL DECLARE D63_A999 TABLE
>            ( VAR1      CHAR(17)        NOT NULL,
>            ) END-EXEC.
> What is wrong with that code.
> Original code is from DB2 and the target is postgres.

The esql processor doesn't appear to know what to do with the DECLARE
TABLE statement.  A quick look at esqlOC.cpp (for example) shows the
only DECLARE construct it recognizes is "DECLARE CURSOR".  I wouldn't be
surprised if it simply passes anything unrecognized to the DBMS as
"SQL", and the error message is the server's complaint about the

Since DECLARE table is optional for DB2 and afaik not a feature in
other esql environments, my first guess would be that you'd be better
off with a preprocessor that just deletes them.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]