<?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: How to %SYSLPUT or %SYSRPUT Locally? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-SYSLPUT-or-SYSRPUT-Locally/m-p/712302#M219595</link>
    <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;I want to create a server-side local (rather than global) macro variable from a local-side local macro variable.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I understand you mean local as in in macro-local, not host-local.&lt;/P&gt;
&lt;P&gt;You can't since &lt;FONT face="courier new,courier"&gt;%syslput&lt;/FONT&gt; sends the value to the remote host outside of a remote macro environment.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro have(local_var_at_local);
  %syslput local_var_at_server=&amp;amp;local_var_at_local;  /* sending a host-local macro-local variable to the remote host, no macro-local environment on that host */
  rsubmit;                                                                          /* connecting to the remote host macro-global environment */
    %put &amp;amp;local_var_at_server is NOT a local macro variable at the server session.;&lt;STRONG&gt; /* nothing local here */&lt;/STRONG&gt;
  endrsubmit;
%mend;
%have
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;The only way would be to pull (rather than push/send) macro variables from the remote host from within a macro. There is no command to execute such a pull.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Jan 2021 03:50:15 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2021-01-19T03:50:15Z</dc:date>
    <item>
      <title>How to %SYSLPUT or %SYSRPUT Locally?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-SYSLPUT-or-SYSRPUT-Locally/m-p/712275#M219571</link>
      <description>&lt;P&gt;&lt;CODE&gt;%syslput&lt;/CODE&gt; and &lt;CODE&gt;%sysrput&lt;/CODE&gt; assign a global macro variable as a result.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*remote access*/
%let wrds=wrds.wharton.upenn.edu 4016;
signon wrds username=_prompt_;

/*pass local macro ONE to remote*/
%macro one(one);
%syslput one=&amp;amp;one;
rsubmit;
%put &amp;amp;one;
endrsubmit;
%mend;

/*prints 1234 remotely*/
%one(1234)

/*ONE works globally*/
rsubmit;
%sysrput one=&amp;amp;one;
endrsubmit;

/*prints 1234 here*/
%put &amp;amp;one;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Can I assign a local macro variable in this case?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 00:33:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-SYSLPUT-or-SYSRPUT-Locally/m-p/712275#M219571</guid>
      <dc:creator>Junyong</dc:creator>
      <dc:date>2021-01-19T00:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to %SYSLPUT or %SYSRPUT Locally?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-SYSLPUT-or-SYSRPUT-Locally/m-p/712296#M219591</link>
      <description>&lt;P&gt;Your question is confusing.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%&lt;/SPAN&gt;&lt;EM&gt;SYSLPUT&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;is submitted in a (most likely local) session and creates/copies macro variables to the server session.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;%&lt;/SPAN&gt;&lt;EM&gt;SYSRPUT&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;is remote-submitted to retrieve the value of a macro variable stored on the remote host and creates/updates macro variables on the calling (most likely local) session.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So they copy macro variable values from a SAS session to another.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;What do you want to do?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 02:18:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-SYSLPUT-or-SYSRPUT-Locally/m-p/712296#M219591</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-01-19T02:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to %SYSLPUT or %SYSRPUT Locally?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-SYSLPUT-or-SYSRPUT-Locally/m-p/712298#M219592</link>
      <description>&lt;P&gt;&lt;EM&gt;%SYSLPUT&lt;/EM&gt; is submitted in a (most likely local) session and creates/copies macro variables to the server session—here &lt;EM&gt;%SYSLPUT&lt;/EM&gt; passes either local or global macro variables from the local session to the server session only as global macro variables.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro have(local_var_at_local);
%syslput local_var_at_server=&amp;amp;local_var_at_local;
rsubmit;
%put &amp;amp;local_var_at_server is a local macro variable at the server session.
endrsubmit;
%mend;
%have

rsubmit;
%put &amp;amp;local_var_at_server is available though was local inside have macro;
endrsubmit;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I want to create a server-side local (rather than global) macro variable from a local-side local macro variable.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 02:59:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-SYSLPUT-or-SYSRPUT-Locally/m-p/712298#M219592</guid>
      <dc:creator>Junyong</dc:creator>
      <dc:date>2021-01-19T02:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to %SYSLPUT or %SYSRPUT Locally?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-SYSLPUT-or-SYSRPUT-Locally/m-p/712302#M219595</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;I want to create a server-side local (rather than global) macro variable from a local-side local macro variable.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;I understand you mean local as in in macro-local, not host-local.&lt;/P&gt;
&lt;P&gt;You can't since &lt;FONT face="courier new,courier"&gt;%syslput&lt;/FONT&gt; sends the value to the remote host outside of a remote macro environment.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro have(local_var_at_local);
  %syslput local_var_at_server=&amp;amp;local_var_at_local;  /* sending a host-local macro-local variable to the remote host, no macro-local environment on that host */
  rsubmit;                                                                          /* connecting to the remote host macro-global environment */
    %put &amp;amp;local_var_at_server is NOT a local macro variable at the server session.;&lt;STRONG&gt; /* nothing local here */&lt;/STRONG&gt;
  endrsubmit;
%mend;
%have
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;The only way would be to pull (rather than push/send) macro variables from the remote host from within a macro. There is no command to execute such a pull.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2021 03:50:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-SYSLPUT-or-SYSRPUT-Locally/m-p/712302#M219595</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2021-01-19T03:50:15Z</dc:date>
    </item>
  </channel>
</rss>

