SAS DDE issues in Windows10. SAS session is freezing - sas

I am running SAS9.4 TS1M3 on Windows10 64-bit. The below piece of code will cause the SAS session to freeze:
filename cmdexcel dde 'excel|system';
%let fid = %sysfunc(fopen(cmdexcel,s));
It's a piece of code used to determine if an instance of excel is already running via DDE. This code used to work on the machine I was previously using (Windows 7, SAS 9.3).
Has anyone had any luck running SAS DDE commands in Windows 10, or is it finally time to bite the bullet and replace all of those reports?

Related

Stop SAS Enterprise Guide 8.3. showing results automatically

How do I stop EG 8.3. from automatically downloading results after running my code?
In EG 7 this functionality was in a checkbox:
Options>Results>Results General>Automatically Open Data or results when generated
Now I can't find it :(

Using libraries with SAS University Edition

This is a novice question. I'm starting with SAS using SAS University Edition, and I'm trying to create a new folder. The code that I'm using is:
libname bee 'C:\JL\B'; run;
It gives me the note: "Library bee does not exist".
And when I try to see what is in the library using the code proc contents data = INNOVA._all_; run;, it gives me the error: "Library BEE does not exist" even though the word bee appears as recommended by SAS Studio when I am writing it.
Does anyone know the answer? I am using the SAS Studio of SAS University Edition with Virtual Box.
Watch this video: Accessing Your Existing Data for SAS University Edition
The virtual machine you are using is running Linux. If you followed the setup instructions, you would have set a shared folder to somewhere on your hard drive. Within the virtual machine, you're going to refer to the root of that folder as /folders/myfolders. Outside of the virtual machine, it would be whatever Windows folder you set.

SAS EG System.AccessViolationException SAS.CIODSFileEvents_EventProvider.remove_FileClose(SAS.CIODSFileEvents_FileCloseEventHandler)

We have two Windows 7 client PCs with SAS EG 7.10. and a .Net program that runs the SAS programs on a separate SAS server running SAS 9.4. We recently started getting this error on one of the client PCs when a SAS program completes...
System.AccessViolationException at
System.Runtime.InteropServices.ComTypes.IConnectionPoint.Unadvise(Int32)
at
SAS.CIODSFileEvents_EventProvider.remove_FileClose(SAS.CIODSFileEvents_FileCloseEventHandler)
at
SAS.CIODSFileEvents_Event.remove_FileClose(SAS.CIODSFileEvents_FileCloseEventHandler)
at SAS.EC.Directory.Model.SASWorkspace.Dispose(Boolean) at
SAS.EC.Directory.Model.Server.Dispose(Boolean) at
SAS.EC.Directory.Model.Root.Dispose(Boolean) at
SAS.EC.Directory.Model.Broker.Dispose(Boolean) at
SAS.EC.Directory.DirectoryService.Dispose(Boolean) at
SAS.EC.Session.LocalSession.Cleanup() at
SAS.EG.Scripting.Application.Dispose(Boolean) at
SAS.EG.Scripting.Application.Finalize()
The same SAS program runs fine from the other client PC. The only thing that may have changed is that the failing Windows 7 PC may have been patched and I noticed the .Net version is now 4.6 whereas I think it was 4.5.1 before as it is on the other client PC.
I found an article saying that SAS EG prior to v7.13 requires .Net 4.5.1 whereas SAS EG 7.13 and later requires .Net 4.6.
We also get the same error on a new Windows 10 client PC we are setting up that has .Net 4.8 and we have installed SAS EG 7.15 which we thought would be more compatible with Windows 10.
Can anyone explain why we get this error and whether there is anything we can do in a SAS program to fix it or whether this is due to incompatibilities between SAS versions and if so what SAS EG versions can we use on Windows 10 to connect to a SAS Server running SAS 9.4 ?
Thanks

Cannot import excel file into SAS using proc import

I am getting the error :
ERROR: Connect: Class not registered
when I try to import an xls file into SAS 9.4 using:
proc import out=test datafile="C:\Users\test_201801.xls"
DBMS=EXCEL REPLACE;
GETNAMES=YES;
run;
What did I do wrong?
CLASS NOT REGISTERED typically comes when you are importing using a wrong-bitness version of Excel (typically, you have 64 bit SAS and 32 bit Excel).
You can work around that a number of ways. As Reeza alluded to, you can use the old DBMS=XLS, though I think that's close to being deprecated and I'm not sure it works in every combination of OS/bitness/SAS version anymore. You can fix your bitness (get 32 bit SAS or 64 bit Excel). You can use a PC Files Server (including hosting one on your own machine). If you're using Enterprise Guide, you can use the built in Import File tool which is totally different from PROC IMPORT.
There are some other causes for this error, but this is the most common. To see SAS's official explanation for this plus some other potential causes, see the KB article 43933.
Believe it or not, Excel import depends on the Microsoft Access Engine redistributable being installed. Sas installs it automatically, but it may have been uninstalled somehow. This must be a common problem. Example download link for the redistributable (2016): https://www.microsoft.com/en-us/download/details.aspx?id=54920
Silent install guide:
https://silentinstallhq.com/microsoft-access-database-engine-2016-redistributable-silent-install-how-to-guide/

Export wizard error for exiting excel files in sas 9.2

I recently upgraded Excel 2007 to 2016, But SAS export wizard does not work after that.
The error messages in log is as follows:
Error: libname is not assigned
Error: class: not registered
It's not Syntax errors in editor but export wizard problem.
I wonder if it need to any special setting for excel 2016 or not.
But does SAS support the 2016 version?
More than likely, your Office 2016 is 64 bit and SAS 9.2 is 32 bit. That means you can't use PROC EXPORT or LIBNAME access with DBMS=EXCEL, or the export wizard from base SAS.
The export wizard from Enterprise Guide will still work, as will the xls engine.
In order to fix this, upgrade to SAS 9.4 (64 bit) or downgrade to a 32 bit version of Office.