gtpc2m5g | C/C++ Language Support User's Guide |
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);
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.
Examples
#include <c$idspat.h>
·
·
·
struct pat *pat_slot; pat_slot = progc( "ABCD", PROGC_PBI );
#include <c$idspat.h>
·
·
·
struct pat *pat_slot; pat_slot = progc( "CVII", PAT_PBI );
Related Information