<?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 inherit the temporary work folder when using SAS/CONNECT in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/921870#M363028</link>
    <description>&lt;P&gt;I suggest it would be dangerous to share SAS WORK libraries between SAS/CONNECT SAS session. You would be better off setting up a dedicated permanent SAS library for sharing data between SAS sessions and just copy the WORK datasets you need to share into that library.&lt;/P&gt;</description>
    <pubDate>Tue, 26 Mar 2024 21:14:55 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2024-03-26T21:14:55Z</dc:date>
    <item>
      <title>how to inherit the temporary work folder when using SAS/CONNECT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/921866#M363025</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been using SAS/CONNECT to run my code more efficiently using multiple cores of my CPUs. However one thing not clear to me is how to make each task inherit the work(temporary) folder?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One block of my code is as follows. I can use libname to indicate different folders on my disk, but I cannot do so with temporary folder. What should I do?&lt;/P&gt;&lt;PRE&gt;/* Prosess 1 */
signon task1;
rsubmit task11 wait=no;

libname temp_e "E:\data\temp"; 

proc sql threads;
    create table uid_11 as
    select *,
           coalesce(enddate, '2022-12-31') as imputed_enddate,
           case when missing(enddate) then 1 else 0 end as miss_end
    from temp_e.uid_11;
quit;


endrsubmit;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Mar 2024 20:53:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/921866#M363025</guid>
      <dc:creator>Eileen1496</dc:creator>
      <dc:date>2024-03-26T20:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to inherit the temporary work folder when using SAS/CONNECT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/921868#M363026</link>
      <description>&lt;P&gt;Use the INHERITLIB=&amp;nbsp; option of the SIGNON statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example if you wanted each "task" to have access to the TEMP libref the pattern would look like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname temp 'some directory';
signon task1 inheritlib=(temp);
rsubmit task11 wait=no;
proc sql threads;
    create table uid_11 as
    select *,
           coalesce(enddate, '2022-12-31') as imputed_enddate,
           case when missing(enddate) then 1 else 0 end as miss_end
    from temp_e.uid_11;
quit;
endrsubmit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Mar 2024 20:59:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/921868#M363026</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-03-26T20:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to inherit the temporary work folder when using SAS/CONNECT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/921869#M363027</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/446510"&gt;@Eileen1496&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is what worked for me&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%syslput g_pWorkPath = %sysfunc(PATHNAME(WORK)) / remote=&amp;lt;taskx&amp;gt;;
Rsubmit taskx;
   LIBNAME pWork "&amp;amp;g_pWorkPath";
    /* To save into the parent's WORK library, use the pWork LibRef */
EndRsubmit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Mar 2024 21:04:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/921869#M363027</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2024-03-26T21:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: how to inherit the temporary work folder when using SAS/CONNECT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/921870#M363028</link>
      <description>&lt;P&gt;I suggest it would be dangerous to share SAS WORK libraries between SAS/CONNECT SAS session. You would be better off setting up a dedicated permanent SAS library for sharing data between SAS sessions and just copy the WORK datasets you need to share into that library.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 21:14:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/921870#M363028</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2024-03-26T21:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to inherit the temporary work folder when using SAS/CONNECT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/922266#M363179</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did tried this way, but it can only inherit non-temporary folder I built myself, the temporary folder cannot be inherited. The detail is:&lt;/P&gt;&lt;P&gt;I set the following folder as my work library (the temporary one): E:\data\work&lt;/P&gt;&lt;P&gt;and using your code i did this:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;libname work 'E:\data\work';
options sascmd="sas";
options CPUCOUNT= 45;
/* Current datetime */
%let _start_dt = %sysfunc(datetime());

/* prosess 10 */
signon task10 inheritlib=(work);
rsubmit task10 wait=no;
....&lt;/PRE&gt;&lt;P&gt;but SAS told me:&lt;/P&gt;&lt;P&gt;ERROR: The SAS system library WORK may not be reassigned.&lt;BR /&gt;ERROR: Error in the LIBNAME statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The above code works for all other non-temporary folder.&lt;/P&gt;&lt;P&gt;Just to be clear: by temporary folder/work folder here, i mean the one where the data is stored if you don't specify libname in&lt;/P&gt;&lt;PRE&gt;libname.dataname&lt;/PRE&gt;&lt;P&gt;and all files in this folder will be deleted after every sas session&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 14:09:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/922266#M363179</guid>
      <dc:creator>Eileen1496</dc:creator>
      <dc:date>2024-03-29T14:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to inherit the temporary work folder when using SAS/CONNECT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/922269#M363182</link>
      <description>&lt;P&gt;HI Ahmed,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you tell me which part i should replace? and what should I replace it with?&lt;/P&gt;&lt;P&gt;I tried the following:&lt;/P&gt;&lt;PRE&gt;signon task10 inheritlib=(raw, clean);
%syslput g_pWorkPath = %sysfunc(PATHNAME(WORK)) / remote=task10;
rsubmit task10 wait=no;
LIBNAME pWork "&amp;amp;g_pWorkPath";&lt;/PRE&gt;&lt;P&gt;but it tells me:&lt;/P&gt;&lt;PRE&gt;ERROR: Library , has not been assigned in the local session therefore it cannot be inherited by
the remote session.
ERROR: Remote signon to TASK10 canceled.
ERROR: A link must be established by executing the SIGNON command before you can communicate
with TASK10.
114 %syslput g_pWorkPath = %sysfunc(PATHNAME(WORK)) / remote=task10;
115 rsubmit task10 wait=no;
ERROR: A link must be established by executing the SIGNON command before you can communicate
with TASK10.
ERROR: Remote submit to TASK10 canceled.&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Mar 2024 14:13:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/922269#M363182</guid>
      <dc:creator>Eileen1496</dc:creator>
      <dc:date>2024-03-29T14:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: how to inherit the temporary work folder when using SAS/CONNECT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/922270#M363183</link>
      <description>&lt;P&gt;If you don't tell SIGNON what name to use for the libref on the remote session it will try to use the same name it has on the local session.&amp;nbsp; But there is already a libref WORK on the remote session. So tell it to use a different name.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;signon task10 inheritlib=(work=_work);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 14:14:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/922270#M363183</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-03-29T14:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to inherit the temporary work folder when using SAS/CONNECT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/922271#M363184</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/446510"&gt;@Eileen1496&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remove the comma (,) from the inheritlib=&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;signon task10 inheritlib=(raw clean);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Mar 2024 14:16:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/922271#M363184</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2024-03-29T14:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: how to inherit the temporary work folder when using SAS/CONNECT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/922316#M363196</link>
      <description>&lt;P&gt;I get rid of the comma and run again, but it still says:&lt;/P&gt;&lt;PRE&gt;ERROR: A communication subsystem partner link setup request failure has occurred.
ERROR: Cannot locate TCP host 'TASK10'.
ERROR: Remote signon to TASK10 canceled.
ERROR: A link must be established by executing the SIGNON command before you can communicate
with TASK10.&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Mar 2024 22:23:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/922316#M363196</guid>
      <dc:creator>Eileen1496</dc:creator>
      <dc:date>2024-03-29T22:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to inherit the temporary work folder when using SAS/CONNECT</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/922322#M363200</link>
      <description>&lt;P&gt;Please post your complete SAS log, not just the errors, so we can see the code you are running.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It looks like you haven't defined TASK10 anywhere.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd expect to see a %LET statement defining it like so - note replace MySASComputeServer with the actual name of your server:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let task10 = MySASComputerServer;

signon task10;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Mar 2024 22:52:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-inherit-the-temporary-work-folder-when-using-SAS-CONNECT/m-p/922322#M363200</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2024-03-29T22:52:29Z</dc:date>
    </item>
  </channel>
</rss>

