BookmarkSubscribeRSS Feed
THALLA_REDDY
Obsidian | Level 7

Hi Team,

 

I am using DB2 Database to manage my clients data and connecting through SAS Enterprise Guide 8.3. Can anyone help me how to load some data into a table in my DB2 database.

 

In the DB2 database We have the subsystem architecture to access the database and it's table.

For Ex: We have the subsystems like
DBT1, DBT2 etc.., and under these subsystem we have some databases defined and then tables are created in those databases.

My requirements is I have table (DBT1 --> T1101015A --> prsn_data

Here DBT1 is subsystem, T1101015A is the database and PRSN_DATA is the table name.

Please help to load some data into PRSN_DATA table using DBLOAD PROC in SAS Enterprise Guide.

 

thanks in Advance,

thalla

4 REPLIES 4
Ksharp
Super User
PROC DBLOAD is very very old product.
Why not using LIBNAME + PROC SQL / PROC COPY ?
THALLA_REDDY
Obsidian | Level 7
Hi Thanks for your reply.
Can you help me with a small code for LIBNAME + PROC SQL / PROC COPY?
Ksharp
Super User
1) fristly , make a connection to DB2 via DB2 client software or ODBC (data source at control center).
2) And using LIBNAME statement .
libname x db2 ........
or
libname x odbc dsn= ... insertbuff=10000;
3) copy table from sas into DB2.
proc copy in=work out=x noclone;
run;

P.S. search your topic at support.sas.com . you could find many useful stuff . Good Luck .
LinusH
Tourmaline | Level 20

Just to add, if you already have a defined schema in DB2 (quite common) use PROC APPEND or PROC SQL (INSERT INTO) instead.

Data never sleeps

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 4 replies
  • 1225 views
  • 5 likes
  • 3 in conversation