@advanceddriver The easiest way to copy data from a database to SAS is by using one of the SAS Access engines. For this to work you need the access engine (like ODBC) licensed and have a connection to the database configured.
If that's not the case then you need the SQL - and many databases have extensions to standard SQL and though often generate code that only runs on the specific database without any changes.
If you've got the Create Table SQLs from your database then you can try and run it "as is" using SAS - but there is a good chance it's not 100% SAS SQL compliant code so you will have to figure out what needs change.
The other option is an export in json format. There you have a good chance that you can read these json's directly with SAS and that this will create the tables in SAS.
You need to write the data step in such a way that it replicates the database table structure as closely as possible. Keep in mind that SAS has only two datatypes, character and numeric, so stuff like the enumerated columns has to be mapped to something which makes sense.
E.g. a column with values Y and N is best converted to numeric 1 and 0, with a display format to show the characters (the variable can then be used directly in conditions).
Any resulting dataset can be used in PROC SQL, no matter how it was created.
Yes, please share som snippet from the dump file.
If this is the type of dump file that contains SQL statements (CREATE TABLE and INSERT INTO), maybe your best shot is to open it in a text editor, and do find/replace on component to make compatible with SAS Proc SQL.
Another option is to load into a SQL server database that your SAS installation can reach, using SAS/ACCESS (from SAS Compute) or Data Connectors (CAS). If your database is not too big you could use SQL Server Express ed.
Hi:
SAS OnDemand for Academics does not have a SQL server -- either MySQL or MS-SQL server available. PROC SQL is primarily intended for students and independent learners to learn how to use the SQL procedure, at the level that we teach in the Programming 1 and SQL 1 classes. We do NOT use any external databases in these classes.
Cynthia
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!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.