STRPDM.COM                  

   Home    |    IBM Manuals Direct    |    iBytes Library   |    Links    |   About     |   Book Store   |  On-Line Code

 

iByte

Subject – Jazzing up AS/400 reports using installed fonts.

    Understanding the components of fonts on the AS/400 is somewhat of a mystery and I have yet to find a good definition of things like FNTCHRSET, CDEFNT, and CDEPAG.  The process of  using installed fonts however is pretty simple.  

Basic setup.....

First check to see what fonts are available.  To do this type the command WRKFNTRSC FNTRSC(*ALL/*ALL).

    Everything with an attribute of FNTCHRSET is an available font.  

To use the installed fonts we must use an external print file.

   Create or Override the print file with the following.

                                      OVRPRTF    FILE(MYFILE) TOFILE(*LIBL/MYFILE) +  
                           DEVTYPE(*AFPDS) CDEFNT(*FNTCHRSET)

Add the FNTCHRSET keyword to the DDS.  In the example below C0D0GT26 is the installed font we are using.  T1D0BASE is a generic code page.  If you are asking what a code page is it beats the heck out of me.  I experimented with different code pages and generally received identical output, or some unidentifiable output.   

                            01'ABCabc123' SPACEB(3)    
                                  FNTCHRSET(*LIBL/C0D0GT26 *LIBL/T1D0-
                                  BASE)     

Remember that the fonts will not display in your SPLF.  You must print your report to actually see the result.                         

Information from IBM - AS/400 Fonts Information, FNTCHRSET Keyword, WRKFNTRSC Keyword