<?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: Appending in proc download? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323356#M62088</link>
    <description>&lt;P&gt;Thank you all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, LinusH is right there. I would prefer not having to go via a local tmp-dataset, but that's not a possible way then.&amp;nbsp;I'll consider other options then, as you suggest.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I'm still a bit confused. To&amp;nbsp;make the proc append work, I need to signoff first?! From Shmuel:s example, the&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc download...&lt;/P&gt;&lt;P&gt;&amp;nbsp;out=work.my_local_name&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;work refers to the local work on the computer, while the&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc append...&lt;/P&gt;&lt;P&gt;&amp;nbsp;data=work.my_local_name&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;still refers to the server-work if I'm signon. Therefore I need to signoff first, then do the proc append?!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Staffan&lt;/P&gt;</description>
    <pubDate>Mon, 09 Jan 2017 14:13:41 GMT</pubDate>
    <dc:creator>SAStaffan</dc:creator>
    <dc:date>2017-01-09T14:13:41Z</dc:date>
    <item>
      <title>Appending in proc download?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323340#M62084</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm doing a proc download and it simply looks like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;proc download data=my_server_lib.my_server_name&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;out=my_local_lib.my_local_name&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This creates the data-set&amp;nbsp;&lt;FONT face="Courier New" size="2"&gt;my_local_name&lt;/FONT&gt; at&amp;nbsp;&lt;FONT face="Courier New" size="2"&gt;my_local_lib.&lt;/FONT&gt; Is there a way to make the download procedure APPEND the dataset to an already excisting dataset at &lt;FONT face="Courier New" size="2"&gt;my_local_lib?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If not, is there another way around it? I want to stay signon and appending a server-set to&amp;nbsp;a local set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Staffan&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 13:19:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323340#M62084</guid>
      <dc:creator>SAStaffan</dc:creator>
      <dc:date>2017-01-09T13:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Appending in proc download?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323342#M62085</link>
      <description>&lt;P&gt;Just have a proc append after download.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc download data=my_server_lib.my_server_name out=tmp;
run;

proc append base=my_local_lib.my_local_name data=tmp;
run;
&lt;/PRE&gt;
&lt;P&gt;Note that data structure would need to be the same.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 13:27:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323342#M62085</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-01-09T13:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Appending in proc download?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323344#M62086</link>
      <description>&lt;P&gt;It seems to me that you can't append with proc download.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Full documentation can be found in next link:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/connref/61908/HTML/default/viewer.htm#prcd.htm" target="_self"&gt;http://support.sas.com/documentation/cdl/en/connref/61908/HTML/default/viewer.htm#prcd.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but you always can download to a work library and append the temporary dataset to the old one:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="times new roman,times" size="3"&gt;proc download data=my_server_lib.my_server_name&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="times new roman,times" size="3"&gt;out=&lt;STRONG&gt;WORK&lt;/STRONG&gt;.my_local_name;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="times new roman,times" size="3"&gt;run;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="times new roman,times" size="3"&gt;proc &lt;STRONG&gt;append &amp;nbsp;&lt;/STRONG&gt; &lt;/FONT&gt;&lt;FONT face="times new roman,times" size="4"&gt;&lt;STRONG&gt;base&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="times new roman,times" size="3"&gt;=&lt;SPAN&gt;my_local_lib.my_local_name &amp;nbsp;&lt;STRONG&gt;data&lt;/STRONG&gt;=&lt;STRONG&gt;WORK&lt;/STRONG&gt;.my_local_name; run;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 13:37:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323344#M62086</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-01-09T13:37:17Z</dc:date>
    </item>
    <item>
      <title>Re: Appending in proc download?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323345#M62087</link>
      <description>&lt;P&gt;What I think the OP is asking for is a way to avoid the local temporary storage step, and insert the data "on the fly" during proc download.&lt;/P&gt;
&lt;P&gt;The short answer to that is no.&lt;/P&gt;
&lt;P&gt;On could&amp;nbsp;wish for an efficient&amp;nbsp;ay to collect remote SAS data like it was a data from an external RDBMS via a SAS/ACCESS libref.&lt;/P&gt;
&lt;P&gt;In SAS/CONNECT, there is Remote library Services, but last I checked, it is a performance killer. I guess&amp;nbsp;it was mainly developed&amp;nbsp;for data entry and SAS/SHARE, and displaying remote sata set meta data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another options is to use RSPT (Remote SQL Pass Through i guess...?), where&amp;nbsp;you could do SQL insert from a remote SAS server data set (not tested myself though):&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/shrref/69819/HTML/default/viewer.htm#n0saopgusahpu0n10w0lgz9t287x.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/shrref/69819/HTML/default/viewer.htm#n0saopgusahpu0n10w0lgz9t287x.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 13:38:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323345#M62087</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-01-09T13:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: Appending in proc download?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323356#M62088</link>
      <description>&lt;P&gt;Thank you all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, LinusH is right there. I would prefer not having to go via a local tmp-dataset, but that's not a possible way then.&amp;nbsp;I'll consider other options then, as you suggest.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I'm still a bit confused. To&amp;nbsp;make the proc append work, I need to signoff first?! From Shmuel:s example, the&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc download...&lt;/P&gt;&lt;P&gt;&amp;nbsp;out=work.my_local_name&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;work refers to the local work on the computer, while the&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc append...&lt;/P&gt;&lt;P&gt;&amp;nbsp;data=work.my_local_name&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;still refers to the server-work if I'm signon. Therefore I need to signoff first, then do the proc append?!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//Staffan&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 14:13:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323356#M62088</guid>
      <dc:creator>SAStaffan</dc:creator>
      <dc:date>2017-01-09T14:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Appending in proc download?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323360#M62089</link>
      <description>&lt;P&gt;proc download copies the dataset from remote host to local host.&lt;/P&gt;
&lt;P&gt;in order to run it you sign on to the remote host from your local.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the input is defined by&amp;nbsp;&lt;STRONG&gt;data=&lt;/STRONG&gt; and it should exist on the remote host.&lt;/P&gt;
&lt;P&gt;the output is defined by&amp;nbsp;&lt;STRONG&gt;out=&lt;/STRONG&gt;&amp;nbsp;and it will be created on the local host&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;you can signoff after the proc download to exceute the proc append.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope it is more clear now.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 14:25:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323360#M62089</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-01-09T14:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Appending in proc download?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323364#M62090</link>
      <description>Yes, thank you!&lt;BR /&gt;&lt;BR /&gt;I was hoping I would not have to signoff, but it seems impossible =/</description>
      <pubDate>Mon, 09 Jan 2017 14:32:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323364#M62090</guid>
      <dc:creator>SAStaffan</dc:creator>
      <dc:date>2017-01-09T14:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: Appending in proc download?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323374#M62091</link>
      <description>I don't think that signoff is a must.&lt;BR /&gt;just try it.</description>
      <pubDate>Mon, 09 Jan 2017 14:54:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323374#M62091</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-01-09T14:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Appending in proc download?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323381#M62092</link>
      <description>&lt;P&gt;But you need an endrsubmit; unless you are performing this interactively and with rsubmit command..&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 15:06:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323381#M62092</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-01-09T15:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Appending in proc download?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323420#M62096</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cannot be done with download as previously said.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You could use proc append/data step for that accessing throught&amp;nbsp;a remote library.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS will implicitly create a temporary table and append that to your target table, but it will be transparent for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Assuming you have a valid signon session previously established:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;* assign remote library;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;libname rlib server=&amp;lt;&lt;SPAN&gt;my_server_name&lt;/SPAN&gt;&amp;gt;&amp;nbsp;slibref=&amp;lt;&lt;SPAN&gt;my_server_lib&lt;/SPAN&gt;&amp;gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;* append remote to local table;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;proc append base=llib.local_tab data=rlib.remote_tab&amp;nbsp;force;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;This is the same as:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;rsubmit;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;* download remote table;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;proc download data=&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;my_server_lib&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;.remote_tab&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; out=llib.remote_tab;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;endrsubmit;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;* append to local table;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;proc append base=llib.local_tab&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data=llib.remote_tab force;&lt;BR /&gt;run;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;Hope it helps.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif" size="2"&gt;Daniel Santos&amp;nbsp;@ &lt;A href="http://www.cgd.pt" target="_blank"&gt;www.cgd.pt&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2017 17:41:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323420#M62096</guid>
      <dc:creator>Daniel-Santos</dc:creator>
      <dc:date>2017-01-09T17:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: Appending in proc download?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323637#M62109</link>
      <description>&lt;P&gt;Yes, I was confusing "signoff" with "endrsubmit". I dont need to "signoff" to get the proc append to work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There can be authorization problems between server and local libraries, so I was hoping to make the download-append in "one move". Mainly to make the code compact.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2017 14:35:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/323637#M62109</guid>
      <dc:creator>SAStaffan</dc:creator>
      <dc:date>2017-01-10T14:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Appending in proc download?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/327396#M62392</link>
      <description>&lt;P&gt;If the goal is to aggregate multiple small sets into a larger set on the server, you could define a view that references the base data set&amp;nbsp;and&amp;nbsp; the data set(s)&amp;nbsp;that you want to append.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should&amp;nbsp;also be able to&amp;nbsp;write a macro that identifies&amp;nbsp;all of the sets in the libref, and have the macro&amp;nbsp;build the view for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Kind of klugey, I know.)&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2017 15:03:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Appending-in-proc-download/m-p/327396#M62392</guid>
      <dc:creator>RichMorris</dc:creator>
      <dc:date>2017-01-25T15:03:37Z</dc:date>
    </item>
  </channel>
</rss>

