<?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 space delimited text if column values contain spaces in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171112#M3335</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well unfortunately it's not fixed columns! So the problem is that the data is not evenly distributed among the columns. I am not sure, but I think there is no "quote qualification". I attached the txt file so you can see that there is no additional information and the problem is that the column can't be imported with a fixed length, because the column has somehow no fixed length.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 Apr 2014 07:50:24 GMT</pubDate>
    <dc:creator>NCEU</dc:creator>
    <dc:date>2014-04-08T07:50:24Z</dc:date>
    <item>
      <title>Import space delimited text if column values contain spaces</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171109#M3332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a beginners question about importing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following txt file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obs road paint bright&lt;/P&gt;&lt;P&gt;1 Center St. 1 43&lt;/P&gt;&lt;P&gt;2 Broadway 1 46&lt;/P&gt;&lt;P&gt;3 Main St. 1 47&lt;/P&gt;&lt;P&gt;4 Main St. 3 54&lt;/P&gt;&lt;P&gt;5 Elm St. 1 55&lt;/P&gt;&lt;P&gt;6 Station Rd. 1 56&lt;/P&gt;&lt;P&gt;7 Center St. 1 59&lt;/P&gt;&lt;P&gt;8 Center St. 4 61&lt;/P&gt;&lt;P&gt;9 Main St. 3 62&lt;/P&gt;&lt;P&gt;10 Center St. 4 62&lt;/P&gt;&lt;P&gt;11 Park Dr. 3 63&lt;/P&gt;&lt;P&gt;12 Main St. 2 64&lt;/P&gt;&lt;P&gt;13 Park Dr. 1 64&lt;/P&gt;&lt;P&gt;14 Broadway 4 64&lt;/P&gt;&lt;P&gt;15 Broadway 2 64&lt;/P&gt;&lt;P&gt;16 Broadway 3 65&lt;/P&gt;&lt;P&gt;17 Station Rd. 3 67&lt;/P&gt;&lt;P&gt;18 Station Rd. 3 67&lt;/P&gt;&lt;P&gt;19 Elm St. 3 68&lt;/P&gt;&lt;P&gt;20 Beech St. 4 71&lt;/P&gt;&lt;P&gt;21 Elm St. 4 72&lt;/P&gt;&lt;P&gt;22 Beech St. 2 75&lt;/P&gt;&lt;P&gt;23 Beech St. 4 75&lt;/P&gt;&lt;P&gt;24 Beech St. 2 76&lt;/P&gt;&lt;P&gt;25 Park Dr. 4 77&lt;/P&gt;&lt;P&gt;26 Elm St. 2 79&lt;/P&gt;&lt;P&gt;27 Station Rd. 2 79&lt;/P&gt;&lt;P&gt;28 Park Dr. 2 84&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I tried to import it and as a control I saved the code in a file and the code is:&lt;/P&gt;&lt;P style="text-align: center;"&gt;&lt;/P&gt;&lt;P&gt;PROC IMPORT OUT= WORK.B_ROADS &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAFILE= "F:\SAS Unterlagen\Statistical Business\B_roads.txt" &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=DLM REPLACE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DELIMITER='20'x; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GETNAMES=YES;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAROW=2; &lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately the column road contains values which contain spaces. So the resulting table in SAS is different, because it adds a new column and a new variable. Like this:&lt;/P&gt;&lt;P&gt;Obs road&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; paint bright VAR5&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Center&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; St.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 43&lt;/P&gt;&lt;P&gt;and so on.....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the problem is that I somehow have to tell SAS that the variable road contains spaces. How can I achieve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 16:35:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171109#M3332</guid>
      <dc:creator>NCEU</dc:creator>
      <dc:date>2014-04-07T16:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Import space delimited text if column values contain spaces</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171110#M3333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Whatever creates the text file really should quote qualify the data in which case the simple answer would be the DSD option on an infile statement in&amp;nbsp; data step program modified from code generated by proc import.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately your example data doesn't show the quote qualification. By chance do they appear in the actual file and were removed for the example?&lt;/P&gt;&lt;P&gt;Or perhaps the data is fixed column? If you look at the data using the SAS program editor or Notepad with Courier or fixed width font do the columns align?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Apr 2014 22:48:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171110#M3333</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-04-07T22:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Import space delimited text if column values contain spaces</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171111#M3334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont think you can import the data you have provide using proc import procedure as there are spaces between road variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use input and infile statement to import this data correctly only if the data is evenly distributed among the columns in txt file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;input obs &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;-&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; road $ &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;3&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;-&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;12&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp; paint &lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;15&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;-&lt;/SPAN&gt;&lt;STRONG style=": ; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;16&amp;nbsp; bright 17-3&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;5 Elm St.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 55&lt;/P&gt;&lt;P&gt;6 Station Rd.&amp;nbsp;&amp;nbsp; 1 56&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2014 06:41:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171111#M3334</guid>
      <dc:creator>Chrishi</dc:creator>
      <dc:date>2014-04-08T06:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Import space delimited text if column values contain spaces</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171112#M3335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well unfortunately it's not fixed columns! So the problem is that the data is not evenly distributed among the columns. I am not sure, but I think there is no "quote qualification". I attached the txt file so you can see that there is no additional information and the problem is that the column can't be imported with a fixed length, because the column has somehow no fixed length.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2014 07:50:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171112#M3335</guid>
      <dc:creator>NCEU</dc:creator>
      <dc:date>2014-04-08T07:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Import space delimited text if column values contain spaces</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171113#M3336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why not import that whole text as one long text string.&amp;nbsp; Then process it in a datastep.&amp;nbsp; So (note I wrote this very quickly and didn't think about optimizing or better methods of getting the data, just got it working:&lt;/P&gt;&lt;P&gt;filename mine "S:\Temp\Rob\test.txt";&lt;BR /&gt;data have;&lt;BR /&gt;&amp;nbsp; attrib buff format=$2000.;&lt;BR /&gt;&amp;nbsp; infile mine dsd;&lt;BR /&gt;&amp;nbsp; input buff;&lt;BR /&gt;run;&lt;BR /&gt;data want (drop=tmp);&lt;BR /&gt;&amp;nbsp; set have;&lt;BR /&gt;&amp;nbsp; obs=input(strip(substr(buff,1,index(buff," "))),best.);&lt;BR /&gt;&amp;nbsp; buff=strip(substr(buff,index(buff," ")));&lt;BR /&gt;&amp;nbsp; tmp=index(strip(reverse(buff))," ")-1;&lt;BR /&gt;&amp;nbsp; bright=input(strip(substr(buff,length(strip(buff))-tmp)),best.);&lt;BR /&gt;&amp;nbsp; buff=substr(strip(buff),1,length(strip(buff))-tmp);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2014 08:21:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171113#M3336</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2014-04-08T08:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Import space delimited text if column values contain spaces</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171114#M3337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: Consolas;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; want(drop=line);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;infile&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; datalines &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;truncover&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt; line &lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: teal; font-size: 10pt;"&gt;$1000.&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;obs=scan(line,&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 10pt;"&gt;' '&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;road =substr(substr(line,length(scan(line,&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 10pt;"&gt;' '&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;))+&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;),&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;,index(substr(line,length(scan(line,&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 10pt;"&gt;' '&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;))+&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;),scan(line,-&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 10pt;"&gt;' '&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;))-&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;paint=scan(line,-&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 10pt;"&gt;' '&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;bright=scan(line,-&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background: white; font-family: Consolas;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: purple; font-size: 10pt;"&gt;' '&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: blue; font-size: 10pt;"&gt;datalines&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;1 Center St. 1 43&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;2 Broadway 1 46&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;3 Main St. 1 47&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;4 Main St. 3 54&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;5 Elm St. 1 55&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;6 Station Rd. 1 56&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;7 Center St. 1 59&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;8 Center St. 4 61&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;9 Main St. 3 62&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;10 Center St. 4 62&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;11 Park Dr. 3 63&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;12 Main St. 2 64&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;13 Park Dr. 1 64&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;14 Broadway 4 64&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;15 Broadway 2 64&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;16 Broadway 3 65&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;17 Station Rd. 3 67&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;18 Station Rd. 3 67&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;19 Elm St. 3 68&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;20 Beech St. 4 71&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;21 Elm St. 4 72&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;22 Beech St. 2 75&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;23 Beech St. 4 75&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;24 Beech St. 2 76&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;25 Park Dr. 4 77&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;26 Elm St. 2 79&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;27 Station Rd. 2 79&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: #ffffc0; color: black; font-size: 10pt;"&gt;28 Park Dr. 2 84&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background: white; font-family: Consolas;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: Consolas; background: white; color: black; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2014 10:02:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171114#M3337</guid>
      <dc:creator>pradeepalankar</dc:creator>
      <dc:date>2014-04-08T10:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Import space delimited text if column values contain spaces</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171115#M3338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So what you need to know to read ROAD is the length of the field.&amp;nbsp; SAS has $VARYING to read it once you know the length.&amp;nbsp; You can calculate that by finding the starting column of PAINT, you always know where paint is relative to the end of line at SCAN -2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 9pt;"&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;filename&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; FT15F001 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;temp&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; paint;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;infile&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; FT15F001 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;firstobs&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;2&lt;/STRONG&gt; &lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;column&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=c;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; obs @;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;call&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; scan(_infile_,-&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;,s,l);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; l=s-c-&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; road &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;$varying32.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; l paint bright;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;drop&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; s l;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; background-color: #ffffff;"&gt;parmcards&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; background-color: #ffffff;"&gt;Obs&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; road paint bright&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Center &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;St.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;43&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Broadway &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;46&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;3&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Main &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;St.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;47&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;4&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Main &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;St.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;3&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;54&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;5&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Elm &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;St.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;55&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;6&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Station &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;Rd.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;56&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;7&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Center &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;St.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;59&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;8&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Center &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;St.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;4&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;61&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;9&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Main &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;St.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;3&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;62&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;10&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Center &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;St.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;4&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;62&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;11&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Park &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;Dr.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;3&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;63&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;12&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Main &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;St.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;2&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;64&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;13&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Park &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;Dr.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;64&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;14&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Broadway &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;4&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;64&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;15&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Broadway &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;2&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;64&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;16&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Broadway &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;3&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;65&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;17&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Station &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;Rd.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;3&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;67&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;18&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Station &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;Rd.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;3&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;67&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;19&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Elm &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;St.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;3&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;68&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;20&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Beech &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;St.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;4&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;71&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;21&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Elm &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;St.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;4&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;72&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;22&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Beech &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;St.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;2&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;75&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;23&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Beech &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;St.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;4&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;75&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;24&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Beech &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;St.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;2&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;76&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;25&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Park &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;Dr.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;4&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;77&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;26&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Elm &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;St.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;2&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;79&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;27&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Station &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;Rd.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;2&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;79&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;28&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; Park &lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;Dr.&lt;/SPAN&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;2&lt;/STRONG&gt; &lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;84&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;;;;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;print&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2014 10:37:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171115#M3338</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-04-08T10:37:10Z</dc:date>
    </item>
    <item>
      <title>Re: Import space delimited text if column values contain spaces</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171116#M3339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to use perl regular expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data want;
 infile 'c:\temp\B_roads.txt' truncover firstobs=2;
 input;
pid=prxparse('/(\d+)\s+(\D+)\s+(\d+)\s+(\d+)/');
if prxmatch(pid,_infile_) then do;
 call prxposn(pid,1,p,l);
 obs=substr(_infile_,p,l);
 call prxposn(pid,2,p,l);
 road=substr(_infile_,p,l);
 call prxposn(pid,3,p,l);
 paint=substr(_infile_,p,l);
 call prxposn(pid,4,p,l);
 bright=substr(_infile_,p,l);
end;
drop p l pid;
run;


&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2014 10:47:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171116#M3339</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-04-08T10:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: Import space delimited text if column values contain spaces</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171117#M3340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;great . request you to pls explain&amp;nbsp; the same &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the use of column c and &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; font-family: 'Courier New'; color: #000000; background-color: #ffffff;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: 'Courier New'; color: #0000ff; background-color: #ffffff;"&gt;call&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: 'Courier New'; color: #000000; background-color: #ffffff;"&gt; scan(_infile_,-&lt;/SPAN&gt;&lt;STRONG style="font-size: 12px; font-family: 'Courier New'; color: #008080; background-color: #ffffff;"&gt;2&lt;/STRONG&gt;&lt;SPAN style="font-size: 12px; font-family: 'Courier New'; color: #000000; background-color: #ffffff;"&gt;,s,l);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: 'Courier New'; color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; l=s-c-&lt;/SPAN&gt;&lt;STRONG style="font-size: 12px; font-family: 'Courier New'; color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;Regards &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 12px; background-color: #ffffff;"&gt;Tarun Kumar&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2014 10:51:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171117#M3340</guid>
      <dc:creator>TarunKumar</dc:creator>
      <dc:date>2014-04-08T10:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Import space delimited text if column values contain spaces</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171118#M3341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@tarun for the call scan explanation, see: &lt;A href="http://support.sas.com/documentation/cdl/en/lefunctionsref/67239/HTML/default/viewer.htm#n0ecxfx00bn8i4n1vhh8up24ha6x.htm" title="http://support.sas.com/documentation/cdl/en/lefunctionsref/67239/HTML/default/viewer.htm#n0ecxfx00bn8i4n1vhh8up24ha6x.htm"&gt;SAS(R) 9.4 Functions and CALL Routines: Reference, Second Edition&lt;/A&gt; (call scan)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2014 11:08:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171118#M3341</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-04-08T11:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Import space delimited text if column values contain spaces</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171119#M3342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;C is the position of the input statement column pointer after reading OBS and is the starting column of ROAD.&amp;nbsp; See INFILE COLUMN=C;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL SCAN tells you where it does not return the word like the SCAN function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S is the starting position of PAINT &lt;/P&gt;&lt;P&gt;so the length of ROAD is&lt;/P&gt;&lt;P&gt;s-c-1;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Apr 2014 11:14:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171119#M3342</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-04-08T11:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Import space delimited text if column values contain spaces</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171120#M3343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, these are all great solutions, thanks a lot for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 16:45:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Import-space-delimited-text-if-column-values-contain-spaces/m-p/171120#M3343</guid>
      <dc:creator>NCEU</dc:creator>
      <dc:date>2014-04-09T16:45:33Z</dc:date>
    </item>
  </channel>
</rss>

