<?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: connect files from a web server in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/connect-files-from-a-web-server/m-p/927988#M365131</link>
    <description>Firstly, I would like to express my gratitude for your response Kurt. I believe it’s a suitable solution. Now, I’m curious about how I can unzip the .gz files (e.g., domain.com-2024-04-11.gz) on SAS Viya. These files are actually .txt, but I would like to automate the loading and decompression process for further processing. I understand that you’re proposing to connect to the server and then assemble a bash script to unzip the files, right?&lt;BR /&gt;</description>
    <pubDate>Sat, 11 May 2024 18:22:39 GMT</pubDate>
    <dc:creator>JuanaPrada</dc:creator>
    <dc:date>2024-05-11T18:22:39Z</dc:date>
    <item>
      <title>connect files from a web server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/connect-files-from-a-web-server/m-p/927984#M365128</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi all -&amp;nbsp;&lt;/SPAN&gt;¿How can I connect files from a web server to sas viya? I want to automatically capture the log files in .gz, and then process them (ex: domain.com-2024-04-11.gz).&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 11:29:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/connect-files-from-a-web-server/m-p/927984#M365128</guid>
      <dc:creator>JuanaPrada</dc:creator>
      <dc:date>2024-05-11T11:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: connect files from a web server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/connect-files-from-a-web-server/m-p/927985#M365129</link>
      <description>&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/proc/n0bdg5vmrpyi7jn1pbgbje2atoov.htm" target="_blank" rel="noopener"&gt;PROC HTTP&lt;/A&gt;&amp;nbsp;as well as&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsglobal/p103pi2vrzn6qhn1e8alrs01jrb7.htm" target="_blank" rel="noopener"&gt;FILENAME URL&lt;/A&gt;&amp;nbsp;can be used to download/access web resources.&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 12:05:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/connect-files-from-a-web-server/m-p/927985#M365129</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-05-11T12:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: connect files from a web server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/connect-files-from-a-web-server/m-p/927988#M365131</link>
      <description>Firstly, I would like to express my gratitude for your response Kurt. I believe it’s a suitable solution. Now, I’m curious about how I can unzip the .gz files (e.g., domain.com-2024-04-11.gz) on SAS Viya. These files are actually .txt, but I would like to automate the loading and decompression process for further processing. I understand that you’re proposing to connect to the server and then assemble a bash script to unzip the files, right?&lt;BR /&gt;</description>
      <pubDate>Sat, 11 May 2024 18:22:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/connect-files-from-a-web-server/m-p/927988#M365131</guid>
      <dc:creator>JuanaPrada</dc:creator>
      <dc:date>2024-05-11T18:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: connect files from a web server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/connect-files-from-a-web-server/m-p/927993#M365135</link>
      <description>&lt;P&gt;First, I would define a file reference with FILENAME URL. Then I would use that reference in a DATA step in the INFILE statement with the GZIP option. This should perform the download and uncompress in one action.&lt;/P&gt;</description>
      <pubDate>Sat, 11 May 2024 21:09:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/connect-files-from-a-web-server/m-p/927993#M365135</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-05-11T21:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: connect files from a web server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/connect-files-from-a-web-server/m-p/928031#M365159</link>
      <description>&lt;P&gt;Hello &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/444265"&gt;@JuanaPrada&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;In a typical webserver log files are not exposed over the web. The appropriate way would be to use scp.&lt;/P&gt;
&lt;P&gt;If you are using Viya 4, one approach would be scp using your jump box (if that is permissible ) and copy to appropriate folder in /viya-share .&lt;BR /&gt;However if it is Viya 3.x scp would be much simpler process.&lt;/P&gt;
&lt;P&gt;For exact details applicable do consult the system admin on the web server side and do include you Viya Admin in planning and implementation.&lt;/P&gt;</description>
      <pubDate>Sun, 12 May 2024 13:03:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/connect-files-from-a-web-server/m-p/928031#M365159</guid>
      <dc:creator>Sajid01</dc:creator>
      <dc:date>2024-05-12T13:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: connect files from a web server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/connect-files-from-a-web-server/m-p/928280#M365223</link>
      <description>&lt;P&gt;&lt;SPAN&gt;The solution I have obtained was to create a simple bash task using linux command-line tools to establish the ssh connection, copy the files from the server to the local folder (scp) and then unzip them (gunzip). Later I created the connection for data import in SAS Viya. The first option through &lt;/SPAN&gt;&lt;SPAN&gt;FILENAME URL &lt;/SPAN&gt;&lt;SPAN&gt;is not possible because "The access method "SOCKET is disabled when SAS is in the lockdown state".&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 13:31:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/connect-files-from-a-web-server/m-p/928280#M365223</guid>
      <dc:creator>JuanaPrada</dc:creator>
      <dc:date>2024-05-14T13:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: connect files from a web server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/connect-files-from-a-web-server/m-p/928302#M365232</link>
      <description>&lt;P&gt;Note that once you have local files you should be able to skip the gunzip step.&amp;nbsp; SAS can read gzipped text files directly by just using the ZIP fileref engine with the GZIP option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In normal SAS code that would look something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename mylog zip 'mylog.log.gz' gzip;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or if writing your own data step you can skip the FILENAME statement and reference the file directly in the INFILE statement adding the ZIP engine and GZIP option there instead. Like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile 'mylog.log.gz' zip gzip;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 May 2024 15:33:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/connect-files-from-a-web-server/m-p/928302#M365232</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-05-14T15:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: connect files from a web server</title>
      <link>https://communities.sas.com/t5/SAS-Programming/connect-files-from-a-web-server/m-p/928737#M365441</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Dear Tom,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I sincerely appreciate your value observation. Upon thorough examination and careful consideration, I have concluded that the most prudent and effective approach would be to PROC LIBRARY step because depends on several factors, such as file size, access frequency, processing needs, and execution environment.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;For small files and occasional access, INFILE is the simplest and most efficient option. For medium or large files, or when complex processing is required, PROC ZIP or PROC LIBRARY are better options. If flexible file access or control over processing is needed, the SAS Viya REST API or SAS Event Stream may be more suitable alternatives. &lt;/SPAN&gt;In other words, to summarize:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Factor&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;infile&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;proc zip&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;proc library&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;SAS Viya REST API&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;SAS Event Stream&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;File size&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Small&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Medium/Large&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Medium/Large&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Any&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Any&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Access frequency&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Occasional&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Frequent&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Frequent&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Variable&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Frequent&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Processing needs&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Basic&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Complex&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Variable&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Complex&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Complex&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Execution environment&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;SAS Studio, SAS Enterprise Guide&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;SAS Studio, SAS Enterprise Guide&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;SAS Studio, SAS Enterprise Guide&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;SAS Viya&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;SAS Viya&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 16 May 2024 20:14:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/connect-files-from-a-web-server/m-p/928737#M365441</guid>
      <dc:creator>JuanaPrada</dc:creator>
      <dc:date>2024-05-16T20:14:41Z</dc:date>
    </item>
  </channel>
</rss>

