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.
Did you try the SQL ?
proc sql;
insert into db2.xxx
select * from sas.xxx;
quit;
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
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;
Thank you. Its resolved. It had length mismatch between the values in one of the var in sas and var in db2 table.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.