<?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: macro to generate a list of label statement, error message in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/macro-to-generate-a-list-of-label-statement-error-message/m-p/356015#M83424</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's nothing wrong with the macro, but if you invoke it outside of a data step it's just generating invalid syntax.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just use it in a data step:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set something;&lt;/P&gt;
&lt;P&gt;%label(x)&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
    <pubDate>Thu, 04 May 2017 15:50:16 GMT</pubDate>
    <dc:creator>collinelliot</dc:creator>
    <dc:date>2017-05-04T15:50:16Z</dc:date>
    <item>
      <title>macro to generate a list of label statement, error message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-generate-a-list-of-label-statement-error-message/m-p/356012#M83421</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro label(N); 
  %do I = 1 %to &amp;amp;N;
   label condid&amp;amp;I = "condition ID&amp;amp;I";
  %end;
%mend label;

%label(25);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;i got an error message:&lt;/P&gt;
&lt;P&gt;NOTE: Line generated by the invoked macro "LABEL".&lt;/P&gt;
&lt;P&gt;49 label condid&amp;amp;I = "condition ID&amp;amp;I";&lt;/P&gt;
&lt;P&gt;-----&lt;/P&gt;
&lt;P&gt;180&lt;/P&gt;
&lt;P&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;
&lt;P&gt;would you please let me know why is that? Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 15:47:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-generate-a-list-of-label-statement-error-message/m-p/356012#M83421</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2017-05-04T15:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: macro to generate a list of label statement, error message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-generate-a-list-of-label-statement-error-message/m-p/356015#M83424</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There's nothing wrong with the macro, but if you invoke it outside of a data step it's just generating invalid syntax.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just use it in a data step:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set something;&lt;/P&gt;
&lt;P&gt;%label(x)&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 15:50:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-generate-a-list-of-label-statement-error-message/m-p/356015#M83424</guid>
      <dc:creator>collinelliot</dc:creator>
      <dc:date>2017-05-04T15:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: macro to generate a list of label statement, error message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-generate-a-list-of-label-statement-error-message/m-p/356039#M83434</link>
      <description>&lt;P&gt;Or use PROC DATASETS to avoid recreating the dataset.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 16:31:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-generate-a-list-of-label-statement-error-message/m-p/356039#M83434</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-05-04T16:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: macro to generate a list of label statement, error message</title>
      <link>https://communities.sas.com/t5/SAS-Programming/macro-to-generate-a-list-of-label-statement-error-message/m-p/356054#M83438</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 17:30:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/macro-to-generate-a-list-of-label-statement-error-message/m-p/356054#M83438</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2017-05-04T17:30:28Z</dc:date>
    </item>
  </channel>
</rss>

