Function package table
The function package table contains information about the function packages that are available for the language processor environment.
An individual user or an installation can write external functions and subroutines. For faster access of a function or subroutine, you can group frequently used external functions and subroutines in function packages. A function package is a number of external functions and subroutines that are grouped together. Function packages are searched before load libraries and execs (see Search order).
- User function packages
- Local function packages
- System function packages
User function packages are searched before local packages. Local function packages are searched before any system packages.
To provide a function package, there are several steps you must perform, including writing the code for the external function or subroutine, providing a function package directory for each function package, and defining the function package directory name in the function package table. External functions and subroutines, and function packages describes function packages in more detail and how you can provide user, local, and system function packages.
In the parameter block, the PACKTB field points to the function package table (see Characteristics of a Language Processor Environment). The table contains information about the user, local, and system function packages that are available for the language processor environment. The function package table consists of two parts; the table header and table entries. Table 1 shows the format of the function package table header. The header contains the total number of user, local, and system packages, the number of user, local, and system packages that are used, and the length of each function package name, which is always 8. The header also contains three addresses that point to the first table entry for user, local, and system function packages. The table entries specify the individual names of the function packages.
The table entries are a series of eight-character fields that are contiguous. Each eight-character field contains the name of a function package, which is the name of a load module containing the directory for that function package. The function package directory specifies the individual external functions and subroutines that make up one function package. Directory for function packages describes the format of the function package directory in detail.
Figure 1 illustrates the eight-character fields that contain the function package directory names for the three types of function packages (user, local, and system).
TSO/E provides a mapping macro for the function package table. The name of the mapping macro is IRXPACKT. The mapping macro is in SYS1.MACLIB.
Offset (decimal) | Number of bytes | Field name | Description |
---|---|---|---|
0 | 4 | USER_FIRST | Specifies the address of the first user function package entry. The address points to the first field in a series of eight-character fields that contain the names of the function package directories for user packages. Figure 1 shows the series of directory names. |
4 | 4 | USER_TOTAL | Specifies the total number of user package table
entries. This is the total number of function package directory names
that are pointed to by the address at offset +0. You can use the USER_TOTAL field to specify the maximum number of user function packages that can be defined for the environment. You can then use the USER_USED field at offset +8 to specify the actual number of packages that are available. |
8 | 4 | USER_USED | Specifies the total number of user package table entries that are used. You can specify a maximum number (total) in the USER_TOTAL field at offset +4 and specify the actual number of user function packages that are used in the USER_USED field. |
12 | 4 | LOCAL_FIRST | Specifies the address of the first local function package entry. The address points to the first field in a series of eight-character fields that contain the names of the function package directories for local packages. Figure 1 shows the series of directory names. |
16 | 4 | LOCAL_TOTAL | Specifies the total number of local package table
entries. This is the total number of function package directory names
that are pointed to by the address at offset +12. You can use the LOCAL_TOTAL field to specify the maximum number of local function packages that can be defined for the environment. You can then use the LOCAL_USED field at offset +20 to specify the actual number of packages that are available. |
20 | 4 | LOCAL_USED | Specifies the total number of local package table entries that are used. You can specify a maximum number (total) in the LOCAL_TOTAL field at offset +16 and specify the actual number of local function packages that are used in the LOCAL_USED field. |
24 | 4 | SYSTEM_FIRST | Specifies the address of the first system function package entry. The address points to the first field in a series of eight-character fields that contain the names of the function package directories for system packages. Figure 1 shows the series of directory names. |
28 | 4 | SYSTEM_TOTAL | Specifies the total number of system package table
entries. This is the total number of function package directory names
that are pointed to by the address at offset +24. You can use the SYSTEM_TOTAL field to specify the maximum number of system function packages that can be defined for the environment. You can then use the SYSTEM_USED field at offset +32 to specify the actual number of packages that are available. |
32 | 4 | SYSTEM_USED | Specifies the total number of system package table entries that are used. You can specify a maximum number (total) in the SYSTEM_TOTAL field at offset +28 and specify the actual number of system function packages that are used in the SYSTEM_USED field. |
36 | 4 | LENGTH | Specifies the length of each table entry, that is, the length of each function package directory name. The length is always 8. |
40 | 8 | — | The end of the table is indicated by X'FFFFFFFFFFFFFFFF'. |
![ikja3fpd](ikja3fpd.gif)
The table entries are a series of eight-character fields. Each field contains the name of a function package directory. The directory is a load module that, when loaded, contains information about each external function and subroutine in the function package. Directory for function packages describes the format of the function package directory in detail.
The function package directory names in each eight-character field must be left justified and padded with blanks.