<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Method to get IP from Domain or Domain from IP in SAS? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Method-to-get-IP-from-Domain-or-Domain-from-IP-in-SAS/m-p/497632#M131959</link>
    <description>&lt;P&gt;How do you do it in python? You need to query a DNS somehow don't you?&lt;/P&gt;</description>
    <pubDate>Fri, 21 Sep 2018 00:11:16 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2018-09-21T00:11:16Z</dc:date>
    <item>
      <title>Method to get IP from Domain or Domain from IP in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Method-to-get-IP-from-Domain-or-Domain-from-IP-in-SAS/m-p/497544#M131892</link>
      <description>&lt;P&gt;I have a CSV that includes a single column of all IP addresses.&amp;nbsp; I'd like to build another column by determining a domain name from the IPs and filling that new column, with the determined domain name.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can do this no problem in powershell or a python program, but I can't see to figure out if it's possible with SAS, where i need to do my work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible with SAS?&amp;nbsp; I've seen proc http, but i couldn't find any indication that it's possible there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;anything info on&amp;nbsp;here will help, I seem to have hit a wall with this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 20 Sep 2018 19:52:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Method-to-get-IP-from-Domain-or-Domain-from-IP-in-SAS/m-p/497544#M131892</guid>
      <dc:creator>prolifious</dc:creator>
      <dc:date>2018-09-20T19:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Method to get IP from Domain or Domain from IP in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Method-to-get-IP-from-Domain-or-Domain-from-IP-in-SAS/m-p/497632#M131959</link>
      <description>&lt;P&gt;How do you do it in python? You need to query a DNS somehow don't you?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Sep 2018 00:11:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Method-to-get-IP-from-Domain-or-Domain-from-IP-in-SAS/m-p/497632#M131959</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2018-09-21T00:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: Method to get IP from Domain or Domain from IP in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Method-to-get-IP-from-Domain-or-Domain-from-IP-in-SAS/m-p/505737#M135471</link>
      <description>&lt;P&gt;this is a python method for getting a domain from an ip:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import socket&lt;/P&gt;&lt;P&gt;try:&lt;BR /&gt;a = '52.216.64.218'&lt;BR /&gt;b = socket.gethostbyaddr(a)&lt;BR /&gt;print(b)&lt;BR /&gt;except socket.error:&lt;BR /&gt;b = 'No Host Found'&lt;BR /&gt;print(b)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it's easy to do it in reverse as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, any update on this?&amp;nbsp; is it possible through PROC HHTP somehow?&amp;nbsp; speaking of which, is there any good documentaiton/whitepapers on PROC HTTP?&amp;nbsp; i could only find limited resources on it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 19:50:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Method-to-get-IP-from-Domain-or-Domain-from-IP-in-SAS/m-p/505737#M135471</guid>
      <dc:creator>prolifious</dc:creator>
      <dc:date>2018-10-18T19:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Method to get IP from Domain or Domain from IP in SAS?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Method-to-get-IP-from-Domain-or-Domain-from-IP-in-SAS/m-p/505759#M135476</link>
      <description>&lt;P&gt;&lt;A href="https://go.documentation.sas.com/?docsetId=proc&amp;amp;docsetVersion=9.4&amp;amp;docsetTarget=n0t7v16eitluu2n15ffpfeafqszs.htm&amp;amp;locale=en" target="_self"&gt;PROC HTTP documentation is here&lt;/A&gt;.&amp;nbsp; &lt;A href="https://blogs.sas.com/content/sasdummy/tag/proc-http/" target="_self"&gt;I also have a series of blog articles &lt;/A&gt;about various use cases for PROC HTTP.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;gethostbyaddr&lt;/STRONG&gt; and &lt;STRONG&gt;gethostbyname&amp;nbsp;&lt;/STRONG&gt;are functions that are built into the operating system.&amp;nbsp; &lt;STRONG&gt;getnameinfo&lt;/STRONG&gt; is actually the preferred method to use now.&amp;nbsp;&amp;nbsp; Some programming languages expose these as functions in their own syntax, but I haven't found where SAS does that.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think it would be possible to &lt;A href="https://go.documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=n0g0t4qe5q9jqcn15ovkk41ga6wl.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;call this using&amp;nbsp;CALL MODULE&lt;/A&gt;&amp;nbsp;if you know the external library (DLL) to reference.&amp;nbsp; It's a little tricky to set up, and I don't have a working example handy.&amp;nbsp; It would be different between Linux and Windows.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 20:34:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Method-to-get-IP-from-Domain-or-Domain-from-IP-in-SAS/m-p/505759#M135476</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2018-10-18T20:34:37Z</dc:date>
    </item>
  </channel>
</rss>

