SAS Shortcut
Automatically assign libraries at startup
Library assignments can be a drag sometimes. All you want is for your libraries to be automatically assigned in your session. Can you let SAS do this? Sure, here’s how (FYI, I’m suggesting an interactive method here but if you prefer writing code, you can certainly embed multiple Libname statements in your programs to assign them at startup or even include them in your autoexec.sas program file).
- Click on the New Library icon.
- Enter the library name and path.
- Check Enable at startup.
- Add the file path of where the database is location
Next time you open your SAS session, you’ll see the ORIN library is automatically assigned without any manual interference.
Connecting to SQL Server and Oracle Database
- Enter the library name
- Select “ODBC” From drop-down menu
- Check Enable at startup.
- Select a Data Source from the drop down menu (i.e. Create ODBC connection first and then come here to select the connection you create.)
- Add your user ID and Password
- Add “schema = dbo” if you want to see the contents of the database listed (E.g. Dataset)
RELATED POSTS
The Complete Guide to SAS Arrays
Are you looking to become a more efficient Data Step programmer? Do you often needRead More
PROC SQL: Using SAS
INSTRUCTIONS FOR CREATING TABLES AND USING CODE EXAMPLES Create the tables using the DATA stepsRead More