<?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: Can I run a proc compare on data across two separate remote servers in BASE SAS 9.4 or SAS EG 7. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Can-I-run-a-proc-compare-on-data-across-two-separate-remote/m-p/570851#M12040</link>
    <description>&lt;P&gt;You basically do&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname remlib1 'path on server 1' server=server1;
libname remlib2 'path on server 2' server=server2;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;after signing on to both servers.&lt;/P&gt;
&lt;P&gt;Then you can compare a dataset in remlib1 with one in remlib2.&lt;/P&gt;
&lt;P&gt;Or you do&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;signon server1
rsubmit;
signon server2;
libname remlib 'path on server2' server=server2;
proc compare ........;
signoff server2;
endrsubmit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to run the compare on one of the servers, so at least one dataset is read locally.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jul 2019 07:42:56 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-07-03T07:42:56Z</dc:date>
    <item>
      <title>Can I run a proc compare on data across two separate remote servers in BASE SAS 9.4 or SAS EG 7.1?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Can-I-run-a-proc-compare-on-data-across-two-separate-remote/m-p/570845#M12036</link>
      <description>&lt;P&gt;Hello SASSY SAS USERS,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm wondering if it's possible to be able to run a proc compare&amp;nbsp; across two servers?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By that I mean -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BASE=&lt;FONT color="#0000FF"&gt;RemoteServer1&lt;/FONT&gt;.lib.dataset&lt;/P&gt;&lt;P&gt;Compare =&amp;nbsp;&lt;FONT color="#FF00FF"&gt;RemoteServer2.&lt;/FONT&gt;lib.dataset&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't really care which server I actually run the proc compare in&amp;nbsp; (local, RS1 or RS2) but I just need to know if it can be done and if so what is the correct rsubmit syntax&amp;nbsp; to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or can I create a proc sql join across two servers in an rsubmit to do my comparison?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example below is the script I have built so far in BASE SAS 9.4 to connect to the two servers. The rsubmit SQL join at the end is where I am having trouble as I don't know what is the right rsubmit syntax to use to get it working? Is it possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;NOTE - I don't&amp;nbsp; want to copy server1 data to server2 data or vice versa as they are very large datasets and there is really no space allocated to me on either server to do this anyway.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;/*LOGON TO REMOTE SERVER 1*/&lt;/FONT&gt;&lt;BR /&gt;signoff remote=SRV1;&lt;BR /&gt;signon remote=SRV1 user="XXXX" password="XXXX";&lt;BR /&gt;/* ASSIGN Remote SERVER1 WORK DIR */&lt;BR /&gt;libname S1WORK slibref=work server=SRV1;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;/*assign the libnames where the datasets you want to run the proc compares on */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;/*SRV1 LIBNAMES*/&lt;/FONT&gt;&lt;BR /&gt;%macro MACRO_ASSIGN_LIB (NAME=, filepath=);&lt;BR /&gt;%syslput name = &amp;amp;name.;&lt;BR /&gt;%syslput filepath = &amp;amp;filepath.;&lt;BR /&gt;libname &amp;amp;NAME. remote "&amp;amp;filepath." server = SRV1;&lt;BR /&gt;rsubmit SRV1;&lt;BR /&gt;libname &amp;amp;NAME. "&amp;amp;filepath.";&lt;BR /&gt;endrsubmit SRV1;&lt;BR /&gt;%mend;&lt;BR /&gt;%MACRO_ASSIGN_LIB (NAME=SRV1OUT, filepath=/SAS_SERVER1/XX/XX/XX/output);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;/*LOGON TO REMOTE SERVER 2*/&lt;/FONT&gt;&lt;BR /&gt;signoff remote=SERV2;&lt;BR /&gt;signon remote=SERV2 user="XXXX" password="XXXX";&lt;BR /&gt;/* ASSIGN Remote SERVER1 WORK DIR */&lt;BR /&gt;libname SRV2WORK slibref=work server=SERV2;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#008000"&gt;/*assign the libnames where the datasets you want to run the proc compares on */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#008000"&gt;/*SERV2 LIBNAMES*/&lt;/FONT&gt;&lt;BR /&gt;%macro MACRO_ASSIGN_LIB (NAME=, filepath=);&lt;BR /&gt;%syslput name = &amp;amp;name.;&lt;BR /&gt;%syslput filepath = &amp;amp;filepath.;&lt;BR /&gt;libname &amp;amp;NAME. remote "&amp;amp;filepath." server = SERV2;&lt;BR /&gt;rsubmit SERV2;&lt;BR /&gt;libname &amp;amp;NAME. "&amp;amp;filepath.";&lt;BR /&gt;endrsubmit SERV2;&lt;BR /&gt;%mend;&lt;BR /&gt;%MACRO_ASSIGN_LIB (NAME=SERV2OUT, filepath=/SERVER2_SAS/XX/XX/XX/output);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;/* this bit does not quite work */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;rsubmit;&lt;/STRONG&gt;&lt;/FONT&gt; &lt;FONT color="#008000"&gt;/* DOES SOME EXTRA RSUBMIT SYNTAX NEED TO GO HERE ??? */&lt;/FONT&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;drop table re_int_model_input_diff;&lt;BR /&gt;create table re_int_model_input_diff as&lt;BR /&gt;select&lt;BR /&gt;a.account_id&lt;BR /&gt;,a.Var1 as Var1_SRV1&lt;BR /&gt;,b.Var1 as Var1_SERV2&lt;/P&gt;&lt;P&gt;,a.Var2 as Var2_SRV1&lt;BR /&gt;,b.Var2 as Var2_SERV2&lt;/P&gt;&lt;P&gt;,.....&lt;/P&gt;&lt;P&gt;,.....&lt;/P&gt;&lt;P&gt;,a.VarN as VarN_SRV1&lt;BR /&gt;,b.VarN as VarN_SERV2&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;from SRV1OUT.DATASETNAME a&lt;/FONT&gt; &lt;/STRONG&gt;&lt;FONT color="#008000"&gt;/* DOES EXTRA SYNTAX NEED TO GO HERE ??? */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;inner join SERV2OUT.DATASETNAME b&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#008000"&gt;/* DOES EXTRA SYNTAX NEED TO GO HERE ??? */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;on a.pkey=b.pkey&lt;BR /&gt;quit;&lt;BR /&gt;endrsubmit;&amp;nbsp; &lt;FONT color="#008000"&gt;/* extra endrsubmit syntax needed ?? */&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 07:19:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Can-I-run-a-proc-compare-on-data-across-two-separate-remote/m-p/570845#M12036</guid>
      <dc:creator>ZolaGola99</dc:creator>
      <dc:date>2019-07-03T07:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a proc compare on data across two separate remote servers in BASE SAS 9.4 or SAS EG 7.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Can-I-run-a-proc-compare-on-data-across-two-separate-remote/m-p/570846#M12037</link>
      <description>&lt;P&gt;If you use Remote Library Services to define remote libraries in your local session pointing to the remote locations, you can run proc compare in the local session. But be prepared that this may not be very efficient; you might find that downloading the datasets and then running the compare might perform better.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 07:24:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Can-I-run-a-proc-compare-on-data-across-two-separate-remote/m-p/570846#M12037</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-07-03T07:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a proc compare on data across two separate remote servers in BASE SAS 9.4 or SAS EG 7.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Can-I-run-a-proc-compare-on-data-across-two-separate-remote/m-p/570848#M12038</link>
      <description>&lt;P&gt;Thanks Kurt. Yep I've done the downloading way previously but this particular dataset I'm wanting to compare is very large (wide and long) and takes a extremely long time to download (many many hours).&amp;nbsp; &amp;nbsp;Anyway thanks for your help. I'll read up on RLS and see what is the best way as this type of comparison work that I'm doing will be continuous and on a regular basis.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ZolaG&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 07:31:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Can-I-run-a-proc-compare-on-data-across-two-separate-remote/m-p/570848#M12038</guid>
      <dc:creator>ZolaGola99</dc:creator>
      <dc:date>2019-07-03T07:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Can I run a proc compare on data across two separate remote servers in BASE SAS 9.4 or SAS EG 7.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Can-I-run-a-proc-compare-on-data-across-two-separate-remote/m-p/570851#M12040</link>
      <description>&lt;P&gt;You basically do&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname remlib1 'path on server 1' server=server1;
libname remlib2 'path on server 2' server=server2;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;after signing on to both servers.&lt;/P&gt;
&lt;P&gt;Then you can compare a dataset in remlib1 with one in remlib2.&lt;/P&gt;
&lt;P&gt;Or you do&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;signon server1
rsubmit;
signon server2;
libname remlib 'path on server2' server=server2;
proc compare ........;
signoff server2;
endrsubmit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to run the compare on one of the servers, so at least one dataset is read locally.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2019 07:42:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Can-I-run-a-proc-compare-on-data-across-two-separate-remote/m-p/570851#M12040</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-07-03T07:42:56Z</dc:date>
    </item>
  </channel>
</rss>

