gtpc2m5gC/C++ Language Support User's Guide

progc-Return Program Allocation Table (PAT) Slot Address

This function accepts a program name and returns the program's base PAT slot address. A program's PAT slot contains that program's characteristics (residency, mode, macro authorization, and so on), and also that program's current core and file addresses.

Format

#include    <c$idspat.h>
struct pat  *progc(const char *name, enum t_progc mdbf_ind);

name
This argument is a pointer to a 4-character program name whose PAT slot address will be returned.

mdbf_ind
This argument specifies which multiple database function (MDBF) index field is used when retrieving the PAT entry as well as which PAT slot to retrieve (the parent slot or the transfer vector (TV) slot). This argument must belong to the enumerated type t_progc, defined in the tpfapi.h header file.

Normal Return

The base PAT slot address of the specified program is returned.

If the program name supplied is a transfer vector, the parent base PAT slot address is returned, unless the TV slot is requested.

If the program name supplied is I-stream unique, the program's base PAT slot address for the I-stream that called the macro is returned.

Error Return

NULL is returned if the specified program name could not be found in the PAT.

Programming Considerations

During normal system operation, only 1 PAT slot will exist for each program on a given subsystem; however, if the E-type loader is used, multiple PAT slots can exist for a given program. The PAT slot address returned is always the address of the base allocated program's PAT slot.

Note:
The mdbf_ind field, if coded, must specify one of the following:

Examples

Related Information

None.