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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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