<?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: SAS/SHARE: copy macro variables to remote session in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-SHARE-copy-macro-variables-to-remote-session/m-p/861074#M340138</link>
    <description>&lt;P&gt;Sorry, I made 2 glaring errors in this post. I meant SAS/CONNECT in the subject and not &amp;amp;SYSLOCALHOST, but &amp;amp;SYHOSTNAME.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Feb 2023 12:23:41 GMT</pubDate>
    <dc:creator>HeidiDT</dc:creator>
    <dc:date>2023-02-27T12:23:41Z</dc:date>
    <item>
      <title>SAS/SHARE: copy macro variables to remote session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-SHARE-copy-macro-variables-to-remote-session/m-p/861050#M340130</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;
&lt;P&gt;I am trying to copy defined macro variables to a remote server session. I have found the code on this forum:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;signon linux user="&amp;amp;sasbatchuser" pass="&amp;amp;sasbatchpass";&lt;/P&gt;
&lt;P&gt;* Combine Credit ABT tables and download to APP server;&lt;BR /&gt;rsubmit;&lt;BR /&gt;libname rwork slibref=work server=??;&lt;/P&gt;
&lt;P&gt;%SYSLPUT _all_;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just have no idea what to specify in the server option of the libname statement. I tried using the value of &amp;amp;SYSLOCALHOST (which in my case is uatsasapp03), but got the following error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1 libname rwork slibref=work server=uatsasapp03;&lt;BR /&gt;-----------&lt;BR /&gt;23&lt;BR /&gt;ERROR: Libref RWORK is not assigned.&lt;BR /&gt;ERROR: Error in the LIBNAME statement.&lt;BR /&gt;ERROR 23-7: Invalid value for the SERVER option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please can anyone assist?&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 10:58:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-SHARE-copy-macro-variables-to-remote-session/m-p/861050#M340130</guid>
      <dc:creator>HeidiDT</dc:creator>
      <dc:date>2023-02-27T10:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/SHARE: copy macro variables to remote session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-SHARE-copy-macro-variables-to-remote-session/m-p/861074#M340138</link>
      <description>&lt;P&gt;Sorry, I made 2 glaring errors in this post. I meant SAS/CONNECT in the subject and not &amp;amp;SYSLOCALHOST, but &amp;amp;SYHOSTNAME.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 12:23:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-SHARE-copy-macro-variables-to-remote-session/m-p/861074#M340138</guid>
      <dc:creator>HeidiDT</dc:creator>
      <dc:date>2023-02-27T12:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/SHARE: copy macro variables to remote session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-SHARE-copy-macro-variables-to-remote-session/m-p/861076#M340139</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/54209"&gt;@HeidiDT&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Sorry, I made 2 glaring errors in this post. I meant SAS/CONNECT in the subject and not &amp;amp;SYSLOCALHOST, but &amp;amp;SYHOSTNAME.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It also feels you're actually not asking about macro variables but about remote libraries.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a look at this sample from the docu:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/connref/p0a9po9um01h3cn1sdhnas5vh5sq.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/connref/p0a9po9um01h3cn1sdhnas5vh5sq.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 12:32:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-SHARE-copy-macro-variables-to-remote-session/m-p/861076#M340139</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-02-27T12:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/SHARE: copy macro variables to remote session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-SHARE-copy-macro-variables-to-remote-session/m-p/861083#M340142</link>
      <description>&lt;P&gt;It looks like you are trying to allocate your local WORK library as a remote libname on the server. I do not think that is possible. What you can do is to allocate a remote library in your own session, like this (no RSUBMIT):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname rwork slibref=work server=linux;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 27 Feb 2023 12:54:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-SHARE-copy-macro-variables-to-remote-session/m-p/861083#M340142</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2023-02-27T12:54:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/SHARE: copy macro variables to remote session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-SHARE-copy-macro-variables-to-remote-session/m-p/861087#M340146</link>
      <description>&lt;P&gt;Below working sample code if spawning a 2nd session on the same machine. Not sure if that's also going to work if the remote server is on a different node - but I believe it should.&amp;nbsp;&lt;BR /&gt;Just take into consideration that whenever you use a remote library there will be a data transfer process in the background that is going to severely impact performance.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;signon sess2 sascmd="!sascmd -nosyntaxcheck -noterminal";
data test;
  set sashelp.class;
run;
%syslput local_work=%sysfunc(pathname(work));
rsubmit sess2;
  libname lwork "&amp;amp;local_work";
  proc print data=lwork.test;
  run;
endrsubmit;
signoff sess2;&amp;nbsp;&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 13:23:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-SHARE-copy-macro-variables-to-remote-session/m-p/861087#M340146</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2023-02-27T13:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS/SHARE: copy macro variables to remote session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-SHARE-copy-macro-variables-to-remote-session/m-p/861089#M340147</link>
      <description>&lt;P&gt;Thanks so much - I realised that it should be outside of the rsubmit after some more reading &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 13:24:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-SHARE-copy-macro-variables-to-remote-session/m-p/861089#M340147</guid>
      <dc:creator>HeidiDT</dc:creator>
      <dc:date>2023-02-27T13:24:18Z</dc:date>
    </item>
  </channel>
</rss>

