BookmarkSubscribeRSS Feed
Ishaan
Calcite | Level 5

I am moving the data from sas to DB2 using proc append. I use BULKLOAD, BL_METHOD and DBCOMMIT options.

I have not created any primary key on DB2 table and variable can contain null value.

While appending the data its reading all the observations from SAS datasets but its not writing all the observation into DB2 table.

I have looked into the rejected obs and I don't see any issue with the data.

 

Log:

NOTE: There were 10911 observations read from the data set sas_lib.abc.
NOTE: 10911 observations added.
NOTE: The data set db2_lib.abc has . observations and 12 variables.
NOTE:

 Results for CLI LOAD operation:
 10900 rows loaded.
 0 rows skipped.
 0 rows rejected.
 0 rows deleted as duplicates.
10900 rows committed.

 

Please advise.

4 REPLIES 4
Ksharp
Super User

Did you try the SQL ?

 

proc sql;

insert into db2.xxx

select * from sas.xxx;

quit;

Ishaan
Calcite | Level 5

Yes, I tried using the proc sql. Still I am getting issue.

While loading I get error.

ERROR: During insert: [IBM][CLI Driver] CLI0111E  Numeric value out of range. SQLSTATE=22003

Ksharp
Super User

or upload sas table into db2 and

use Pass-Through method.

 

proc sql;

connect to db2(.............);

execute( inset into .....db2 sql here.  )

by db2;

quit;

Ishaan
Calcite | Level 5

Thank you. Its resolved. It had length mismatch between the values in one of the var in sas and var in db2 table.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1125 views
  • 0 likes
  • 2 in conversation