<?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: Enterprise Guide Locks Excel File in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/935332#M45003</link>
    <description>Hi Alan,&lt;BR /&gt;I think I understand and agree with your position, however I am not sure that we are aligned on what the problem actually is.  I don't and never expect SAS to miraculously work universally or with bad data or poorly crafted code.    What I expect (and perhaps this bears repeating) is that SAS is capable of releasing a PC file after an error is encountered/detected by SAS.  That is it.  Nothing more.    It shouldn't take disconnecting from the SAS server or restarting SAS Studio or EG to free the file up.&lt;BR /&gt;If you're wondering (and I doubt you are) why I am so hung on his issue, well it's three-fold:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  1.  I can't prevent the Excel files that I import from always being 100% compatible with the PROC IMPORT  WHERE clause.  I can certainly try (and will), but there is no guarantee it won't happen.&lt;BR /&gt;  2.  Similar to #1, I can't always ensure that the PROC IMPORT WHERE clause will be aligned the filtered column type.   The vast majority of the time, they are  (aligned).&lt;BR /&gt;  3.  Most of my EG projects are designed to set up the environment macro variables, libraries, etc. based on a user prompt response and other system variables.  Each time an external file is lock and I have to disconnect or restart and when I do I lose all of the environment settings; which takes time to reset and present additional opportunity for entry error.&lt;BR /&gt;No response is required and I very much appreciate you take time out for your day(s) to help me.    At this point, I am not looking for a solution cause it sounds like one isn't available (aside from not getting the SAS error) and we can officially close this track.&lt;BR /&gt;</description>
    <pubDate>Wed, 10 Jul 2024 14:27:09 GMT</pubDate>
    <dc:creator>Michael_W</dc:creator>
    <dc:date>2024-07-10T14:27:09Z</dc:date>
    <item>
      <title>Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877385#M43017</link>
      <description>&lt;P&gt;EG can be absolutely maddening at times.&amp;nbsp; &amp;nbsp;I run the following PROC IMPORT statement ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PROC IMPORT DATAFILE="F:\SAS\ACT002A\RA\ESP\Change Control Tables\Revenue and Enrollment\Enrollment Segs to Exclude-&amp;amp;BenYr_..xlsx"&lt;BR /&gt;OUT=WRKMBR.CCT_Segs2ExclA (WHERE=(PPI EQ '1' AND Authorized_By NE 'Dummy') RENAME=(IssuerEnrolleeID=SubID_)) DBMS=XLSX REPLACE;&lt;BR /&gt;SHEET="Excluded Segments" ;&lt;BR /&gt;QUIT;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It runs successfully ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;NOTE: The import data set has 0 observations and 9 variables.&lt;BR /&gt;NOTE: WRKMBR.CCT_SEGS2EXCLA data set was successfully created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But when I go to open or delete outside of EG, it says it's still in use.&amp;nbsp; I am 100% confident that the file is not open my me or anyone else.&amp;nbsp; Windows won't open it because my EG still has a lock on it.&amp;nbsp; &amp;nbsp;The only solution (albeit a horrible one) is to shut down EG entirely and then it will get released.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Any idea of how to fix this issue without shutting down my EG session?&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 20:38:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877385#M43017</guid>
      <dc:creator>Michael_W</dc:creator>
      <dc:date>2023-05-24T20:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877397#M43018</link>
      <description>&lt;P&gt;If you only ran that code then I doubt that Enterprise Guide itself would even touch that XLSX file.&amp;nbsp; That is SAS code you showed.&amp;nbsp; So only the SAS process would be trying to open the XLSX file, not the Windows application Enterprise Guide that you used to create and submit the SAS code.&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 21:04:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877397#M43018</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-05-24T21:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877405#M43019</link>
      <description>Of course it is SAS code.  I submitted it through a code node in EG.   Something (EG, SAS) is locking up the file.     No SAS processes are running while I am in EG and I cannot open or delete the file in Windows, but as soon as I close EG, I can delete it with no problem.   What SAS process do you suppose is running?</description>
      <pubDate>Wed, 24 May 2023 21:13:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877405#M43019</guid>
      <dc:creator>Michael_W</dc:creator>
      <dc:date>2023-05-24T21:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877407#M43020</link>
      <description>&lt;P&gt;You can probably test if it is SAS that has the lock without having to shut down Enterprise Guide.&amp;nbsp; Just close your connection to the SAS server that EG is using. Or restart the SAS connection.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could try making a copy of the file and then running PROC IMPORT on the copy and see if that prevents the lock from being made.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename original "F:\SAS\ACT002A\RA\ESP\Change Control Tables\Revenue and Enrollment\Enrollment Segs to Exclude-&amp;amp;BenYr_..xlsx"
   recfm=n;
filename copy "%sysfunc(pathname(work))\xxx.xlsx" recfm=n;
%let rc=%sysfunc(fcopy(original,copy));
filename original;
proc import datafile=copy dbms=xlsx .....&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 21:46:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877407#M43020</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-05-24T21:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877409#M43021</link>
      <description>&lt;P&gt;I tried making a copy of the Excel&amp;nbsp; file and then re-running the Proc Import statement against the copy .. and that works.&amp;nbsp; But it still doesn't free up the original file;&amp;nbsp; plus it doesn't solve my problem.&amp;nbsp; I have not yet tried to close my connection to the SAS server (I assume that you mean the SASApp server), but I will try that the next time it happens.&amp;nbsp; &amp;nbsp;I will have to re-run all of my LIBNAME statement, but maybe that will work.&amp;nbsp; &amp;nbsp;If so, it should be significantly better than what I have been doing .. which is saving and shutting down my EG session.&amp;nbsp; &amp;nbsp;To add insult to injury, it doesn't happen all of the time either.&amp;nbsp; &amp;nbsp; Thanks for the advice!&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 21:49:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877409#M43021</guid>
      <dc:creator>Michael_W</dc:creator>
      <dc:date>2023-05-24T21:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877411#M43022</link>
      <description>&lt;P&gt;You might try moving the subsetting to a separate step instead of using WHERE= dataset option on the output dataset name.&amp;nbsp; Perhaps the extra complexity is contributing to the problem.&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 21:55:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877411#M43022</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-05-24T21:55:24Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877414#M43023</link>
      <description>&lt;P&gt;What OS does your SAS server run on? I see you are using a Windows-type folder share to access the spreadsheet from the SAS server. The fact that it is intermittent makes me suspect this is not a SAS issue. In any case SAS uses OS file locking, not its own.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 22:49:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877414#M43023</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-05-24T22:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877439#M43024</link>
      <description>&lt;P&gt;The best way, IMO, to find processes that are locking a file is to use process explorer. It can be found on the Microsoft site and is bundled in sysinternals package. It works great on a local file. For remote files, you will probably need access to the system where the process is hosed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are lots and lots of resources on the use of sysinternals. It is very well established toolkit that has been around since the 90s. I have even seen college courses on its toolset. Give that a try if you can get access to the mid-tier machine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Link:&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer" target="_blank"&gt;Process Explorer - Sysinternals | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I download SysInternals suite as one of my first downloads to any new machine. Nothing needs to be installed. Lots of industry staples in it like procmon, procexp, etc.&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 04:45:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877439#M43024</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2023-05-25T04:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877440#M43025</link>
      <description>&lt;P&gt;The use of the F: drive letter makes me suspect that a network share is involved, and that share may not propagate the release of the file handle properly.&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 04:56:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877440#M43025</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-05-25T04:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877525#M43032</link>
      <description>&lt;P&gt;For us, the "F: drive" is the logical partition on the SASApp server.&amp;nbsp; The same thing occurs (when it occurs) when I am pointing to the fully qualified URL/path.&amp;nbsp; &amp;nbsp; &amp;nbsp; I am relatively certain that the issue is with something EG is going to make Windows OS think that the file is still in use (when it's not).&amp;nbsp; &amp;nbsp;What I am trying to figure out is how to free or release whatever connection EG has to it without restarting EG completely.&amp;nbsp; &amp;nbsp; I am sure that it's a specific combination of actions that trigger it, I am just sure what they are to replicate them.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 14:59:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877525#M43032</guid>
      <dc:creator>Michael_W</dc:creator>
      <dc:date>2023-05-25T14:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877530#M43034</link>
      <description>&lt;P&gt;I think&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;is probably right. EG is releasing the file, but if you have any sort of network blips, the network doesn't receive the release and it stays locked and SAS isn't checking to ensure the release is dropped.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe for the other SAS guru's, is there a way to open the file as read only or to explicitly release the lock, as with FCLOSE()?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 15:21:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877530#M43034</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2023-05-25T15:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877533#M43035</link>
      <description>Network blips that only effect EG and its use of or connection to PC Files (specifically Excel)?    You say that EG is releasing the file (as if EG is doing its part to release the connection to the file) and that it's something with the network .. yet the file is released as soon as EG is shut down?   How is that not EG?     I feel this is like one of those situations where you purchase a warranty for a car and then when you go to put a warranty claim in, they insist that the issue is not a covered part or in this case, it's not with the car period .. it's the road that is the problem.  I do appreciate the support/effort though.   I definitely like your last contribution "is there a way to open the file as read only or to explicitly release the lock, as with FCLOSE()" .. that's the kind of thing I am looking for!&lt;BR /&gt;</description>
      <pubDate>Thu, 25 May 2023 15:34:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877533#M43035</guid>
      <dc:creator>Michael_W</dc:creator>
      <dc:date>2023-05-25T15:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877611#M43036</link>
      <description>&lt;P&gt;I suggest you open a track with SAS Tech Support. We use PROC IMPORT a lot ourselves with Excel files on a Windows SAS server via EG and I've never encountered your intermittent problem. It would also be worth checking with your IT / SAS admin to see if they have any ideas.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 21:23:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877611#M43036</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-05-25T21:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877612#M43037</link>
      <description>Thank you.  I appreciate the advice.   We use PROC IMPORT a lot as well and more often than not, it works as advertised.   But when it doesn't, it is head-scratching and frustrating.  I have checked with our SAS admin and he doesn't have an explanation and his only suggestion to use SAS Management Studio in lieu of EG.    When it happens again, I will open a SAS Tech Support track.&lt;BR /&gt;</description>
      <pubDate>Thu, 25 May 2023 21:28:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877612#M43037</guid>
      <dc:creator>Michael_W</dc:creator>
      <dc:date>2023-05-25T21:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877618#M43038</link>
      <description>&lt;P&gt;We use SMC too running a lot of batch jobs with PROC IMPORTs and it performs exactly like in EG. Of course with batch jobs your SAS session only lasts as long as the job so that is likely to be less problematic.&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 23:04:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877618#M43038</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-05-25T23:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877619#M43039</link>
      <description>&lt;P&gt;If you change to using libname XLSX do you have the same problem? &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the Excel file might be locked after the libname statement runs. &amp;nbsp;But then you can use libname &lt;EM&gt;libref&lt;/EM&gt; clear; to explicitly clear the libref, and release the lock. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suppose it's possible that PROC IMPORT is creating a libref behind the scenes, and somehow the statement to clear the libref is failin on occasion.. &amp;nbsp;Just a guess. &amp;nbsp;I don't use PROC IMPORT much.&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 00:53:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/877619#M43039</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-05-26T00:53:14Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/935012#M44962</link>
      <description>&lt;P&gt;Open a Track is the recommended solution?&amp;nbsp; &amp;nbsp;I did and SAS Tech support wasn't able to identify the root cause or solution.&amp;nbsp; If you took your car to the mechanic and told him that it was only starting sporadically, and his response was "We start cars all of the time.&amp;nbsp; You should take it to a mechanic" .... What would your reaction be?&amp;nbsp; &amp;nbsp;To recap, this issue appears to occur when I run Proc Import from an EG code node and an error is encountered.&amp;nbsp; I know how to resolve the error as I just need to open the Excel file and change the PPI column type to number; however I can't (as you can see) because Windows thinks it's in use.&amp;nbsp; &amp;nbsp;The problem with doing that is that I have to shutdown my EG session entirely just to free up the Excel file.&amp;nbsp; &amp;nbsp;If the error doesn't occur, the file isn't locked.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Michael_W_0-1720461063643.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98219i209F60471000B8A4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Michael_W_0-1720461063643.png" alt="Michael_W_0-1720461063643.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;SYMBOLGEN:&amp;nbsp; Macro variable BENYR resolves to 2024&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;MPRINT(IMPORTREFTBLS):&amp;nbsp;&amp;nbsp; PROC IMPORT DATAFILE="G:\Risk Adjustment\Edge Server Processing\Change Control Tables\Revenue and&amp;nbsp;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;Enrollment\2024\Enrollment Segs to Exclude.xlsx" OUT=WRKMBR.CCT_Segs2ExclA (WHERE=(PPI EQ 1) RENAME=(IssuerEnrolleeID=SubID_))&amp;nbsp;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;DBMS=XLSX REPLACE;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;MPRINT(IMPORTREFTBLS):&amp;nbsp;&amp;nbsp; RXLX;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;SYMBOLGEN:&amp;nbsp; Macro variable BENYR resolves to 2024&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;MPRINT(IMPORTREFTBLS):&amp;nbsp;&amp;nbsp; SHEET="Excluded Segments_2024" ;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;MPRINT(IMPORTREFTBLS):&amp;nbsp;&amp;nbsp; QUIT;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with&amp;nbsp;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; options MSGLEVEL=I.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;ERROR: WHERE clause operator requires compatible variables.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;NOTE: PROCEDURE IMPORT used (Total process time):&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 18:13:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/935012#M44962</guid>
      <dc:creator>Michael_W</dc:creator>
      <dc:date>2024-07-08T18:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/935028#M44963</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16531"&gt;@Michael_W&lt;/a&gt;&amp;nbsp;- I am a developer on EG and just noticed your reply today. Apologies for not noticing this topic sooner.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A few thoughts:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;It would be very helpful to follow the suggestion above to use Process Explorer. The downside there is that it would need to be run on the server machine, and you may not have access to that. But if that can be done by you or an admin, it will definitely say what process is locking the file. I suspect it will be the workspace session (sas.exe).&lt;/LI&gt;
&lt;LI&gt;I have tried to rep without success. You mentioned it is intermittent. Any pattern to the scenario will be helpful as intermittent issues are always much more frustrating to diagnose than repeatable ones are.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;If you have access to SAS Studio on that server, it would be interesting to try the same code from there as that takes EG out of the equation. I understand that your overall process that this code node is involved in may prevent running in Studio.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I am very puzzled at the difference in behavior between disconnecting the workspace server in EG and exiting EG. They should have the same effect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if I read this thread correctly, stopping and restarting the server session doesn't cause the lock to be released. If the only reference to the xlsx file is in the sas code, then EG is not accessing the file. All access is taking place on the server.&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Is the file on your project process flow as a node? If so, that could cause EG to access it.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;If this last point is correct, (shutdown releases but disconnect and reconnect doesn't), then I recommend:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Open the track with tech support again.&lt;/LI&gt;
&lt;LI&gt;Provide an EG log file of a session when it happens, and you disconnect/reconnect and the lock persists, and then you exit EG. And then confirm the lock is released.&lt;/LI&gt;
&lt;LI&gt;Ask them to indicate in the track that you interacted with me on communities and I asked for the logs. That will result in me getting a ticket to track the work from an R&amp;amp;D perspective.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;That log will help me determine if there is some extra step that is causing the exit to behave differently than the disconnect. I have reviewed the code and do not see anything.&lt;/P&gt;
&lt;P&gt;I'm sorry this is proving difficult to resolve - I understand it must be very frustrating.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Mark Allemang&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 19:04:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/935028#M44963</guid>
      <dc:creator>MarkAllemang</dc:creator>
      <dc:date>2024-07-08T19:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/935031#M44964</link>
      <description>&lt;P&gt;Hidden in the middle of that picture you posted as this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1720465769932.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98233i2D2E5BE8A467E3A6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Tom_0-1720465769932.png" alt="Tom_0-1720465769932.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Do you only have trouble with SAS not releasing the lock on the XLSX file&amp;nbsp; when you get that ERROR message about the WHERE= dataset option?&amp;nbsp;&amp;nbsp;(NOTE: Since it is SAS code that is touching the XLSX file the fact that you are using Enterprise Guide to submit the code is probably unrelated to the cause.&amp;nbsp; The symptom you mention of the file getting freed with EG is closed is probably a side effect of EG closing the SAS session it is using to run the SAS code.&amp;nbsp; Next time it locks a file try just telling EG to restart the SAS session and see if it frees the lock.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What happens if you change your code to NOT use the WHERE= dataset option in the step that is accessing the XLSX file?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc import .... out=WORK.xxx ....;
data WANT; set work.xxx;
  where PPI=1;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or change the way the WHERE= condition is coded so that the TYPE of the variable being referenced does not matter?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where=(cats(PPI)='1')&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 19:22:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/935031#M44964</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-07-08T19:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide Locks Excel File</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/935044#M44968</link>
      <description>My Mark,&lt;BR /&gt;Thank you so much for your response!   I really appreciate.    Please allow me to respond in line to your feedback:&lt;BR /&gt;&lt;BR /&gt;It would be very helpful to follow the suggestion above to use Process Explorer.   The downside there is that it would need to be run on the server machine, and you may not have access to that.   You are correct, I  don't have access to that , but our SAS Admin does and I have passed the file and code along to him to replicate the issue.&lt;BR /&gt;You mentioned it is intermittent. Any pattern to the scenario will be helpful as intermittent issues are always much more frustrating to diagnose than repeatable ones are.   It is intermittent, sort of.  Today I was able to replicate the issue pretty consistently.   The pattern seems to be that if the error occurs (as shown in the log), the lock is applied and never released by SAS.&lt;BR /&gt;If you have access to SAS Studio on that server, it would be interesting to try the same code from there as that takes EG out of the equation.   I do and will try that now along with replicating it from a new EG session.    The issue is replicated when I create a brand new EG project from scratch AS WELL AS when I run it from SAS Studio.   Closing out the Process Flow does not free up the file. However signing out of SAS Studio does (free it up).&lt;BR /&gt;I am very puzzled at the difference in behavior between disconnecting the workspace server in EG and exiting EG.    My apologies but I don't know what you mean by "disconnecting the workspace server in EG" .. Is that done automatically when the code has completed execution of something that I would do manually?&lt;BR /&gt;. If the only reference to the xlsx file is in the sas code, then EG is not accessing the file.  I agree and after replicating it in SAS Studio, it doesn't appear to be an EG problem after all.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But if I read this thread correctly, stopping and restarting the server session doesn't cause the lock to be released.  I am not sure what you mean by the "server session".  I am using EG to submit my code.  Once the error occurs, the lock occurs and cannot be released until I close my EG session.  To be clear, once I do (close) the lock is released.&lt;BR /&gt;</description>
      <pubDate>Mon, 08 Jul 2024 20:08:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-Locks-Excel-File/m-p/935044#M44968</guid>
      <dc:creator>Michael_W</dc:creator>
      <dc:date>2024-07-08T20:08:09Z</dc:date>
    </item>
  </channel>
</rss>

