<?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: Signin-Signoff blicks inside a macro invoked from local session in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Signin-Signoff-blicks-inside-a-macro-invoked-from-local-session/m-p/127934#M26118</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still looking for documentation regarding SIGNON/SIGNOFF commands inside a macro.&amp;nbsp; When two such blocks appear one after the other inside a macro, execution of code inside first seems normal.&amp;nbsp; Inside the second, proc and data steps seem to execute before %let and %do statements even though macro statements appear first.&amp;nbsp; Very strange.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Nov 2012 01:35:25 GMT</pubDate>
    <dc:creator>SASPARILLA</dc:creator>
    <dc:date>2012-11-22T01:35:25Z</dc:date>
    <item>
      <title>Signin-Signoff blicks inside a macro invoked from local session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Signin-Signoff-blicks-inside-a-macro-invoked-from-local-session/m-p/127928#M26112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doing something strange.&amp;nbsp; I put 2 successive signon-rsubmit-endrsubmit-signoff blocks INSIDE of a macro.&amp;nbsp; Macro variables assigned using %let are not resolving inside the second block.&amp;nbsp; Everything in first block seems to execute OK.&amp;nbsp; Stuff in second block also runs, but I cannot resolve macro variables.&amp;nbsp; That code is just skipped. Can't find any documentation on whether or not you can even do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I'm doing this because my remote session keeps timing out if I do everything at once.&amp;nbsp; I know it is not normal to use signon INSIDE a macro)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro my_macro;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; signon; rsubmit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* bunch of code */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endrsubmit; signoff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; signon; rsubmit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* bunch of code */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let i = 2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Code beyond here will not recognize i as a macro variable. */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put &amp;amp;i.;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Not resolving */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endrubmit; signoff;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%mend my_macro;&lt;/P&gt;&lt;P&gt;%my_macro;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2012 02:03:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Signin-Signoff-blicks-inside-a-macro-invoked-from-local-session/m-p/127928#M26112</guid>
      <dc:creator>SASPARILLA</dc:creator>
      <dc:date>2012-11-16T02:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Signin-Signoff blicks inside a macro invoked from local session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Signin-Signoff-blicks-inside-a-macro-invoked-from-local-session/m-p/127929#M26113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Without the complete code/log it's hard to say anything about resolving.&lt;/P&gt;&lt;P&gt;There seems to be a ; missing after the first signoff...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Nov 2012 12:01:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Signin-Signoff-blicks-inside-a-macro-invoked-from-local-session/m-p/127929#M26113</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2012-11-16T12:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Signin-Signoff blicks inside a macro invoked from local session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Signin-Signoff-blicks-inside-a-macro-invoked-from-local-session/m-p/127930#M26114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for the missing ;&amp;nbsp;&amp;nbsp;&amp;nbsp; My general question was that "can you put signon-rsubmit statements inside a macro invoked from local session.&amp;nbsp; The simi-pseudo code I provided was not the actual code I ran.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you know if documentation that addresses issue of placing signon and rsubmit commands inside a macro?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Nov 2012 01:45:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Signin-Signoff-blicks-inside-a-macro-invoked-from-local-session/m-p/127930#M26114</guid>
      <dc:creator>SASPARILLA</dc:creator>
      <dc:date>2012-11-17T01:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Signin-Signoff blicks inside a macro invoked from local session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Signin-Signoff-blicks-inside-a-macro-invoked-from-local-session/m-p/127931#M26115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The issue of when macro statements like %LET evaluate can be tricky when combining macros with rsubmit blocks.&lt;/P&gt;&lt;P&gt;You might need to resort to work arounds. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Usually I use %SYSLPUT to create the macro variables in the remote environment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;signon;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%syslput i=2;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;rsubmit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;endrsubmit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also look at this thread where the programmer ended up using a renamed version of the old SYSLPUT macro from versions of SAS from before the introduction of the %SYSLPUT macro statement.&amp;nbsp; &lt;A __default_attr="142686" __jive_macro_name="message" class="jive_macro jive_macro_message" href="https://communities.sas.com/" modifiedtitle="true" title="Re: %SYSLPUT in a macro"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another technique is to move the information in datasets instead.&amp;nbsp; You could then use CALL SYMPUTX in a datastep on the remote side to populate the macro variable in the remote environment.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Nov 2012 18:02:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Signin-Signoff-blicks-inside-a-macro-invoked-from-local-session/m-p/127931#M26115</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-11-17T18:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: Signin-Signoff blicks inside a macro invoked from local session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Signin-Signoff-blicks-inside-a-macro-invoked-from-local-session/m-p/127932#M26116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the input.&amp;nbsp; Are signon and rsubmit statements used inside macros really the norm?&amp;nbsp; It is in the second signon block where the troubles begin.&amp;nbsp; Everything resolves just fine.&amp;nbsp; But down in the second block, procedures and data steps are running before %let and %do statements even though %let and %do appear first.&amp;nbsp; Very strange.&amp;nbsp; I don't think it is a synchronous nonsynchronous thing.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again.&amp;nbsp; I'm looking for any SAS documentation talking about Signon and Rsumbit inside a macro.&amp;nbsp; Have only seen one other posting on the issue.&amp;nbsp; He was having same problem I am.&amp;nbsp; But in his case, Signon and Signoff were outside macro and only Rsubmit and endrsubmit were inside:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; signon;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %macro my_macro;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rsubmit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt; stuff &amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; endrsubmit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %mend;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; signoff;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Nov 2012 01:15:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Signin-Signoff-blicks-inside-a-macro-invoked-from-local-session/m-p/127932#M26116</guid>
      <dc:creator>SASPARILLA</dc:creator>
      <dc:date>2012-11-18T01:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Signin-Signoff blicks inside a macro invoked from local session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Signin-Signoff-blicks-inside-a-macro-invoked-from-local-session/m-p/127933#M26117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;SIGNON/SIGNOFF are executable and %MACRO/%MEND are just to define the macro.&amp;nbsp; To run the macro you need to call it.&amp;nbsp; In general it would be clearer to move the macro definitions to before the executable code (or put them in an autocall library).&amp;nbsp; Your example should look more like:&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%macro my_macro;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;rsubmit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; &amp;lt; stuff &amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; background-color: #ffffff;"&gt;endrsubmit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%mend;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;signon;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;%my_macro;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;signoff;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%DO/%END will control the execution of the macro.&amp;nbsp; So they will NOT be executing in the remote session. Instead the code that they generate might be sent to the remote session if you have an open RSUBMIT/ENDRSUBMIT block.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is the %LET that I am not sure whether it could execute in either the local session or the remote session. In general I suspect that they will execute in the local session.&amp;nbsp; If you want them to execute in the remote session then you probable need to use %NRSTR() to protect the %LET keyword.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Nov 2012 19:22:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Signin-Signoff-blicks-inside-a-macro-invoked-from-local-session/m-p/127933#M26117</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-11-18T19:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Signin-Signoff blicks inside a macro invoked from local session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Signin-Signoff-blicks-inside-a-macro-invoked-from-local-session/m-p/127934#M26118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tom:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Still looking for documentation regarding SIGNON/SIGNOFF commands inside a macro.&amp;nbsp; When two such blocks appear one after the other inside a macro, execution of code inside first seems normal.&amp;nbsp; Inside the second, proc and data steps seem to execute before %let and %do statements even though macro statements appear first.&amp;nbsp; Very strange.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2012 01:35:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Signin-Signoff-blicks-inside-a-macro-invoked-from-local-session/m-p/127934#M26118</guid>
      <dc:creator>SASPARILLA</dc:creator>
      <dc:date>2012-11-22T01:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: Signin-Signoff blicks inside a macro invoked from local session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Signin-Signoff-blicks-inside-a-macro-invoked-from-local-session/m-p/127935#M26119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just a thought, but wouldn't it be better to solve the remote SAS server timeout problem rather than trying to code around it? The reason I say this is we had a very similar problem recently and discovered that the reason for the timeouts is that our SAS server sits behind a firewall and it was the TCP ports on the firewall that were timing out. A quick chat to one of our IT network staff confirmed what was going on and a change was implemented to extend the timeout period on the firewall ports. Problem solved.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2012 23:23:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Signin-Signoff-blicks-inside-a-macro-invoked-from-local-session/m-p/127935#M26119</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2012-11-22T23:23:50Z</dc:date>
    </item>
  </channel>
</rss>

