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