12-10-2014 09:07 AM
I am a C# dotNet developer and I will be working with a third party vendor whom I was told will be providing me with a SAS file that I need to process. Each day we will get a new file and will need to process the data in the file. That is the extent of what I know at this point. I don't know what data the file will contain or how it will be laid out. I am for now just trying to understand how to work with SAS files.
I have never worked with a SAS file/dataset so I need some guidance as to how to process the file. From what I understand we will be using an odbc connection using the sas provider to connect to the local file. We can then run queries to get the data into c# dataTables.
What do I need to have installed (dll's, etc) to get this to work and is there some basic documentation I can follow to get this setup. The code will be written in c# framework v4.0 so if anyone has any guidance or can point me in the right direction it would greatly be appreciated.
I apologize if this in not posted in the correct board.
12-10-2014 09:26 AM
Bit confused on your post there. You start by stating a SAS file will be provided to you daily, but then in a later paragraph talk about connecting to an odbc datasource?
It really needs some clarification on what you will be getting/how etc. i.e. some sort of third party vendor agreement. If its just a dataset, simplest way would be to ask for it in CSV or even XML, shouldn't be any issue from their side, then simple read to your system.
The actual file structure of a SAS dataset however is not so simple. Firstly its not plain text but proprietary binary. You would need to be looking at licensing.
If however the file is XPT, then that is an open source file format - still not flat text, but probably easier to get to.
If its database, then you should, providing you have the permissions, be able to use SQL to pull out information you need.
12-10-2014 09:38 AM
Yes, sorry I know I dont really know enough about the file, but was told it will be SAS "file". I misspoke when I mentioned ODBC as I believe we need an OleDB connection to get at the data in the SAS file?
What I would ultimately like is to get the data from the SAS file into a C# dataTable(s) which I can then use to process into our system. So I just need to know how to open/read the SAS file and extract the data into a dataTable .
Hope that explains it better?