MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » May 2014

Re: How to call cmd runqry from RPG with QCMDEXEC



fixed

On 5/16/2014 11:42 AM, gio.cot via MIDRANGE-L wrote:
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.

OK, so that's not QCMDEXEC. It is the System/38 version. Try QCMDEXC
instead.

How did you find an example for QCAEXC? It is very, very old. Here is
an article from 2004 explaining the difference:
http://forums.iprodeveloper.com/forums/aft/37466

When you search the web for examples, don't use searches like "as400" or
"iseries" because you will find some very old stuff out there - stuff so
old that it is not useful. The current manuals are at:
http://www-01.ibm.com/support/knowledgecenter/ssw_ibm_i/welcome
--buck





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact