Exit xpcftch – IBM SC33-1683-02 User Manual

Page 197

Advertising
background image

3. If a GETMAIN was issued in XPCREQ to obtain an area to hold the SYSID,

issue a FREEMAIN for the address held in UEPPCTOK.

4. Return to CICS.

Exit XPCFTCH

XPCFTCH is invoked before a PPT-defined program (including internal CICS
modules) receives control, which could be because it is the first program in a
transaction, or as a result of a LINK, XCTL, or HANDLE ABEND PROGRAM
request. You can use this exit to modify the entry address used when linking to the
program. If the exit sets a return code of zero, or a modified address of zero, the
entry address of the original application program is used.

The exit is intended to allow you to pass control to an application program or
routine

before the original program is invoked. This first program, after it has

finished its processing, should pass control back to the entry point of the original
program. You should not use the exit to cause a program to be invoked

instead of

the original program. If you do so, the results are unpredictable.

If a modified entry address is supplied, the program that is invoked receives control
in the execution key that the original application program would have received
control in—that is, as specified on the EXECKEY option of the original program’s
resource definition.

When invoked

Before an application program receives control.

Exit-specific parameters

UEPPCDS

Address of a storage area that contains program- and
terminal-related information, and that can be mapped using the
DSECT DFHPCUE. When XPCFTCH is invoked, the following
DFHPCUE fields are significant:

PCUE_CONTROL_BITS

1-byte flag field. A setting of PCUECBTE indicates that the
transaction is linked to a terminal. A setting of PCUENOTX
(X'40') indicates that the program is not command level.

PCUE_TASK_NUMBER

3-character packed decimal field containing the task
number.

PCUE_TRANSACTION_ID

4-character field containing the ID of the original
transaction. Note that this may differ from the current
transaction ID.

PCUE_TERMINAL_ID

4-character field containing the terminal ID (if any).

PCUE_PROGRAM_NAME

8-character field containing the name of the program that is
to receive control.

PCUE_PROGRAM_LANGUAGE

3-character field containing the language of the program
that is to receive control.

program control program exits

Chapter 1. Global user exit programs

165

Advertising