<?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 use  %do %to on while running on remote servers in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-do-to-on-while-running-on-remote-servers/m-p/384034#M91636</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/35945"&gt;@Shayan2012&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;On top of what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;wrote you need also to be quite carefule how you implement your macro code if combined with rsubmit in regards of timing. If you get it wrong then the macro compiler will resolve your macro stuff before the rsubmit gets executed resulting in the macro stuff being executed on your local machine even though you have it within the rsubmit block in your code.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/23/986.html" target="_blank"&gt;http://support.sas.com/kb/23/986.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/connref/69581/HTML/default/viewer.htm#n1wm9969gdtuijn195n1o7uaqp87.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/connref/69581/HTML/default/viewer.htm#n1wm9969gdtuijn195n1o7uaqp87.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 29 Jul 2017 22:52:07 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2017-07-29T22:52:07Z</dc:date>
    <item>
      <title>How to use  %do %to on while running on remote servers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-do-to-on-while-running-on-remote-servers/m-p/384000#M91623</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I recently noticed that, if I want to write a do loop or do a %let statement while on server, it does not work, and it seems that SAS simply ignores the line.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;* sign on WRDS server;
rsubmit;
&lt;BR /&gt;%do i = 1980 %to  2000;
data a_&amp;amp;i;
set ...;
run;

%end;
endrsubmit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;log does not produce any line for that issue, it simply returns an error becasue a_i&amp;amp; is not resolved. The same thing happens if I want to use %let on the server. Is there a way that I can run such macro statements on the server? Or is there anything run with the code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am familiar with %syslput but somehow cannot figure how to use it with the %do loop.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jul 2017 18:55:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-do-to-on-while-running-on-remote-servers/m-p/384000#M91623</guid>
      <dc:creator>Shayan2012</dc:creator>
      <dc:date>2017-07-29T18:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to use  %do %to on while running on remote servers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-do-to-on-while-running-on-remote-servers/m-p/384005#M91628</link>
      <description>&lt;P&gt;Macro code needs to generally be embedded in a macro. The code you posted will not work on a desktop either, you need working code in general first. Basically, your errors have nothing to do with being run on a server.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro print_loop_useless();
%do i=1 %to 100;

proc print data=sashelp.cars(obs=&amp;amp;i);
run;

%end;
%mend;

%print_loop_useless();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jul 2017 18:56:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-do-to-on-while-running-on-remote-servers/m-p/384005#M91628</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-29T18:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to use  %do %to on while running on remote servers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-do-to-on-while-running-on-remote-servers/m-p/384034#M91636</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/35945"&gt;@Shayan2012&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;On top of what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;wrote you need also to be quite carefule how you implement your macro code if combined with rsubmit in regards of timing. If you get it wrong then the macro compiler will resolve your macro stuff before the rsubmit gets executed resulting in the macro stuff being executed on your local machine even though you have it within the rsubmit block in your code.&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/23/986.html" target="_blank"&gt;http://support.sas.com/kb/23/986.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/connref/69581/HTML/default/viewer.htm#n1wm9969gdtuijn195n1o7uaqp87.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/connref/69581/HTML/default/viewer.htm#n1wm9969gdtuijn195n1o7uaqp87.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 29 Jul 2017 22:52:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-do-to-on-while-running-on-remote-servers/m-p/384034#M91636</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-07-29T22:52:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to use  %do %to on while running on remote servers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-do-to-on-while-running-on-remote-servers/m-p/384322#M91755</link>
      <description>thanks Reeza, I actually had the macro statements, I forgot to put them here while copying and pasting. I do apologize for the inaccuracy.</description>
      <pubDate>Mon, 31 Jul 2017 15:33:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-do-to-on-while-running-on-remote-servers/m-p/384322#M91755</guid>
      <dc:creator>Shayan2012</dc:creator>
      <dc:date>2017-07-31T15:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use  %do %to on while running on remote servers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-do-to-on-while-running-on-remote-servers/m-p/384323#M91756</link>
      <description>Thanks a lot, Patrick. I think my problem was actually the thing that you mentioned, and the documents helped solving the problem.&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Jul 2017 15:34:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-do-to-on-while-running-on-remote-servers/m-p/384323#M91756</guid>
      <dc:creator>Shayan2012</dc:creator>
      <dc:date>2017-07-31T15:34:14Z</dc:date>
    </item>
  </channel>
</rss>

