Resource Exit
ACIF provides an exit that enables you to “filter” resources from being included in
the resource file. If you want to exclude a specific type of resource (for example, an
overlay), you can control this with the restype parameter. This exit is useful in
controlling resources at the file name level. For example, assume you were going
to send the output of ACIF to PSF for AIX and you only wanted to send those fonts
that were not shipped with the PSF for AIX product. You could code this exit
program to contain a table of all fonts shipped with PSF for AIX and filter those
from the resource file. Security is another consideration for using this exit because
you could prevent certain named resources from being included. The program
invoked at this exit is defined by the ACIF resexit parameter.
This exit receives control before a resource is read from a directory. The exit
program can request that the resource be processed or ignored (skipped), but it
cannot substitute another resource name in place of the requested one. If the exit
requests any overlay to be ignored, ACIF will automatically ignore any resources
the overlay may have referenced (that is, fonts and page segments).
Figure 17 contains a sample C language header that describes the control block
that is passed to the exit program.
typedef struct _RESEXIT_PARMS /\ Parameters for the resource record exit
\/
{
char
\work;
/\ Address of 16-byte static work area
\/
PFATTR
\pfattr;
/\ Address of print file attribute information \/
char
resname[8]; /\ Name of requested resource
\/
char
restype;
/\ Type of resource
\/
char
request;
/\ Ignore or process the resource
\/
char
eof;
/\ Last call indicator
\/
} RESEXIT_PARMS;
Figure 17. Sample Resource Exit C Language Header
The address of the control block containing the following parameters is passed to
the resource record exit:
work (Bytes 1–4)
A pointer to a static, 16-byte memory block. The exit program can use this
parameter to save information across calls (for example, pointers to work
areas). The 16-byte work area is aligned on a full word boundary and is
initialized to binary zeros prior to the first call. The user-written exit program
must provide the code required to manage this work area.
pfattr (Bytes 5–8)
A pointer to the print file attribute data structure. See “Attributes of the Input
Print File” on page 74 for more information on the format of this data structure
and the information presented.
resname (Bytes 9–16)
Specifies the name of the requested resource. This value cannot be modified
(changed) by the exit program.
restype (Byte 17)
Specifies the type of resource the name refers to. This is a 1-byte hexadecimal
value where:
72
ACIF User’s Guide
Summary of Contents for S544-5285-01
Page 1: ...IBM Print Services Facility IBM AFP Conversion and Indexing Facility User s Guide S544 5285 01...
Page 2: ......
Page 3: ...IBM Print Services Facility IBM AFP Conversion and Indexing Facility User s Guide S544 5285 01...
Page 10: ...viii ACIF User s Guide...
Page 22: ...2 ACIF User s Guide...
Page 40: ...20 ACIF User s Guide...
Page 41: ...Part 2 Using ACIF in the AIX Environment Copyright IBM Corp 1993 1999 21...
Page 42: ...22 ACIF User s Guide...
Page 72: ...52 ACIF User s Guide...
Page 96: ...76 ACIF User s Guide...
Page 99: ...Part 3 Using ACIF in the OS 390 MVS VM and VSE Environments Copyright IBM Corp 1993 1999 79...
Page 100: ...80 ACIF User s Guide...
Page 106: ...86 ACIF User s Guide...
Page 134: ...Figure 24 Example of a Customer s Phone Bill 114 ACIF User s Guide...
Page 142: ...122 ACIF User s Guide...
Page 196: ...176 ACIF User s Guide...
Page 197: ...Part 4 Appendixes Copyright IBM Corp 1993 1999 177...
Page 198: ...178 ACIF User s Guide...
Page 206: ...186 ACIF User s Guide...
Page 210: ...190 ACIF User s Guide...
Page 226: ...206 ACIF User s Guide...
Page 253: ......