|
I am not sure why it cannot be saved/restored - probably because of QSYS
thing.
External procedures are registered in system catalog files - there is no
object needed.
They can be deleted via DROP PROCEDURE statement.
Note that RUNSQLSTM sensitivity to warnings can be controlled via ERRLVL
parameter.
Alexei
Disclaimer: this message represents only my personal opinion.
"We have every reason to assume that our assumptions are not without
reason".
Dan <dan27649@xxxxxxxxx>
Sent by: midrange-l-bounces@xxxxxxxxxxxx
10/23/2006 12:42 PM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
To
"Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
cc
Subject
Re: "call qcmdexc parm('CLRPFM ABC' 10.00000)" in an SQL script?
On 10/23/06, Alexei Pytel <pytel@xxxxxxxxxx> wrote:
What I usually do is to create external stored procedure for the program
I
need to call. This allows me to specify parameter types and then SQL CALL statement
can
correctly pass parameters.
For example, this is stored procedure for QCMDEXC:
create procedure qgpl/cmdcall
( in cmd char(4096),
in cmdlen dec(15,5) )
language CL parameter style general
not deterministic no sql not fenced
program type main
external name QSYS/QCMDEXC
Wow, a lotta stuff in there to do something seemingly so simple! When I ran this from RUNSQLSTM, I got SQL7909 "Routine SP_QCMDEXC was created, but cannot be saved and restored." (I used sp_qCmdExc instead of cmdcall.) What gives with that? Is it because of "-- The external program schema is QSYS."? (from the message help) Where are stored procedures "stored"? WRKOBJ on SP_QCMDEXC doesn't show anything. How does one delete a stored procedure? In any case, I got it to work. Thanks! Dan
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.