Did you try
data db2lib.test2;
set work.test;
keep var1;
run;
?
Same error
Is it numerical or char?
If numerical, you may hit the default max size for the mapped data type in DB2.
options sastrace=',,,d' sastraceloc=saslog nostsuffix msglevel=i;
It looks like the column is (per default) defined as integer in DB/2, where you have a range of -2147483648 to +2147483647.
One thing that came to my mind was to use PROC DS2 and define the column as BIGINT or FLOAT.
When numerical variable become this large, on can ask if they really need to be integers - are they par of calculations?
Another option is to use data set options to explicitly specify data types in the target database (DBTYPE).
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.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.