<?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 How to link SAS file from defined path? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-link-SAS-file-from-defined-path/m-p/375001#M89854</link>
    <description>&lt;P&gt;Hello:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a 'Template'&amp;nbsp;file saved in the&amp;nbsp;ZK file.&amp;nbsp; Everytime, I need to open libname then use data step to input into work library.&amp;nbsp;&amp;nbsp; Is there a way to link to the 'Template'&amp;nbsp;file and send it to the work library directly?&amp;nbsp; Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;libname&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;ZK &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"\\abb.org\ybz12003\Test"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; template; &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ZK.template; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Jul 2017 15:26:07 GMT</pubDate>
    <dc:creator>ybz12003</dc:creator>
    <dc:date>2017-07-11T15:26:07Z</dc:date>
    <item>
      <title>How to link SAS file from defined path?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-link-SAS-file-from-defined-path/m-p/375001#M89854</link>
      <description>&lt;P&gt;Hello:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a 'Template'&amp;nbsp;file saved in the&amp;nbsp;ZK file.&amp;nbsp; Everytime, I need to open libname then use data step to input into work library.&amp;nbsp;&amp;nbsp; Is there a way to link to the 'Template'&amp;nbsp;file and send it to the work library directly?&amp;nbsp; Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;libname&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;ZK &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"\\abb.org\ybz12003\Test"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; template; &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ZK.template; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2017 15:26:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-link-SAS-file-from-defined-path/m-p/375001#M89854</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2017-07-11T15:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to link SAS file from defined path?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-link-SAS-file-from-defined-path/m-p/375002#M89855</link>
      <description>&lt;P&gt;You can use your dataset from USER directly. No need to copy it to WORK.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since WORK is a dynamic location that is created when a SAS process starts and deleted when the SAS process terminates, you cannot create anything permanent in it.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2017 15:15:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-link-SAS-file-from-defined-path/m-p/375002#M89855</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-07-11T15:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to link SAS file from defined path?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-link-SAS-file-from-defined-path/m-p/375011#M89860</link>
      <description>&lt;P&gt;Sorry, I probaby should not use the 'USER'.&amp;nbsp;&amp;nbsp; Below is my acturaly code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1 data zk.itemplate;&lt;/P&gt;
&lt;P&gt;2 set template;&lt;/P&gt;
&lt;P&gt;ERROR: File WORK.TEMPLATE.DATA does not exist.&lt;/P&gt;
&lt;P&gt;3 run;&lt;/P&gt;
&lt;P&gt;ERROR: Libref ZK is not assigned.&lt;/P&gt;
&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2017 15:23:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-link-SAS-file-from-defined-path/m-p/375011#M89860</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2017-07-11T15:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to link SAS file from defined path?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-link-SAS-file-from-defined-path/m-p/375014#M89862</link>
      <description>&lt;P&gt;That tells you two things&lt;/P&gt;
&lt;P&gt;- library zk is not assigned&lt;/P&gt;
&lt;P&gt;- there is no dataset template in work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If template exists anywhere, use the correct library for it. If the library is not yet assigned, assign one.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2017 15:27:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-link-SAS-file-from-defined-path/m-p/375014#M89862</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-07-11T15:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to link SAS file from defined path?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-link-SAS-file-from-defined-path/m-p/375015#M89863</link>
      <description>&lt;P&gt;That is what I am asking.&amp;nbsp;&amp;nbsp; I need to assign one libname and run data step to assign 'Template' file to work library.&amp;nbsp;&amp;nbsp; I am looking for if I could combine below two steps into one step.&amp;nbsp; Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;libname&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;ZK &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"\\abb.org\ybz12003\Test"&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; template; &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; ZK.template; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;run&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2017 15:32:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-link-SAS-file-from-defined-path/m-p/375015#M89863</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2017-07-11T15:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to link SAS file from defined path?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-link-SAS-file-from-defined-path/m-p/375024#M89868</link>
      <description>&lt;P&gt;Does your code run as is? Yes &amp;nbsp;means you have the template dataset in your WORK library.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to save the template in your own library, so that you do not run same code each time you start SAS,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;than define your own library and save it there:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname ZK "\\abb.org\ybz12003\Test";
libname user "...your path ...";  /* you can change name from USER to any other name */

data user.template; 
  set ZK.template; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Next sas session use as:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname user "...same path as origin ...";
data want;
  set user.template;
   ...any code ...
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2017 15:50:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-link-SAS-file-from-defined-path/m-p/375024#M89868</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-07-11T15:50:42Z</dc:date>
    </item>
  </channel>
</rss>

