This came out of a question. It is another of the little questions that get much bigger.
Background to Domain Name System(DNS)
DNS allows you to get an IP address from a string such as “WWW.MY.COM”.
You can have some files on your local system which provide this mapping, or you can exploit DNS Servers in the big internet.
Some people configure their system so it tries the internet first, and if that fails, uses local files.
You can do reverse DNS lookup, mapping an IP address to a string. For example you want to allow access from sites in WWW.MYFRIEND.COM. When a connection is started, you get the IP address, and can then do a reverse DNS lookup to get a name, which you can check in your “allow” list.
DNS commands for the end user
You can use the “old” tso command NSLOOKUP http://www.ibm.com, or the “new” command dig http://www.ibm.com. Neither of which seemed to give me any output!
The NSLOOKUP and DIG commands send their output to SYSOUT. In my TSO system, SYSOUT has been configured to JES. If I use SDSF, and display the output of my TSO userid, there is a SYSOUT, with the output in it!
NSLOOKUP
The NSLOOKUP command
NSLOOKUP http://www.my.com
NSLOOKUP http://www.my.com this.dns.site
NSLOOKUP 10.1.1.2
Tracing a DNS request
This does not provide much useful information! It does not tell you what happened, or what failed. It is described here.
Starting and stopping the DNS
This is not obvious. At IPL the ADCD.Z24C.PARMLIB(BPXPRM00) member has
RESOLVER_PROC(RESOLVER)
the resolver procedure must be in a data set that is specified by the IEFPDSI DD card specification of the MSTJCLxx PARMLIB member.
If you use D A,L it does not show up.
D A,RESOLVER gives you the normal output.
When I issued
P RESOLVER S RESOLVER
It used the RESOLVER procedure from USER.Z24C.PROCLIB, the normal concatenation.
Displaying and changing the configuration.
You can display some of the current resolver configuration using
f resolver,display
The output is like
EZZ9298I RESOLVERSETUP - USER.Z24C.TCPPARMS(GBLRESOL) EZZ9298I DEFAULTTCPIPDATA - USER.Z24C.TCPPARMS(GBLTDATA) EZZ9298I GLOBALTCPIPDATA - /etc/resolv.conf EZZ9298I DEFAULTIPNODES - ADCD.Z24C.TCPPARMS(ZPDTIPN1) EZZ9298I GLOBALIPNODES - /etc/hosts EZZ9304I COMMONSEARCH EZZ9304I CACHE EZZ9298I CACHESIZE - 200M EZZ9298I MAXTTL - 2147483647 EZZ9298I MAXNEGTTL - 2147483647 EZZ9304I NOCACHEREORDER EZZ9298I UNRESPONSIVETHRESHOLD - 25
The only way I could display all of the resolver configuration was to get a resolver trace!
//IBMRESO JOB 1,MSGCLASS=H //S1 EXEC PGM=IKJEFT01,REGION=0M //SYSPRINT DD SYSOUT=* //SYSTSPRT DD SYSOUT=* //SYSTCPT DD SYSOUT=* //SYSPRINT DD SYSOUT=* //SYSTSIN DD * NSLOOKUP 99.99.99.99 /*
This gave me in //SYSTCPT
Resolver Trace Initialization Complete -> 2023/02/26 18:01:56.725504
res_init Parse error on line 1: /etc/resolv.conf
res_init Resolver values:
Setup file warning messages = No
CTRACE TRACERES option = No
Global Tcp/Ip Dataset = /etc/resolv.conf
Default Tcp/Ip Dataset = USER.Z24C.TCPPARMS(GBLTDATA)
Local Tcp/Ip Dataset = None
Translation Table = TCPIP.STANDARD.TCPXLBIN
UserId/JobName = IBMUSER
Caller API = TCP/IP C Sockets
Caller Mode = EBCDIC
System Name = S0W1 (from VMCF)
UnresponsiveThreshold = 25
(D) DataSetPrefix = TCPIP
(D) HostName = S0W1
(D) TcpIpJobName = TCPIP
(*) DomainOrigin = None
(*) NameServer(s) = None
(*) NsPortAddr = 53 (*) ResolverTimeout = 5
(*) ResolveVia = UDP (*) ResolverUdpRetries = 1
(*) Options NDots = 1
(D) Trace Resolver (*) SockNoTestStor
(D) AlwaysWto = NO (D) MessageCase = MIXED
(*) LookUp = DNS LOCAL
(*) Cache
(*) NoCacheReorder
res_init Succeeded
res_init Started: 2023/02/26 18:01:56.794280
res_init Ended: 2023/02/26 18:01:56.794305
This is documented here.
The source of the value is
- (*) Default value
- (A) Modified by application
- (D) Default file (not used if the local file is found)
- (E) Environment variable
- (G) Global file
- (L) Local file
This means the “LookUp = DNS LOCAL ” value came from the default value.
The resolver JCL in USER.Z24C.PROCLIB had
//SETUP DISP=SHR,DSN=USER.Z24C.TCPPARMS(GBLRESOL)
When I changed this member to have LOOKUP LOCAL DSN, and used the F RESOLVER,REFRESH command, this changed the value.
Sample hosts file
The sample host file in TCPIP.SEZAINST(HOSTS) has
; The format of this file is documented in RFC 952, "DoD Internet ; Host Table Specification". ; ; The format for entries is: ; ; NET : ADDR : NETNAME : ; GATEWAY : ADDR, ALT-ADDR : HOSTNM : CPUTYPE : OPSYS : PROTOCOLS : ; HOST : ADDR, ALT-ADDR : HOSTNM, NICKNM : CPUTYPE : OPSYS : PROTOCOLS : ; ; Where: ; ADDR, ALT-ADDR = IP address in decimal, e.g., 26.0.0.73 ; HOSTNM, NICKNM = the fully qualified host name and any nicknames ; CPUTYPE = machine type (PDP-11/70, VAX-11/780, IBM-3090, C/30, etc.) ; OPSYS = operating system (UNIX, TOPS20, TENEX, VM/SP, etc.) ; PROTOCOLS = transport/service (TCP/TELNET,TCP/FTP, etc.) ; : (colon) = field delimiter ; :: (2 colons) = null field ; *** CPUTYPE, OPSYS, and PROTOCOLS are optional fields. ; ; MAKESITE does not allow continuation lines, as described in ; note 2 of the section "GRAMMATICAL HOST TABLE SPECIFICATION" ; in RFC 952. Entries should be specified on a single line of ; up to a maximum of 512 characters per line. HOST : 129.34.128.245, 129.34.128.246 : YORKTOWN, WATSON :::: ; NET : 9.67.43.0 : RALEIGH.IBM.COM : ; GATEWAY : 129.34.0.0 : YORKTOWN-GATEWAY ::::
Unix application trace
Enable the trace by issuing the Unix command
export RESOLVER_TRACE=~/trace
Run the command
pip install mfpandas
gave
-[33mWARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x500B209580>:
Failed to establish a new connection:
[Errno 1] EDC9501I The name does not resolve for the supplied parameters.')': /simple/mfpandas/-[0m-[33m
Look at the trace file
oedit trace
gave
GetAddrInfo Started: 2025/11/25 15:58:36.890589
GetAddrinfo Invoked with following inputs:
Host Name: pypi.org
Service Name: 443
Hints parameter supplied with settings:
ai_family = 0, ai_flags = 0x00000000
ai_protocol = 0, ai_socktype = 1
No NameServers specified, no DNS activity
GetAddrInfo Opening Socket for IOCTLs
BPX1SOC: RetVal = 0, RC = 0, Reason = 0x00000000, Type=IPv4
BPX1IOC: RetVal = 0, RC = 0, Reason = 0x00000000
GetAddrInfo Opened Socket 0x00000005
GetAddrInfo Only IPv4 Interfaces Exist
GetAddrInfo Searching Local Tables for IPv6 Address
Global IpNodes Dataset = ADCD.Z31B.TCPPARMS(ZPDTIPN1)
Default IpNodes Dataset = ADCD.Z31B.TCPPARMS(ZPDTIPN1)
Search order = CommonSearch
BPX1ENV Get _BPXK_AUTOCVT: RetVal = 0, RC = 0, Reason = 0x00000000
_BPXK_AUTOCVT current value is ON
BPX1ENV Set _BPXK_AUTOCVT: RetVal = 0, RC = 0, Reason = 0x00000000
_BPXK_AUTOCVT set to OFF
Parse error on line 22: ADCD.Z31B.TCPPARMS(ZPDTIPN1)
SITETABLE from globalipnodes ADCD.Z31B.TCPPARMS(ZPDTIPN1)
- Lookup for pypi.org
GetAddrInfo Searching Local Tables for IPv4 Address
- Lookup for pypi.org
GetAddrInfo Searching Local Tables for IPv6 Address
- Lookup for pypi.org.DAL-EBIS.IHOST.COM
GetAddrInfo Searching Local Tables for IPv4 Address
- Lookup for pypi.org.DAL-EBIS.IHOST.COM
GetAddrInfo Closing IOCTL Socket 0x00000005
BPX1CLO: RetVal = 0, RC = 0, Reason = 0x00000000
GetAddrInfo Failed: RetVal = -1, RC = 1, Reason = 0x78AE1004
GetAddrInfo Ended: 2025/11/25 15:58:36.904995
EDIT /etc/hosts
Command ===>
****** ******************************************************* Top
==MSG> -Warning- The UNDO command is not available until you chang
==MSG> your edit profile using the command RECOVERY ON.
000001 # BEGIN ANSIBLE MANAGED BLOCK
000002 #72.26.1.2 s0w1.dal-ebis.ihost.com S0W1
000003 127.0.0.1 localhost
000004 # END ANSIBLE MANAGED BLOCK
000005 #IPAddress Hostname alias
000006 151.101.128.223 pypi.org pip