× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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 thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.