<?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 Help need in log error message when running a macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-need-in-log-error-message-when-running-a-macro/m-p/553692#M153990</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;  proc sort data=_final0 out=&amp;amp;OUTPUT_DATASET.(label=&amp;amp;dslbl);
	  	by &amp;amp;sortby;
	  run;

SYMBOLGEN:  Macro variable OUTPUT_DATASET resolves to lptda.addili

SYMBOLGEN:  Macro variable DSLBL resolves to DILI Reporting Analysis Dataset (SI)

NOTE 137-205: Line generated by the invoked macro "ADD0ATTRIBUTE".
1125         **sort output dataset then add label;       proc sort data=_final0 out=&amp;amp;OUTPUT_DATASET.(label=&amp;amp;dslbl);
                                                                                                                 -
                                                                                                                 22
1125!     by &amp;amp;sortby;       run;
ERROR 22-322: Syntax error, expecting one of the following: ;, ASCII, BUFFNO, DANISH, DATA, DATECOPY, DETAILS, DIAG,
              DUPOUT, EBCDIC, EQUALS, FINNISH, FORCE, IN, ISA, L, LEAVE, LIST, MESSAGE, MSG, NATIONAL, NODUP, NODUPKEY,
              NODUPKEYS, NODUPLICATE, NODUPLICATES, NODUPREC, NODUPRECS, NODUPS, NOEQUALS, NORWEGIAN, NOTHREADS,
              NOUNIKEY, NOUNIKEYS, NOUNIQUEKEY, NOUNIQUEKEYS, NOUNIQUEREC, NOUNIQUERECS, NOUNIREC, NOUNIRECS, OSA, OUT,
              OVERWRITE, PAGESIZE, PRESORTED, PSIZE, REVERSE, SIZE, SORTSEQ, SORTSIZE, SORTWKNO, SWEDISH, T, TAGSORT,
              TECH, TECHNIQUE, TESTHSI, THREADS, UNIOUT, UNIQUEOUT, WKNO, WORKNO.

NOTE: Line generated by the invoked macro "ADD0ATTRIBUTE".
1125         **sort output dataset then add label;       proc sort data=_final0 out=&amp;amp;OUTPUT_DATASET.(label=&amp;amp;dslbl);
                                                                                                                 -
                                                                                                                 200
1125!     by &amp;amp;sortby;       run;
ERROR 200-322: The symbol is not recognized and will be ignored.

SYMBOLGEN:  Macro variable SORTBY resolves to USUBJID  PARAMCD  AEPOCH ADT
MPRINT(ADD0ATTRIBUTE):   proc sort data=_final0 out=lptda.addili(label=DILI Reporting Analysis Dataset (SI)) by USUBJID
PARAMCD AEPOCH ADT ;
MPRINT(ADD0ATTRIBUTE):   run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set LPTDA.ADDILI may be incomplete.  When this step was stopped there were 0 observations and 0
         variables.
WARNING: Data set LPTDA.ADDILI was not replaced because this step was stopped.
NOTE: PROCEDURE SORT used (Total process time):
      real time           2.40 seconds
      cpu time            0.01 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Dear,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am running a macro that has this&amp;nbsp; &amp;nbsp;&lt;CODE class=" language-sas"&gt;&amp;nbsp;"proc sort data=_final0 out=&amp;amp;OUTPUT_DATASET.(label=&amp;amp;dslbl);
	  	by &amp;amp;sortby;
	  run;"&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;The macro variables are resolving&amp;nbsp;&amp;amp;OUTPUT_DATASET and&amp;nbsp;&amp;amp;dslbl and&amp;nbsp;&amp;amp;sortby&amp;nbsp; &amp;nbsp;all are resolving. Below is the resolving code.&amp;nbsp; But I am getting errors because the semicolon is missing in resolved code after &lt;FONT color="#FF0000"&gt;Label&lt;/FONT&gt; statement and before &lt;FONT color="#FF0000"&gt;By&lt;/FONT&gt; statement eventhough there is semicolon in macro&amp;nbsp;&lt;FONT color="#FF0000"&gt;Label&lt;/FONT&gt; statement and before &lt;FONT color="#FF0000"&gt;By&lt;/FONT&gt; statement. Please suggest. Thank you.&amp;nbsp; I am also copied the log file where it showing error (22).&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=_final0 out=lptda.addili(label=DILI Reporting Analysis Dataset (SI)) by USUBJID&lt;BR /&gt;PARAMCD AEPOCH ADT ;&lt;BR /&gt;MPRINT(ADD0ATTRIBUTE): run;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Apr 2019 16:01:39 GMT</pubDate>
    <dc:creator>knveraraju91</dc:creator>
    <dc:date>2019-04-24T16:01:39Z</dc:date>
    <item>
      <title>Help need in log error message when running a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-need-in-log-error-message-when-running-a-macro/m-p/553692#M153990</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&lt;BR /&gt;  proc sort data=_final0 out=&amp;amp;OUTPUT_DATASET.(label=&amp;amp;dslbl);
	  	by &amp;amp;sortby;
	  run;

SYMBOLGEN:  Macro variable OUTPUT_DATASET resolves to lptda.addili

SYMBOLGEN:  Macro variable DSLBL resolves to DILI Reporting Analysis Dataset (SI)

NOTE 137-205: Line generated by the invoked macro "ADD0ATTRIBUTE".
1125         **sort output dataset then add label;       proc sort data=_final0 out=&amp;amp;OUTPUT_DATASET.(label=&amp;amp;dslbl);
                                                                                                                 -
                                                                                                                 22
1125!     by &amp;amp;sortby;       run;
ERROR 22-322: Syntax error, expecting one of the following: ;, ASCII, BUFFNO, DANISH, DATA, DATECOPY, DETAILS, DIAG,
              DUPOUT, EBCDIC, EQUALS, FINNISH, FORCE, IN, ISA, L, LEAVE, LIST, MESSAGE, MSG, NATIONAL, NODUP, NODUPKEY,
              NODUPKEYS, NODUPLICATE, NODUPLICATES, NODUPREC, NODUPRECS, NODUPS, NOEQUALS, NORWEGIAN, NOTHREADS,
              NOUNIKEY, NOUNIKEYS, NOUNIQUEKEY, NOUNIQUEKEYS, NOUNIQUEREC, NOUNIQUERECS, NOUNIREC, NOUNIRECS, OSA, OUT,
              OVERWRITE, PAGESIZE, PRESORTED, PSIZE, REVERSE, SIZE, SORTSEQ, SORTSIZE, SORTWKNO, SWEDISH, T, TAGSORT,
              TECH, TECHNIQUE, TESTHSI, THREADS, UNIOUT, UNIQUEOUT, WKNO, WORKNO.

NOTE: Line generated by the invoked macro "ADD0ATTRIBUTE".
1125         **sort output dataset then add label;       proc sort data=_final0 out=&amp;amp;OUTPUT_DATASET.(label=&amp;amp;dslbl);
                                                                                                                 -
                                                                                                                 200
1125!     by &amp;amp;sortby;       run;
ERROR 200-322: The symbol is not recognized and will be ignored.

SYMBOLGEN:  Macro variable SORTBY resolves to USUBJID  PARAMCD  AEPOCH ADT
MPRINT(ADD0ATTRIBUTE):   proc sort data=_final0 out=lptda.addili(label=DILI Reporting Analysis Dataset (SI)) by USUBJID
PARAMCD AEPOCH ADT ;
MPRINT(ADD0ATTRIBUTE):   run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set LPTDA.ADDILI may be incomplete.  When this step was stopped there were 0 observations and 0
         variables.
WARNING: Data set LPTDA.ADDILI was not replaced because this step was stopped.
NOTE: PROCEDURE SORT used (Total process time):
      real time           2.40 seconds
      cpu time            0.01 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Dear,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am running a macro that has this&amp;nbsp; &amp;nbsp;&lt;CODE class=" language-sas"&gt;&amp;nbsp;"proc sort data=_final0 out=&amp;amp;OUTPUT_DATASET.(label=&amp;amp;dslbl);
	  	by &amp;amp;sortby;
	  run;"&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;The macro variables are resolving&amp;nbsp;&amp;amp;OUTPUT_DATASET and&amp;nbsp;&amp;amp;dslbl and&amp;nbsp;&amp;amp;sortby&amp;nbsp; &amp;nbsp;all are resolving. Below is the resolving code.&amp;nbsp; But I am getting errors because the semicolon is missing in resolved code after &lt;FONT color="#FF0000"&gt;Label&lt;/FONT&gt; statement and before &lt;FONT color="#FF0000"&gt;By&lt;/FONT&gt; statement eventhough there is semicolon in macro&amp;nbsp;&lt;FONT color="#FF0000"&gt;Label&lt;/FONT&gt; statement and before &lt;FONT color="#FF0000"&gt;By&lt;/FONT&gt; statement. Please suggest. Thank you.&amp;nbsp; I am also copied the log file where it showing error (22).&amp;nbsp;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc sort data=_final0 out=lptda.addili(label=DILI Reporting Analysis Dataset (SI)) by USUBJID&lt;BR /&gt;PARAMCD AEPOCH ADT ;&lt;BR /&gt;MPRINT(ADD0ATTRIBUTE): run;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 16:01:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-need-in-log-error-message-when-running-a-macro/m-p/553692#M153990</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2019-04-24T16:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help need in log error message when running a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-need-in-log-error-message-when-running-a-macro/m-p/553709#M153999</link>
      <description>&lt;P&gt;Your label ends with a ")". Try using double quotes around your label macro:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(label="&amp;amp;dslbl");&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 17:01:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-need-in-log-error-message-when-running-a-macro/m-p/553709#M153999</guid>
      <dc:creator>noling</dc:creator>
      <dc:date>2019-04-24T17:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help need in log error message when running a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-need-in-log-error-message-when-running-a-macro/m-p/553760#M154013</link>
      <description>&lt;P&gt;You also want to be very cautious about using *statement; style comments in macros.&lt;/P&gt;
&lt;P&gt;Either use the %*statement ; or /* statement; */&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Under some syntax combinations the statement style comment may be submitted as code to be treated as though it should be executed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2019 19:21:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-need-in-log-error-message-when-running-a-macro/m-p/553760#M154013</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-04-24T19:21:35Z</dc:date>
    </item>
    <item>
      <title>Re: Help need in log error message when running a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-need-in-log-error-message-when-running-a-macro/m-p/553821#M154036</link>
      <description>Let's not forget the elephant in the room that leads to the problem.&lt;BR /&gt;&lt;BR /&gt;PROC SORT works just fine.  There's no good reason to turn it into a macro.  All that accomplishes is adding complexity, clouding the debugging process, and eliminating the possibility of applying other options (such as  NODUPKEY) .</description>
      <pubDate>Thu, 25 Apr 2019 00:18:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-need-in-log-error-message-when-running-a-macro/m-p/553821#M154036</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-04-25T00:18:26Z</dc:date>
    </item>
  </channel>
</rss>

