- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I have a huge CSV file, and i want to convert it to a SAS Table. I know that i can use SAS to make an import, but i am interested in create the SAS table using, for example, C++, python or any available library.
For example, in SPSS i can easily create a SAS Table using the command "Save as type" to SAS v9+ Windows (*.sas7bdat). And it not necessary to have the SAS installed.
Is there any library to make this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You can use R to write a SAS export file. See: Can anyone help me write a R data frame as a SAS data set? - Stack Overflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the response! The next challenge is to call a R function from Java/C++, for example.
If anyone know a library to C++ or Java, it will be amazing!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
R isn't a function, it's a program. Here is an example of calling it from Java: Call R from JAVA to get Chi-squared statistic and p-value - Stack Overflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I know that R is language. But what i actually need to do is to call this function (something like this):
write.xport(df = test.df, datafile = 'test.sas7bdat', codefile = 'test.txt', package = "SAS")
Or i call the function, or execute a R Script for load the SAS table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
So you need SAS to import the export file, why would it be better to just import the original CSV-file?
What's the application, why do you want to create SAS data files if you don't have SAS?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
We have a ETL process. The ouput of the process is a csv file, in different formats.
The user always get this file and import using SAS. I would like to import it for him generating a SAS Table, using a library/DLL. That's the use case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Still, by using R, you don't get a SAS table, you'll end up with a SAS transport file. The process to import that is very similar to import a csv-file...?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
So, I dont have a way to create a sas7bdat ?
I will have another file (similiar to CSV) that i need to import to SAS.
Why SAS dont give, for example, a DLL to create the sas7bdat? i really doesnt understand..
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Because they want to sell SAS software?
Python can call R functions/libraries fairly easily, but that's a question that's best posted on a python/java/C forums rather than here if you think about it
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If SAS make possible to generate a (sas7bdat) i will give him a FREE user... I translate my CSV fil to (sas7bdat) and now only a user with SAS can read it. So the user has to buy SAS license. So i think this argument is invalid.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I kinda agree. It's not the data sets themselves that is the big thing with SAS, it's everything you can do with the data within them.
So, when we awaits SAS to change their policy, tell us more about your SAS user(s),What kind are they, what SAS software/platform do they use? Chances are that yo can up with alternative ways to make your csv easily available to them. One way (if you csv-files have the same structure) is to create a data step view for the customer. Then they can change the csv-file, and the new data will be available instantly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
While I, too, have always wished that SAS would change their policy, one could easily rebut your argument. SAS already has your customer and (it sounds like) you could lose your customer if you can't provide what they want. That is why I suggested alternatives.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
No, you're converting it to accommodate a SAS user. You'd have to buy a license to do so, providing SAS another customer.
I don't agree with this policy, but I sort of understand. And at any respects some people have reverse engineered it, otherwise WPS wouldn't exist, just not really open source.
I thought R could but not willing to look into it now.
There's also the free SAS analytics U edition you could use, which would violate the license I'm sure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Conversely, for $300 you can purchase a program that can be called from your code. Take a look at: StatTransfer.com | The Command Processor