<?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: Reading text string (variable length) in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89750#M25618</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the $QUOTE. informat to eliminate the quotes around the value in the input file.&amp;nbsp; Use the TRUNCOVER rather than the MISSOVER option to avoid problems when reading past the end of the physical line. With missover the value becomes missing when you read past the end, but with truncover you get the values that are there instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read the line into a character variable and then parse out the model and make from there.&amp;nbsp; This will also let you code in a list of models that require two words like ALFA ROMEO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also added UPCASE() to make it easier to test for specific values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data carnames;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; infile cards truncover ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; length line $100 make model $50 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; input line $quote100. ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; line = upcase(line);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; model = scan(line,1,' ');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; if model in ('ALFA') then model=catx(' ',model,scan(line,2,' '));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; make = substr(line,length(model)+2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; put ( line model make ) (=/);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;cards;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"chevrolet chevelle malibu"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"buick skylark 320"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"plymouth satellite"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"amc rebel sst"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"ford torino"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"ford galaxie 500"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"chevrolet impala"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"plymouth fury iii"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"pontiac catalina"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"amc ambassador dpl"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"citroen ds-21 pallas"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"chevrolet chevelle concours (sw)"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"ford torino (sw)"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"plymouth satellite (sw)"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"amc rebel sst (sw)"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"Alfa Romeo Giulia"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 04 Dec 2012 14:54:14 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2012-12-04T14:54:14Z</dc:date>
    <item>
      <title>Reading text string (variable length)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89746#M25614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to read this into two variables: make and model name. E.g. make=chevrolet, model_name=chevelle malibu&lt;/P&gt;&lt;P&gt;Not sure how to do this since the lengths vary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the code below. But I am left with quotes " in the text variable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Filename carnames url '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www';"&gt;http://www';&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Data Carnames;&lt;/P&gt;&lt;P&gt;INFILE Carnames MISSOVER;&lt;/P&gt;&lt;P&gt;LENGTH n1 n2 n3 $40;&lt;/P&gt;&lt;P&gt;INPUT @2 n1 $ n2 $ n3 $;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"chevrolet chevelle malibu"&lt;/P&gt;&lt;P&gt;"buick skylark 320"&lt;/P&gt;&lt;P&gt;"plymouth satellite"&lt;/P&gt;&lt;P&gt;"amc rebel sst"&lt;/P&gt;&lt;P&gt;"ford torino"&lt;/P&gt;&lt;P&gt;"ford galaxie 500"&lt;/P&gt;&lt;P&gt;"chevrolet impala"&lt;/P&gt;&lt;P&gt;"plymouth fury iii"&lt;/P&gt;&lt;P&gt;"pontiac catalina"&lt;/P&gt;&lt;P&gt;"amc ambassador dpl"&lt;/P&gt;&lt;P&gt;"citroen ds-21 pallas"&lt;/P&gt;&lt;P&gt;"chevrolet chevelle concours (sw)"&lt;/P&gt;&lt;P&gt;"ford torino (sw)"&lt;/P&gt;&lt;P&gt;"plymouth satellite (sw)"&lt;/P&gt;&lt;P&gt;"amc rebel sst (sw)"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2012 01:18:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89746#M25614</guid>
      <dc:creator>sandeep249</dc:creator>
      <dc:date>2012-12-04T01:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Reading text string (variable length)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89747#M25615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Easy.&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;PRE&gt;Data Carnames;
INFILE cards dsd pad MISSOVER length=len;
INPUT x $varying200. len;
make=scan(dequote(x),1);
model=substr(left(dequote(x)),find(dequote(x),' ')+1);
cards;
"chevrolet chevelle malibu"
"buick skylark 320"
"plymouth satellite"
"amc rebel sst"
"ford torino"
"ford galaxie 500"
"chevrolet impala"
"plymouth fury iii"
"pontiac catalina"
"amc ambassador dpl"
"citroen ds-21 pallas"
"chevrolet chevelle concours (sw)"
"ford torino (sw)"
"plymouth satellite (sw)"
"amc rebel sst (sw)"
;
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;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2012 02:22:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89747#M25615</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-12-04T02:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Reading text string (variable length)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89748#M25616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Slightly simplified version &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data Carnames;&lt;/P&gt;&lt;P&gt;INFILE cards ;&lt;/P&gt;&lt;P&gt;INPUT ;&lt;/P&gt;&lt;P&gt;make=scan(dequote(_infile_),1);&lt;/P&gt;&lt;P&gt;model=substr(dequote(_infile_),length(make)+1);&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;"chevrolet chevelle malibu"&lt;/P&gt;&lt;P&gt;"buick skylark 320"&lt;/P&gt;&lt;P&gt;"plymouth satellite"&lt;/P&gt;&lt;P&gt;"amc rebel sst"&lt;/P&gt;&lt;P&gt;"ford torino"&lt;/P&gt;&lt;P&gt;"ford galaxie 500"&lt;/P&gt;&lt;P&gt;"chevrolet impala"&lt;/P&gt;&lt;P&gt;"plymouth fury iii"&lt;/P&gt;&lt;P&gt;"pontiac catalina"&lt;/P&gt;&lt;P&gt;"amc ambassador dpl"&lt;/P&gt;&lt;P&gt;"citroen ds-21 pallas"&lt;/P&gt;&lt;P&gt;"chevrolet chevelle concours (sw)"&lt;/P&gt;&lt;P&gt;"ford torino (sw)"&lt;/P&gt;&lt;P&gt;"plymouth satellite (sw)"&lt;/P&gt;&lt;P&gt;"amc rebel sst (sw)"&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2012 06:24:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89748#M25616</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-12-04T06:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Reading text string (variable length)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89749#M25617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Devil's advocate here: what about "Alfa Romeo Giulia" ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2012 09:56:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89749#M25617</guid>
      <dc:creator>Robert_Bardos</dc:creator>
      <dc:date>2012-12-04T09:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Reading text string (variable length)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89750#M25618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the $QUOTE. informat to eliminate the quotes around the value in the input file.&amp;nbsp; Use the TRUNCOVER rather than the MISSOVER option to avoid problems when reading past the end of the physical line. With missover the value becomes missing when you read past the end, but with truncover you get the values that are there instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read the line into a character variable and then parse out the model and make from there.&amp;nbsp; This will also let you code in a list of models that require two words like ALFA ROMEO.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also added UPCASE() to make it easier to test for specific values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data carnames;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; infile cards truncover ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; length line $100 make model $50 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; input line $quote100. ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; line = upcase(line);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; model = scan(line,1,' ');&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; if model in ('ALFA') then model=catx(' ',model,scan(line,2,' '));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; make = substr(line,length(model)+2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; put ( line model make ) (=/);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;cards;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"chevrolet chevelle malibu"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"buick skylark 320"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"plymouth satellite"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"amc rebel sst"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"ford torino"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"ford galaxie 500"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"chevrolet impala"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"plymouth fury iii"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"pontiac catalina"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"amc ambassador dpl"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"citroen ds-21 pallas"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"chevrolet chevelle concours (sw)"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"ford torino (sw)"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"plymouth satellite (sw)"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"amc rebel sst (sw)"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;"Alfa Romeo Giulia"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2012 14:54:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89750#M25618</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-12-04T14:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: Reading text string (variable length)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89751#M25619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, it's no doubt doable. That wasn't the goal of the question. Rather to raise the awareness that the problem as it was presented is difficult to solve without some kind of lookup table containing manufacturer's names. Although I can't name one off the top of my head, mergers may have created names consisting of three or more parts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Dec 2012 17:10:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89751#M25619</guid>
      <dc:creator>Robert_Bardos</dc:creator>
      <dc:date>2012-12-04T17:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Reading text string (variable length)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89752#M25620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't understand what you mean . What output do you expect ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 02:59:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89752#M25620</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-12-05T02:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Reading text string (variable length)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89753#M25621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry Ksharp, seems I was too scarce with my comment. What I'm trying to convey: &lt;/P&gt;&lt;UL&gt;&lt;LI&gt;^'model' and 'make' are difficult to parse out when the only delimiter between them are blanks&lt;UL&gt;&lt;LI&gt;examples: 'alfa romeo giulia', 'sunbeam talbot alpine', 'steyr puch haflinger' where 'model' consists of the &lt;BR /&gt;first two words&lt;/LI&gt;&lt;LI&gt;examples with more than two words designating 'model' are imaginable though I can't name one&lt;BR /&gt; off the top of my head&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;values requiring special treatment should not be hard coded in programs but stored in tables much rather&lt;UL&gt;&lt;LI&gt;i.e. sequences of "if lowcase(scan(_infile_,1)) = 'alfa' then ....'&amp;nbsp; statements in the program source&lt;BR /&gt;tend to become a maintenance nightmare&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still unclear?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 06:56:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89753#M25621</guid>
      <dc:creator>Robert_Bardos</dc:creator>
      <dc:date>2012-12-05T06:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Reading text string (variable length)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89754#M25622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;It is up to OP. Since OP only show us taking the first word as make, we will not be able to image so far situation.&lt;/LI&gt;&lt;LI&gt;But If I were you ,I will use a Hash table to maintain these key words and get what you want.&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 08:42:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89754#M25622</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-12-05T08:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: Reading text string (variable length)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89755#M25623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With regards to the hash table approach this begs the question whether (and I am talking about every day's reuse of the data here) the hash table can be hardened to a storage medium such that keyed access to a single item is possible without reloading the entire table first. Imagine a multimillion rows table with an index on one or more variables. Which one is more effective: accessing the desired row with a keyed access directly from the storage medium or loading the hash table into memory first and then doing a find on it? I guess it boils down to a "it depends".&lt;/P&gt;&lt;P&gt;Note that I have close to zero experience with hashes but from what I've read (code samples in SAS-L mainly) I'm under the impression that they aren't the swiss army knife for every data retrieval problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 09:06:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89755#M25623</guid>
      <dc:creator>Robert_Bardos</dc:creator>
      <dc:date>2012-12-05T09:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: Reading text string (variable length)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89756#M25624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree. I think your only option is to collapse the data by the first three or four strings, and from that derive a table of "make" values. After extracting that, the remainder becomes the "model". There are just too many odd possibilities to automate the detection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However,one optimization might be to determine if there are only two words, and if there are assume that they are make and model. The makes extracted from that can then be used against the remainder, and any matches can be handled in an automated fashion. This should leave a very small residue for manual evaluation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've dealt with the same problem with municipality and province, and there's really no count-based solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 14:28:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Reading-text-string-variable-length/m-p/89756#M25624</guid>
      <dc:creator>TomKari</dc:creator>
      <dc:date>2012-12-05T14:28:29Z</dc:date>
    </item>
  </channel>
</rss>

