LOOKUP statement

Use the LOOKUP statement to specify the order in which the DNS or local host tables are to be used for name resolution.

Syntax

Read syntax diagramSkip visual syntax diagramsystem_name:LOOKUP DNSLOCAL

Parameters

system_name:
The name of the system to which this statement applies. See system_name considerations for a complete description of this parameter.

Requirement: The colon is required.

DNS
The domain name servers specified by the NSINTERADDR and NAMESERVER statements are used for name resolution. When system-wide caching is active, this processing includes querying the resolver cache first for entries provided by these name servers on previous name resolution attempts, and only if that query fails, querying the domain name servers.

For more resolver information see z/OS Communications Server: IP Configuration Guide for more details.

LOCAL
The local host tables (for example, etc/hosts, HOSTS.SITEINFO or HOSTS.ADDRINFO) are used for name resolution. See z/OS Communications Server: IP Configuration Guide for information about determining which local host tables are used.

Statement dependency

You can refresh this statement using the MODIFY command. For more information about parameters used with the MODIFY command, see z/OS Communications Server: IP System Administrator's Commands.

Examples

In the following example, only the local host tables are used:
LOOKUP LOCAL 
In the following example, the local host tables are used first. If the resource name is not resolved, then the resolver cache (if a cache is being used) is used next. If there is still no resolution, then the name servers are queried directly.
LOOKUP LOCAL DNS
In the following example, the resolver cache (if a cache is being used) is used first. If the resource name is not resolved, then the name servers are queried directly. If there is still no resolution, then the local host tables are used next.
LOOKUP DNS LOCAL

Usage notes

  • If a LOOKUP statement is not specified, the resolver cache (if a cache is being used) is queried first. If the cache query is unsuccessful, the domain name servers are queried next, and if the resolution request is not successful, the local host file, if it exists, is used.
  • If an incorrect parameter value is specified, the entire LOOKUP statement is ignored.
  • The last syntactically correct LOOKUP statement is used.