473,320 Members | 2,012 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,320 software developers and data experts.

SQL select not working when starting program is a stored procedure.

2
Hello all,
I have a weird situation here. We are on an ISeries AS400. We have created an SQL table and can access it just fine when the COBOL program is called directly. The problem exists when the process is invoked with a stored procedure. The stored procedure calls a CL and then the COBOL program, but the SQL statement fails during this process.

Am I missing something, why does it work when the COBOL progam is invoked without using the stored procedure, but not when the stored procedure is the start of the process?

Here is a copy of the stored procedure.

DROP PROCEDURE SpInput; /* Old Store Procedure */
DROP PROCEDURE SpRate;

CREATE PROCEDURE SpRate (
InOut ChadWrk1_1 CHAR(32000),
InOut ChadWrk1_2 CHAR(32000),
InOut ChadWrk1_3 CHAR(32000),
InOut ChadWrk1_4 CHAR(32000),
InOut ChadWrk1_5 CHAR(32000),
InOut ChadWrk1_6 CHAR(7458),
OUT CHARINST_A CHAR(1420),
OUT CHARFEES_A CHAR(260),
OUT BALANCE DECIMAL(9,2))
LANGUAGE CL
SPECIFIC SpRate
NOT DETERMINISTIC
NO SQL
EXTERNAL NAME RATECL
PARAMETER STYLE GENERAL;
Sep 20 '07 #1
0 1700

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: serge | last post by:
Using "SELECT * " is a bad practice even when using a VIEW instead of a table? I have some stored procedures that are identical with the difference of one statement in the WHERE clause. If I...
4
by: nicholas | last post by:
I want to check if a userlogin already exists, so this is what i did...but it is not working and I just can't get it to work. Must be something stupid, but I don't see it ;-) (I don't get any...
7
by: Matt Jensen | last post by:
Howdy Fairly simple question I think, I presume the answer is no it can't be reused for 2 *SELECT* statements, but just hoping for clarification. Just asking in the interests of trying to minimise...
1
by: jamminc | last post by:
Hi All, I am currently developing a module where the user will input multiple items (as many as 20-600) and I am suppose to retrieve it from a sql database all the information and update it with...
3
by: Jim Andersen | last post by:
Just to let you know, and to help any future sorry sods who gets trapped in the same black hole...... You can't just copy/move a working sql-statement into a stored procedure. Working with a...
2
by: karups | last post by:
Hi, I've got listbox in my .aspx page where the users can make multiple selection. So, Users can select any number of items in listbox, I have to take value from items and pass it to stored...
2
by: =?Utf-8?B?VGVycnk=?= | last post by:
I have coded multiple select statements in a single stored procedure, and when I execute this procedure on SQL Server Management Express, I correctly get multiple result sets. But, if I try to add...
0
by: Richard Silvers | last post by:
Hi, I'm trying to find the most efficient way to access DB2 data on z/OS DB2 V8. Any suggestions would be welcomed . . . Situation: 1. Converting a VSAM file to DB2 on z/OS 2. VSAM file...
2
by: kxyz | last post by:
Hello everyone, I need help with a stored procedure or two. My stored procedures are supposed to check if a certain record exists. If it does exist, then I select everything from that row, as...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.