Thursday, February 17, 2011

SAS Transport Files and .NET

Well, someone contacted me about the Data Management Utilities. they loved them (thank you) but wanted to know about reading SAS Transport Files. Well, after fiddling with the localProvider a bit and getting nowhere, I stumbled onto something cool:

  • Download and install the SAS Universal Viewer from the SAS support site
  • Create a new project in Visual Studio
  • Add a reference from the SAS Universal Viewer install files to the following 2 dlls
  •    SAS.UV.Transport
  •    SAS.UV.Utility
  • Use the following C# code (adapt as needed):

TransportFile tf = new TransportFile(@"x:\temp\sample.xpt");
var x = tf.Datasets;

Your dataset will be in variable x


Don't forget to add the using statement to the top of your code for the SAS.UV.

No comments:

Cisco Information Server (CIS) and MS OLAP

Ok, so my recent issue was integrating CIS with Microsoft OLAP cubes. The normal way to do this is to set up MS OLAP (SSAS) with a website a...