Resource Exit

 

ACIF

provides an exit that enables you to “filter” resources from be

 

the

resource file. If you want to exclude a specific type of re

 

overlay), you can control thisre typewith parameterthe. This exit is

 

useful

in

 

 

controlling

resources

at the

 

file

name

level.

 

For

example,

assume

you

we

 

to send

the

output

of ACIF to PSF for

AIX

and

you

only

wanted

 

to

se

 

that

were not shipped with the PSF for

AIX product. You could code

 

program

to

 

contain

a

 

table

of

all

fonts

shipped

with

PSF

for

AIX

and

 

from

the resource file. Security is another consideration

for

using

th

 

you

could prevent certain named resources from being included.

The

pro

 

invoked

at

 

this

exit

 

is

definedresexitby parametertheACIF.

 

 

 

 

 

 

 

 

 

 

 

This

exit receives control before a resource is read from

a

direct

 

program can request that the resource

be

processed

or

ignored

(skipp

 

cannot substitute another resource name

in place of the requested one

 

requests

any

overlay

 

to

be

ignored,

ACIF

will

automatically

 

ignore

any

 

the

overlay may have referenced (that

 

is, fonts and page segments).

 

Figure 17

contains

a

sample

C

language

header

 

that

describes

the

contr

 

that is passed to the exit program.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

typedef struct _RESEXIT_PARMS /\ Parameters for the resourc￿e 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

 

the

resource

record

exit:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

work

(Bytes

 

1–4)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A

pointer to a static, 16-byte memory block. The exit program can u

 

parameter to save information across

calls (for example, pointers to

 

areas). The 16-byte work area is aligned on a full word boundary a

 

initialized

to

binary

zeros

prior

to

the

first

call.

The

user-writt

 

must

provide

the

code

required to

manage

this

work

area.

 

 

 

 

 

pfattr

(Bytes

5–8)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

A

pointer

to

the

 

print

file

attribute

data

structure.

See

“Attribut

 

Print

File”

on

 

page 74

for

more

information

 

on

the

format of

this

da

 

and

the

information

presented.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

resname (Bytes 9–16)

Specifies the name of the requested resource. This value cannot b (changed) by the exit program.

restype (Byte 17)

Specifies the type of resource the name refers to. This is a 1 value where:

72 ACIF User’s Guide

Page 92
Image 92
IBM S544-5285-01 manual Resname Bytes, Restype Byte, Sample Resource Exit C Language Header