<?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: New data set crashing SAS macro in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/New-data-set-crashing-SAS-macro/m-p/613363#M18402</link>
    <description>&lt;P&gt;Most likely you are generating unbalanced quotes or something like that and it is confusing SAS.&lt;/P&gt;
&lt;P&gt;Working with Excel files could also be a problem since they are prone to containing confusing content, but less likely if they are files you generated from SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure to turn on the MPRINT option before calling the macro so that the log will show what code the macro has generated.&amp;nbsp; You could also try turning on SYMBOLGEN or MLOGIC, but if the macro is very complex that could quickly yield a log file that too clutter with meaningless message to be useful to a human reviewer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might also try saving the code to a file and use the batch (background) submit mode in SAS/Studio so that you will get it to run in a separate session and you can then check the log of that session.&lt;/P&gt;</description>
    <pubDate>Fri, 20 Dec 2019 23:28:10 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-12-20T23:28:10Z</dc:date>
    <item>
      <title>New data set crashing SAS macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/New-data-set-crashing-SAS-macro/m-p/613359#M18399</link>
      <description>&lt;P&gt;I'm working on SAS Studio and have an interesting problem.&amp;nbsp; I am doing analysis, followed by table and graph creations.&amp;nbsp; I have 2 codes set up; one for subset creation and the other for the analysis and TLG creation.&amp;nbsp; Both have macros to run everything and all I have to do is change the file name and some inputs on the macro declaration for the new data set.&amp;nbsp; I have 6 different outcomes split on 2 groups (hence 12 separate tables, graphs, then 6 overlaid graphs by group).&amp;nbsp; I needed to add a new outcome, which gets processed as the same as before.&amp;nbsp; Here is the situation:&amp;nbsp; Group A works perfectly fine.&amp;nbsp; Group B crashes my macro and kills all SAS Studio functionality.&amp;nbsp; I essentially have to close the window down and log back in to get it working again.&amp;nbsp; Besides the values being different (date bins and quantities), both group A &amp;amp; B are processed on the same macros.&amp;nbsp; The only real difference is the file name.&amp;nbsp; Thoughts?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Macro A:&lt;/P&gt;&lt;P&gt;creates subsets based on Outcome and Group to an Excel file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Macro B:&lt;/P&gt;&lt;P&gt;reads in each Outcome/Group excel file, then calculates a cumulative time to event rate for the specified outcome and group.&lt;/P&gt;&lt;P&gt;*Outcomes 1-6, Groups A &amp;amp; B creates the proper output of tables and graphs.&lt;/P&gt;&lt;P&gt;*Outcome 7, Group A creates the proper output of tables and graphs.&lt;/P&gt;&lt;P&gt;*Outcome 7, Group B does diddly.&amp;nbsp; After hitting run, it pops over to the log window, but does even show warning or flags.&amp;nbsp; I cannot run another macro or process code without restarting SAS Studio.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FYI.&amp;nbsp; If I decide to work without Macro B and just locally declare my macro variables and process the code "manually", then I get the desired outcome.&amp;nbsp; It's just trying to do it with the macro that causes failure.&amp;nbsp; I had a situation before where my macros were crashing due to the location of an apostrophe (even though it was commented out).&amp;nbsp; My code worked perfectly before altering it to a macro, but once it was in the macro, it didn't like the apostrophe.&amp;nbsp; Obviously that's not the exact case here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts or ideas would be greatly appreciated.&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;Wes&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 23:03:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/New-data-set-crashing-SAS-macro/m-p/613359#M18399</guid>
      <dc:creator>uopsouthpaw</dc:creator>
      <dc:date>2019-12-20T23:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: New data set crashing SAS macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/New-data-set-crashing-SAS-macro/m-p/613360#M18400</link>
      <description>&lt;P&gt;No code.&lt;/P&gt;
&lt;P&gt;No data.&lt;/P&gt;
&lt;P&gt;No log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide something that might resemble actual details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would suggest if you haven't yet that you set :&lt;/P&gt;
&lt;P&gt;OPTIONS MPRINT;&lt;/P&gt;
&lt;P&gt;before running the macro and save the log to a text file for detailed examination.&lt;/P&gt;
&lt;P&gt;If you can't tell what is going&amp;nbsp; wrong then post the mprint results for where the problems start appearing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use in line comments with the *text; structure&amp;nbsp;such as :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data something;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; set datasource;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; * the next step does something;&lt;/P&gt;
&lt;P&gt;&amp;lt;code&amp;gt;&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;Then you really should change every single one inside a macro &amp;nbsp;to either the /* comment */ style or the specific for macros:&lt;/P&gt;
&lt;P&gt;%*comment;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 23:23:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/New-data-set-crashing-SAS-macro/m-p/613360#M18400</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-12-20T23:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: New data set crashing SAS macro</title>
      <link>https://communities.sas.com/t5/New-SAS-User/New-data-set-crashing-SAS-macro/m-p/613363#M18402</link>
      <description>&lt;P&gt;Most likely you are generating unbalanced quotes or something like that and it is confusing SAS.&lt;/P&gt;
&lt;P&gt;Working with Excel files could also be a problem since they are prone to containing confusing content, but less likely if they are files you generated from SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Make sure to turn on the MPRINT option before calling the macro so that the log will show what code the macro has generated.&amp;nbsp; You could also try turning on SYMBOLGEN or MLOGIC, but if the macro is very complex that could quickly yield a log file that too clutter with meaningless message to be useful to a human reviewer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might also try saving the code to a file and use the batch (background) submit mode in SAS/Studio so that you will get it to run in a separate session and you can then check the log of that session.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 23:28:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/New-data-set-crashing-SAS-macro/m-p/613363#M18402</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-12-20T23:28:10Z</dc:date>
    </item>
  </channel>
</rss>

