SP's & DB2 & Power Builder

Dennis Raher

SP's & DB2 & Power Builder
I could really use some of the experience out there to figure out what
isn't configured right. We are trying to execute a Cobol stored procedure
from a Power Builder program, through DB2 Connect, to DB2 V 5 OS390. We are
half the way there. The PB program executes the SP which runs fine and does
what it is supposed to. The problem is in getting the information back to
the PB program. This SP is a simple one, no cursors, just parameters being
passed in and out. When control goes back to the PB program an SQLCA = 100
from the ODBC driver is returned from the SP execute. The parameters in the
call are all unset. I believe we are missing something in how the PB
program is setup to call the SP. We have also run the SP from a driver
cobol program and everything works fine. The PB program has a Declare, an
Execute, and a Fetch statement associated with the SP call. I questioned
the use of the Fetch, since there is no cursor involved, but the programers
indicate that the PB documentation indicates this is the correct syntax.
Any help would be appreciated.

Thanks

Dennis Raher

Peavy Rao

Re: SP's & DB2 & Power Builder
(in response to Dennis Raher)
Hi,
I have spent last one month trying to PB7 work with ODBC driver to PB7, but
still no success. As per Sybase and some discussion forums, the ODBC way of
getting OUPUT parms from Stored procedure is thru FETCH. I had tested in
with MS SQL Server, thru ODBC, it works. But the similar SP coded in COBOL
and succesfully running thru COBOL driver program is not returning OUTPUT
parms to PB.
Note that the OUTPUT parms works only with PB7 (except Native SQL server
driver which works even with earlier versions of PB).

I tried StarSQL ODBC driver and DB2 Connect ODBC driver to get OUTPUT parms
from DB2 SP, but none of them are working. I want to test another ODBC
driver from INTERSOLVE (if anybody has used it please post it)

We have opened a case with Sybase (case# 41052349) and provided most of the
pieces to reproduce the problem. They are still working, hopefully they fix
it ASAP.

Please let us know, if you could find a solution....
TIA

> ----------
> From: Dennis Raher[SMTP:[login to unmask email]
> Reply To: DB2 Data Base Discussion List
> Sent: Wednesday, October 06, 1999 7:17 PM
> To: [login to unmask email]
> Subject: SP's & DB2 & Power Builder
>
> I could really use some of the experience out there to figure out what
> isn't configured right. We are trying to execute a Cobol stored procedure
> from a Power Builder program, through DB2 Connect, to DB2 V 5 OS390. We
> are
> half the way there. The PB program executes the SP which runs fine and
> does
> what it is supposed to. The problem is in getting the information back to
> the PB program. This SP is a simple one, no cursors, just parameters being
> passed in and out. When control goes back to the PB program an SQLCA = 100
> from the ODBC driver is returned from the SP execute. The parameters in
> the
> call are all unset. I believe we are missing something in how the PB
> program is setup to call the SP. We have also run the SP from a driver
> cobol program and everything works fine. The PB program has a Declare, an
> Execute, and a Fetch statement associated with the SP call. I questioned
> the use of the Fetch, since there is no cursor involved, but the
> programers
> indicate that the PB documentation indicates this is the correct syntax.
> Any help would be appreciated.
>
> Thanks
>
> Dennis Raher
>

Peavy Rao

Re: SP's & DB2 & Power Builder
(in response to Peavy Rao)
Did you guys talk to IBM, they should have some info on these OUTPUT parms

> ----------
> From: Dennis Raher[SMTP:[login to unmask email]
> Reply To: DB2 Data Base Discussion List
> Sent: Wednesday, October 06, 1999 7:17 PM
> To: [login to unmask email]
> Subject: SP's & DB2 & Power Builder
>
> I could really use some of the experience out there to figure out what
> isn't configured right. We are trying to execute a Cobol stored procedure
> from a Power Builder program, through DB2 Connect, to DB2 V 5 OS390. We
> are
> half the way there. The PB program executes the SP which runs fine and
> does
> what it is supposed to. The problem is in getting the information back to
> the PB program. This SP is a simple one, no cursors, just parameters being
> passed in and out. When control goes back to the PB program an SQLCA = 100
> from the ODBC driver is returned from the SP execute. The parameters in
> the
> call are all unset. I believe we are missing something in how the PB
> program is setup to call the SP. We have also run the SP from a driver
> cobol program and everything works fine. The PB program has a Declare, an
> Execute, and a Fetch statement associated with the SP call. I questioned
> the use of the Fetch, since there is no cursor involved, but the
> programers
> indicate that the PB documentation indicates this is the correct syntax.
> Any help would be appreciated.
>
> Thanks
>
> Dennis Raher
>