<?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: How to import a TXT file from a database on the network to SAS automatically at a defined time in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-import-a-TXT-file-from-a-database-on-the-network-to-SAS/m-p/841894#M82190</link>
    <description>&lt;P&gt;How do you access the TXT file now?&amp;nbsp; Is there a URL you can use that will return the text from the file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so then use the URL filename engine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So here is an example of a data step that reads from a CSV file with 4 variables.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  infile 'http://servername/location' url dsd truncover firstobs=2;
  input var1 var2 var3 :$20 var4 :date. ;
  format var4 date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 01 Nov 2022 15:13:15 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-11-01T15:13:15Z</dc:date>
    <item>
      <title>How to import a TXT file from a database on the network to SAS automatically at a defined time</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-import-a-TXT-file-from-a-database-on-the-network-to-SAS/m-p/841890#M82189</link>
      <description>&lt;PRE class=""&gt;&lt;SPAN class=""&gt;Good Morning! How are you?

I need to import a database in TXT format, but it is in the cloud and not on my machine.

How can I import this database into a specific LIBNAME, in an automated way at a pre-defined time?

Is there any code for this or do you have a tool in SAS that already does this?


Thanks for your help! :)&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Nov 2022 14:52:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-import-a-TXT-file-from-a-database-on-the-network-to-SAS/m-p/841890#M82189</guid>
      <dc:creator>BrunoKnudsen</dc:creator>
      <dc:date>2022-11-01T14:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to import a TXT file from a database on the network to SAS automatically at a defined time</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-import-a-TXT-file-from-a-database-on-the-network-to-SAS/m-p/841894#M82190</link>
      <description>&lt;P&gt;How do you access the TXT file now?&amp;nbsp; Is there a URL you can use that will return the text from the file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so then use the URL filename engine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So here is an example of a data step that reads from a CSV file with 4 variables.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  infile 'http://servername/location' url dsd truncover firstobs=2;
  input var1 var2 var3 :$20 var4 :date. ;
  format var4 date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Nov 2022 15:13:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-import-a-TXT-file-from-a-database-on-the-network-to-SAS/m-p/841894#M82190</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-11-01T15:13:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to import a TXT file from a database on the network to SAS automatically at a defined time</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-import-a-TXT-file-from-a-database-on-the-network-to-SAS/m-p/841900#M82191</link>
      <description>&lt;P&gt;What type of "cloud" access is this?&lt;/P&gt;
&lt;P&gt;What operating system are you using?&lt;/P&gt;
&lt;P&gt;Are you sure that the cloud file will be available to you "at a defined time"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the file will show in your local file management program, such as Windows Explorer as an example, then the path and name used there should work in SAS.&lt;/P&gt;
&lt;P&gt;I have many files on a One Drive server for example. Once I have a path to the file I need then a SAS Filename statement will associate the file and can be read (or create a file if needed for output).&lt;/P&gt;
&lt;P&gt;So a basic data step to read a TXT file should work just fine once you get the proper path syntax.&lt;/P&gt;
&lt;P&gt;I suggest using a scheduling program to start SAS and execute the read.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: "Import" when used to indicate Proc Import is a poor choice for repeated reads of different files. The differences between files can lead to variables of the same name having different lengths and data types as the procedure makes guesses based on the actual content of the file "imported". It is much better and will avoid many headaches to have a proper description of the source text file and read it with a data step so things stay consistent.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Nov 2022 15:57:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-import-a-TXT-file-from-a-database-on-the-network-to-SAS/m-p/841900#M82191</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-11-01T15:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to import a TXT file from a database on the network to SAS automatically at a defined time</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-import-a-TXT-file-from-a-database-on-the-network-to-SAS/m-p/843124#M82230</link>
      <description>&lt;DIV class=""&gt;&lt;PRE class=""&gt;&lt;SPAN class=""&gt;Thank you so much for your answer! It sure helped me a lot!&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 08 Nov 2022 13:57:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-import-a-TXT-file-from-a-database-on-the-network-to-SAS/m-p/843124#M82230</guid>
      <dc:creator>BrunoKnudsen</dc:creator>
      <dc:date>2022-11-08T13:57:52Z</dc:date>
    </item>
  </channel>
</rss>

