Hi,
I am using a datastep to save tables to local disc from a database using odbc. The simple code looks like this:
data LD.Diva; DD.Diva;
where LD is the local directory and DD is the assigned database connection. It works fine except for columns containing long strings (above 1024 char), these are truncated.
Does anyone have a solution for this problem?
Thank you very much for this. For now I can export and import, but I would like to find a solution without manual steps. Do you have a description or a link on how to set up a direct access?
Looks like a limit in ODBC and/or the ODBC driver of the database. Use direct access to the database, or do an export to a file and import that.
Thank you very much for this. For now I can export and import, but I would like to find a solution without manual steps. Do you have a description or a link on how to set up a direct access?
You need SAS/ACCESS for your database licensed.
You also need the database client installed on your SAS machine, and it needs to be set up so that it can connect to the database in question.
Look for the documentation on SAS/ACCESS to relational databases.
Be prepared to spend some time getting that running.
I've given up on DB/2, I only use the "export to file - import file in SAS" method. This also gives you a fixed data point (the database changes permanently, the file keeps the state of its creation).
Thank you very much for your help! I do not have a license for SAS/ACCESS at the moment, but I will consider this solution.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.