Either way, you must perform an override command before you open the printer file in your program. You can do this either by running the OVRPRTF command before you call the program, or you can use QCMDEXC to execute the command from inside your program BEFORE you explicitly open the printer file.
The OVRPRTF command will look like this:
OVRPRTF QSYSPRT *FILE PAGESIZE(066 190) CPI(15) or if the file has another name in your program (e.g. MYFILE):
OVRPRTF MYFILE QSYSPRT PAGESIZE(066 190) CPI(15)
You can also add the parameters USRDTA('Some text') and/or SPLFNAME(NEW_NAME) -- these will make it easy to recognize the spooled file when it has been created by your program.
================================== MORE INFORMATION ON THIS TOPIC ==================================
Visit the ITKnowledge Exchange and get answers to your developing questions fast.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.
This was first published in May 2005