<?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: How to split character and numeric data from a single column in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-split-character-and-numeric-data-from-a-single-column/m-p/434995#M281983</link>
    <description>&lt;P&gt;That worked with some formatting. Now how can I make the ZipCode column a numerical value?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data AgentD;
infile '/home/Homework 3/AgentD.txt' firstobs=2;
length Customer 8 Date1 8 Date2 8 Address $24;
input Customer Date1 : YYMMDD10. Date2 : YYMMDD10. Address $ &amp;amp;;
format Date1 Date2 YYMMDD10.;
City=scan(address,1,',');
ZipCode=scan(address,-1,',');
keep Customer Date1 Date2 City ZipCode;
run;
proc print data=agentd;
title 'AgentD';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 07 Feb 2018 18:41:17 GMT</pubDate>
    <dc:creator>newbie_grad</dc:creator>
    <dc:date>2018-02-07T18:41:17Z</dc:date>
    <item>
      <title>How to split character and numeric data from a single column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-split-character-and-numeric-data-from-a-single-column/m-p/434966#M281981</link>
      <description>&lt;P&gt;Hello SAS Community!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to split the address column into two new columns, City and ZipCode.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hw3.jpg" style="width: 479px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18382iB831E22B6619D6A8/image-size/large?v=v2&amp;amp;px=999" role="button" title="hw3.jpg" alt="hw3.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data AgentD;
infile '/home/Homework 3/AgentD.txt' firstobs=2;
length Customer 8 Date1 8 Date2 8 Address $13;
input Customer Date1 : YYMMDD10. Date2 : YYMMDD10. Address $ &amp;amp;;
run;
proc print data=agentd;
title 'AgentD';
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Any ideas on how to do this?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 17:40:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-split-character-and-numeric-data-from-a-single-column/m-p/434966#M281981</guid>
      <dc:creator>newbie_grad</dc:creator>
      <dc:date>2018-02-07T17:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to split character and numeric data from a single column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-split-character-and-numeric-data-from-a-single-column/m-p/434967#M281982</link>
      <description>&lt;P&gt;use scan function&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data AgentD;
infile '/home/Homework 3/AgentD.txt' firstobs=2;
length Customer 8 Date1 8 Date2 8 Address $13;
input Customer Date1 : YYMMDD10. Date2 : YYMMDD10. Address $ &amp;amp;;
City=scan(address,1,',');
zipcode=scan(address,-1,',');
run;
proc print data=agentd;
title 'AgentD';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Feb 2018 17:43:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-split-character-and-numeric-data-from-a-single-column/m-p/434967#M281982</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-02-07T17:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to split character and numeric data from a single column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-split-character-and-numeric-data-from-a-single-column/m-p/434995#M281983</link>
      <description>&lt;P&gt;That worked with some formatting. Now how can I make the ZipCode column a numerical value?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data AgentD;
infile '/home/Homework 3/AgentD.txt' firstobs=2;
length Customer 8 Date1 8 Date2 8 Address $24;
input Customer Date1 : YYMMDD10. Date2 : YYMMDD10. Address $ &amp;amp;;
format Date1 Date2 YYMMDD10.;
City=scan(address,1,',');
ZipCode=scan(address,-1,',');
keep Customer Date1 Date2 City ZipCode;
run;
proc print data=agentd;
title 'AgentD';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 07 Feb 2018 18:41:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-split-character-and-numeric-data-from-a-single-column/m-p/434995#M281983</guid>
      <dc:creator>newbie_grad</dc:creator>
      <dc:date>2018-02-07T18:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to split character and numeric data from a single column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-split-character-and-numeric-data-from-a-single-column/m-p/434996#M281984</link>
      <description>&lt;P&gt;use input around the scan like:&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;ZipCode&lt;SPAN class="token operator"&gt;=input(strip(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;scan&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;address&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;-1&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;','&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)),5.)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 18:42:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-split-character-and-numeric-data-from-a-single-column/m-p/434996#M281984</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-02-07T18:42:58Z</dc:date>
    </item>
  </channel>
</rss>

