BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
peter_sjogarde
Fluorite | Level 6

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?

1 ACCEPTED SOLUTION

Accepted Solutions
peter_sjogarde
Fluorite | Level 6

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?

View solution in original post

4 REPLIES 4
peter_sjogarde
Fluorite | Level 6

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?

Kurt_Bremser
Super User

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).

peter_sjogarde
Fluorite | Level 6

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.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

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!

Register Now

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1206 views
  • 6 likes
  • 2 in conversation