<?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 simple macro: syntax error in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/simple-macro-syntax-error/m-p/52579#M14477</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LinLin's answer should solve the problem.&amp;nbsp; SAS will interpret &amp;amp;J_ as a request to expand the non existent macro variable named J_.&amp;nbsp; Placing the period after the J will let SAS know that you want to expand the value of the macro variable J instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Nov 2011 16:30:58 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2011-11-22T16:30:58Z</dc:date>
    <item>
      <title>simple macro: syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/simple-macro-syntax-error/m-p/52577#M14475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SAS said there is syntax error for &amp;amp;j:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%MACRO calnum;&lt;BR /&gt;&amp;nbsp; %DO j=1 %TO 2;&lt;BR /&gt;&amp;nbsp; %DO i=1 %TO 10;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PROC UNIVARIATE DATA=work.data&amp;amp;j;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAR diff;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OUTPUT OUT=work.pctile&amp;amp;j%SYSFUNC(PUTN(&amp;amp;i,z2.)) PCTLPRE=P&amp;amp;j_ PCTLPTS=1 to 100 BY 1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RUN;&lt;BR /&gt;&amp;nbsp; %END;&lt;BR /&gt;&amp;nbsp; %END;&lt;BR /&gt;%MEND;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seemed that the use of work.data&amp;amp;j is fine, but it is error to specify it as: PCTLPRE=P&amp;amp;j_&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I put this right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2011 16:12:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/simple-macro-syntax-error/m-p/52577#M14475</guid>
      <dc:creator>bncoxuk</dc:creator>
      <dc:date>2011-11-22T16:12:07Z</dc:date>
    </item>
    <item>
      <title>simple macro: syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/simple-macro-syntax-error/m-p/52578#M14476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; please change&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;PCTLPRE=P&amp;amp;j_ PCTLPTS=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; to &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;100&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; BY &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;; to&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt;PCTLPRE=P&amp;amp;j._ PCTLPTS=&lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; to &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;100&lt;/STRONG&gt;&lt;SPAN style="background-color: white; font-family: 'Courier New'; color: black; font-size: 10pt;"&gt; BY &lt;/SPAN&gt;&lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2011 16:21:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/simple-macro-syntax-error/m-p/52578#M14476</guid>
      <dc:creator>Linlin</dc:creator>
      <dc:date>2011-11-22T16:21:28Z</dc:date>
    </item>
    <item>
      <title>simple macro: syntax error</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/simple-macro-syntax-error/m-p/52579#M14477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LinLin's answer should solve the problem.&amp;nbsp; SAS will interpret &amp;amp;J_ as a request to expand the non existent macro variable named J_.&amp;nbsp; Placing the period after the J will let SAS know that you want to expand the value of the macro variable J instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Nov 2011 16:30:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/simple-macro-syntax-error/m-p/52579#M14477</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-11-22T16:30:58Z</dc:date>
    </item>
  </channel>
</rss>

