<?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: SAS Server Work Directory in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134878#M27403</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To clarify :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Server SAS I need to log on every morning (Run &amp;gt; Sign On) which prompts me for the a SAS Session ID and then my network user name and network password. After these are successfully entered I am assigned a temporary Work Library on the SAS Server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A message like this appears in my log: "Your work directory is J:\SASWORK\_TD26644_B000010455_"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;nbsp; do not use the Work folder under the Active Library because every piece of code submitted is done via Remote Submit (Run &amp;gt; Remote Submit) and all temp tables are placed in my temp directory. If I want to view those I need to submit something like: "libname Temp_LIB 'W:\_TD26644_WAPPRIB00001040_';" to create a library in my Active Library.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm curious if there is an easy way automate assigning the libname for this temp network directory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Sep 2014 13:36:09 GMT</pubDate>
    <dc:creator>Ody</dc:creator>
    <dc:date>2014-09-09T13:36:09Z</dc:date>
    <item>
      <title>SAS Server Work Directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134868#M27393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am hoping to get some direction on this. We use SAS Server and every day you log in a new temporary work directy is assigned to you. Is there an easy way to assign this directory to a libname with out manually copying it from the log each mornig into a libname statemnent?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Appreciate any input, thanks!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Sep 2014 14:11:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134868#M27393</guid>
      <dc:creator>Ody</dc:creator>
      <dc:date>2014-09-08T14:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Server Work Directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134869#M27394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually, the work directories are designed to go away when you end the SAS process.&amp;nbsp; You should not attempt to reuse them.&amp;nbsp; Our SAS Admin runs the cleanwork tool to delete any orphan work and utility directories that are left by uses who exit SAS abruptly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Sep 2014 14:45:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134869#M27394</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2014-09-08T14:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Server Work Directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134870#M27395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the info &lt;A href="mailto:Doc@Duke"&gt;Doc@Duke&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand they go away after I end my session however I frequently look at the temp tables I'm creating so I was looking for an easier way to create an accessable library instead of copying the temp folder from my log into a libname statement. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Sep 2014 16:04:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134870#M27395</guid>
      <dc:creator>Ody</dc:creator>
      <dc:date>2014-09-08T16:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Server Work Directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134871#M27396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure of the benefit (isn't Work 'accessible'?)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could use:&lt;/P&gt;&lt;PRE&gt;libname MyWork "%sysfunc(pathname(work))" ;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Sep 2014 17:31:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134871#M27396</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2014-09-08T17:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Server Work Directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134872#M27397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The libref is WORK and it is fully accessible to you. Not sure what you're missing. Can you explain?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 10:31:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134872#M27397</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2014-09-09T10:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Server Work Directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134873#M27398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What client are you using?&lt;/P&gt;&lt;P&gt;A situation where I'm using this is when executing code in DI Studio, and then wish to ad-hoc query the intermediate tables, using Enterprise Guide.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 11:01:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134873#M27398</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2014-09-09T11:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Server Work Directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134874#M27399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you doing this? Copy the work tables to somewhere else? Or actually using the physical path for WORK from the one session as path for a libname statement in another session?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 11:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134874#M27399</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2014-09-09T11:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Server Work Directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134875#M27400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The dull answer is I do the same as Ody descibes (and in your second alternative). DI Code editor, libname work list; Copy/paste into EG.&lt;/P&gt;&lt;P&gt;But I would love a neater solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 11:35:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134875#M27400</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2014-09-09T11:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Server Work Directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134876#M27401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could as part of the EG session invocation run a bit of code which scans the directories under your root path for WORK for sub-folders (I believe they all start with _TD) and create a concatenated library pointing to all existing folders.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 12:16:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134876#M27401</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2014-09-09T12:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Server Work Directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134877#M27402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use Quentins idea. &lt;BR /&gt; &lt;BR /&gt;Get the work directory from the Di session&amp;nbsp; running:&amp;nbsp;&amp;nbsp; %put "%sysfunc(pathname(work))" ;&amp;nbsp;&amp;nbsp;&amp;nbsp; as some user-code.&amp;nbsp; Then put in EGuide:&amp;nbsp; libname MyWork "copy/paste" the data.&lt;/P&gt;&lt;P&gt;If you home directory is open for personal files you could save that info from DI in an file at your personal profile directory and activate that in EGuide.&amp;nbsp; Almost as near getting it fully automated.&lt;/P&gt;&lt;P&gt;As long it is Unix/Windows you only have locking on files, that are the tables. Just avoid&amp;nbsp; locking issues knowing what you are doing.. Work as usual.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 13:01:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134877#M27402</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-09-09T13:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Server Work Directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134878#M27403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To clarify :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Server SAS I need to log on every morning (Run &amp;gt; Sign On) which prompts me for the a SAS Session ID and then my network user name and network password. After these are successfully entered I am assigned a temporary Work Library on the SAS Server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A message like this appears in my log: "Your work directory is J:\SASWORK\_TD26644_B000010455_"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;nbsp; do not use the Work folder under the Active Library because every piece of code submitted is done via Remote Submit (Run &amp;gt; Remote Submit) and all temp tables are placed in my temp directory. If I want to view those I need to submit something like: "libname Temp_LIB 'W:\_TD26644_WAPPRIB00001040_';" to create a library in my Active Library.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm curious if there is an easy way automate assigning the libname for this temp network directory.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 13:36:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134878#M27403</guid>
      <dc:creator>Ody</dc:creator>
      <dc:date>2014-09-09T13:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Server Work Directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134879#M27404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are telling&amp;nbsp; something about using SAS-connect. That is behind "run &amp;gt; sign on"&amp;nbsp; There is a for a server-name&amp;nbsp; (must have been setup somewhere) and then the user-id password.&lt;BR /&gt;The server is obviously a Windows server.&amp;nbsp; That is offering a lot of opportunities.&lt;/P&gt;&lt;P&gt;The SAS way works also with Unix and Mainframe using the Conenct options.&amp;nbsp; Slibref &lt;A class="active_link" href="http://support.sas.com/documentation/cdl/en/connref/67174/HTML/default/viewer.htm#p0kbcxy5kx9nwxn1qr9guspg2cz3.htm" title="http://support.sas.com/documentation/cdl/en/connref/67174/HTML/default/viewer.htm#p0kbcxy5kx9nwxn1qr9guspg2cz3.htm"&gt;SAS/CONNECT(R) 9.4 User's Guide, Second Edition&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Setting the conection in asynchronous mode using:&amp;nbsp; options connectwait=no will let your dms system free for other work. Progress on the other/server side can be followed as "rdisplay"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "llibname work&amp;lt;serverid-xxx&amp;gt;&amp;nbsp; server=&amp;lt;serverid&amp;gt; slibref=work ; "&amp;nbsp;&amp;nbsp; will give you open access to the remote work.&lt;/P&gt;&lt;P&gt;Your &amp;lt;serverid&amp;gt; must be a sas-macro variable containg DNS-address and port of the SAS server (spawner).&amp;nbsp; serverid-xxx must be a macro-var with some 3 letters as shorten of the server. A libname is limited to a string of 8 chars.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;You can all this having automated at startup as sasscripting. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Windows when you are knowing the Uncname&amp;nbsp; of the server and can share data at that location you could use a program rsubmit that and getting it back by sysrput&amp;nbsp; so you can epand the uncname with that temp-name for a libname.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;Do you have access to that windows sas server at that work using an uncname?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 14:01:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134879#M27404</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-09-09T14:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Server Work Directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134880#M27405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As I understant your situation, your SAS server logon/initialization processing assigns a WORK library (e.g.,&amp;nbsp; J:\SASWORK\_TD26644_B000010455_) and a TEMP library (e.g., W:\_TD26644_WAPPRIB00001040_).&amp;nbsp; Your programs use the TEMP library instead of the WORK library.&amp;nbsp; Both are deleted at the end of the SAS session.&amp;nbsp; (I don't see the point but there must be one.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jaap tells how to map the remote (server-side) WORK directory for local (desktop) access but you want to map the TEMP library for local access.&amp;nbsp; SAS allows you to map &lt;SPAN style="text-decoration: underline;"&gt;any&lt;/SPAN&gt; remote library for local access.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's say in your signon/connect program you've assigned the remote server the alias 'bigOne' and the TEMP library is named 'temp'.&amp;nbsp; In the SAS editor, in the local environment issue one of these two commands:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; To use a libref name different from the remote libref when you access it from the local environment use the construct Jaap provided --&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; libref remTemp remote server=bigOne slibref=temp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ** remote is not required but is a visual aid to make it even more obvious that I'm referencing a remote libref. ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; To use the same libref name as the remote when you access it locally --&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; library temp remote server=bigOne;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ** remote is not required. ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't use EG, but to make it run automatically you can add either of these librefs to the bottom of your connect program (if you can modify it) -- just be sure it is after the remote libref TEMP is assigned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You might want to look at my 2011 SGF paper "Using SAS to Move Data Between Servers".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 16:18:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134880#M27405</guid>
      <dc:creator>bentleyj1</dc:creator>
      <dc:date>2014-09-09T16:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Server Work Directory</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134881#M27406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All, thanks for the feedback and information! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 20:12:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Server-Work-Directory/m-p/134881#M27406</guid>
      <dc:creator>Ody</dc:creator>
      <dc:date>2014-09-09T20:12:28Z</dc:date>
    </item>
  </channel>
</rss>

