<?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: %nrstr string getting &amp;quot;Error:  Missing ')' parenthesis&amp;quot; in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/nrstr-string-getting-quot-Error-Missing-parenthesis-quot/m-p/551910#M9072</link>
    <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added the extra parenthesis as you suggested.&amp;nbsp; Below is a copy of the log with the full macro in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;9803 options mprint symbolgen mlogic;&lt;/P&gt;&lt;P&gt;9804 %macro frequencies(year,var,missing);&lt;BR /&gt;9805 %put Output frequencies of categories by ORSID;&lt;BR /&gt;9806 proc freq data=cohort_flags(where=(eligible=1 &amp;amp; year=&amp;amp;year &amp;amp;cohort)) noprint;&lt;BR /&gt;9807 table &amp;amp;var / out=freq;&lt;BR /&gt;9808 by orsid;&lt;BR /&gt;9809 run;&lt;BR /&gt;9810 %put Separate duplicates &amp;amp; ensure correct number of total enrollees for &amp;amp;year;&lt;BR /&gt;9811 proc sort data=freq nodupkey&lt;BR /&gt;9812 out=enrollee_count&lt;BR /&gt;9813 dupout=duplicates;&lt;BR /&gt;9814 by orsid;&lt;BR /&gt;9815 run;&lt;BR /&gt;9816 %put Ensure duplicate observations are not missing;&lt;BR /&gt;9817 data anymissing;&lt;BR /&gt;9818 set duplicates (where=(&amp;amp;var=&amp;amp;missing));&lt;BR /&gt;9819 run;&lt;BR /&gt;9820 %put Print frequency counts and missing observations;&lt;BR /&gt;9821 proc freq data=freq (drop=count percent);&lt;BR /&gt;9822 table &amp;amp;var;&lt;BR /&gt;9823 run;&lt;BR /&gt;9824 %mend;&lt;/P&gt;&lt;P&gt;9825 %let cohort = %nrstr(and cohort = %nrquote(%unquote(&amp;amp;year)));&lt;BR /&gt;9826 %frequencies(2012,new_race,.);&lt;BR /&gt;MLOGIC(FREQUENCIES): Beginning execution.&lt;BR /&gt;MLOGIC(FREQUENCIES): Parameter YEAR has value 2012&lt;BR /&gt;MLOGIC(FREQUENCIES): Parameter VAR has value new_race&lt;BR /&gt;MLOGIC(FREQUENCIES): Parameter MISSING has value .&lt;BR /&gt;MLOGIC(FREQUENCIES): %PUT Output frequencies of categories by ORSID&lt;BR /&gt;Output frequencies of categories by ORSID&lt;BR /&gt;SYMBOLGEN: Macro variable YEAR resolves to 2012&lt;BR /&gt;SYMBOLGEN: Macro variable COHORT resolves to and cohort = %nrquote(%unquote(&amp;amp;year))&lt;BR /&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been&lt;BR /&gt;unquoted for printing.&lt;BR /&gt;NOTE 137-205: Line generated by the invoked macro "FREQUENCIES".&lt;BR /&gt;1 proc freq data=cohort_flags(where=(eligible=1 &amp;amp; year=&amp;amp;year &amp;amp;cohort)) noprint; table &amp;amp;var&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;1 ! / out=freq; by orsid; run;&lt;BR /&gt;ERROR 22-322: Missing ')' parenthesis for data set option list&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the invoked macro "FREQUENCIES".&lt;BR /&gt;1 proc freq data=cohort_flags(where=(eligible=1 &amp;amp; year=&amp;amp;year &amp;amp;cohort)) noprint; table &amp;amp;var&lt;BR /&gt;-&lt;BR /&gt;79&lt;BR /&gt;1 ! / out=freq; by orsid; run;&lt;BR /&gt;ERROR 79-322: Expecting a ).&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the macro variable "COHORT".&lt;BR /&gt;1 and cohort = %nrquote(%unquote(&amp;amp;year))&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;-&lt;BR /&gt;76&lt;BR /&gt;ERROR: Syntax error while parsing WHERE clause.&lt;BR /&gt;MPRINT(FREQUENCIES): proc freq data=cohort_flags(where=(eligible=1 &amp;amp; year=2012 and cohort =&lt;BR /&gt;%nrquote(%unquote(&amp;amp;year)))) noprint;&lt;BR /&gt;SYMBOLGEN: Macro variable VAR resolves to new_race&lt;BR /&gt;MPRINT(FREQUENCIES): table new_race / out=freq;&lt;BR /&gt;MPRINT(FREQUENCIES): by orsid;&lt;BR /&gt;MPRINT(FREQUENCIES): run;&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string,&lt;BR /&gt;a numeric constant, a datetime constant, a missing value, (, *, +, -, :, INPUT, NOT,&lt;BR /&gt;PUT, ^, ~.&lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.FREQ may be incomplete. When this step was stopped there were 0&lt;BR /&gt;observations and 0 variables.&lt;BR /&gt;WARNING: Data set WORK.FREQ was not replaced because this step was stopped.&lt;BR /&gt;NOTE: PROCEDURE FREQ used (Total process time):&lt;BR /&gt;real time 0.05 seconds&lt;BR /&gt;cpu time 0.04 seconds&lt;/P&gt;&lt;P&gt;MLOGIC(FREQUENCIES): %PUT Separate duplicates &amp;amp; ensure correct number of total enrollees for &amp;amp;year&lt;BR /&gt;SYMBOLGEN: Macro variable YEAR resolves to 2012&lt;BR /&gt;Separate duplicates &amp;amp; ensure correct number of total enrollees for 2012&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;MPRINT(FREQUENCIES): proc sort data=freq nodupkey out=enrollee_count dupout=duplicates;&lt;BR /&gt;MPRINT(FREQUENCIES): by orsid;&lt;BR /&gt;ERROR: Variable ORSID not found.&lt;BR /&gt;MPRINT(FREQUENCIES): run;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.ENROLLEE_COUNT may be incomplete. When this step was stopped there were&lt;BR /&gt;0 observations and 0 variables.&lt;BR /&gt;WARNING: Data set WORK.ENROLLEE_COUNT was not replaced because this step was stopped.&lt;BR /&gt;WARNING: The data set WORK.DUPLICATES may be incomplete. When this step was stopped there were 0&lt;BR /&gt;observations and 0 variables.&lt;BR /&gt;WARNING: Data set WORK.DUPLICATES was not replaced because this step was stopped.&lt;BR /&gt;NOTE: PROCEDURE SORT used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;MLOGIC(FREQUENCIES): %PUT Ensure duplicate observations are not missing&lt;BR /&gt;Ensure duplicate observations are not missing&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;MPRINT(FREQUENCIES): data anymissing;&lt;BR /&gt;SYMBOLGEN: Macro variable VAR resolves to new_race&lt;BR /&gt;SYMBOLGEN: Macro variable MISSING resolves to .&lt;BR /&gt;MPRINT(FREQUENCIES): set duplicates (where=(new_race=.));&lt;BR /&gt;ERROR: Variable new_race is not on file WORK.DUPLICATES.&lt;BR /&gt;MPRINT(FREQUENCIES): run;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.ANYMISSING may be incomplete. When this step was stopped there were 0&lt;BR /&gt;observations and 0 variables.&lt;BR /&gt;WARNING: Data set WORK.ANYMISSING was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;MLOGIC(FREQUENCIES): %PUT Print frequency counts and missing observations&lt;BR /&gt;Print frequency counts and missing observations&lt;BR /&gt;MPRINT(FREQUENCIES): proc freq data=freq (drop=count percent);&lt;BR /&gt;ERROR: The variable count in the DROP, KEEP, or RENAME list has never been referenced.&lt;BR /&gt;ERROR: The variable percent in the DROP, KEEP, or RENAME list has never been referenced.&lt;BR /&gt;SYMBOLGEN: Macro variable VAR resolves to new_race&lt;BR /&gt;MPRINT(FREQUENCIES): table new_race;&lt;BR /&gt;ERROR: No data set open to look up variables.&lt;BR /&gt;MPRINT(FREQUENCIES): run;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE FREQ used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;MLOGIC(FREQUENCIES): Ending execution.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Apr 2019 21:33:05 GMT</pubDate>
    <dc:creator>LEINAARE</dc:creator>
    <dc:date>2019-04-17T21:33:05Z</dc:date>
    <item>
      <title>%nrstr string getting "Error:  Missing ')' parenthesis"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/nrstr-string-getting-quot-Error-Missing-parenthesis-quot/m-p/551897#M9067</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am developing a macro program to use for two different analyses.&amp;nbsp; Below is a simplified version of the program.&amp;nbsp; The actual program is much larger.&amp;nbsp; I included a global macro variable "cohort" within the macro program.&amp;nbsp; As you see below, for the first execution of the program, the variable "cohort" was assigned a null value.&amp;nbsp; The entire program executed as desired for this step.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let cohort = ;

%macro frequencies(year,var);
proc freq data=cohort_flags(where=(eligible=1 &amp;amp; year=&amp;amp;year &amp;amp;cohort)) noprint;
	table &amp;amp;var / out=freq;
	by orsid;
run;
%mend;&lt;BR /&gt;&lt;BR /&gt;*Example;&lt;BR /&gt;%frequencies(2012,race);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, for the second analysis, I want to restrict incoming observations to those that have the same cohort allocation as a given year.&amp;nbsp; What I want is to assign a value to the global macro variable "cohort" that acts as an additional statement within the where option.&amp;nbsp; I know that the following is not valid syntax, but to communicate what I want, I would like the resolved macro variable to create code within the macro program that looks like this "and cohort = &amp;amp;year", with "year" calling the local macro variable.&amp;nbsp; I have been experimenting with different combinations of %nrstr and %nrquote, but have been unsuccessful thus far.&amp;nbsp; Below is an example of my last failed experiment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let cohort = %nrstr(and cohort = &amp;amp;year);
%let cohort = %nrstr(and cohort = %nrquote(%unquote(&amp;amp;year));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I keep getting the error message&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR 22-322: Missing ')' parenthesis&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would greatly appreciate your help in creating a global macro variable that resolves within the macro program to reference the local macro variable "year".&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 21:18:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/nrstr-string-getting-quot-Error-Missing-parenthesis-quot/m-p/551897#M9067</guid>
      <dc:creator>LEINAARE</dc:creator>
      <dc:date>2019-04-17T21:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: %nrstr string getting "Error:  Missing ')' parenthesis"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/nrstr-string-getting-quot-Error-Missing-parenthesis-quot/m-p/551899#M9068</link>
      <description>&lt;P&gt;One more &lt;U&gt;&lt;STRONG&gt;closing&lt;/STRONG&gt; &lt;/U&gt;parenthesis&amp;nbsp;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;year&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;))&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token macroname"&gt;%let&lt;/SPAN&gt; cohort &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token macrostatement"&gt;%nrstr&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;and cohort &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token macroname"&gt;%nrquote&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token macrostatement"&gt;%unquote&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;year&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;))&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 21:20:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/nrstr-string-getting-quot-Error-Missing-parenthesis-quot/m-p/551899#M9068</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-04-17T21:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: %nrstr string getting "Error:  Missing ')' parenthesis"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/nrstr-string-getting-quot-Error-Missing-parenthesis-quot/m-p/551910#M9072</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I added the extra parenthesis as you suggested.&amp;nbsp; Below is a copy of the log with the full macro in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;9803 options mprint symbolgen mlogic;&lt;/P&gt;&lt;P&gt;9804 %macro frequencies(year,var,missing);&lt;BR /&gt;9805 %put Output frequencies of categories by ORSID;&lt;BR /&gt;9806 proc freq data=cohort_flags(where=(eligible=1 &amp;amp; year=&amp;amp;year &amp;amp;cohort)) noprint;&lt;BR /&gt;9807 table &amp;amp;var / out=freq;&lt;BR /&gt;9808 by orsid;&lt;BR /&gt;9809 run;&lt;BR /&gt;9810 %put Separate duplicates &amp;amp; ensure correct number of total enrollees for &amp;amp;year;&lt;BR /&gt;9811 proc sort data=freq nodupkey&lt;BR /&gt;9812 out=enrollee_count&lt;BR /&gt;9813 dupout=duplicates;&lt;BR /&gt;9814 by orsid;&lt;BR /&gt;9815 run;&lt;BR /&gt;9816 %put Ensure duplicate observations are not missing;&lt;BR /&gt;9817 data anymissing;&lt;BR /&gt;9818 set duplicates (where=(&amp;amp;var=&amp;amp;missing));&lt;BR /&gt;9819 run;&lt;BR /&gt;9820 %put Print frequency counts and missing observations;&lt;BR /&gt;9821 proc freq data=freq (drop=count percent);&lt;BR /&gt;9822 table &amp;amp;var;&lt;BR /&gt;9823 run;&lt;BR /&gt;9824 %mend;&lt;/P&gt;&lt;P&gt;9825 %let cohort = %nrstr(and cohort = %nrquote(%unquote(&amp;amp;year)));&lt;BR /&gt;9826 %frequencies(2012,new_race,.);&lt;BR /&gt;MLOGIC(FREQUENCIES): Beginning execution.&lt;BR /&gt;MLOGIC(FREQUENCIES): Parameter YEAR has value 2012&lt;BR /&gt;MLOGIC(FREQUENCIES): Parameter VAR has value new_race&lt;BR /&gt;MLOGIC(FREQUENCIES): Parameter MISSING has value .&lt;BR /&gt;MLOGIC(FREQUENCIES): %PUT Output frequencies of categories by ORSID&lt;BR /&gt;Output frequencies of categories by ORSID&lt;BR /&gt;SYMBOLGEN: Macro variable YEAR resolves to 2012&lt;BR /&gt;SYMBOLGEN: Macro variable COHORT resolves to and cohort = %nrquote(%unquote(&amp;amp;year))&lt;BR /&gt;SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been&lt;BR /&gt;unquoted for printing.&lt;BR /&gt;NOTE 137-205: Line generated by the invoked macro "FREQUENCIES".&lt;BR /&gt;1 proc freq data=cohort_flags(where=(eligible=1 &amp;amp; year=&amp;amp;year &amp;amp;cohort)) noprint; table &amp;amp;var&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;1 ! / out=freq; by orsid; run;&lt;BR /&gt;ERROR 22-322: Missing ')' parenthesis for data set option list&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the invoked macro "FREQUENCIES".&lt;BR /&gt;1 proc freq data=cohort_flags(where=(eligible=1 &amp;amp; year=&amp;amp;year &amp;amp;cohort)) noprint; table &amp;amp;var&lt;BR /&gt;-&lt;BR /&gt;79&lt;BR /&gt;1 ! / out=freq; by orsid; run;&lt;BR /&gt;ERROR 79-322: Expecting a ).&lt;/P&gt;&lt;P&gt;NOTE: Line generated by the macro variable "COHORT".&lt;BR /&gt;1 and cohort = %nrquote(%unquote(&amp;amp;year))&lt;BR /&gt;-&lt;BR /&gt;22&lt;BR /&gt;-&lt;BR /&gt;76&lt;BR /&gt;ERROR: Syntax error while parsing WHERE clause.&lt;BR /&gt;MPRINT(FREQUENCIES): proc freq data=cohort_flags(where=(eligible=1 &amp;amp; year=2012 and cohort =&lt;BR /&gt;%nrquote(%unquote(&amp;amp;year)))) noprint;&lt;BR /&gt;SYMBOLGEN: Macro variable VAR resolves to new_race&lt;BR /&gt;MPRINT(FREQUENCIES): table new_race / out=freq;&lt;BR /&gt;MPRINT(FREQUENCIES): by orsid;&lt;BR /&gt;MPRINT(FREQUENCIES): run;&lt;/P&gt;&lt;P&gt;ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string,&lt;BR /&gt;a numeric constant, a datetime constant, a missing value, (, *, +, -, :, INPUT, NOT,&lt;BR /&gt;PUT, ^, ~.&lt;/P&gt;&lt;P&gt;ERROR 76-322: Syntax error, statement will be ignored.&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.FREQ may be incomplete. When this step was stopped there were 0&lt;BR /&gt;observations and 0 variables.&lt;BR /&gt;WARNING: Data set WORK.FREQ was not replaced because this step was stopped.&lt;BR /&gt;NOTE: PROCEDURE FREQ used (Total process time):&lt;BR /&gt;real time 0.05 seconds&lt;BR /&gt;cpu time 0.04 seconds&lt;/P&gt;&lt;P&gt;MLOGIC(FREQUENCIES): %PUT Separate duplicates &amp;amp; ensure correct number of total enrollees for &amp;amp;year&lt;BR /&gt;SYMBOLGEN: Macro variable YEAR resolves to 2012&lt;BR /&gt;Separate duplicates &amp;amp; ensure correct number of total enrollees for 2012&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;MPRINT(FREQUENCIES): proc sort data=freq nodupkey out=enrollee_count dupout=duplicates;&lt;BR /&gt;MPRINT(FREQUENCIES): by orsid;&lt;BR /&gt;ERROR: Variable ORSID not found.&lt;BR /&gt;MPRINT(FREQUENCIES): run;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.ENROLLEE_COUNT may be incomplete. When this step was stopped there were&lt;BR /&gt;0 observations and 0 variables.&lt;BR /&gt;WARNING: Data set WORK.ENROLLEE_COUNT was not replaced because this step was stopped.&lt;BR /&gt;WARNING: The data set WORK.DUPLICATES may be incomplete. When this step was stopped there were 0&lt;BR /&gt;observations and 0 variables.&lt;BR /&gt;WARNING: Data set WORK.DUPLICATES was not replaced because this step was stopped.&lt;BR /&gt;NOTE: PROCEDURE SORT used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;MLOGIC(FREQUENCIES): %PUT Ensure duplicate observations are not missing&lt;BR /&gt;Ensure duplicate observations are not missing&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;MPRINT(FREQUENCIES): data anymissing;&lt;BR /&gt;SYMBOLGEN: Macro variable VAR resolves to new_race&lt;BR /&gt;SYMBOLGEN: Macro variable MISSING resolves to .&lt;BR /&gt;MPRINT(FREQUENCIES): set duplicates (where=(new_race=.));&lt;BR /&gt;ERROR: Variable new_race is not on file WORK.DUPLICATES.&lt;BR /&gt;MPRINT(FREQUENCIES): run;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.ANYMISSING may be incomplete. When this step was stopped there were 0&lt;BR /&gt;observations and 0 variables.&lt;BR /&gt;WARNING: Data set WORK.ANYMISSING was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;MLOGIC(FREQUENCIES): %PUT Print frequency counts and missing observations&lt;BR /&gt;Print frequency counts and missing observations&lt;BR /&gt;MPRINT(FREQUENCIES): proc freq data=freq (drop=count percent);&lt;BR /&gt;ERROR: The variable count in the DROP, KEEP, or RENAME list has never been referenced.&lt;BR /&gt;ERROR: The variable percent in the DROP, KEEP, or RENAME list has never been referenced.&lt;BR /&gt;SYMBOLGEN: Macro variable VAR resolves to new_race&lt;BR /&gt;MPRINT(FREQUENCIES): table new_race;&lt;BR /&gt;ERROR: No data set open to look up variables.&lt;BR /&gt;MPRINT(FREQUENCIES): run;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: PROCEDURE FREQ used (Total process time):&lt;BR /&gt;real time 0.01 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;MLOGIC(FREQUENCIES): Ending execution.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 21:33:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/nrstr-string-getting-quot-Error-Missing-parenthesis-quot/m-p/551910#M9072</guid>
      <dc:creator>LEINAARE</dc:creator>
      <dc:date>2019-04-17T21:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: %nrstr string getting "Error:  Missing ')' parenthesis"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/nrstr-string-getting-quot-Error-Missing-parenthesis-quot/m-p/551917#M9076</link>
      <description>&lt;P&gt;So you want to get the value of COHORT to be the string:&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;and cohort = &amp;amp;year&lt;/PRE&gt;
&lt;P&gt;That is easy to do with a DATA step.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  call symputx('cohort','and cohort = &amp;amp;year');
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Much harder to do with pure macro code.&amp;nbsp; Here is a trick that should work.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let cohort=and cohort = &amp;amp;&amp;amp;%upcase(year);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The macro processor will evaluate &amp;amp;&amp;amp; to &amp;amp;, but the use of the macro function around YEAR prevents the macro processor from then trying to resolve &amp;amp;YEAR.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2019 22:28:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/nrstr-string-getting-quot-Error-Missing-parenthesis-quot/m-p/551917#M9076</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-04-17T22:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: %nrstr string getting "Error:  Missing ')' parenthesis"</title>
      <link>https://communities.sas.com/t5/New-SAS-User/nrstr-string-getting-quot-Error-Missing-parenthesis-quot/m-p/552069#M9102</link>
      <description>&lt;P&gt;Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help.&amp;nbsp; I used the macro code you provided, and it worked well.&amp;nbsp;&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;&lt;P&gt;Ted&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2019 12:02:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/nrstr-string-getting-quot-Error-Missing-parenthesis-quot/m-p/552069#M9102</guid>
      <dc:creator>LEINAARE</dc:creator>
      <dc:date>2019-04-18T12:02:57Z</dc:date>
    </item>
  </channel>
</rss>

