<?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: Is there function in SAS EG similar to  &amp;quot;text to column&amp;quot; in Excel? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Is-there-function-in-SAS-EG-similar-to-quot-text-to-column-quot/m-p/524565#M4794</link>
    <description>&lt;P&gt;Not sure how you would do it by clicking on things, but it is trivial to do with a program.&lt;/P&gt;
&lt;P&gt;So if you have a variable names MYVAR in a dataset named HAVE you can use this program to create a new dataset called WANT that adds two now columns names COL1 and COL2.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  length col1 col2 $10 ;
  col1 = scan(myvar,1,'_');
  col2 = scan(myvar,2,'_');
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 04 Jan 2019 14:59:37 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-01-04T14:59:37Z</dc:date>
    <item>
      <title>Is there function in SAS EG similar to  "text to column" in Excel?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-function-in-SAS-EG-similar-to-quot-text-to-column-quot/m-p/524563#M4793</link>
      <description>&lt;P&gt;I have a character column like this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;aaa_xyz&lt;/P&gt;&lt;P&gt;bbb_yxz&lt;/P&gt;&lt;P&gt;ccc_zyx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to break this&amp;nbsp; column into two columns, one&lt;/P&gt;&lt;P&gt;aaa&lt;/P&gt;&lt;P&gt;bbb&lt;/P&gt;&lt;P&gt;ccc&lt;/P&gt;&lt;P&gt;and the other&lt;/P&gt;&lt;P&gt;xyz&lt;/P&gt;&lt;P&gt;yxz&lt;/P&gt;&lt;P&gt;zyx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I do that quickly in SAS EG? I know in Excel it can be done quickly by text to column… but SAS EG's split column function does something else… not want I want...&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2019 14:56:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-function-in-SAS-EG-similar-to-quot-text-to-column-quot/m-p/524563#M4793</guid>
      <dc:creator>Yiting</dc:creator>
      <dc:date>2019-01-04T14:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Is there function in SAS EG similar to  "text to column" in Excel?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-function-in-SAS-EG-similar-to-quot-text-to-column-quot/m-p/524565#M4794</link>
      <description>&lt;P&gt;Not sure how you would do it by clicking on things, but it is trivial to do with a program.&lt;/P&gt;
&lt;P&gt;So if you have a variable names MYVAR in a dataset named HAVE you can use this program to create a new dataset called WANT that adds two now columns names COL1 and COL2.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  length col1 col2 $10 ;
  col1 = scan(myvar,1,'_');
  col2 = scan(myvar,2,'_');
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Jan 2019 14:59:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-function-in-SAS-EG-similar-to-quot-text-to-column-quot/m-p/524565#M4794</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-01-04T14:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Is there function in SAS EG similar to  "text to column" in Excel?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-function-in-SAS-EG-similar-to-quot-text-to-column-quot/m-p/524593#M4798</link>
      <description>&lt;P&gt;and if you want to get rid of the original column, add the drop option into&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;'s code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
   set have;
   length col1 col2 $10;
   col1 = scan(myvar,1,'_');
   col2 = scan(myvar,2,'_');
   drop myvar;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2019 16:17:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-function-in-SAS-EG-similar-to-quot-text-to-column-quot/m-p/524593#M4798</guid>
      <dc:creator>joeFurbee</dc:creator>
      <dc:date>2019-01-04T16:17:23Z</dc:date>
    </item>
  </channel>
</rss>

