By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
You can see that you can use different fonts for the same field in a printer file by specifying one font at the record level and another at the field level, conditioned by indicators. If neither font is activated (i.e. its conditioning indicators prevent them), the font specified in the CRTPRTF command is used -- so you can have three fonts for the same field, if you want. But you can't specify the FONT keyword more than once at field or record level.
You can change the point size of scaleable fonts using FONT(nnnn (*POINTSIZE(zz)), where nnnn is the font number of a scaleable font supported by your printer and zz is the point size. Or you can use the CHRSIZ keyword to scale most fonts.
From V5R2, you can use program-to-system fields as parameters for the FONT and POINTSIZE keywords. This allows your program greater control.
The CHRSIZ keyword works for printer files where the DEVTYPE is *IPDS or *AFPDS; the actual printer must be an IPDS device.
Now, there are so many variables involved in fonts that it is almost impossible to predict the spacing and effects you will get when you start mixing them together. You can only start with a guess, and refine the start positions and line spacing until you get what you want. So be prepared to recompile your PRTF over and over again, and print full-field test data in all fields to see what they will look like.
As to the available fonts, this depends so much on the actual hardware involved - i.e., which printer. You can get a list of the fonts in the system from the CL Reference manual appendix B, but not all of these fonts are scaleable, and not all are supported on all printers. Again, it's a matter of testing, unless you have access to all the relevant manuals and lots of time to read them.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
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.
Dig Deeper on iSeries COBOL programming
Related Q&A from John Blenkinsop
When an error occurs on an IBM command, the diagnostic messages are sent first, then an escape message, which you can monitor. On AS/400 you see the ...continue reading
Learn how to 'append data to the file' with the FTP DIR command, and eliminate the hassle of having to end the FTP session and restart to view ...continue reading
RPGIV will 'think of' incoming integer fields as binary, and then will redefine them in the program structures as PACKED. So, when you chain a record...continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.