<?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: remote macro variables in local code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/remote-macro-variables-in-local-code/m-p/130426#M26613</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried running SAS Connect in "reverse"?&amp;nbsp; That is where the server becomes the client for a remote session on what you currently regard as your local machine.&amp;nbsp; You would then have 2 sessions on your PC and could control the exports by nesting rsubmits:&lt;/P&gt;&lt;P&gt;Local1 =&amp;gt; rsubmit to server running main extract and analysis =&amp;gt; rsubmit and upload to Local2 for export&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a thought&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard in Oz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Nov 2012 05:09:07 GMT</pubDate>
    <dc:creator>RichardinOz</dc:creator>
    <dc:date>2012-11-20T05:09:07Z</dc:date>
    <item>
      <title>remote macro variables in local code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remote-macro-variables-in-local-code/m-p/130424#M26611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi, so i have been struggling with this for a little while. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a sas file that has a bunch of macros in it, which i would like to execute on a remote server. portions of those need to execute on my local pc sas (mainly proc exports). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%include 'some file';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro1(var1,var2,var3);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what i need is to include var1 within a macro that is executed both remotely and locally. i have been trying to get %syslput and %sysrput to work for me, but its just not happening. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any help would be greatly appreciated. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2012 03:06:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remote-macro-variables-in-local-code/m-p/130424#M26611</guid>
      <dc:creator>anlynch</dc:creator>
      <dc:date>2012-11-20T03:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: remote macro variables in local code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remote-macro-variables-in-local-code/m-p/130425#M26612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not suggesting that this paper has your answer, but it might: &lt;A href="http://www2.sas.com/proceedings/sugi30/224-30.pdf" title="http://www2.sas.com/proceedings/sugi30/224-30.pdf"&gt;http://www2.sas.com/proceedings/sugi30/224-30.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regardless, it is worth the short time it will take to read it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2012 03:46:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remote-macro-variables-in-local-code/m-p/130425#M26612</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-11-20T03:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: remote macro variables in local code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remote-macro-variables-in-local-code/m-p/130426#M26613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried running SAS Connect in "reverse"?&amp;nbsp; That is where the server becomes the client for a remote session on what you currently regard as your local machine.&amp;nbsp; You would then have 2 sessions on your PC and could control the exports by nesting rsubmits:&lt;/P&gt;&lt;P&gt;Local1 =&amp;gt; rsubmit to server running main extract and analysis =&amp;gt; rsubmit and upload to Local2 for export&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a thought&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Richard in Oz&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Nov 2012 05:09:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remote-macro-variables-in-local-code/m-p/130426#M26613</guid>
      <dc:creator>RichardinOz</dc:creator>
      <dc:date>2012-11-20T05:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: remote macro variables in local code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remote-macro-variables-in-local-code/m-p/130427#M26614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've struggled with this too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Going from my Windows client to my AIX server a simple:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %syslput msg1=&amp;amp;msg1.;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; rsubmit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; endrsubmit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;works to define the variable msg1 in the remote session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, coming back the other way I find it does not work unless I do this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; rsubmit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %nrstr(%sysrput rmtuser=&amp;amp;sysuserid);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; endrsubmit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know why that %nrstr makes a difference, but it seems to!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 15:02:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remote-macro-variables-in-local-code/m-p/130427#M26614</guid>
      <dc:creator>TimArm</dc:creator>
      <dc:date>2012-11-21T15:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: remote macro variables in local code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remote-macro-variables-in-local-code/m-p/130428#M26615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, so I think that I at least understand the premise of what is going on... a follow up question though. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in my 'macro' file, i have sever proc exports... i would like to execute everything on the server with the exception of the proc export itself, so this would need to be executed locally. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so basically the file would like something like &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro test(variables);&lt;/P&gt;&lt;P&gt;some sas code;&lt;/P&gt;&lt;P&gt;proc export;&lt;/P&gt;&lt;P&gt;some more sas code;&lt;/P&gt;&lt;P&gt;%mend test;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i tried to do this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro test(variables);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;some sas code;&lt;/P&gt;&lt;P&gt;endrsubmit;&lt;/P&gt;&lt;P&gt;proc export;&lt;/P&gt;&lt;P&gt;rsubmit remote=server;&lt;/P&gt;&lt;P&gt;some more sas code;&lt;/P&gt;&lt;P&gt;%mend test;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but that does't seem to be working&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Nov 2012 23:29:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remote-macro-variables-in-local-code/m-p/130428#M26615</guid>
      <dc:creator>anlynch</dc:creator>
      <dc:date>2012-11-28T23:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: remote macro variables in local code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remote-macro-variables-in-local-code/m-p/130429#M26616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Why not run the macro on the LOCAL machine?&amp;nbsp; Then your macro definition becomes:&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;%macro test(variables);&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 style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; some sas code;&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;&amp;nbsp;&amp;nbsp;&amp;nbsp; Perhaps a PROC DOWNLOAD.&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;endrsubmit;&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;proc export;&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;...&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 style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Perhaps a PROC UPLOAD.&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;&amp;nbsp;&amp;nbsp; some more sas code;&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;endrsubmit;&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;%mend test;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 00:11:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remote-macro-variables-in-local-code/m-p/130429#M26616</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2012-11-29T00:11:47Z</dc:date>
    </item>
    <item>
      <title>Re: remote macro variables in local code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remote-macro-variables-in-local-code/m-p/130430#M26617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's essentially what I am doing... however, the macro is located in another file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so i %include the macro(s) file and then call the macros from the other program. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so my macro (in the external file) would look something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro test;&lt;/P&gt;&lt;P&gt;rsubmit server=&lt;EM&gt;"server"&lt;/EM&gt;;&lt;/P&gt;&lt;P&gt;data make_ds;&lt;/P&gt;&lt;P&gt;set ds2;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;endrsubmit;&lt;/P&gt;&lt;P&gt;%mend test;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this then throws an error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;connection to &lt;EM&gt;"server" &lt;/EM&gt;does not exist. you must establish&amp;nbsp; a connection by issuing the signon with the server=option or setting the global autosignon option. &lt;/P&gt;
&lt;P&gt;remote submit to &lt;EM&gt;"server"&lt;/EM&gt; canceled. &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then sas hangs with "remote processing in progress"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so i tried to add the &lt;EM&gt;signon="sever"&lt;/EM&gt; option to the macro, which presented me with a window to fill out some credentials, and eventually told me that the SAS/CONNECT Server name should be a quoted string.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 01:00:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remote-macro-variables-in-local-code/m-p/130430#M26617</guid>
      <dc:creator>anlynch</dc:creator>
      <dc:date>2012-11-29T01:00:07Z</dc:date>
    </item>
  </channel>
</rss>

