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



QCMDEXC is an API that has two parameters.



The first is a character string, the second a packed(15,5) number .



The first parameter contains the entire command you wish to execute. No parameter markers are allowed.



The second is the length of the contents of the first parameter.





I usually set up two variables:



d Cmd S 200

d CmdLen S 15 5



then populate the Cmd variable and its length:



cmd = 'runqry (RunQry Qry(*None) QryFile(' + %trim(libraryvariable) + '/' + %trim(QueryName) + ') RcdSlt( *Yes ) )';

cmdlen = %length(cmd);



callp QCMDEXC(cmd: cmdlen);





Steve Needles





-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of gio.cot
Sent: Thursday, May 15, 2014 10:30 AM
To: midrange-l@xxxxxxxxxxxx
Subject: How to call cmd runqry from RPG with QCMDEXEC



Hi

i would need to run from RPG the command runqry (RunQry Qry(*None)

QryFile(&l/&n) RcdSlt( *Yes ) ) via QCMDEXC, but i receive the error CPD0104 ; can some help me to avoid this problem ?



Thanks in advance



Gio



<http://www.code400.com/forum/editpost.php?p=75936&do=editpost> Edit / Delete





--

This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx<mailto:MIDRANGE-L@xxxxxxxxxxxx> To subscribe, unsubscribe, or change list options,

visit: http://lists.midrange.com/mailman/listinfo/midrange-l

or email: MIDRANGE-L-request@xxxxxxxxxxxx<mailto:MIDRANGE-L-request@xxxxxxxxxxxx> Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.



________________________________
This communication, including attachments, is confidential, may be subject to legal privileges, and is intended for the sole use of the addressee. Any use, duplication, disclosure or dissemination of this communication, other than by the addressee, is prohibited. If you have received this communication in error, please notify the sender immediately and delete or destroy this communication and all copies.

TRVDiscDefault::1201

As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.