473,394 Members | 1,759 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Running SQL PL stored procedure

I have a number of SQL PL stored procedures (DB2 UDB 8.2 on Windows)
that were created in the DB2 Development Center. From there I can run
them just fine.

When I use another tool (WinSQL) and attempt to run while connected to
the same UDB database:
CALL TFBUDB.SMACF_DRIVER_INFO(21264682);
I get the following message:
SQL0444N Routine "*VER_INFO" (specific name "SQL070423085539400") is
implemented with code in
library or path "...DRIVER_INFO", function "TFBUDB.SMACF_DRIVER_INFO"
which cannot be accessed.
Reason code: "4". SQLSTATE=42724

The SP is defined as:
CREATE PROCEDURE TFBUDB.SMACF_Driver_Info (IN Pol_Nbr Char(10)
,OUT ErrNo INTEGER
,OUT ErrMsg CHAR(80) )
RESULT SETS 1
NOT DETERMINISTIC
LANGUAGE SQL

so perhaps there are some additional steps needed to make these
actually runnable from outside the development environment?

thanks,

Phil Jackson

Apr 23 '07 #1
5 6472
On 23 Apr 2007 07:01:10 -0700, PJ******@txfb-ins.com wrote:
>I have a number of SQL PL stored procedures (DB2 UDB 8.2 on Windows)
that were created in the DB2 Development Center. From there I can run
them just fine.

When I use another tool (WinSQL) and attempt to run while connected to
the same UDB database:
CALL TFBUDB.SMACF_DRIVER_INFO(21264682);
I get the following message:
SQL0444N Routine "*VER_INFO" (specific name "SQL070423085539400") is
implemented with code in
library or path "...DRIVER_INFO", function "TFBUDB.SMACF_DRIVER_INFO"
which cannot be accessed.
Reason code: "4". SQLSTATE=42724
The error given _Routine "*VER_INFO"_ is created temporarily by the
tool to execute the procedure for you. The SPECIFIC NAME is (most
likely) because the tool did not supply one, so DB2 uses the default,
which is a timestamp.
>
The SP is defined as:
CREATE PROCEDURE TFBUDB.SMACF_Driver_Info (IN Pol_Nbr Char(10)
,OUT ErrNo INTEGER
,OUT ErrMsg CHAR(80) )
RESULT SETS 1
NOT DETERMINISTIC
LANGUAGE SQL

so perhaps there are some additional steps needed to make these
actually runnable from outside the development environment?
IIRC, you need to execute "SET PATH TFBUDB, CURRENT PATH" and try
again.
B.
>
thanks,

Phil Jackson
Apr 23 '07 #2
When I look in the properties in DB2 Dev Center it shows Shcema as
TFBUDB, which looks correct.

When I look at the DDL in Quest, :
SET SCHEMA UTPSJ01 ;

SET CURRENT PATH = "SYSIBM","SYSFUN","SYSPROC","UTPSJ01";

It varies, depending who I am logged on as....I see otehr SPs remain
consant in this respect. Schema is always TFBUDB....
When I try to run the SP in Quest via its Script Runner tool it gets
a different error, SQL 0440N, SQLSTATE=42884.

Not sure that anyone has developed any DB2 SQL PL procedures since
they upgraded to 8.2, so perhaps something is not pointing to the
right place? Seems to run fine within the context of the DB2 Dev
Center though...

thanks,

Phil

On Apr 23, 9:32 am, Brian Tkatch <N/Awrote:>
The error given _Routine "*VER_INFO"_ is created temporarily by the
tool to execute the procedure for you. The SPECIFIC NAME is (most
likely) because the tool did not supply one, so DB2 uses the default,
which is a timestamp.
IIRC, you need to execute "SET PATH TFBUDB, CURRENT PATH" and try
again.
B.


thanks,
Phil Jackson- Hide quoted text -

- Show quoted text -

Apr 23 '07 #3
On Apr 23, 9:32 am, Brian Tkatch <N/Awrote:
On 23 Apr 2007 07:01:10 -0700, PJack...@txfb-ins.com wrote:
I have a number of SQL PL stored procedures (DB2 UDB 8.2 on Windows)
that were created in the DB2 Development Center. From there I can run
them just fine.
When I use another tool (WinSQL) and attempt to run while connected to
the same UDB database:
CALL TFBUDB.SMACF_DRIVER_INFO(21264682);
I get the following message:
SQL0444N Routine "*VER_INFO" (specific name "SQL070423085539400") is
implemented with code in
library or path "...DRIVER_INFO", function "TFBUDB.SMACF_DRIVER_INFO"
which cannot be accessed.
Reason code: "4". SQLSTATE=42724

The error given _Routine "*VER_INFO"_ is created temporarily by the
tool to execute the procedure for you. The SPECIFIC NAME is (most
likely) because the tool did not supply one, so DB2 uses the default,
which is a timestamp.
The SP is defined as:
CREATE PROCEDURE TFBUDB.SMACF_Driver_Info (IN Pol_Nbr Char(10)
,OUT ErrNo INTEGER
,OUT ErrMsg CHAR(80) )
RESULT SETS 1
NOT DETERMINISTIC
LANGUAGE SQL
so perhaps there are some additional steps needed to make these
actually runnable from outside the development environment?
The DB2 Dev center shows the schema for this SP to be TFBUDB.

In Quest, when I look at the DDL , it depends upon who I am logged in
as, as to what I see in these two lines:
SET SCHEMA UTPSJ01 ;
SET CURRENT PATH = "SYSIBM","SYSFUN","SYSPROC","UTPSJ01";
Other stored procedures consistantly show :SET SCHEMA TFBUDB;
and
SET CURRENT PATH = "SYSIBM","SYSFUN","SYSPROC","TFBUDB";

When I try to run the SP from the script runner tool, I get a
different error,
SQL0440n, SQLSTATE=42884

Strange that it runs fine in the context of the DB2 Dev Center!
IIRC, you need to execute "SET PATH TFBUDB, CURRENT PATH" and try
again.
B.


thanks,
Phil Jackson- Hide quoted text -

- Show quoted text -

Apr 23 '07 #4
Lew
I don't know if this may be having an affect but when I execute a
stored procedure from the unix command prompt I have to provide for
both inputs and outputs in the call statement. In your case the call
statement would be:

CALL TFBUDB.SMACF_DRIVER_INFO(21264682,?,?);


Apr 24 '07 #5
Interesting, as using those parameter markers works fine from Quest.
WinSWL, on the other hand does not like the parameter markers:
CLI0100E Wrong number of parameters. SQLSTATE=07001
CLI0125E Function sequence error. SQLSTATE=S1010
so that error i supose is actually bogus.

thanks!


On Apr 24, 3:47 pm, Lew <seth...@yahoo.comwrote:
I don't know if this may be having an affect but when I execute a
stored procedure from the unix command prompt I have to provide for
both inputs and outputs in the call statement. In your case the call
statement would be:

CALL TFBUDB.SMACF_DRIVER_INFO(21264682,?,?);

Apr 26 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jeremy | last post by:
Hi, I am having a problem running an sql stored procedure with ADO/ASP. If I hard code a select statement, the code works, but when I try to use a stored procedure it bombs. Here is my code: ...
1
by: Rittercorp | last post by:
I am debugging an app which blocks many processes in a SQL7 server DB. The app log writes every transaction "open" and "close". The weird thing is : when the app logfile says the transaction is...
2
by: Dino L. | last post by:
How can I run stored procedure (MSSQL) ?
5
by: MS | last post by:
Here's my simple stored procedure: ALTER PROCEDURE GetMemberIDByEmail @Email EmailAddress, @ID int OUTPUT AS SELECT @ID = ID FROM tbl_Member WHERE Email=@Email RETURN
12
by: Bill Nguyen | last post by:
What's the VB syntax to run the CR report using the following SP? I use CrystalreportViewer and ReportDocument. Thanks Bill Here's the SP in SQLserver 2K: CREATE proc mysp_ReportSubmission...
0
by: stand__sure | last post by:
Stepping into a stored procedure used to be fairly straight-forward, but after following the guidance in all 6 or so of the MSDN pages about enabling debugging of stored procedures in SQL Server...
7
by: Jerry | last post by:
I'm trying to execute a stored procedure in a loop while paging through database table records but the stored procedure isn't running. I get the folowing error: The component 'adodb.connection'...
0
by: eRTIS SQL | last post by:
hi, I want to use a stored procedure inside a stored procedure simulteanously changing the database. this is my base store procedure alter PROCEDURE create_file @dbname sysname AS declare...
4
by: nishi57 | last post by:
I hope I can get some help regarding this issue, which has been going on for a while. I have a desktop user who is having problem running "Stored Procedures". The DB2 Connect application works fine...
0
by: DR | last post by:
what are the memory caps for threads running as a CLR stored procedure executed by sql server 2005? is it limited by OS only or also by sql servers memory limits? e.g. lets say my clr stored...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.