<?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: Catx or trim?  Help with Problem in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350792#M81589</link>
    <description>&lt;P&gt;Its actually how one of our tables are built. &amp;nbsp;Its an ugly process on how it is injested. &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Apr 2017 11:57:27 GMT</pubDate>
    <dc:creator>IgawaKei29</dc:creator>
    <dc:date>2017-04-18T11:57:27Z</dc:date>
    <item>
      <title>Catx or trim?  Help with Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350765#M81574</link>
      <description>&lt;P&gt;So I am trying to figure out how to take this string of data and seperate it out with a data step. &amp;nbsp;I understand the concept, but I am not sure how to apply it to multiple results.&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;My_Data: 12345 | Harry | Crumb | 123 Fake Street | Anytown | MA | More of the same&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I want to take the data and seperate it out:&lt;/P&gt;
&lt;P&gt;Ac_Num = 12345&lt;/P&gt;
&lt;P&gt;Fr_Nm = Harry&lt;/P&gt;
&lt;P&gt;Ls_Nm = Crumb&lt;/P&gt;
&lt;P&gt;Address = 123 Fake Street&lt;/P&gt;
&lt;P&gt;City = Anytown&lt;/P&gt;
&lt;P&gt;State = MA&lt;/P&gt;
&lt;P&gt;Text = More of the Same&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know how to do this if there is 1 variable, so I am curious what I need to do to gather them all.&lt;/P&gt;
&lt;P&gt;Ac_Num&amp;nbsp;= substr(&lt;SPAN&gt;My_Data&lt;/SPAN&gt;, 1, index(&lt;SPAN&gt;My_Data&lt;/SPAN&gt;, '|') - 1);&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 10:18:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350765#M81574</guid>
      <dc:creator>IgawaKei29</dc:creator>
      <dc:date>2017-04-18T10:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: Catx or trim?  Help with Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350766#M81575</link>
      <description>&lt;P&gt;Is your raw data already in a sas table? If not what format is it in?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 10:20:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350766#M81575</guid>
      <dc:creator>jessicaking</dc:creator>
      <dc:date>2017-04-18T10:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Catx or trim?  Help with Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350767#M81576</link>
      <description>&lt;P&gt;Yes it is all in 1 line on my table. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 10:22:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350767#M81576</guid>
      <dc:creator>IgawaKei29</dc:creator>
      <dc:date>2017-04-18T10:22:01Z</dc:date>
    </item>
    <item>
      <title>Re: Catx or trim?  Help with Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350768#M81577</link>
      <description>&lt;P&gt;&lt;BR /&gt;data finaldata;&lt;BR /&gt;set rawdata;&lt;BR /&gt;Ac_Num=trim(scan(my_data,1,'|'));&lt;BR /&gt;*scan(variable name, position, delimeter);&lt;BR /&gt;Fr_Nm=trim(scan(my_data,2,'|'));&lt;BR /&gt;Ls_Nm=trim(scan(my_data,3,'|'));&lt;BR /&gt;Address=trim(scan(my_data,4,'|'));&lt;BR /&gt;City=trim(scan(my_data,5,'|'));&lt;BR /&gt;State=trim(scan(my_data,6,'|'));&lt;BR /&gt;Text=trim(scan(my_data,7,'|'));&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 10:29:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350768#M81577</guid>
      <dc:creator>jessicaking</dc:creator>
      <dc:date>2017-04-18T10:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Catx or trim?  Help with Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350769#M81578</link>
      <description>&lt;P&gt;Thanks so much &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I haven't used the scan feature before, I am going to play around with that a little bit looks like it can help me in other programs as well.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 10:35:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350769#M81578</guid>
      <dc:creator>IgawaKei29</dc:creator>
      <dc:date>2017-04-18T10:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Catx or trim?  Help with Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350770#M81579</link>
      <description>&lt;P&gt;Its similar to the substring function but is a bit more flexible &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; I personally favor it. Good luck!&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 10:36:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350770#M81579</guid>
      <dc:creator>jessicaking</dc:creator>
      <dc:date>2017-04-18T10:36:28Z</dc:date>
    </item>
    <item>
      <title>Re: Catx or trim?  Help with Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350782#M81585</link>
      <description>&lt;P&gt;data ds1;&lt;BR /&gt;infile datalines dlm ="|";&lt;BR /&gt;input Ac_Num Fr_Nm $ Ls_Nm $ Address :$50. City $ State$ Text :$50. ;&lt;BR /&gt;datalines;&lt;BR /&gt;12345 | Harry | Crumb | 123 Fake Street | Anytown | MA | More of the same&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=ds1;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 11:29:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350782#M81585</guid>
      <dc:creator>atul_desh</dc:creator>
      <dc:date>2017-04-18T11:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Catx or trim?  Help with Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350788#M81587</link>
      <description>&lt;P&gt;Where has this data come from? &amp;nbsp;This is a key question here as it looks like your using delimited data, most likely from a delimited file. &amp;nbsp;If so, then write a datastep import program to read the data correctly, avoiding the need for post-processing the data at all.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 11:51:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350788#M81587</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-04-18T11:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Catx or trim?  Help with Problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350792#M81589</link>
      <description>&lt;P&gt;Its actually how one of our tables are built. &amp;nbsp;Its an ugly process on how it is injested. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 11:57:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Catx-or-trim-Help-with-Problem/m-p/350792#M81589</guid>
      <dc:creator>IgawaKei29</dc:creator>
      <dc:date>2017-04-18T11:57:27Z</dc:date>
    </item>
  </channel>
</rss>

