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



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


    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 11:00 AM
Please respond to
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>


To
"Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
cc

Subject
"call qcmdexc parm('CLRPFM ABC' 10.00000)" in an SQL script?






I am attempting to clear several files at the top of an SQL script that
later populates those files.  (I would prefer to not use SQL's DELETE to
"clear" the file.)

I know that SQL supports calling programs with no parameters.  In a crude
test, I was able to prove that it is possible to pass parameters, as long 
as
they are specified in hexidecimal format, i.e., CALL ABC (x'C1').  Is 
there
a way to do this without mucking up the SQL script?  The SQL Reference and
Programming Guide don't offer much, although the programming guide gave an
obscure example of calling a program from a C program.

TIA,
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.