gtpc2m9l | C/C++ Language Support User's Guide |
This function returns information from the terminal address table (WGTA)
about a line number, interchange address, and terminal address (LNIATA) or
pseudo-LNIATA value.
Format
#include <tpfapi.h>
struct wg0ta *wgtac_ext(int lniata, unsigned char cpuid,
struct wg0ta *storage, unsigned int ext);
- lniata
- An integer representing the LNIATA or Systems Network Architecture (SNA)
resource identifier (RID) for which information is desired. Only 24
bits of this integer are considered significant.
- cpuid
- An unsigned character representing the hexadecimal central processing unit
(CPU) identification of the CPU on which the calling entry control block (ECB)
is running.
- storage
- A pointer to a free working storage area large enough to hold a completed
wg0ta structure. This address is overwritten with a
completed wg0ta and is passed back as the return value if the
search for the requested LNIATA is successful and WGTA_NO_UDATE is
specified. If WGTA_UPDATE is specified, this parameter should be set to
zero. The wg0ta structure is defined in the
tpfapi.h header file.
- ext
- Use one of the following options defined in the tpfapi.h
header file to indicate if the entry will be updated:
- WGTA_NO_UPDATE
- Specifies that no updates will be performed. The WGTA entry will be
copied into the storage location pointed to by the storage parameter.
- WGTA_UPDATE
- Specifies that updates may be performed. A pointer to the actual
WGTA table entry is returned.
Normal Return
A pointer to struct wg0ta for the requested
LNIATA.
Error Return
NULL pointer.
Programming Considerations
When specifying WGTA_UPDATE, ensure that you have the protect key set to 0
before attempting to update any fields in the WGTA entry; otherwise, a
system error will be generated.
Examples
The following example obtains a pointer to the WGTA entry for the LNIATA
referred to from the issuing ECB.
#include <tpfapi.h>
struct wg0ta *wgta;
·
·
·
if(!(wgta = wgtac_ext(ecbptr()->ebrout,ecbptr()->ce1cpd,0,WGTA_UPDATE)))
{ /* Item not found if return was zero */
puts("LNIATA not referenced in WGTA table\n");
}
else
/* Normal processing path */
·
·
·
Related Information
wgtac-Locate Terminal Entry.