GetHostNumber

The GetHostNumber procedure resolves a host name into an internet address. This is shown in Figure 1.

GetHostNumber uses a table lookup to convert the name of a host (alphanumeric name or dotted decimal number) to an internet address, and returns this address in the HostNumber field. When the name is a dotted decimal number, GetHostNumber returns the integer represented by that dotted decimal. The dotted decimal representation of a 32-bit number has 1 decimal integer for each of the 4 bytes, separated by dots. For example, 14.0.0.7 for X'0E000007'. See z/OS Communications Server: IP Configuration Reference for information about how to create host lookup tables.

The HostNumber field is set to NOhost if the host is not found.

Figure 1. GetHostNumber example
   procedure GetHostNumber
            (
        const    Name: string;
        var       HostNumber: InternetAddressType
            );
            external;
Parameter
Description
Name
The name or dotted decimal number to be converted. The maximum name length is 128 characters.
HostNumber
Set to the converted address, or NOhost if conversion fails.