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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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