<?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: Optional/situational steps in a macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147948#M29304</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does your macro parameter value have quotes?&amp;nbsp; Or do you allow for either quoted or not quoted values?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Jan 2014 16:50:30 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2014-01-21T16:50:30Z</dc:date>
    <item>
      <title>Optional/situational steps in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147944#M29300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I used macros all the time and always come across an issue--is it possible to use certain steps in a macro situationally? That is, depending on the value of one of the incoming parameters, process certain parts of the overall macro? For example, if the second parameter = "flag", then the "newValue" data step will be processed, otherwise it will be bypassed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 14:01:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147944#M29300</guid>
      <dc:creator>Paul_NYS</dc:creator>
      <dc:date>2014-01-21T14:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Optional/situational steps in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147945#M29301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, a simple construction like&lt;/P&gt;&lt;P&gt;%if %sysfunc(upcase("&amp;amp;myparameter.")) eq "FLAG" %then %do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; data whatever;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /*statements*/&lt;/P&gt;&lt;P&gt;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;should accomplish what you want.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 14:09:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147945#M29301</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-01-21T14:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: Optional/situational steps in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147946#M29302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Art. I am giving this a shot and will let you know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 16:44:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147946#M29302</guid>
      <dc:creator>Paul_NYS</dc:creator>
      <dc:date>2014-01-21T16:44:57Z</dc:date>
    </item>
    <item>
      <title>Re: Optional/situational steps in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147947#M29303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes.&amp;nbsp; That is one of the main reasons for creating a macro rather than just running a saved program.&amp;nbsp; There are a number of conditional statements in macro language.&lt;/P&gt;&lt;P&gt;%IF ... %THEN ... %ELSE&lt;/P&gt;&lt;P&gt;%DO;&lt;/P&gt;&lt;P&gt;%DO var=... %TO ... ;&lt;/P&gt;&lt;P&gt;%DO %WHILE();&lt;/P&gt;&lt;P&gt;%DO %UNTIL();&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 16:50:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147947#M29303</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-01-21T16:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: Optional/situational steps in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147948#M29304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does your macro parameter value have quotes?&amp;nbsp; Or do you allow for either quoted or not quoted values?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 16:50:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147948#M29304</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2014-01-21T16:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Optional/situational steps in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147949#M29305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just curious, is there any reason why you didn't use macro function &lt;SPAN style="font-family: 'courier new', courier;"&gt;%upcase&lt;/SPAN&gt;?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 17:44:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147949#M29305</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2014-01-21T17:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Optional/situational steps in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147950#M29306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="807378" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;: Why?&amp;nbsp; Good question!&lt;/P&gt;&lt;P&gt;My usual answer would be that I'm a psychologist, not a programmer.&lt;/P&gt;&lt;P&gt;However, the real answer was because I copied and pasted from an old macro I had handy and didn't even notice.&amp;nbsp; Interestingly, no one complained about the inclusion of quotes.&amp;nbsp; Yes, the following would have sufficed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%if %upcase(&amp;amp;myparaneter)=FLAG %then&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regardless, both will do what Paul wanted to accomplish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Jan 2014 18:39:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147950#M29306</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-01-21T18:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: Optional/situational steps in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147951#M29307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your choice to use %sysfunc() around upcase() is an interesting area.&lt;/P&gt;&lt;P&gt;Before sysfunc() became available, I had to debug a macro application which used the innocent-looking %LEFT().&lt;/P&gt;&lt;P&gt;I am now very happy to avoid that by adopting your approach %SYSFUNC(LEFT()).&lt;/P&gt;&lt;P&gt;These (%left and %upcase) may seem similar string handl;ing functions, but the macro language %UPCASE() is in fact a pre-compiled function, unlike %LEFT().&lt;/P&gt;&lt;P&gt;What folllows is a full debugging log comparing the noise level (lines in the saslog imply some activity) of %sysfunc(LEFT()) and %LEFT&lt;/P&gt;&lt;P&gt;First prepare a macro variable with leading blanks&lt;/P&gt;&lt;P&gt;%let test_str = %str(&amp;nbsp; 123 abc x) ;&lt;/P&gt;&lt;P&gt;now switch on the macro diagnostics and now&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;option mprint mprintnest mlogic mlogicnest symbolgen ;&lt;/P&gt;&lt;P&gt;Here is activity of your way %put %sysfunc(left( &amp;amp;test_str ) ) ;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;220&amp;nbsp; %put %sysfunc( left( &amp;amp;test_str )) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable TEST_STR resolves to&amp;nbsp;&amp;nbsp; 123 abc x&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;SYMBOLGEN:&amp;nbsp; Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&lt;STRONG&gt;123 abc x&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and what follows are the lines from invoking classic SAS macro %put %left( &amp;amp;test_str );&lt;/P&gt;&lt;P&gt;There seems to be a lot going on!!&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;221&amp;nbsp; %put %left( &amp;amp;test_str );&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT):&amp;nbsp; Beginning execution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT):&amp;nbsp; This macro was compiled from the autocall file C:\Program Files\SASHome2\SASFoundation\9.4\core\sasmacro\left.sas&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable TEST_STR resolves to&amp;nbsp;&amp;nbsp; 123 abc x&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT):&amp;nbsp; Parameter TEXT has value _&amp;nbsp; 123 abc x_&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT):&amp;nbsp; %LOCAL I&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable TEXT resolves to&amp;nbsp;&amp;nbsp; 123 abc x&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT):&amp;nbsp; %IF condition %length(&amp;amp;text)=0 is FALSE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT):&amp;nbsp; %LET (variable name is I)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT.VERIFY):&amp;nbsp; Beginning execution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT.VERIFY):&amp;nbsp; This macro was compiled from the autocall file C:\Program Files\SASHome2\SASFoundation\9.4\core\sasmacro\verify.sas&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable TEXT resolves to&amp;nbsp;&amp;nbsp; 123 abc x&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT.VERIFY):&amp;nbsp; Parameter TEXT has value _&amp;nbsp; 123 abc x_&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT.VERIFY):&amp;nbsp; Parameter TARGET has value _ _&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT.VERIFY):&amp;nbsp; %LOCAL I&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable TEXT resolves to&amp;nbsp;&amp;nbsp; 123 abc x&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable TARGET resolves to&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT.VERIFY):&amp;nbsp; %IF condition %length(&amp;amp;text)=0 OR %length(&amp;amp;target)=0 is FALSE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable TEXT resolves to&amp;nbsp;&amp;nbsp; 123 abc x&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT.VERIFY):&amp;nbsp; %DO loop beginning; index variable I; start value is 1; stop value is 11; by value is 1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable TARGET resolves to&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable TEXT resolves to&amp;nbsp;&amp;nbsp; 123 abc x&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable I resolves to 1&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT.VERIFY):&amp;nbsp; %IF condition NOT %index(&amp;amp;target,%qsubstr(&amp;amp;text,&amp;amp;i,1)) is FALSE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT.VERIFY):&amp;nbsp; %DO loop index variable I is now 2; loop will iterate again.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable TARGET resolves to&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable TEXT resolves to&amp;nbsp;&amp;nbsp; 123 abc x&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN: Macro variable I resolves to 2&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT.VERIFY):&amp;nbsp; %IF condition NOT %index(&amp;amp;target,%qsubstr(&amp;amp;text,&amp;amp;i,1)) is FALSE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT.VERIFY):&amp;nbsp; %DO loop index variable I is now 3; loop will iterate again.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable TARGET resolves to&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable TEXT resolves to&amp;nbsp;&amp;nbsp; 123 abc x&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable I resolves to 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT.VERIFY):&amp;nbsp; %IF condition NOT %index(&amp;amp;target,%qsubstr(&amp;amp;text,&amp;amp;i,1)) is TRUE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT.VERIFY):&amp;nbsp; %GOTO VERFND (label resolves to VERFND).&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable I resolves to 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable TEXT resolves to&amp;nbsp;&amp;nbsp; 123 abc x&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT.VERIFY):&amp;nbsp; %IF condition &amp;amp;i&amp;gt;%length(&amp;amp;text) is FALSE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN: Macro variable I resolves to 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT.VERIFY):&amp;nbsp; Ending execution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable I resolves to 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT):&amp;nbsp; %IF condition &amp;amp;i is TRUE&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable TEXT resolves to&amp;nbsp;&amp;nbsp; 123 abc x&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Some characters in the above value which were subject to macro quoting have been unquoted for printing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SYMBOLGEN:&amp;nbsp; Macro variable I resolves to 3&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MLOGIC(LEFT):&amp;nbsp; Ending execution.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG style="font-size: 8.0pt; font-family: 'SAS Monospace';"&gt;123 abc x&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 16:20:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147951#M29307</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2014-01-22T16:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Optional/situational steps in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147952#M29308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Gosh, Peter, are you suggesting there may be room for improvement in some of the autocall macros provided by SAS? &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was lucky to take a macro course early in my career from Ian Whitlock.&amp;nbsp; He was kind enough to point out the difference between true pre-compiled macro functions (%UPCASE) and autocall macros doing the work of a function (%LOWCASE).&amp;nbsp; I noticed the docs differentiate these as well.&amp;nbsp; And most importantly, he encouraged us to peruse the source code of the autocall macros from SAS, and consider which stylistic approaches we might or might not want to adopt.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 20:04:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147952#M29308</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2014-01-22T20:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: Optional/situational steps in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147953#M29309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A good example of why you should only turn on SYMBOLGEN and MLOGIC as a last resort in debugging a macro.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2014 00:43:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147953#M29309</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-01-23T00:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Optional/situational steps in a macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147954#M29310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you Tom&lt;/P&gt;&lt;P&gt;I agree for development of code, use minimum diagnostics.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;It was in debugging a production problem without these diagnostics that I decided they have their place at that stage, especially mautolocdisplay and source2. In that situation it is difficult to re-run, after adding these options.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The %LEFT diagnostics example posted earlier was a bit "overkill", but points out how much might be "going on under the covers" of a macro. In that case the %verify() macro that is called by %left(), is designed to support more than %left() needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2014 12:48:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Optional-situational-steps-in-a-macro/m-p/147954#M29310</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2014-01-23T12:48:10Z</dc:date>
    </item>
  </channel>
</rss>

