<?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: importing tab delimited files in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/importing-tab-delimited-files/m-p/228291#M16632</link>
    <description>&lt;P&gt;If those dates always start with 2015, or even 20 ( or 20 and 19) you could use index function to find that location and then substr from 1 to that position -1 (the space before 2015).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will be subtle Y2K type potential error but would likely not kick in until Jan 2100...&lt;/P&gt;</description>
    <pubDate>Fri, 02 Oct 2015 22:03:32 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2015-10-02T22:03:32Z</dc:date>
    <item>
      <title>importing tab delimited files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/importing-tab-delimited-files/m-p/227969#M16606</link>
      <description>&lt;P&gt;hi friends please help,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;have one text file like this (test.text); (its tab delimited) (showing separate variables by bold and not bold) - trying to import it but not getting desire result, specially want to separate out red color and blue color as separate variable&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;have&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;zone&amp;nbsp;&lt;STRONG&gt;mkt&lt;/STRONG&gt;&amp;nbsp;/sas/log1/02_mkt/logs &lt;STRONG&gt;01-01_this_is_the_xyz_mkt_&lt;FONT color="#FF0000"&gt;2015.09.30&lt;/FONT&gt;_&lt;FONT color="#333399"&gt;04.01.37&lt;/FONT&gt;.log &lt;/STRONG&gt;(ok) &amp;nbsp;&lt;STRONG&gt;0.104072&lt;/STRONG&gt; Sat &lt;STRONG&gt;Sep&lt;/STRONG&gt; 19 &lt;STRONG&gt;04:04:51&lt;/STRONG&gt; 2015&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;zone&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;fin&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;/sas/log1/02_fin/logs&lt;STRONG&gt; &lt;STRONG&gt;05-05_this_is_the_xyz_fin_&lt;FONT color="#FF0000"&gt;2015.09.30&lt;/FONT&gt;_&lt;FONT color="#333399"&gt;04.05.00&lt;/FONT&gt;.log &lt;/STRONG&gt;&lt;SPAN&gt;(ok) &amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;0.104072&lt;/STRONG&gt;&lt;SPAN&gt; Sat &lt;/SPAN&gt;&lt;STRONG&gt;Sep&lt;/STRONG&gt;&lt;SPAN&gt; 19 &lt;/SPAN&gt;&lt;STRONG&gt;04:21:51&lt;/STRONG&gt;&lt;SPAN&gt; 2015&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;zone&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;sales&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;/sas/log1/02_sales/logs&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;10&lt;/SPAN&gt;&lt;STRONG&gt;-13_this_is_the_xyz_sales_&lt;FONT color="#FF0000"&gt;2015.09.30&lt;/FONT&gt;_&lt;FONT color="#333399"&gt;04.22.13&lt;/FONT&gt;.log &lt;/STRONG&gt;&lt;SPAN&gt;(ok) &amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;0.104072&lt;/STRONG&gt;&lt;SPAN&gt; Sat &lt;/SPAN&gt;&lt;STRONG&gt;Sep&lt;/STRONG&gt;&lt;SPAN&gt; 19 &lt;/SPAN&gt;&lt;STRONG&gt;04:54:09&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;2015&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;want &lt;/STRONG&gt;(example for dataline 1 and it should be same for others too)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;var1=zone&lt;/P&gt;
&lt;P&gt;var2=&lt;STRONG&gt;mkt&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;var3=&lt;SPAN&gt;/sas/log1/02_mkt/logs&lt;/SPAN&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;var4=&lt;STRONG&gt;01-01_this_is_the_xyz_mkt&lt;/STRONG&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;date=&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;2015.09.30&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;start=&lt;STRONG&gt;&lt;FONT color="#333399"&gt;04.01.37&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;var7=&lt;SPAN&gt;(ok)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;var8=&lt;STRONG&gt;0.104072&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;var9=&lt;SPAN&gt;Sat&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;var10=&lt;STRONG&gt;Sep&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;var11=19&lt;/P&gt;
&lt;P&gt;end=&lt;STRONG&gt;04:04:51&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;var13=&lt;SPAN&gt;2015&lt;/SPAN&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2015 23:50:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/importing-tab-delimited-files/m-p/227969#M16606</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2015-09-30T23:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: importing tab delimited files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/importing-tab-delimited-files/m-p/227977#M16607</link>
      <description>&lt;P&gt;Your example does NOT look like it it tab delimited. it looks more like the values are space delimited.&lt;/P&gt;
&lt;P&gt;But outside of the delimiters (if any) in the file it looks like you are trying to parse the filename into pieces.&lt;/P&gt;
&lt;P&gt;path= '&lt;SPAN&gt;/sas/log1/02_mkt/logs';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;filename='&lt;/SPAN&gt;&lt;STRONG&gt;01-01_this_is_the_xyz_mkt_&lt;FONT color="#FF0000"&gt;2015.09.30&lt;/FONT&gt;_&lt;FONT color="#333399"&gt;04.01.37&lt;/FONT&gt;.log' ;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;datestr=scan(filename,-2,'_');&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;timestr=scan(filename,-2,'._');&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2015 00:20:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/importing-tab-delimited-files/m-p/227977#M16607</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-10-01T00:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: importing tab delimited files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/importing-tab-delimited-files/m-p/228142#M16614</link>
      <description>&lt;P&gt;PROC IMPORT is not getting full "filename" is there a way to define length in PROC IMPORT,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2015 21:58:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/importing-tab-delimited-files/m-p/228142#M16614</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2015-10-01T21:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: importing tab delimited files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/importing-tab-delimited-files/m-p/228143#M16615</link>
      <description>&lt;P&gt;never mind, used filename and data step and it worked,,,&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2015 22:12:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/importing-tab-delimited-files/m-p/228143#M16615</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2015-10-01T22:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: importing tab delimited files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/importing-tab-delimited-files/m-p/228148#M16616</link>
      <description>&lt;P&gt;but this statement:&amp;nbsp;&lt;FONT color="#0000FF"&gt;timestr=scan(filename,-2,'._');&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#000000"&gt;for this value:&amp;nbsp;&lt;/FONT&gt;&lt;SPAN&gt;&lt;FONT color="#000000"&gt;filename&lt;/FONT&gt;='&lt;/SPAN&gt;&lt;STRONG&gt;01-01_this_is_the_xyz_mkt_&lt;FONT color="#FF0000"&gt;2015.09.30&lt;/FONT&gt;_&lt;FONT color="#333399"&gt;04.01.37&lt;/FONT&gt;.log' ;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;&lt;FONT color="#000000"&gt;give this output:&lt;/FONT&gt; &amp;nbsp;37&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2015 22:57:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/importing-tab-delimited-files/m-p/228148#M16616</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2015-10-01T22:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: importing tab delimited files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/importing-tab-delimited-files/m-p/228158#M16617</link>
      <description>&lt;P&gt;Depending on how consistent the data is you could either parse it into more pieces and build it back up.&lt;/P&gt;
&lt;P&gt;Or it might be easier to parse it just on the underscore and then use substr to remove the '.log' from the end.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;timestr=substr(scan(filename,-1,'_'),1,10);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Our you could look at using regular expressions.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2015 01:41:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/importing-tab-delimited-files/m-p/228158#M16617</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-10-02T01:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: importing tab delimited files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/importing-tab-delimited-files/m-p/228284#M16631</link>
      <description>&lt;P&gt;so for example how can we get this done if we want to scan string from left to right?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;have&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;01-01_this_is_the_xyz_mkt_&lt;FONT color="#FF0000"&gt;2015.09.30&lt;/FONT&gt;_&lt;FONT color="#333399"&gt;04.01.37&lt;/FONT&gt;.log&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;01-01_this_is_the_xyz_market_fin_sale_&lt;FONT color="#FF0000"&gt;2015.09.30&lt;/FONT&gt;_&lt;FONT color="#333399"&gt;04.01.37&lt;/FONT&gt;.log&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;this_is_the_xyz_fin_&lt;FONT color="#FF0000"&gt;2015.09.30&lt;/FONT&gt;_&lt;FONT color="#333399"&gt;04.05.00&lt;/FONT&gt;.log&amp;nbsp;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;want&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;01-01_this_is_the_xyz_mkt_&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;01-01_this_is_the_xyz_market_fin_sale_&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;this_is_the_xyz_fin_&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2015 20:34:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/importing-tab-delimited-files/m-p/228284#M16631</guid>
      <dc:creator>woo</dc:creator>
      <dc:date>2015-10-02T20:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: importing tab delimited files</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/importing-tab-delimited-files/m-p/228291#M16632</link>
      <description>&lt;P&gt;If those dates always start with 2015, or even 20 ( or 20 and 19) you could use index function to find that location and then substr from 1 to that position -1 (the space before 2015).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This will be subtle Y2K type potential error but would likely not kick in until Jan 2100...&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2015 22:03:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/importing-tab-delimited-files/m-p/228291#M16632</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-10-02T22:03:32Z</dc:date>
    </item>
  </channel>
</rss>

