QCAEXEC and QCMEXC are not the same.
As I recall, QCAEXEC is the S/38 compatible version of QCMEXC. As such, its command structure is different...it expects a command formatted like a S/38.
S/38 uses the period (.) as the delimiter between library and object name. IBMi uses the slash (/).
Change the qualified query to use a period rather than a slash.
RUNQRY QRY(QGPL.QCUST) RCDSLT(*YES) <- compatible with QCAEXEC
Vs.
RUNQRY QRY(QGPL/QCUST) RCDSLT(*YES) <- compatible with QCMDEXC
Steve Needles
-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of gio.cot via MIDRANGE-L
Sent: Friday, May 16, 2014 10:43 AM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: How to call cmd runqry from RPG with QCMDEXEC
Hi
here my problem with an example :
E M 1 2 80
C*
C Z-ADD80 LUNG 155
*
C CALL 'QCAEXEC'
C PARM M,1
C PARM LUNG
*
C CALL 'QCAEXEC'
C PARM M,2
C PARM LUNG
*
C SETON LR
**
RUNQRY QRY(QCUST) RCDSLT(*YES)
RUNQRY QRY(QGPL/QCUST) RCDSLT(*YES)
the first CALL QCAEXEC run fine, the second go on thi error: ( the RUNQRY with library name seem is not allowed !!??)
ID message. . . . . : CPD0104
Date ............. . . . : 16/05/14 time . . . . : 17:29:16
Message. . . : Expression not allowed for the parameter QRY.
Cause. . . . . : The expressions are allowed only a program CL. The
expressions cannot interactively be performed in a flow of
immission batch, from the program of the applications using the key F4 or
using
an automatic application from a program CL.
Correction. . . : To introduce a valid value for this parameter. For
further information on the parameters and the expressions, to consult the
manual
CL Reference.
<
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 To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: 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.