<?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: Libname and %Let are not shared among programs within the same SAS EG project in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873501#M42845</link>
    <description>&lt;P&gt;I suggest you talk to your system admin in that case about the change in behaviour. I'm guessing that there could be a port or configuration setting issue on your new SAS server that is closing SAS sessions prematurely.&lt;/P&gt;</description>
    <pubDate>Tue, 02 May 2023 23:27:06 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2023-05-02T23:27:06Z</dc:date>
    <item>
      <title>Libname and %Let are not shared among programs within the same SAS EG project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873434#M42833</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to use the same LIBNAME or macro variables across all programs within a SAS EG project. In the past, I only needed to run the Libname or %let= one time, but now I need to run these statements in every program.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone tell me what I need to change in the SAS settings?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help in advance.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 16:58:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873434#M42833</guid>
      <dc:creator>CKSASEG</dc:creator>
      <dc:date>2023-05-02T16:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Libname and %Let are not shared among programs within the same SAS EG project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873441#M42834</link>
      <description>&lt;P&gt;You should only need to run a libname or %LET statement once per session.&amp;nbsp; &amp;nbsp;So if you open EG, connect to the SAS instance, and then open two programs, you're saying if you run %let foo=1; in one and %put foo; in the other, the macro variable won't be resolved?&amp;nbsp; That would be odd.&amp;nbsp; I don't think there is an option to say "start a new session every time I submit code".&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 17:35:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873441#M42834</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-05-02T17:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Libname and %Let are not shared among programs within the same SAS EG project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873454#M42837</link>
      <description>&lt;P&gt;Hi, Quentin,&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;Yes, that is what's happening in my SAS EG. I now need to repeat Libname/macro variable/proc format ... in every program.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 18:23:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873454#M42837</guid>
      <dc:creator>CKSASEG</dc:creator>
      <dc:date>2023-05-02T18:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: Libname and %Let are not shared among programs within the same SAS EG project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873472#M42839</link>
      <description>&lt;P&gt;Do you run all of the steps in your work flow as one job?&amp;nbsp; Or are you opening the project and selecting a random step and trying to run it first before running any of the other steps?&amp;nbsp; Do you see the difference?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Doesn't EG have an AUTOEXEC type functionality for a project?&amp;nbsp; A place to put code that runs as soon as you connect to the SAS server?&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 19:13:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873472#M42839</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-05-02T19:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Libname and %Let are not shared among programs within the same SAS EG project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873479#M42841</link>
      <description>&lt;P&gt;Just as a sanity check, do you have the same problem with work datasets?&amp;nbsp; That is, if you create a work dataset in one program, then open another program and try to read the dataset, does it exist? That would suggest you somehow have different SAS sessions for each program.&amp;nbsp; I guess you could also check that by seeing if %put %sysfunc(pathname(work)) returns the same work directory is being used for both programs.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 20:21:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873479#M42841</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-05-02T20:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: Libname and %Let are not shared among programs within the same SAS EG project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873481#M42842</link>
      <description>&lt;P&gt;When did this change in behaviour happen and do you recall any EG or SAS changes around the same time? Something must have happened to cause the change.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 20:27:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873481#M42842</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-05-02T20:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Libname and %Let are not shared among programs within the same SAS EG project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873487#M42843</link>
      <description>&lt;P&gt;Thanks everyone for taking a moment to reply.&lt;/P&gt;&lt;P&gt;Just to answer the questions in the replies.&lt;/P&gt;&lt;P&gt;- I don't run the programs in a specific order, not autoexec&lt;/P&gt;&lt;P&gt;- The temporary datasets work fine across programs.&lt;/P&gt;&lt;P&gt;- The issue appears to happen after I switched SAS server as instructed by system Admin&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 21:32:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873487#M42843</guid>
      <dc:creator>CKSASEG</dc:creator>
      <dc:date>2023-05-02T21:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: Libname and %Let are not shared among programs within the same SAS EG project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873501#M42845</link>
      <description>&lt;P&gt;I suggest you talk to your system admin in that case about the change in behaviour. I'm guessing that there could be a port or configuration setting issue on your new SAS server that is closing SAS sessions prematurely.&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 23:27:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873501#M42845</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-05-02T23:27:06Z</dc:date>
    </item>
    <item>
      <title>Re: Libname and %Let are not shared among programs within the same SAS EG project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873532#M42847</link>
      <description>&lt;P&gt;Hello CkSasEG!&lt;BR /&gt;Sorry for asking again, I do not have a clear picture yet: &lt;BR /&gt;So it is sure that you have run the %let statement without any errors or warnings in the log?&lt;/P&gt;
&lt;P&gt;Does the variable show up in the macro manager?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if not please try the same (for a quick fix) using the %global statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%global foo;
%let foo=bar;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Cheers&lt;/P&gt;
&lt;P&gt;Fja&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 05:44:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873532#M42847</guid>
      <dc:creator>fja</dc:creator>
      <dc:date>2023-05-03T05:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: Libname and %Let are not shared among programs within the same SAS EG project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873643#M42850</link>
      <description>&lt;P&gt;I'm completely lost.&amp;nbsp; If work datasets can be seen by both programs, that means there is one SAS session that is being maintained.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you confirmed that librefs and macro variables persist across multiple submissions of the same program?&amp;nbsp; (i.e. highlight code, submit, highlight another block, submit)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All I can think is that there is some code being submitted which is clearing librefs and deleting global macro variables.&amp;nbsp; It's possible with EG to specify code that is run before every submission.&amp;nbsp; So if someone accidentally set up submission pre-code that would do 'cleanup', that would cause this problem across submissions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you run a libname statement in program A, then try to use the libref in program B and get the libref not assigned error, then if you go back to program A and try to use the libref again (without running the libname statement again), does it work?&amp;nbsp; I'm hoping it would not, which would be evidence that something is happening when you submit code in B that is clearing your librefs.&amp;nbsp; Also could do same test with a global macro variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But this is a mystery.&amp;nbsp; If your admin can't help, you might want to submit to tech support.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 14:08:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873643#M42850</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-05-03T14:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Libname and %Let are not shared among programs within the same SAS EG project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873732#M42853</link>
      <description>&lt;P&gt;I found the cause.&lt;BR /&gt;The setting "Code will run on server:" was set to different servers in different programs, so the Libname/Macro Variable/Proc Format etc... can't be reused across programs.&lt;/P&gt;&lt;P&gt;The setting is under Properties for Program&amp;gt;General&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks everyone for your time.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 20:36:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873732#M42853</guid>
      <dc:creator>CKSASEG</dc:creator>
      <dc:date>2023-05-03T20:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: Libname and %Let are not shared among programs within the same SAS EG project</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873733#M42854</link>
      <description>&lt;P&gt;Glad you got it sorted.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that's the case, then I would have expected that the earlier check I suggested, to see if a single work dataset could be accessed from both programs, would have revealed that it could not be accessed from both.&amp;nbsp; Because each server is running its own SAS session, with its own WORK library.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 20:48:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Libname-and-Let-are-not-shared-among-programs-within-the-same/m-p/873733#M42854</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-05-03T20:48:02Z</dc:date>
    </item>
  </channel>
</rss>

