<?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 if condition in remote session in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-if-condition-in-remote-session/m-p/512589#M138080</link>
    <description>&lt;P&gt;You should enter the %IF into a internal macro submitted to the remote host:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro new;
options mprint mlogic;
OPTIONS COMAMID = TCP;
%LET _host_user=xxxx;
%let _host_pass=xxxx;
%LET Rsysv = rysa 7280;
signon Rsysv  user="&amp;amp;_host_user" password="&amp;amp;_host_pass" noscript;

rsubmit;
 
data new;
x=5;
run;
 
data _null_;
call symputx('y',2);
run;

%macro check(arg);
    %if &amp;amp;arg=2 %then %do;
      proc download data=new;
     run;&lt;BR /&gt;   %end;
%mend check;
%check(&amp;amp;y);

endrsubmit;

%mend;

%new;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 13 Nov 2018 15:37:50 GMT</pubDate>
    <dc:creator>Shmuel</dc:creator>
    <dc:date>2018-11-13T15:37:50Z</dc:date>
    <item>
      <title>how to use if condition in remote session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-if-condition-in-remote-session/m-p/512504#M138055</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro new;

options mprint mlogic;

OPTIONS COMAMID = TCP;

%LET _host_user=xxxx;

%let _host_pass=xxxx;

%LET Rsysv = rysa 7280;

signon Rsysv  user="&amp;amp;_host_user" password="&amp;amp;_host_pass" noscript;

 

rsubmit;

 
data new;

x=5;

run;

 

data _null_;

call symputx('y',2);

run;

 

%if &amp;amp;y=2 %then %do;

proc download data=new;

run;

%end;

 

endrsubmit;

 

%mend;

 

%new



&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how can i use below condition correctly in remote session&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;%if &amp;amp;y=2 %then %do;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2018 10:56:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-if-condition-in-remote-session/m-p/512504#M138055</guid>
      <dc:creator>shubham1</dc:creator>
      <dc:date>2018-11-13T10:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to use if condition in remote session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-if-condition-in-remote-session/m-p/512589#M138080</link>
      <description>&lt;P&gt;You should enter the %IF into a internal macro submitted to the remote host:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro new;
options mprint mlogic;
OPTIONS COMAMID = TCP;
%LET _host_user=xxxx;
%let _host_pass=xxxx;
%LET Rsysv = rysa 7280;
signon Rsysv  user="&amp;amp;_host_user" password="&amp;amp;_host_pass" noscript;

rsubmit;
 
data new;
x=5;
run;
 
data _null_;
call symputx('y',2);
run;

%macro check(arg);
    %if &amp;amp;arg=2 %then %do;
      proc download data=new;
     run;&lt;BR /&gt;   %end;
%mend check;
%check(&amp;amp;y);

endrsubmit;

%mend;

%new;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Nov 2018 15:37:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-if-condition-in-remote-session/m-p/512589#M138080</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2018-11-13T15:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to use if condition in remote session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-if-condition-in-remote-session/m-p/512595#M138082</link>
      <description>You should consider any code between RSUBMIT and ENDRSUBMIT as a separate program, You probably know that %IF should be part of a macro known to host where it is running.</description>
      <pubDate>Tue, 13 Nov 2018 15:44:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-if-condition-in-remote-session/m-p/512595#M138082</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2018-11-13T15:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to use if condition in remote session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-use-if-condition-in-remote-session/m-p/512616#M138083</link>
      <description>If you're using SAS 9.4 TS1M5 that type of code is valid, but it's not in earlier versions. You need to have another external macro that you can call with the %IF logic. &lt;BR /&gt;</description>
      <pubDate>Tue, 13 Nov 2018 16:15:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-use-if-condition-in-remote-session/m-p/512616#M138083</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-13T16:15:17Z</dc:date>
    </item>
  </channel>
</rss>

