ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DB2 Stored Procedure on os/390

Post new topic  Reply to topic
 DB2 Stored Procedure on os/390 « View previous topic :: View next topic » 
Author Message
miron
PostPosted: Mon Jun 30, 2003 11:23 am    Post subject: DB2 Stored Procedure on os/390 Reply with quote

Apprentice

Joined: 27 Jun 2002
Posts: 39
Location: New York

Hello,

I am trying to execute a DB2 stored procedure on os/390.
I run into error:
BIP2920 The procedure is unknown to the database and no definition could be found.
However the procedure is there.
My code looks like this:

Code:

Call test_proc
(IN_MACH_TYPE
,IN_SERIAL_NUM
,OP_ID
,IN_CC
,IN_SC
,OUT_STATUS);

set Environment.Variable.PARMS.Out_Status = OUT_STATUS;

Create Procedure test_proc
(in IN_MACH_TYPE char
,in IN_SERIAL_NUM char
,in OP_ID char
,in IN_CC char
,in IN_SC char
,out OUT_STATUS char)
External Name "DSND.GARDDBA.GRTSP01";


So i call my stored procedure as "subsystem.schema.procname"
Broker id is different but proc is open to public.

Do I have to create a schema with broker id to make it work?
Is there anything I am missing in configuration?

Thanks for help.


We run:
WMQI 2.1 CSD03 on os/390
MQ 5.21
DB2 7.10
Back to top
View user's profile Send private message
shalabh1976
PostPosted: Mon Jun 30, 2003 9:07 pm    Post subject: Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

Does your stored procedure run if you call it through a program on S390 say a COBOL DB2 program.
If you have WLM, you may need to define your stored procedure to it.
IBM has a redbook on it.
I don't remember the name exactly but it was something like :
"Getting started with DB2 stored procedures :
Give them a call over the network "
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
miron
PostPosted: Tue Jul 01, 2003 3:52 am    Post subject: stored procedure Reply with quote

Apprentice

Joined: 27 Jun 2002
Posts: 39
Location: New York

Hi ,

My stored procedure is written in PL/I and it is defined in DB2 catalog.
It works fine when called from another program.
In 'Developing Solutions' book it says:
Quote:

External database stored procedures
You can call external database procedures using ESQL (DB2 or Oracle stored
procedure are supported). To call an external database stored procedure you
must define it in the databases as well as the broker.


What does 'as well as the broker' means?
Also can I reference this stored procedure with full path "subsystem.schema.procname" or it has to be referenced just by the name like in this book example and the broker assigns broker's id as high level qualifier?

Thanks for your input.
Miron
Back to top
View user's profile Send private message
Craig B
PostPosted: Tue Jul 01, 2003 4:05 am    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

The following is documented in point 82a of the WMQI V2.1 CSD04 readme.txt :

Quote:

82a. CREATE PROCEDURE EXTERNAL NAME clause
The EXTERNAL NAME clause of the CREATE PROCEDURE statement can contain either
a qualified or unqualified procedure name. The rules for qualification vary
slightly between DB2 and Oracle databases.

For DB2 and Oracle, if a schema name is not provided, the database connection
username is used as a default schema name. If the required procedure does not
exist in this schema then an explicit schema name must be provided in the form
"mySchema.myProcedure" in the EXTERNAL NAME clause.


This suggests you can specify your schema name in the definitions. From what you have documented you have tried "DSND.GARDDBA.GRTSP01". Do you need the subsystem id? Have you tried just "GARDDBA.GRTSP01"??
_________________
Regards
Craig
Back to top
View user's profile Send private message
shalabh1976
PostPosted: Tue Jul 01, 2003 8:41 pm    Post subject: Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

Craig, is CSD04 for NT/win2K equivalent to CSD03 for OS/390 / z/OS ?
For all you know this might not be supported for CSD03(z/OS).
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Craig B
PostPosted: Tue Jul 01, 2003 11:35 pm    Post subject: Reply with quote

Partisan

Joined: 18 Jun 2003
Posts: 316
Location: UK

CSD04 for distributed platforms is NOT the same CSD03 on the zOS platform. CSD04 is also available for the zOS platform which is equivalent to its other CSD04 platform counterparts.

The following is documented in the WMQI V2.1 CSD04 readme.txt

Quote:

81. Stored Procedure database support
Stored Procedures are supported on DB2 Version 7.1 and Oracle 8.1.6 and 8.1.7.
They are not currently supported on DB2 6.1, Sybase and SQLServer. In addition
overloaded stored procedures are not supported. An overloaded procedure is
one which has the same name as another procedure in the same database schema,
and they only differ on type or number of parameters. If the broker detects
that a given procedure has been overloaded, an exception will be thrown.


Points 81 and 82a are documented in both the CSD03 and CSD04 readme.txts so they apply to both these CSD's. However, as pointed out, your IBM support team should be able to give you a formal statement on whether this is supported or not.
_________________
Regards
Craig
Back to top
View user's profile Send private message
miron
PostPosted: Wed Jul 02, 2003 7:26 am    Post subject: Reply with quote

Apprentice

Joined: 27 Jun 2002
Posts: 39
Location: New York

Hello,

Thanks for all replies.
The problem was that you can not use subsystem name in your stored procedure name. So the syntax for calling external procedure would be
"schema.procname".
I am however now getting SQLCODE -751 which is related to XA coordination I believe. The stored procedure I call has some SQL Rollback coded in it and this is causing -751.
I do have 'Coordinated Transaction Property' set to yes but still I am getting this error.

Miron
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » DB2 Stored Procedure on os/390
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.