DB2 STORED PROCEDURE FROM COBOL PROGRAM.

Jan tje

DB2 STORED PROCEDURE FROM COBOL PROGRAM.
On Mon, 28 Dec 2009 13:02:35 -0800, mallik vemugunta
<[login to unmask email]> wrote:

>When I call using the below I am getting compilation error on SQLSTATE as
undefined host variable where I defined SQLSTATE AS
>?
>EXEC SQL BEGIN DECLARE SECTION END-EXEC.???????????
>??? 01 SQLSTATE PIC X(5).??????????????????????????
>EXEC SQL END DECLARE SECTION END-EXEC.????

Would SQLSTATE not be a reserved word? Did you try something like:

EXEC SQL BEGIN DECLARE SECTION END-EXEC.
01 W-MY-SQLSTATE PIC X(5).
EXEC SQL END DECLARE SECTION END-EXEC.

Cheers,

Jantje.

_____________________________________________________________________

* IDUG North America * Tampa, Florida, * May 10-14 2010 * http://IDUG.ORG/NA *
_____________________________________________________________________

http://www.idug.org/rug/index.html - with almost 150 IDUG Regional User Groups,
there is probably one near you!
Regional User Groups are your local connection to the Worldwide DB2 User Community
_____________________________________________________________________

If you need to change settings, http://www.idug.org/cgi-bin/wa?A0=DB2-L is the home of IDUG's DB2-L