<?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 Variable in ODS text in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275752#M55189</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to include a numeric variable in an ODS text statement. Is there a way to do that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code is something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods text= "^S={just=l} Note: [xxx] subjects are missing data at this time."&lt;/P&gt;&lt;P&gt;I want to substitute the variable count in place of the Xs.&lt;/P&gt;&lt;P&gt;It is part of a macro code and hence do not want to hard code it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Neha.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jun 2016 17:34:12 GMT</pubDate>
    <dc:creator>analyst_work</dc:creator>
    <dc:date>2016-06-07T17:34:12Z</dc:date>
    <item>
      <title>Variable in ODS text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275752#M55189</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to include a numeric variable in an ODS text statement. Is there a way to do that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code is something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods text= "^S={just=l} Note: [xxx] subjects are missing data at this time."&lt;/P&gt;&lt;P&gt;I want to substitute the variable count in place of the Xs.&lt;/P&gt;&lt;P&gt;It is part of a macro code and hence do not want to hard code it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Neha.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 17:34:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275752#M55189</guid>
      <dc:creator>analyst_work</dc:creator>
      <dc:date>2016-06-07T17:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in ODS text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275754#M55190</link>
      <description>&lt;P&gt;Create a macro variable&amp;nbsp;that holds the value and then use it in the text.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
select count(*) into :n_count from have where missing(var);
quit;

ods text  = "^S={just=l} Note: [&amp;amp;n_count.] subjects are missing data at this time."&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Jun 2016 17:38:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275754#M55190</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-07T17:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in ODS text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275764#M55194</link>
      <description>Could you please explain this code?&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Tue, 07 Jun 2016 17:57:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275764#M55194</guid>
      <dc:creator>analyst_work</dc:creator>
      <dc:date>2016-06-07T17:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in ODS text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275767#M55195</link>
      <description>&lt;P&gt;Proc sql creates the&amp;nbsp;macro variable that contains the count. You can use a different method to create the macro variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The ODS text statement uses the macro variable.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 18:03:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275767#M55195</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-07T18:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in ODS text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275769#M55196</link>
      <description>&lt;P&gt;&amp;nbsp;I tried the code and its working, but I am getting parenthesis around the numbers which I don't want. Also, is it possible to get the&amp;nbsp;numbers in words?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 18:09:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275769#M55196</guid>
      <dc:creator>analyst_work</dc:creator>
      <dc:date>2016-06-07T18:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in ODS text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275772#M55198</link>
      <description>&lt;P&gt;The brackets were in your ODS text statement. Remove them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To get them as words use the WORDS. format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
select put(count(*), words.) into :n_count from have where missing(var);
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 18:20:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275772#M55198</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-06-07T18:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in ODS text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275778#M55201</link>
      <description>&lt;P&gt;Perfect! Getting them in words now without the parenthesis, but the formatting isnt very accurate:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ten&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; subjects not included&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I get rid of the space and can I capitalize the first letter?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 18:31:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275778#M55201</guid>
      <dc:creator>analyst_work</dc:creator>
      <dc:date>2016-06-07T18:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in ODS text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275793#M55213</link>
      <description>&lt;P&gt;Also, the code does not output zero. Is there a way to fix this?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 19:37:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275793#M55213</guid>
      <dc:creator>analyst_work</dc:creator>
      <dc:date>2016-06-07T19:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Variable in ODS text</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275795#M55214</link>
      <description>&lt;P&gt;Quick and dirty:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let n_count=0;&lt;/P&gt;
&lt;P&gt;just before the SQL that does the count.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 19:42:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Variable-in-ODS-text/m-p/275795#M55214</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-06-07T19:42:25Z</dc:date>
    </item>
  </channel>
</rss>

