<?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: Macro Stopped Working in SAS Studio in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Macro-Stopped-Working-in-SAS-Studio/m-p/254962#M287</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For that &amp;amp;GRAPHTERM, that must be something being setup in the auto run of SAS, maybe in an autoexec.sas file, or something similar, you might want to check that to see if its been setup correctly, check all the options are up and running.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/30287508/how-can-i-disable-automatic-options-statements-in-sas-university-edition" target="_blank"&gt;http://stackoverflow.com/questions/30287508/how-can-i-disable-automatic-options-statements-in-sas-university-edition&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, I am not reading that code, it breaks every rule of easy to read code I can think of (indentation, finishing steps, ending macro variables etc.). &amp;nbsp;At a guess, as your using lots of call symputs, its likely one of those is being generated that contains either quotes, or something else which is causing problems. &amp;nbsp;comment out the whole macro and run it adding a step at a time, there is a lot in that code that looks suspicious to me. &amp;nbsp;the first datastep, you have an if then around assigning charclass, but then afterwards just assign it TRT without any logic? &amp;nbsp;And this line:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Doesn't seem to do anything?&lt;/P&gt;
&lt;P&gt;%if %upcase(%substr(&amp;amp;exact,1,1))=Y %then %str(exact wilcoxon);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 Mar 2016 15:14:01 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2016-03-07T15:14:01Z</dc:date>
    <item>
      <title>Macro Stopped Working in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Macro-Stopped-Working-in-SAS-Studio/m-p/254944#M284</link>
      <description>&lt;P&gt;I'm using SAS Studio on a MacBook Pro with VirtualBox and Safari. I wrote a macro that used to work, but now does not with the following log messages:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="sasSource"&gt;&lt;FONT size="2"&gt;1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;FONT size="2"&gt;2 TITLE;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;FONT size="2"&gt;3 FOOTNOTE;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;FONT size="2"&gt;4 OPTIONS LOCALE=en_US DFLANG=LOCALE;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;&lt;FONT size="2" color="#008080"&gt;WARNING: The quoted string currently being processed has become more than 262 bytes long. You might have unbalanced quotation&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;&lt;FONT size="2" color="#008080"&gt;marks.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;FONT size="2"&gt;140 &amp;amp;GRAPHTERM; ;*';*";*/;RUN;QUIT;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;FONT size="2"&gt;_________________&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;FONT size="2" color="#FF0000"&gt;49&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&lt;FONT size="2" color="#0000FF"&gt;NOTE 49-169: The meaning of an identifier after a quoted string might change in a future SAS release. Inserting white space&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasNote"&gt;&lt;FONT size="2" color="#0000FF"&gt;between a quoted string and the succeeding identifier is recommended.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;FONT size="2"&gt;___MORE &lt;/FONT&gt;&lt;FONT size="2"&gt;LOG LINES, THEN MY CODE___&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;DIV class="sasSource"&gt;options mprint symbolgen MAUTOSOURCE SASAUTOS="/folders/myfolders/SASMacs";&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;&lt;FONT color="#008000"&gt;WARNING: The quoted string currently being processed has become more than 262 bytes long. You might have unbalanced quotation&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasWarning"&gt;&lt;FONT color="#008000"&gt;marks.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;57 data birthwt; set npar.birthwt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;58 if program="Drug" then Trt=1;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;59 else if program="Placebo" then Trt=2;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;60 %macro Moses(data=birthwt,class=Trt,var=birthwt,k=4,exact=yes)&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;FONT size="3"&gt;Any suggestions?&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&lt;FONT size="3"&gt;Thanks.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Mar 2016 14:00:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Macro-Stopped-Working-in-SAS-Studio/m-p/254944#M284</guid>
      <dc:creator>rsteiner</dc:creator>
      <dc:date>2016-03-07T14:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Stopped Working in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Macro-Stopped-Working-in-SAS-Studio/m-p/254945#M285</link>
      <description>&lt;P&gt;What is this line doing?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;140 &amp;amp;GRAPHTERM; ;*';*";*/;RUN;QUIT;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What does &amp;amp;graphtemr decode to? &amp;nbsp;Why not finishi it with a full stop. &amp;nbsp;Why the sequence of semicolons, asterix, quotes, and run quit? &amp;nbsp;It looks like there was a problem before with unbalanced quotes, and this has been patched up with that sequence.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you want my suggestion, I would take this moving to a new system as a good opportunity to do some software lifecycle management on this, look at all the code, see what is needed, why its needed, update it to the latest SAS functionality etc. &amp;nbsp;And document everything!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;In a normal production environment this should be done at least once a year, reassess against Functional Design Specifcation and requirements, check code still does what it should, re-test, look at new requests etc.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2016 14:20:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Macro-Stopped-Working-in-SAS-Studio/m-p/254945#M285</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-03-07T14:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Stopped Working in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Macro-Stopped-Working-in-SAS-Studio/m-p/254958#M286</link>
      <description>Hi RW9,&lt;BR /&gt;&lt;BR /&gt;Thanks for responding so quickly. The line&lt;BR /&gt;&lt;BR /&gt;140 &amp;amp;GRAPHTERM; ;*';*";*/;RUN;QUIT;&lt;BR /&gt;&lt;BR /&gt;isn¹t part of the code I wrote. It just came out in the log. I was&lt;BR /&gt;assuming this was something that SAS Studio generated. I just wrote this&lt;BR /&gt;over the weekend and it ran yesterday. Here is my code:&lt;BR /&gt;&lt;BR /&gt;options mprint symbolgen MAUTOSOURCE SASAUTOS="/folders/myfolders/SASMacs";&lt;BR /&gt;data birthwt; set npar.birthwt;&lt;BR /&gt;if program="Drug" then Trt=1;&lt;BR /&gt;else if program="Placebo" then Trt=2;&lt;BR /&gt;%macro Moses(data=birthwt,class=Trt,var=birthwt,k=4,exact=yes)&lt;BR /&gt;&lt;BR /&gt;And here is the macro:&lt;BR /&gt;&lt;BR /&gt;%macro Moses(data=_last_, class=, var=, k= , exact=no);&lt;BR /&gt;data &amp;amp;data; set &amp;amp;data nobs=n;&lt;BR /&gt;Shuffle=ranuni(2394857);&lt;BR /&gt;/* Check for numeric class variable */&lt;BR /&gt;type=vtype(&amp;amp;class);&lt;BR /&gt;CALL SYMPUT('type',TRIM(LEFT(PUT(type,$1.))));&lt;BR /&gt;if type="N" then do;&lt;BR /&gt;charclass=STRIP(PUT(&amp;amp;class, z10.));&lt;BR /&gt;end;&lt;BR /&gt;else do;&lt;BR /&gt;length charclass $10.;&lt;BR /&gt;charclass=&amp;amp;class;&lt;BR /&gt;end;&lt;BR /&gt;/*==================================*/&lt;BR /&gt;proc sort out=&amp;amp;data; by &amp;amp;class Shuffle;&lt;BR /&gt;proc means noprint;&lt;BR /&gt;class &amp;amp;class;&lt;BR /&gt;var &amp;amp;var;&lt;BR /&gt;output out=SamSize n=n;&lt;BR /&gt;data n1; set SamSize; if _N_=2;&lt;BR /&gt;CALL SYMPUT('n1',TRIM(LEFT(PUT(n,10.))));&lt;BR /&gt;CALL SYMPUT('grp1',TRIM(LEFT(PUT(&amp;amp;class,$10.))));&lt;BR /&gt;data n2; set SamSize; if _N_=3;&lt;BR /&gt;CALL SYMPUT('n2',TRIM(LEFT(PUT(n,10.))));&lt;BR /&gt;CALL SYMPUT('grp2',TRIM(LEFT(PUT(&amp;amp;class,$10.))));&lt;BR /&gt;data Group1;&lt;BR /&gt;do j=1 to floor(&amp;amp;n1/&amp;amp;k);&lt;BR /&gt;do i=1 to &amp;amp;k;&lt;BR /&gt;subgroup=j;&lt;BR /&gt;set &amp;amp;data; if &amp;amp;class=%str("&amp;amp;grp1");&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;data Group2;&lt;BR /&gt;do j=1 to floor(&amp;amp;n2/&amp;amp;k);&lt;BR /&gt;do i=1 to &amp;amp;k;&lt;BR /&gt;subgroup=j;&lt;BR /&gt;set &amp;amp;data; if &amp;amp;class=%str("&amp;amp;grp2");&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;end;&lt;BR /&gt;data Group1; Set Group1;&lt;BR /&gt;if _N_&amp;gt;&amp;amp;n1-mod(&amp;amp;n1,&amp;amp;k) then delete;&lt;BR /&gt;data Group2; Set Group2;&lt;BR /&gt;if _N_&amp;gt;&amp;amp;n2-mod(&amp;amp;n2,&amp;amp;k) then delete;&lt;BR /&gt;proc append base=Group1 data=Group2;&lt;BR /&gt;proc summary noprint;&lt;BR /&gt;class &amp;amp;class subgroup;&lt;BR /&gt;var Na;&lt;BR /&gt;output out=Variances var=Variance;&lt;BR /&gt;data Variances; set Variances;&lt;BR /&gt;if _TYPE_ &amp;lt; 3 then delete;&lt;BR /&gt;proc npar1way wilcoxon;&lt;BR /&gt;class &amp;amp;class;&lt;BR /&gt;var Variance;&lt;BR /&gt;%if %upcase(%substr(&amp;amp;exact,1,1))=Y %then %str(exact wilcoxon;);&lt;BR /&gt;title "Moses Rank-like Procedure";&lt;BR /&gt;run;&lt;BR /&gt;%mend Moses;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks again!&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Mon, 07 Mar 2016 14:53:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Macro-Stopped-Working-in-SAS-Studio/m-p/254958#M286</guid>
      <dc:creator>rsteiner</dc:creator>
      <dc:date>2016-03-07T14:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Stopped Working in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Macro-Stopped-Working-in-SAS-Studio/m-p/254962#M287</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For that &amp;amp;GRAPHTERM, that must be something being setup in the auto run of SAS, maybe in an autoexec.sas file, or something similar, you might want to check that to see if its been setup correctly, check all the options are up and running.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://stackoverflow.com/questions/30287508/how-can-i-disable-automatic-options-statements-in-sas-university-edition" target="_blank"&gt;http://stackoverflow.com/questions/30287508/how-can-i-disable-automatic-options-statements-in-sas-university-edition&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry, I am not reading that code, it breaks every rule of easy to read code I can think of (indentation, finishing steps, ending macro variables etc.). &amp;nbsp;At a guess, as your using lots of call symputs, its likely one of those is being generated that contains either quotes, or something else which is causing problems. &amp;nbsp;comment out the whole macro and run it adding a step at a time, there is a lot in that code that looks suspicious to me. &amp;nbsp;the first datastep, you have an if then around assigning charclass, but then afterwards just assign it TRT without any logic? &amp;nbsp;And this line:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Doesn't seem to do anything?&lt;/P&gt;
&lt;P&gt;%if %upcase(%substr(&amp;amp;exact,1,1))=Y %then %str(exact wilcoxon);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2016 15:14:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Macro-Stopped-Working-in-SAS-Studio/m-p/254962#M287</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-03-07T15:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Stopped Working in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Macro-Stopped-Working-in-SAS-Studio/m-p/254967#M288</link>
      <description>Thanks, RW9. I appreciate your time and suggestions.</description>
      <pubDate>Mon, 07 Mar 2016 15:25:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Macro-Stopped-Working-in-SAS-Studio/m-p/254967#M288</guid>
      <dc:creator>rsteiner</dc:creator>
      <dc:date>2016-03-07T15:25:21Z</dc:date>
    </item>
  </channel>
</rss>

