<?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: import of a tab delimited file in SAS Studio is not working? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/import-of-a-tab-delimited-file-in-SAS-Studio-is-not-working/m-p/777357#M247295</link>
    <description>You're mixing and matching concepts here. &lt;BR /&gt;Libraries are for referencing SAS data sets not text files. Filename is correct for text files but you have to provide the full path. &lt;BR /&gt;</description>
    <pubDate>Fri, 29 Oct 2021 16:41:50 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-10-29T16:41:50Z</dc:date>
    <item>
      <title>import of a tab delimited file in SAS Studio is not working?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-of-a-tab-delimited-file-in-SAS-Studio-is-not-working/m-p/777313#M247268</link>
      <description>&lt;P&gt;hypertension exists. SAS Studio can't find it? WHy?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
libname mylib '/home/u50158717/Stat.775.data';
filename hyperten 'hypertension.txt';
data hp;
infile "mylib.hyperten" DLM='09'X DSD TRUNCOVER;
input group $ NaCl;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;error messge in log&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 14:53:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-of-a-tab-delimited-file-in-SAS-Studio-is-not-working/m-p/777313#M247268</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2021-10-29T14:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: import of a tab delimited file in SAS Studio is not working?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-of-a-tab-delimited-file-in-SAS-Studio-is-not-working/m-p/777318#M247270</link>
      <description>&lt;P&gt;You need to include the complete path to the file in the filename statement. If you see the file in your file list, right-click and check the Properties, and copy the path from there, then add to your code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;filename hyper '/u/myfolder/hypertension.txt';&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then use the fileref in your INFILE:&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;infile hyper DLM='09'X DSD TRUNCOVER;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 14:59:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-of-a-tab-delimited-file-in-SAS-Studio-is-not-working/m-p/777318#M247270</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2021-10-29T14:59:27Z</dc:date>
    </item>
    <item>
      <title>Re: import of a tab delimited file in SAS Studio is not working?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-of-a-tab-delimited-file-in-SAS-Studio-is-not-working/m-p/777346#M247286</link>
      <description>&lt;P&gt;So your code has a LIBNAME statement and a FILENAME statement at the top, but your data step is not using either the libref (MYLIB) or the fileref (HYPERTEN) they defined.&amp;nbsp; Instead you are looking for a file named 'mylib.hyperten' in the current working directory.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to use the libref then use it in specifying the output dataset name in the DATA statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data mylib.hp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want to use the fileref then either point it to the actual file you want and then reference the fileref in your INFILE statement. So perhaps something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename hyperten '/home/u50158717/Stat.775.data/hypertension.txt';
....
infile hyperten DLM='09'X DSD TRUNCOVER;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or you could point the fileref to a folder and then name the specific file from that folder in the INFILE statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename hyperten '/home/u50158717/Stat.775.data/';
....
infile hyperten('hypertension.txt') DLM='09'X DSD TRUNCOVER;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or skip the FILENAME statement completely and just list the full filename in the INFILE statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile '/home/u50158717/Stat.775.data/hypertension.txt' DLM='09'X DSD TRUNCOVER;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Oct 2021 16:15:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-of-a-tab-delimited-file-in-SAS-Studio-is-not-working/m-p/777346#M247286</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-10-29T16:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: import of a tab delimited file in SAS Studio is not working?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-of-a-tab-delimited-file-in-SAS-Studio-is-not-working/m-p/777357#M247295</link>
      <description>You're mixing and matching concepts here. &lt;BR /&gt;Libraries are for referencing SAS data sets not text files. Filename is correct for text files but you have to provide the full path. &lt;BR /&gt;</description>
      <pubDate>Fri, 29 Oct 2021 16:41:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-of-a-tab-delimited-file-in-SAS-Studio-is-not-working/m-p/777357#M247295</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-29T16:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: import of a tab delimited file in SAS Studio is not working?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-of-a-tab-delimited-file-in-SAS-Studio-is-not-working/m-p/777391#M247310</link>
      <description>Two good explanations today. Thanks. I need to study your solution.</description>
      <pubDate>Fri, 29 Oct 2021 19:02:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-of-a-tab-delimited-file-in-SAS-Studio-is-not-working/m-p/777391#M247310</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2021-10-29T19:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: import of a tab delimited file in SAS Studio is not working?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-of-a-tab-delimited-file-in-SAS-Studio-is-not-working/m-p/777392#M247311</link>
      <description>I keep thinking that with the libname location specified that the filename will be automatically be placed in mylib. Thank you. MM</description>
      <pubDate>Fri, 29 Oct 2021 19:04:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-of-a-tab-delimited-file-in-SAS-Studio-is-not-working/m-p/777392#M247311</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2021-10-29T19:04:20Z</dc:date>
    </item>
  </channel>
</rss>

