Pete

> ... IP address ... (also available via USS).

Indeed the IP address of the SNA-oriented TELNET client can be obtained from an 
USSTAB associated with the TELNET TCP connection. See "@@@@@@@@@IPADDR, Client 
IP Address" in Table 40, "Variables substituted for USSMSG" in "USSMSG 
macroinstruction" in the "z/OS Communications Server IP Configuration 
Reference" manual:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/F1A1B4B0/16.4.3

Presentation of the client's IP address is one of the many handy features that 
Unformatted System Services[1] provides in order to assist the end-user to 
manage a TELNET TCP connection using the SNA-oriented TELNET server from the IP 
component of z/OS Communications Server - originally a service from VTAM.

However Yanick[2] didn't say that the IP address was that of any possible 
TELNET client connecting through the SNA-oriented TELNET server from the IP 
component of z/OS Communications Server

-

Note that you can always avoid ambiguity by using correct terminology:

>From a "Summary of Changes" in the OS/390 V2R6 MVS Initialization and Tuning 
>Guide:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA1E106/CHANGES

<quote>

| As part of the name change of OS/390 OpenEdition to OS/390 UNIX System 
| Services, occurrences of OS/390 OpenEdition have been changed to OS/390 
| UNIX System Services or its abbreviated name, OS/390 UNIX. OpenEdition may 
| continue to appear in messages, panel text, and other code with OS/390 
| UNIX System Services.

</quote>

Today's "abbreviated form" is, naturally, "z/OS UNIX".

See also

http://aime.ua.edu/cgi-bin/wa?A2=ind0907&L=ibm-main&F=&S=&P=1220260

-

> ... but I believe the gethostbyaddr is a standard socket call.

This belief could be considered a heresy since none of the API calls I 
mentioned to Yanick actually involve - directly anyhow in the case of the 
GETHOSTBYNAME and GETHOSTBYADDR API calls - the use of sockets. Of course it is 
usual to call upon the services of these API calls in sockets programs but an 
actual socket need not have been opened.

-

Otherwise that looks like a handy example of a simple REXX program using calls 
from Chapter 14, "REXX socket application programming interface" in the "z/OS 
Communications Server IP Sockets Application Programming Interface Guide and 
Reference" manual.

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/f1a1d490/3.5

-

[1] http://www-01.ibm.com/software/globalization/terminology/u.html#x2042481

[2] Maybe you never heard of Yannick Noah the tennis player from France. It 
seems in French-speaking Canada one of the "n"s is dropped.

-

Chris Mason

On Wed, 21 Dec 2011 11:34:38 -0500, Conlin, Pete <pete_con...@ibi.com> wrote:

>Hi Jacques,
>
>You may be able to issue nslookup with the IP address as a system call & parse 
>the result (also available via USS).
>
>I don't know if you can call rexx from IDMS, but I believe the gethostbyaddr 
>is a standard socket call.
>
>A more complicated solution via rexx, written many moons ago (prior to 
>nslookup) & based (foggy recollection) on IBM's rx . . .  samples, now 
>apparently reincarnated in TCPIP.SEZAINST(R6SERVE & R6CLIENT):
>
>/* rexx pgm in EXEC(gethostn) or $HOME/gethostn.rexx */
>  arg ipaddr
>  say ' ' /* blank line */
>init=Socket('Initialize','GETHOSTN');
> say 'Initializing 'word(init,2) '(REXX) socket program return code',
> /* continuation */word(init,1)'.';
>hostaddr    = ipaddr ;
>gethostbyaddr  = Socket('GetHostByAddr',hostaddr);
> say 'gethostbyaddr yields 'word(gethostbyaddr,2)
>term=Socket('Terminate','GETHOSTN');
> say ' '; /* blank line */
> say 'Socket termination return code 'word(term,1);
> say ' '; /* blank line */
>exit
>
>Good Luck,
>
>Peter
>
>-----Original Message-----
>From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On Behalf Of 
>Yanick Jacques
></
>
>Hi,
>
>   We run application in IDMS and CICS and we have the IP address in one 
> storage. Now we need more, I need the hostname. I'm wondering if it is 
> possible to do an assembler cross-memory program to talk to the adress space 
> of TCP/IP and only retrieve  the hostname associate with IP address.How do I 
> do to issue an DNS query to retrieve only the hostname and return the result 
> to the caller.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: INFO IBM-MAIN

Reply via email to