How the AFP Reblocking Program works

To reblock AFP file data, you use the AFRREBLK command, which specifies an input data set or a z/OS® File System (zFS/HFS) file and, optionally, an output data set. If the output data set is not specified on the AFRREBLK command, the reblocking program determines the type of AFP object that is to be reblocked, such as overlay or object container, and then creates a reblocked data set in one of these ways:
  • The reblocking program uses the AFRREBLK profile to select the data set name for the AFP object type. For example, this line in the AFRREBLK profile (see Figure 1),
    Doc240 userid().afrreblk.doc240                 /* 240 pel Document Names     */
    indicates that when a document formatted for a 240 pel resolution printer is encountered, the reblocked file becomes a member of the partitioned data set userid.afrreblk.doc240, where userid is your user ID. Therefore, when AFRREBLK reblocks the input data set userid.GRTNOVEL.UPLD, it recognizes the file as a 240-pel document from fields in the AFP data and changes its name, according to the AFRREBLK profile, to userid.afrreblk.doc240(GRTNOVEL). The second qualifier of the input data set, GRTNOVEL, becomes the member name of the output data set.
    The profile can also specify a sequential data set by using only one qualifier. For example, if the profile specifies:
    Doc240 doc240                    /* 240 pel Document Names   */
    the file that is reblocked is renamed userid.dsname.DOC240, where dsname is the second qualifier of the input data set. Therefore, the input data set, userid.GRTNOVEL.UPLD, is reblocked with the name userid.GRTNOVEL.DOC240.
  • If no profile exists or if no data set can be determined from the profile, the reblocking program allocates a sequential output data set with a first qualifier of your user ID, the same second qualifier as the input data set, and a third qualifier determined by the AFP object type. For example:
    userid.dsname.objtype
    Table 1 shows the third qualifier values that the reblocking program associates with the default AFP object types. The list also shows the profile keywords associated with the AFP object types.
    Table 1. Data set values for default AFP object types
    AFP Object Type Third Qualifier Profile Keyword
    Unbounded Box Font FONT3820 FontUB
    240 Bounded Box Font FONT3820 Font240
    300 Bounded Box Font Name FONT300 Font300
    Outline Font Name FONTOLN FontOLN
    Page Definition Name PDEF38PP PageDef
    Form Definition Name FDEF38PP FormDef
    240 pel Document Name LIST3820 Doc240
    Resolution Independent Document LISTAFP DocAFP
    240 pel Overlay OVLY38PP Ovly240
    Resolution Independent Overlay OVLYAFP OvlyAFP
    IOCA Image IOCA IOCA
    Object Container AFPOBJ AFPOBJ
    Page Segment-240 pel IM1 Image PSEG3820 Pseg240
    Page Segment-300 pel IM1 Image PSEGAFP PsegAFP

    Therefore, when AFRREBLK reblocks the input data set userid.OVERLAY.UPLD, it recognizes the file as a 240-pel overlay from fields in the AFP data and changes its name, according to the default AFP object type list, to userid.OVERLAY.OVLY38PP.

  • If the reblocking program does not recognize the AFP object type, it sets the third qualifier in the sequential output data set to AFPDS. For example, if the type of AFP data set is not recognized, the reblocking program uses:
    userid.dsname.AFPDS
    where userid is the user identifier of the person who is reblocking the document and dsname is the second qualifier of the input data set being reblocked. Therefore, if userid.UNKNOWN.UPLD is reblocked and not recognized by the profile or in the default AFP object type list, the data set is named userid.UNKNOWN.AFPDS. The second qualifier (UNKNOWN) is the same as the data set being reblocked. The third qualifier is always AFPDS.
  • Start of changeWhen the input is a zFS/HFS fie, the AFRREBLK program follows the same rules as when the input is a data set, except for the naming of the second qualifier of the output data set. The second qualifier is the first 8 characters of the zFS/HFS filename, after removing underscore characters (or all remaining characters, if there are fewer than 8). The input filename extension suffix is not included. For example, if /usr/lpp/PSF/fonts/cdepage/flnm1_nm2.ECP is reblocked and not recognized by the profile or in the default AFP object type list, the output data set is named userid.FLNM1NM2.AFPDS. The third qualifier is always AFPDS.End of change