<?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 Macro that does nothing blows up the second time with passed parameter in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-that-does-nothing-blows-up-the-second-time-with-passed/m-p/781296#M249013</link>
    <description>&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;I'm trying to pass the string and gender="F" and tenure in ("01","02"). In this example the macro does nouthing. Something about passing the string is causing an error. An error message does not occur the first time I run the script to see an error message I have to run just the last line with run selection a second time. I can run &lt;BR /&gt;%turnoverTable(faculty, %str() ); &lt;BR /&gt;%turnoverTable(faculty, %str(and tenure in ('01','02')) );&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;but not &lt;BR /&gt;%turnoverTable(faculty, %str(and gender="F" and tenure in ("01","02") );&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro turnoverTable(tableName, additionalWhereClause);
/*do nouthing*/
%mend;

/*these work*/
%turnoverTable(faculty, %str() );&lt;BR /&gt;%turnoverTable(faculty, %str(and tenure in ('01','02')) );&lt;BR /&gt;
/*this causes the error*/
/*I run it a second time to see the log blow up to see the erorr you have to run this line again using run selection*/
%turnoverTable(faculty, %str(and gender="F" and tenure in ("01","02") );

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;;*';*";*/;quit;run;&lt;BR /&gt;2 OPTIONS PAGENO=MIN;&lt;BR /&gt;3 %LET _CLIENTTASKLABEL='Program';&lt;BR /&gt;4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';&lt;BR /&gt;5 %LET _CLIENTPROJECTPATH='';&lt;BR /&gt;6 %LET _CLIENTPROJECTPATHHOST='';&lt;BR /&gt;7 %LET _CLIENTPROJECTNAME='';&lt;BR /&gt;8 %LET _SASPROGRAMFILE='';&lt;BR /&gt;9 %LET _SASPROGRAMFILEHOST='';&lt;BR /&gt;10 &lt;BR /&gt;11 ODS _ALL_ CLOSE;&lt;BR /&gt;12 OPTIONS DEV=PNG;&lt;/P&gt;
&lt;P&gt;_________________________________&lt;BR /&gt;49&lt;BR /&gt;NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space &lt;BR /&gt;between a quoted string and the succeeding identifier is recommended.&lt;/P&gt;
&lt;P&gt;13 GOPTIONS XPIXELS=0 YPIXELS=0;&lt;BR /&gt;14 FILENAME EGSR TEMP;&lt;BR /&gt;15 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR&lt;BR /&gt;16 STYLE=VCU_Report_Printing&lt;BR /&gt;17 STYLESHEET=(URL="redacted")&lt;BR /&gt;18 NOGTITLE&lt;BR /&gt;19 NOGFOOTNOTE&lt;BR /&gt;20 GPATH=&amp;amp;sasworklocation&lt;BR /&gt;21 ENCODING=UTF8&lt;BR /&gt;NOTE: Line generated by the macro variable "SASWORKLOCATION".&lt;BR /&gt;21 ") NOGTITLE NOGFOOTNOTE&lt;BR /&gt;21 ! GPATH="/saswork/SAS_workF1AB0000291E_redacted/SAS_work29A50000291E_redacted/"&lt;/P&gt;
&lt;P&gt;_____________________________________&lt;/P&gt;</description>
    <pubDate>Fri, 19 Nov 2021 16:18:39 GMT</pubDate>
    <dc:creator>DavidPhillips2</dc:creator>
    <dc:date>2021-11-19T16:18:39Z</dc:date>
    <item>
      <title>Macro that does nothing blows up the second time with passed parameter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-that-does-nothing-blows-up-the-second-time-with-passed/m-p/781296#M249013</link>
      <description>&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;I'm trying to pass the string and gender="F" and tenure in ("01","02"). In this example the macro does nouthing. Something about passing the string is causing an error. An error message does not occur the first time I run the script to see an error message I have to run just the last line with run selection a second time. I can run &lt;BR /&gt;%turnoverTable(faculty, %str() ); &lt;BR /&gt;%turnoverTable(faculty, %str(and tenure in ('01','02')) );&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;but not &lt;BR /&gt;%turnoverTable(faculty, %str(and gender="F" and tenure in ("01","02") );&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro turnoverTable(tableName, additionalWhereClause);
/*do nouthing*/
%mend;

/*these work*/
%turnoverTable(faculty, %str() );&lt;BR /&gt;%turnoverTable(faculty, %str(and tenure in ('01','02')) );&lt;BR /&gt;
/*this causes the error*/
/*I run it a second time to see the log blow up to see the erorr you have to run this line again using run selection*/
%turnoverTable(faculty, %str(and gender="F" and tenure in ("01","02") );

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;;*';*";*/;quit;run;&lt;BR /&gt;2 OPTIONS PAGENO=MIN;&lt;BR /&gt;3 %LET _CLIENTTASKLABEL='Program';&lt;BR /&gt;4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';&lt;BR /&gt;5 %LET _CLIENTPROJECTPATH='';&lt;BR /&gt;6 %LET _CLIENTPROJECTPATHHOST='';&lt;BR /&gt;7 %LET _CLIENTPROJECTNAME='';&lt;BR /&gt;8 %LET _SASPROGRAMFILE='';&lt;BR /&gt;9 %LET _SASPROGRAMFILEHOST='';&lt;BR /&gt;10 &lt;BR /&gt;11 ODS _ALL_ CLOSE;&lt;BR /&gt;12 OPTIONS DEV=PNG;&lt;/P&gt;
&lt;P&gt;_________________________________&lt;BR /&gt;49&lt;BR /&gt;NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space &lt;BR /&gt;between a quoted string and the succeeding identifier is recommended.&lt;/P&gt;
&lt;P&gt;13 GOPTIONS XPIXELS=0 YPIXELS=0;&lt;BR /&gt;14 FILENAME EGSR TEMP;&lt;BR /&gt;15 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR&lt;BR /&gt;16 STYLE=VCU_Report_Printing&lt;BR /&gt;17 STYLESHEET=(URL="redacted")&lt;BR /&gt;18 NOGTITLE&lt;BR /&gt;19 NOGFOOTNOTE&lt;BR /&gt;20 GPATH=&amp;amp;sasworklocation&lt;BR /&gt;21 ENCODING=UTF8&lt;BR /&gt;NOTE: Line generated by the macro variable "SASWORKLOCATION".&lt;BR /&gt;21 ") NOGTITLE NOGFOOTNOTE&lt;BR /&gt;21 ! GPATH="/saswork/SAS_workF1AB0000291E_redacted/SAS_work29A50000291E_redacted/"&lt;/P&gt;
&lt;P&gt;_____________________________________&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 16:18:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-that-does-nothing-blows-up-the-second-time-with-passed/m-p/781296#M249013</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2021-11-19T16:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Macro that does nothing blows up the second time with passed parameter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-that-does-nothing-blows-up-the-second-time-with-passed/m-p/781323#M249019</link>
      <description>&lt;P&gt;Unbalanced () &lt;/P&gt;
&lt;P&gt;%turnoverTable(faculty, %str(and gender="F" and tenure in ("01","02") );&lt;/P&gt;
&lt;P&gt;has three ( and only two )&amp;nbsp;&amp;nbsp;&amp;nbsp; the second ) closes the %str function so you do not have a close for the parameter list.&lt;/P&gt;
&lt;P&gt;%turnoverTable(faculty, %str(and gender="F" and tenure in ("01","02") )&amp;nbsp; );&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The editor should have a find matching parentheses function&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 17:09:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-that-does-nothing-blows-up-the-second-time-with-passed/m-p/781323#M249019</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-11-19T17:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Macro that does nothing blows up the second time with passed parameter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-that-does-nothing-blows-up-the-second-time-with-passed/m-p/781333#M249021</link>
      <description>&lt;P&gt;Thanks, Ballardw oddly the editor did not catch the unbalanced parameters.&amp;nbsp; This solved the issue though.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 17:40:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-that-does-nothing-blows-up-the-second-time-with-passed/m-p/781333#M249021</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2021-11-19T17:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Macro that does nothing blows up the second time with passed parameter</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-that-does-nothing-blows-up-the-second-time-with-passed/m-p/781346#M249022</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/5059"&gt;@DavidPhillips2&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks, Ballardw oddly the editor did not catch the unbalanced parameters.&amp;nbsp; This solved the issue though.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It isn't an automatic function. You place the cursor on a ( and then with the proper key it should find the match. In the SAS Display Manger that is Ctrl+( or Ctrl+) keys. Hold Ctrl and press either of the ( or ) and the cursor moves to the matching key (and back, doesn't matter which of the () that you use). If it doesn't move then there isn't a match.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Because of the basic approach SAS has to code and especially with the macro language there can't really be a syntax check prior to submission for some forms of missmatched () and/or quotes.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Nov 2021 17:52:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-that-does-nothing-blows-up-the-second-time-with-passed/m-p/781346#M249022</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-11-19T17:52:42Z</dc:date>
    </item>
  </channel>
</rss>

