Posts

Showing posts from 2008

SAS and Microsoft: Different Worlds

Well, first of all, sorry I haven't written recently. My time has been taken up by some great SAS work but it is under wraps for the time being.

I was chatting with a SAS buddy of mine recently and I started to comment on the differences between the SAS and Microsoft development communities. I like them both but they each have the pros and cons.

The Microsoft community travels fast, I mean lightening fast. There are constant updates, massive 3rd party support, great forums, blogs, etc. from the Microsoft developers to always keep people updated. Best of all, the constant changes means that it is always exciting and new. Like getting several Christmas's a year. Cool new technologies like Silverlight (WOW!!), C# 4.0, Office 2007, Windows 7, LINQ, etc. On the 3rd party front, I have dozens of graphing toolsets I can use. Dozens of databases, etc.

That is also their con which is that you always have to be learning and never catch up. It also leads to a lot more uncertainty with how t…

SAS Integration Technologies and Vista

Ok, I am sure that I will get some grief about this but I needed to submit my SAS code from a .NET application. this was on my new PC which is running Vista 32. Anyway, no matter what I did, I kept getting the following error:

"Retrieving the COM class factory for component with CLSID {440196D4-90F0-11D0-9F41-00A024BB830C} failed due to the following error: 80040154."

Well, normally that is addressed by simply installing the IntTech client and setting permissions to None in dcomcnfg. It didn't work this time.

Here is what i did to fix it (people can try these in isolation to see which one is the root):

1. Right-click on the the inttech.exe file and run it in compatibility mode for Win XP SP2

2. Go into dcomcnfg and set every single SAS DCOM object with permissions of None.

I could play with this some more but I am now behind.

Update 3/31/2010

This worked for me on Windows 7 64 and when the dcom stuff failed:

To register the IOM server,

1) Copy SASVRSRV.DLL from !SASROOT\CORE\SASE…

Microsoft Project Files, SAS, and .NET

Ok, another fun, fun time with SAS and an obscure area. Here's the scenario, the client needs data from an MPP file (Microsoft Project) converted into a SAS dataset. I tried lots of routes, all to no avail. As usual, I get to go through the mess of COM interop, lack of documentation on the web, and SAS not supporting write access in the local data provider. Ahhhh, the joys of consulting ;-]


I finally got the following C# code operational and it writes the data into a SAS-friendly XML format. I hope this helps someone else:

using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Linq;
using System.Text;
using Microsoft.Office.Interop.MSProject;
using System.Reflection;
using Savian.Core;
using Savian.DataManagement.Delimited;

namespace Client.ReadProjectFile
{
public class Main
{
List tasks = new List();

public void Process(string file)
{
ReadMppFile(file);
ConvertFileToSas();
Console.Re…

Silverlight Lessons Learned

After a shotgun week of Silverlight 2.0, I thought I would share a few lessons learned.

Blank page

If you get a blank page after uploading your xap file, make sure that NETWORK SERVICE is in the security accounts.

XAP File

XAP is the only file that needs to be moved typically. As you do your code updates, just move the XAP file into place.

Dynamic XAML

Dynamic XAML requires a namespace attribute now:

&ltGrid xmlns="http://schemas.microsoft.com/client/2007"&gt

Timing Issues

There seems to be a timing issue in Silverlight that is causing an event to get triggered before the data streams down from a site. This still requires investigation.

Visual Studio 2008 and Silverlight Debugging

For some reason, if a serious Silverlight error occurs, debugging will be disabled in the web application. This may make it seem like events are not firing when they are, just that the debugger is broken. Right-click properties on the web application --> Start Options --> Debuggers --> C…

Microsoft Silverlight

I have been in Vegas all week at the Microsoft MIX08 conference for the rollout of Silverlight 2.0. It is so revolutionary that it really got me thinking. That and SAS Global Forum made me mull a few thoughts:

1. Silverlight is going to revolutionize the world. Bold statement, I know.However, what I saw, as a web developer, absolutely stunned me. If you don't believe me, see what NBC will do with the Olympics. 2200 hours of hi-def video, 4 channels per user, VOD, and just much, much more.

However, check this out for something live now:

http://memorabilia.hardrock.com/

Data visualization and BI will move toward Silverlight. SAS should move there as well. as quickly as possible. SAS should be a leader here and not follow the inevitable.

2. Microsoft is innovating at an amazing pace. Windows Server 2008, Silverlight, Surface, Vista, IE8, IIS7, and on and on. Meanwhile we await a .07 release from SAS that is languishing once again. Basic project management: reduce scope, increase budget, …

SAS LanguageService and You

For those of us who work with SAS LanguageService on a regular basis, it is frustrating. The entire SAS COM interface is very poorly documented and is light on functionality. It gets better over time but it would be much nicer to have a .NET interface so we don't have 50 COM nulls in a single method call.

Ok, that all said, I just came off of a marathon (10+ hours) bug fix that damn near drove me mad.

I was submitting a simple query via the Language Service:

proc sql;
create outdata.test as
select *
from DICTIONARY.COLUMNS
where …some criteria…
;
quit;


Ok, no problem. I could submt the query within the SAS Editor and it would work fine. However, DEPENDING ON WHERE I WAS IN MY .NET CODE, it would return 0 rows. Huh!?!? It wasn't the dataset, it wasn't the syntax for the call, it was where the call occured at during processing. Holy smokes Batman! That's a bear of a bug to catch.

You do the normal stuff and isolate, isolate, isolate. Well, it took a long time…