473,395 Members | 1,938 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,395 software developers and data experts.

Calling an SP from RPG Using SQL CLI

We have a stored procedure that returns a result set. We call this
stored procedure from an RPG program using SQL CLI. The first call is
successful and we can fetch rows, etc. The RPG program ends with
*INLR set on. The second time the program is called and the stored
procedure is executed, the stored procedure bombs before it can return
the cursor to the result set.

In the job log we see:

Space offset X'00000000' or teraspace offset X'0000000000000000' is
outside current limit for object SQLDA TEMP SPACE00000017.

The stored procedure creates a temporary table named "TEMP" in QTEMP.
It returns a cursor to this table with:

DECLARE C2 CURSOR WITH RETURN FOR
SELECT *
FROM QTEMP.TEMP;

In the job log we see this for the first successful call:

1 rows inserted in TEMP in QTEMP.
ODP reused.
ODP not deleted.
SET statement complete.
Row not found for C1.
ODP deleted.
Cursor C1 closed.
Unable to retrieve query options file.
**** Starting optimizer debug message for query .
Unable to retrieve query options file.
**** Starting optimizer debug message for query .
The OS/400 Query access plan has been rebuilt.
Unable to retrieve query options file.
Arrival sequence access was used for file TEMP.
**** Ending debug message for query .
ODP created.
Blocking used for query.
Cursor C2 opened.
1 result sets are available from procedure PAS001 in PRDELIB.
1 rows fetched from cursor *N.
1 rows fetched from cursor *N.
Row not found for *N.
Row not found for *N.
ODP not deleted.
Cursor *N closed.
SQL cursors closed.

and this for the 2nd attempt (the stored procedure dies before it can
return the result set, even though table TEMP has been filled):

1 rows inserted in TEMP in QTEMP.
ODP reused.
ODP not deleted.
SET statement complete.
Row not found for C1.
Space offset X'00000000' or teraspace offset X'0000000000000000' is
outside current limit for object SQLDA TEMP SPACE00000017.

Any help with this issue would be appreciated.
Nov 12 '05 #1
2 6808
Dan Flynn wrote:
We have a stored procedure that returns a result set. We call this
stored procedure from an RPG program using SQL CLI. The first call is
successful and we can fetch rows, etc. The RPG program ends with
*INLR set on. The second time the program is called and the stored
procedure is executed, the stored procedure bombs before it can return
the cursor to the result set.

In the job log we see:

Space offset X'00000000' or teraspace offset X'0000000000000000' is
outside current limit for object SQLDA TEMP SPACE00000017.
<snip>
Any help with this issue would be appreciated.


Best option is probably working with your IBM service provider.
Information that would be helpful:
-> What is the "To program" for the "Space offset.." exception
(MCH0601?) message?
-> Is the application running in "server mode"?
http://www-1.ibm.com/servers/eserver...q.htm#header_3
http://publib.boulder.ibm.com/iserie...zadpmst119.htm
-> If possible, a CLI trace.

--
Karl Hanson
Nov 12 '05 #2
Dan Flynn wrote:
We have a stored procedure that returns a result set. We call this
stored procedure from an RPG program using SQL CLI. The first call is
successful and we can fetch rows, etc. The RPG program ends with
*INLR set on. The second time the program is called and the stored
procedure is executed, the stored procedure bombs before it can return
the cursor to the result set.

In the job log we see:

Space offset X'00000000' or teraspace offset X'0000000000000000' is
outside current limit for object SQLDA TEMP SPACE00000017.
<snip>
Any help with this issue would be appreciated.


Best option is probably working with your IBM service provider.
Information that would be helpful:
-> What is the "To program" for the "Space offset.." exception
(MCH0601?) message?
-> Is the application running in "server mode"?
http://www-1.ibm.com/servers/eserver...q.htm#header_3
http://publib.boulder.ibm.com/iserie...zadpmst119.htm
-> If possible, a CLI trace.

--
Karl Hanson
Nov 12 '05 #3

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

Similar topics

30
by: Tim Marshall | last post by:
Here's the scenario, A2003, Jet back end, illustrated with some cut down code at the end of the post: A proc dims a snapshot recordset (dim rst as Dao.recordset) and opens it. There are several...
1
by: Jesse McGrew | last post by:
Hi all, I'm trying to make a plugin DLL for a third-party application, using VC++ .NET 2003. This DLL acts as a bridge between the C++ plugin API of the application, and my actual plugin code...
5
by: Nick Flandry | last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my development environment (Win2K server running IIS 5) and a test environment (also Win2K server running IIS...
1
by: desmcc | last post by:
Hi, I am launching a modal dialog through the usual javascript (window.showmodaldialog). When the modal dialog is complete (ie user selects OK), the calling page then refreshes itself by setting...
1
by: Lakshmi | last post by:
Hi All, I am having performance issues with the .NET client calling the Java Webservice running on axis. Have detailed the problem below. Please help. I wrote a webservice in Java. Lets name...
12
by: Ron | last post by:
Greetings, I am trying to understand the rational for Raising Events instead of just calling a sub. Could someone explain the difference between the following 2 scenarios? Why would I want to...
11
by: briankirkpatrick | last post by:
Forgive me if my post seems a little amateurish... I'm requesting assistance from some of you smart folks out there to get the managed calls write that meet the specification in the esa.h for...
15
by: =?Utf-8?B?VG9tIENvcmNvcmFu?= | last post by:
I've been led to believe by several articles, particularly Eric Gunnerson's C# Calling Code Dynamically, that calling a method dynamically through Reflection was much slower than through a...
16
by: teju | last post by:
hi, i am trying 2 merge 2 projects into one project.One project is using c language and the other one is using c++ code. both are working very fine independently.But now i need to merge both...
7
by: =?Utf-8?B?UVNJRGV2ZWxvcGVy?= | last post by:
I have a C# logging assembly with a static constructor and methods that is called from another C# Assembly that is used as a COM interface for a VB6 Application. Ideally I need to build a file...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.