How long is your &CMDSTR variable and what are you putting in &CMDLEN?
Do you get any error messages in the joblog when it doesn't work?
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Branston DiBrell
Sent: Friday, January 10, 2014 4:48 PM
Subject: How come I can't use a single OVRPRTF?
I'm having a problem getting OVRPRTF to work in the following instance:
CHGVAR VAR(&CMDSTR) VALUE('OVRPRTF' *BCAT &PS)
CALL PGM(QCMDEXC) PARM(&CMDSTR &CMDLEN)
EXCSQLSTM SQLSTM('Select * from DFLADIFF') OUTPUT(*PRINT)
Value of &PS: FILE(QPQXPRTF) TOFILE(PRTLSTK) DEV(WRKPRT3) MULTIUP(1)
DUPLEX(*YES) OUTQ(WRKPRT3) COPIES(1) PAGERANGE(1 *END) HOLD(*YES)
DRAWER(2) FORMTYPE('test form')
Also, the EXCSQLSTM command uses STRQMQRY to run the SQL statement.
What happens is, my output doesn't get put on hold and doesn't get
Is does get printed on the WRKPRT3 printer (which is how the PRTLSTK
defined). I tried adding OVRSCOPE(*JOB) to the OVRPRTF command - that
didn't work. I also tried running each command interactively from the
command line - that didn't work either.
What DID work is when I separated the OVRPRTF command into two OVRPRTF
ovrprtf FILE(QPQXPRTF) TOFILE(PRTLSTK)
ovrprtf FILE(PRTLSTK) DEV(WRKPRT3) MULTIUP(1) DUPLEX(*YES) OUTQ(WRKPRT3)
COPIES(1) PAGERANGE(1 *END) HOLD(*YES) SAVE(*YES) DRAWER(2)
My Question is: How come I can't use a single OVRPRTF?
-Branston DiBrell, Jr - b.dibrell@xxxxxxxxxxxxxxxxxx
Peerless Tires, IT Department, Denver CO - 720-274-0632