Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Stored SQL procedure problems

307 views
Skip to first unread message

Dave Neuer

unread,
Sep 23, 1998, 3:00:00 AM9/23/98
to
I'm trying to create a stored procedure entirely in SQL on our new 170
(V4R2) for use with a Net.Data macro. I'm issuing my "create procedure"
statement from our Unix webserver using IBM's AS/400 Toolbox for Java JDBC
classes.

However, I get "SQL7032: Stored procedure _ in _ not created" errors
(where the blanks are the names of the procedure and the library,
respectively); no other errors. Needless to say, I cannot find any
*useful* information on this error and/or its potential causes.

All other freeform SQL statements work fine. We don't have the SQL
Development Kit installed (yet). Could this be the reason that it won't
create the stored procedure?

The reason why I'm doing it this way is that I have a web development
(Mac/Unix, Perl & java) background, so I'm not going to be able to quickly
or easily implement this some other way (i.e. with RPG or REXX stored
procedures; we don't have the SQL Development Kit to compile embedded SQL
apps yet anyway).

Anyone know why this isn't working?

Thanks,
Dave Neuer
LDR Webmaster

Charles R. Pence

unread,
Sep 23, 1998, 3:00:00 AM9/23/98
to
Dave Neuer wrote:
>
> I'm trying to create a stored procedure entirely in SQL on our new 170
> (V4R2) for use with a Net.Data macro. I'm issuing my "create procedure"
> statement from our Unix webserver using IBM's AS/400 Toolbox for Java JDBC
> classes.
>
> However, I get "SQL7032: Stored procedure _ in _ not created" errors
> (where the blanks are the names of the procedure and the library,
> respectively); no other errors. Needless to say, I cannot find any
> *useful* information on this error and/or its potential causes.
> <<SNIP>>

On the AS/400 request: WRKMSGD SQL7032 QSQLMSG
Use 5=Display Message <text>; cause & recovery will be stated.
FYI: This condition is: ILE C/400 is not installed.
FWiW: I'd expect that 5769ST1 may also be required for the CREATE

Regards, Chuck
-- Comments provided "as is" with no warranties of any kind whatsoever.

Kent Milligan

unread,
Sep 23, 1998, 3:00:00 AM9/23/98
to
The DB2 for AS/400 SQL Development Kit & ILE C compiler are needed on the
system where you're creating your SQL stored procedures.


--
Kent Milligan, DB2/400 Solutions Team
AS/400 Partners In Development
km...@us.ibm.com
GO HAWKEYES!!
(opinions stated are not necessarily those of my employer)

Dave Neuer

unread,
Sep 23, 1998, 3:00:00 AM9/23/98
to

You need the ILE C compiler to use SQL-only stored procedures? That
doesn't seem to make sense; I'm not embedding the SQL statements in C, and
the SQL Reference for V4R2 says that it's possible to have SQL-only stored
procedures.

Does it compile the query to the native DB2 API's?

Dave Neuer
LDR Webmaster

Edmund To

unread,
Sep 24, 1998, 3:00:00 AM9/24/98
to
As quoted from DB2 for AS/400 SQL Reference ...

When an SQL procedure is created, SQL creates a temporary source file that
will
contain C source code with embedded SQL statements. A program object is then

created using the CRTSQLCI and CRTPGM commands. The options used to
create the program are the options that are in effect at the time the CREATE

PROCEDURE statement is executed. The DB2 Query Manager and SQL
Development Kit and ILE C products must be installed on the system when the
SQL procedure is created.

SQL-only stored procedures are new to V4R2 and you are already very lucky
becuase if you are
using V4R1 or lower, you do require to code the stored procedure in C or in
other language.

tho...@inorbit.com

unread,
Sep 24, 1998, 3:00:00 AM9/24/98
to
Dave:

Welcome to the AS/400, IBM-style. <g>

You're asking questions that a LOT of AS/400 sites would like answered.

Tom Liotta

In article <daven-23099...@208.8.190.31>,


da...@ldr.com (Dave Neuer) wrote:
> In article <6ubiuh$1bvo$1...@news.rchland.ibm.com>, km...@vnet.ibm.com wrote:
>
> > The DB2 for AS/400 SQL Development Kit & ILE C compiler are needed on the
> > system where you're creating your SQL stored procedures.
> >
> >
> > --
> > Kent Milligan, DB2/400 Solutions Team
> > AS/400 Partners In Development
> > km...@us.ibm.com
> > GO HAWKEYES!!
> > (opinions stated are not necessarily those of my employer)
>
> You need the ILE C compiler to use SQL-only stored procedures? That
> doesn't seem to make sense; I'm not embedding the SQL statements in C, and
> the SQL Reference for V4R2 says that it's possible to have SQL-only stored
> procedures.
>
> Does it compile the query to the native DB2 API's?
>
> Dave Neuer
> LDR Webmaster
>

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum

Dave Neuer

unread,
Sep 25, 1998, 3:00:00 AM9/25/98
to
In article <6ucfsa$29b$1...@nnrp1.dejanews.com>, tho...@inorbit.com wrote:

> Dave:
>
> Welcome to the AS/400, IBM-style. <g>
>
> You're asking questions that a LOT of AS/400 sites would like answered.
>
> Tom Liotta

Yes, I'm running into what our DBA and I are starting to refer to as the
"Domino Effect"; buy an IBM product, only to find out that you need to buy
4 more IBM products for it to work.

I think it's amusing that IBM, in the SQL Reference and the DRDA
Reference, among other places, chimes the mantra that "SQL is the standard
language for accessing data" in the AS/400's integrated dabase. However,
in order to use this "standard", you have to shell out thousands of $'s
for more IBM products. If it's the "standard language" for data access,
gee ... maybe it should be included in the cost of the machine or OS.

This is a perfect example of what irritates me about IBM. They have a
pretty amazing product in the AS/400, but using turns out to be
frustrating at every corner with the poor documentation, and they way IBM
forces you into ever escalating expenditures just to accomplish what you
thought was the main functionality of the product.

Sigh.

Dave Neuer

Tim

unread,
Sep 25, 1998, 3:00:00 AM9/25/98
to
Here's another limitation that pisses me off...

Stored procedures SQL or non-SQL can return a result set (open a cursor).
But to do this requires embedded SQL precompilers (SQL/400) not only the
machine that develops the stored procedure but also on the machine that runs
the stored procedure.

The run-time support is not included in the base OS.

Talk about frustrating.


Dave Neuer wrote in message ...

Kent Milligan

unread,
Sep 28, 1998, 3:00:00 AM9/28/98
to
I'm not aware of this limitation, please explain in detail.
The runtime support is in the base OS, it's the precompilers
that are a separate product. For sure, you only need precompilers
on one of your AS/400s.

Tim

unread,
Sep 29, 1998, 3:00:00 AM9/29/98
to
According to Rochester Support in order to use result sets returned by a
stored procedures you not only have embedded SQL to develop the application,
you must also have SQL/400 to run the procedure.

They told me this while I was researching a problem with stored procedures
and ODBC. When they told me this I dropped futher search into this.

I am interested in the definitive answer to this myself


Kent Milligan wrote in message <6uo630$148o$1...@news.rchland.ibm.com>...

Kent Milligan

unread,
Oct 2, 1998, 3:00:00 AM10/2/98
to
This doesn't make any sense. If you know the name of the Rochester
Support person please email it to me because the information they
passed along is in error according to some other people that I bounced
this off of.
0 new messages