Focal Point
[SOLVED] Create Synonym against DB2/LUW stored procedure

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8467053176

June 23, 2014, 02:48 PM
Harold Trammel
[SOLVED] Create Synonym against DB2/LUW stored procedure
Hi all,

I have a stored procedure in my DB2/LUW 9.1 database that prepares a brief case summary when given a case id. The skeleton of this is below:
--------------------------------
Create Procedure ANTOX.CASE_ABSTRACT (IN c_id INTEGER, OUT abstr VARCHAR(2000), OUT o_err INTEGER )
Specific CASE_ABSTRACT
Reads SQL Data
Language SQL
AB: BEGIN
DECLARE temp_abst VARCHAR(2000);
DECLARE v_err INT DEFAULT 0;

OPENQ: BEGIN -- Get the open date and time and the caller's full name
---
a lot of steps to build temp_abst
---
SET abstr = temp_abst;

RETURN abstr, o_err;
END AB!
--------------------------------
The stored procedure works when I call it a DB2 user defined function as well as a direct call in Advanced Query Tool.

I have attempted to create a synonym for this stored procedure using WF Dev Studio 8007 but get the following error when the new synonym process gets to the build synonym.
--------------------------------------------------------------
(FOC1400) SQLCODE IS -104 (HEX:FFFFFF980
:[42601][IBM][CLI Driver][DB2/NT] SQL0104N An unexpected token "," was
:found following "NTOX.CASE_ABSTRACT (". Expected tokens may include: "
:". SQLSTATE=42601
(FOC1405) SQL PREPARE ERROR
--------------------------------------------------------------

I am going to revisit my earlier attempt to build it using the Synonym Editor, but if I have the same issues I had earlier with that approach I may be posting those issues here later.

Thanks in advance.
Harold

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8.1.0.1 M
Windows Server 2008
PDF, HTML, Excel
June 25, 2014, 04:08 AM
Ram Prasad E
Did you raise case with IBI on this.

Thanks,
Ram


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
June 30, 2014, 01:42 PM
<Kathryn Henning>
Hi Harold,

Thank you for opening a case for this. I'll come back and update this topic with the resolution once it's been published.

Regards,

Kathryn
August 04, 2014, 07:45 PM
<Kathryn Henning>
Hi All,

The resolution to this issue can be found in the following document link:

FOC1400 -104 when creating synonym for DB2 stored procedure

You will need an ID for InfoResponse Online to view it.

Cheers!

Kathryn