In a CL program I have the following OVRPRTF command
OVRPRTF FILE(BSPP460) TOFILE(BSPP460) PAGESIZE(80 + 80) LPI(6) CPI(10) PAGRTT(0) SPOOL(*YES) + OUTQ(&RVIOUTQ) USRDTA(BSPR460) + SPLFNAME(BSPP460) OVRSCOPE(*CALLLVL) .
When the CL is called or submitted from a command line, the OVRPRTF works.
The CL is new and is called from another CL, that is part of a job stream that has been submitted to batch. When it is called in this manner. The OVRPRTF does not work.
The file used to create the print file is cleared at the end of the job stream, so it can not be a separate job .