<?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: SAS concatenate string and integer in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/SAS-concatenate-string-and-integer/m-p/627848#M20599</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/292097"&gt;@ed_sas_member&lt;/a&gt; 's reply DOES have variable names.&amp;nbsp; The datalines approach is used instead of SET statements to show you that the CAT functions works - you can compare the result to the original variables YEAR and QUARTER.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Feb 2020 10:50:08 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2020-02-27T10:50:08Z</dc:date>
    <item>
      <title>SAS concatenate string and integer</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-concatenate-string-and-integer/m-p/627834#M20594</link>
      <description>&lt;P&gt;I have two variables&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;one is named yr and is an integer e.g. 2017&lt;/P&gt;
&lt;P&gt;and one called quarter taking values Q1, Q2, Q3 etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I produce a variable called Time which contains YearQuarter concatenated e.g. 2017Q1 etc?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;rsubmit;&lt;BR /&gt;DATA dataset_1;&lt;BR /&gt;SET dataset_1;&lt;BR /&gt;Time=cat(yr, quarter);&lt;BR /&gt;RUN;&lt;BR /&gt;endrsubmit;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but it returns empty values&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 10:24:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-concatenate-string-and-integer/m-p/627834#M20594</guid>
      <dc:creator>adrfinance</dc:creator>
      <dc:date>2020-02-27T10:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: SAS concatenate string and integer</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-concatenate-string-and-integer/m-p/627837#M20596</link>
      <description>&lt;P&gt;Works fine?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
   yr=2017;
   quarter='Q1';
   time=cat(yr, quarter);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Feb 2020 10:26:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-concatenate-string-and-integer/m-p/627837#M20596</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2020-02-27T10:26:39Z</dc:date>
    </item>
    <item>
      <title>Re: SAS concatenate string and integer</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-concatenate-string-and-integer/m-p/627839#M20597</link>
      <description>&lt;P&gt;Pleas provide more details as this code works fine&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data dataset_1;
	input yr quarter $;
	Time=cat(yr, quarter);
	datalines;
2017 Q1
2017 Q2
2017 Q3
;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Feb 2020 10:28:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-concatenate-string-and-integer/m-p/627839#M20597</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-02-27T10:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: SAS concatenate string and integer</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-concatenate-string-and-integer/m-p/627841#M20598</link>
      <description>&lt;P&gt;Can you post your reply with variables names insted of using datalines?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 10:29:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-concatenate-string-and-integer/m-p/627841#M20598</guid>
      <dc:creator>adrfinance</dc:creator>
      <dc:date>2020-02-27T10:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAS concatenate string and integer</title>
      <link>https://communities.sas.com/t5/New-SAS-User/SAS-concatenate-string-and-integer/m-p/627848#M20599</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/292097"&gt;@ed_sas_member&lt;/a&gt; 's reply DOES have variable names.&amp;nbsp; The datalines approach is used instead of SET statements to show you that the CAT functions works - you can compare the result to the original variables YEAR and QUARTER.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 10:50:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/SAS-concatenate-string-and-integer/m-p/627848#M20599</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2020-02-27T10:50:08Z</dc:date>
    </item>
  </channel>
</rss>

