PSF for z/OS: User's Guide
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF


Using table reference characters to select fonts

PSF for z/OS: User's Guide
S550-0435-04

Using table reference characters to select fonts

You can use TRCs in traditional line data records to select the font to be used in printing full lines or text in a line. To select fonts for full lines, code a TRC in each output data line. When traditional line data contains both CC characters and TRCs, the CC character precedes the TRC, as in Figure 31. The TRC (0, 1, 2, or 3) selects the font corresponding to the order in which you specified the font names with the JCL CHARS parameter.

You can also code TRCs that correspond to font names specified in a font list defined for the page definition. When coding TRCs, your COPYGROUP must reference FOCA fonts only or TrueType and OpenType fonts only. You cannot have a mixture of both types of fonts. Although you can specify 128 fonts in a page definition, the printer can allow fewer fonts per page than that.

Examples of selecting fonts with TRCs

  1. This example shows how to use TRCs to specify fonts in line data. The example uses column 1 for the CC character and column 2 for the TRC (0, 1, 2, or 3).
    12This line should print in a bold font.
     1This is a normal print line.
  2. This example creates printing resources by using the PPFA PAGEDEF TRCREF command. Values different from the default values are specified in the DIRECTION and ROTATION subcommands of the TRCREF command.
    Page definition source code example:
    
    SETUNITS LINESP 8 LPI;
     
    FORMDEF rhdr (form definition name)
      REPLACE yes
      OFFSET .5 in .5 in
       DUPLEX NORMAL;
     
    PAGEDEF rhdr (page definition name)
     
       WIDTH 8.5 IN
       HEIGHT 10.0 IN
       LINEONE 1.0 IN 1.0 IN
       DIRECTION ACROSS
       REPLACE YES;
     
       FONT normal 70D0 ROTATION 0;
       FONT heading 60D8 ;
     
       PAGEFORMAT rhdr;
     
          TRCREF 1 FONT normal;
          TRCREF 2 FONT heading DIRECTION DOWN ROTATION 270 ;
     
          PRINTLINE CHANNEL 1
             POSITION 8.0 IN 1.0 IN
             DIRECTION DOWN;
     
          PRINTLINE
             POSITION MARGIN 2.0 IN
             DIRECTION ACROSS
             REPEAT 60;
    
    Input for page definition code example:
    ===========================================================
    
    12Chapter 1 should be printed in font 60D8.                         
     1This is a normal print line and should be printed in font 70D0.   
     1
     1Some normal text for illustration, chapter 1.
    12Chapter 2 should be printed in font 60D8.
     1This is a normal print line and should be printed in font 70D0.
     1
     1Some normal text for illustration, chapter 2.
    
    ===========================================================
  3. This example uses the TRC parameter in the OUTPUT statement to specify that the traditional line data set contains TRCs:
       //OUT2 OUTPUT CHARS=(60D8,60D0),TRC=YES
       //DD2 DD SYSOUT=A,OUTPUT=*.OUT2
  4. This example uses the DCB subparameter of the DD statement to specify that the data set contains TRCs:
       //OUT2 OUTPUT CHARS=(60D8, 60D0)
       //DD2 DD SYSOUT=A,OUTPUT=*.OUT2,DCB=OPTCD=J
    The order in which the fonts are specified in the CHARS parameter establishes which number is assigned to each associated TRC. For example, the reference characters for the fonts in this example are 0 for the first font name listed and 1 for second font name.

Rules for coding table reference characters

PSF uses the TRC from the output line to select a font. When you are coding a TRC in an output data line, remember these rules:

  • For TRCs corresponding to font names specified in the CHARS parameter:
    • The valid TRCs are 0, 1, 2, and 3 and are called compatibility TRCs because they are compatible with the 3800 Model 1 printer. PSF ignores the left-most four bits of the TRCs. Thus, X'F0' and X'00' are both valid representations for zero.
    • A TRC that refers to a font with a number higher than the number loaded by use of the CHARS parameter defaults to 0. For example, if two fonts are specified with CHARS, a TRC of 2 (referring to a third font) defaults to 0 and selects the first font specified. A number that is not valid, such as 4, also defaults to 0.
  • For TRCs corresponding to font names specified in a page definition:
    • Valid TRCs are from 0 to 127, inclusive. If four or fewer fonts are specified, they are treated as compatibility TRCs, and the left-most four bits of the TRC are ignored. In this case, X'F0' and X'00' are both valid representations for 0. If more than four fonts are specified, PSF treats them the same as non-compatibility TRCs and reads all eight bits. In this case, X'00' is 0, but X'F0' is decimal 240.
    • A TRC that refers to a font with a number higher than the number of fonts specified in the page definition defaults to the first font in the page definition.
    • A TRC of 0 selects the first font defined in the page definition.
    • A TRC higher than 127 selects the first font defined in the page definition.
  • If both TRC=NO and DCB=OPTCD=J are specified, PSF ignores the TRC=NO parameter and expects the line data to contain multiple fonts.
  • If TRC=YES or DCB=OPTCD=J is specified, but the data set contains no TRCs, the first character of each line (or the second character if carriage control characters are used) is interpreted as the font identifier. Consequently, the font used to print each line of the data set might not be the one you expect.
  • If you do not specify TRC=YES or DCB=OPTCD=J in the JCL, but your line data contains a TRC as the first character of each line (or the second character if carriage control characters are used), the TRC is not used as a font identifier, but is printed as a text character.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014