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



I did not see this posted yet on the correct group\list, so I will respond here.

I do not think this is a problem with quoting; the logged CL request from the CLP should /look just like/ what was specified on a command line for a successful invocation. In this case, the QMQRY source was compiled referencing &fromdate, *however* the SETVAR() is passing a literal assignment for the variable &FROMDATE. Recreate the QMQRY from source which has changed to use\name the variable name &FROMDATE instead of &fromdate, and try the CLP again.

http://www.google.com/search?hl=en&q=qmqry+upper+case+variable+name+v5r4
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/books/sc415703.pdf

Regards, Chuck

Rowe, Sheri wrote:

I have converted a QUERY/400 query to QM, so that I can pass 2 parms
to it. The QM is fine and I can run it on-line successfully, it
prompts for the fields I want and I enter them successfully. My
problem is I am trying to run it in batch, so that is can be run
through our job scheduler, and it fails. I have fiddled with
changing the parms to be numeric but it still didn't work. After a
day and ½ of testing I am exasperated, as I know the solution must be
very simple.

Here is my CL

<<SNIP>>

STRQMQRY QMQRY(ZROYIRON) QMFORM(ZROYIRON) +
DATETIME(*NO) PAGNBR(*NO) ALWQRYDFN(*yes) +
SETVAR((FROMDATE &QRYFROM) (TODATE &QRYTO))

<<SNIP>>

Here is my submit statement:

SBMJOB CMD(CALL PGM(RUNZROYIRN) PARM('080101' '081231'))


Here is the error log I get.

Message . . . . : -CALL PGM(RUNZROYIRN) PARM('080101' '081231') 01/09/09 12:36:04.266408 QCADRV QSYS 03AE
RUNZROYIRN SROWE

Message . . . . : 2700 - STRQMQRY QMQRY(ZROYIRON)
QMFORM(ZROYIRON) DATETIME(*NO) PAGNBR(*NO) ALWQRYDFN(*YES)
SETVAR((FROMDATE '''080101''') (TODATE '''081231'''))

20 01/09/09 12:36:04.369792 QQXSRV01 QSYS *STMT
QQXSRV01 From module . . . . . . . . : QQXCPIMESS From procedure .
. . . . . : QQxCPIMessage__SendMessage Statement . . . . . . . . .
: 16 To module . . . . . . . . . : QQXCPISTRI To procedure . . .
. . . . : QQxCPIString__ResolveSingleVar Statement . . . . . . . .
. : 37 Message . . . . : Global variable prompting is not allowed
in batch mode. Cause . . . . . : You tried to use the variable "fromdate " before it was set. Prompting for
variables cannot be done in batch mode. Recovery . . . : If you
are using the STRQMQRY command you can set variable "fromdate
" by using the SETVAR keyword. <<SNIP>>

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.