75 pts.
 AS400 query print landscape/legal?
How do you get Query to print in landscape on legal sized paper? I tried adjusting the paper size but that didn't seem to help.

Software/Hardware used:
AS400
ASKED: September 24, 2009  4:35 PM
UPDATED: March 15, 2012  2:07 AM

Answer Wiki:
You can create a PRTF with all the specifications for your output: OUTQ, FONT, #characters per line, etc. Then change your QRYDFN to use that file or do an OVRPRTF before you run your query. Or you can change the Form Size in the Query, to the width you need.
Last Wiki Answer Submitted:  September 24, 2009  5:49 pm  by  CharlieBrowne   32,825 pts.
All Answer Wiki Contributors:  CharlieBrowne   32,825 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Thanks, but the query is going to be run interactively over existing files, so I won’t have any input into the file format the query runs over. I did try the form size option, but it still wouldn’t go landscape on legal.

 75 pts.

 

If you are doing a RUNQRY command, you can prompt on that and set your Printer file specs

 32,825 pts.

 

The runqry command has the same options as the Query itself, so there was no way to indicate legal size paper to print on. I found a work-around by sending it to the spoolfile, and from there to set the drawer # on the printer. That forced it to go to legal size paper when printing. It’s not pretty but it got the job done.
Thanks for the help.

 75 pts.

 

If I need to print a query on different size paper, I put the query into a CL program and include the page layout in the program

E.g.
PGM

/* MONITOR FOR ALL ERRORS */
             MONMSG     MSGID(CPF0000)

/* SUBMIT QRYS TO PRINT Plan Volume Report */
             OVRPRTF    FILE(QPQUPRFIL) PAGESIZE(70 150) CPI(13.3) +
                          OVRFLW(69) OUTQ(QUSRSYS/PRT01) FORMTYPE(*STD) +
                          HOLD(*NO) SAVE(*YES) USRDTA(AUTUMN)

             RUNQRY     QRY(QRYPROGS/DAY36A)

             DLTOVR     FILE(*ALL)

ENDPGM                     

Hope this helps

 230 pts.

 

If I had found this earlier I would not have dried up my ink cartridges running test after test to try and do it right. Thank you for the information, you saved my day.

 70 pts.