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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 909 views
  • 5 likes
  • 3 in conversation