DATA Step, Macro, Functions and more

Importing SQL databases

Posts: 62

Importing SQL databases

Hi All,

I have data in the following format, Dataset.sql.dat & Dataset.sql.dat.gpg

Is it possible to bring this data into SAS?

I'm running SAS 9.2 64bit on windows XP


Super User
Posts: 5,260

Importing SQL databases

SAS can probably not read those files directly, if they are database files.

SAS can access them trough a common API, such as ODBC and OLEDB.

Are those SQL Server databases?

Either case, you also need a database server up and running to answer calls from SAS via above mentioned API:s.

You aslo probaly need a SAS licence for aprpia te SAS/ACCESS product.

Data never sleeps
Posts: 62

Importing SQL databases

It turend out the .sql part was just naming convention (and therefore not an extension) and the .dat part was a generic extension that the client uses and the .gpg is associated with compression.

I changed the .dat to .txt and opened it up in an editior and it was Pipe delimted!

Thanks for your response.

Posts: 43

Importing SQL databases

FYI, the ".gpg" extension usually means it is an encrypted file (using GnuPG, here if interested  It's not a "compressed" file per se; although gog normally compresses a file during encryption, you cannout uncompress it yourself.  The one without ".gpg" on the end is probably the decrypted copy of the same file.

And note that you did not need to rename the file with ".txt".  If it's just a plain text file, any editor can open it by that name. 

Ask a Question
Discussion stats
  • 3 replies
  • 3 in conversation