BookmarkSubscribeRSS Feed
sas_it
Quartz | Level 8

What is the meaning of the following code? What does it mean? what does it do?  How we create DSN and from where we get user and password? Please explain.

 

libname Comp_Sour odbc dsn=COMP user="SAAS_USER" password="abc" schema=dbo;

 

data temp_comp;
set Comp_Sour .Main_File;

run;

2 REPLIES 2
andreas_lds
Jade | Level 19

You may want to search for setting up odbc connections, i am confident, that the necessary steps are well documented.

PaigeMiller
Diamond | Level 26

@sas_it wrote:

What is the meaning of the following code? What does it mean? what does it do?  How we create DSN and from where we get user and password? Please explain.

 

libname Comp_Sour odbc dsn=COMP user="SAAS_USER" password="abc" schema=dbo;

 

data temp_comp;
set Comp_Sour .Main_File;

run;


It links to a database identified as COMP, provides a username and password, and then creates a temporary SAS data set that contains the entire contents of the database table Main_File

--
Paige Miller

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 2 replies
  • 950 views
  • 0 likes
  • 3 in conversation