<?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: Creating a column heading from a variable and text in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-column-heading-from-a-variable-and-text/m-p/296451#M62122</link>
    <description>&lt;P&gt;You probably don't need the run statement either. It should reside in the calling scope.&lt;/P&gt;</description>
    <pubDate>Mon, 05 Sep 2016 05:07:57 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2016-09-05T05:07:57Z</dc:date>
    <item>
      <title>Creating a column heading from a variable and text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-column-heading-from-a-variable-and-text/m-p/296445#M62117</link>
      <description>&lt;P&gt;The following code checks whether an exposure value is less than 0 or . and if it is makes it 0. It then puts this into a new field called Raw_Agg_ and whatever the user puts in the variable cov, but I am unable to get SAS to create a new column header out of Raw_Agg_ and the macro variable cov&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;%macro expo_check(exposure_field, cov);
	
	if &amp;amp;exposure_field. &amp;lt; 0 or &amp;amp;exposure_field. = . then Raw_Agg_ || &amp;amp;cov. = 0;
		run;
%mend;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2016 04:19:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-column-heading-from-a-variable-and-text/m-p/296445#M62117</guid>
      <dc:creator>chris_e</dc:creator>
      <dc:date>2016-09-05T04:19:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a column heading from a variable and text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-column-heading-from-a-variable-and-text/m-p/296448#M62120</link>
      <description>&lt;P&gt;You don't need the concatenation operator.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro expo_check(exposure_field, cov);
	
	if &amp;amp;exposure_field. &amp;lt; 0 or &amp;amp;exposure_field. = . then Raw_Agg_&amp;amp;cov. = 0;
		run;
%mend;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 05 Sep 2016 04:44:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-column-heading-from-a-variable-and-text/m-p/296448#M62120</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-09-05T04:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a column heading from a variable and text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-column-heading-from-a-variable-and-text/m-p/296451#M62122</link>
      <description>&lt;P&gt;You probably don't need the run statement either. It should reside in the calling scope.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2016 05:07:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-column-heading-from-a-variable-and-text/m-p/296451#M62122</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-09-05T05:07:57Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a column heading from a variable and text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-a-column-heading-from-a-variable-and-text/m-p/296452#M62123</link>
      <description>&lt;P&gt;Thanks, that was easy I was trying all sorts of other complicated stuff.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2016 05:09:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-a-column-heading-from-a-variable-and-text/m-p/296452#M62123</guid>
      <dc:creator>chris_e</dc:creator>
      <dc:date>2016-09-05T05:09:36Z</dc:date>
    </item>
  </channel>
</rss>

