Is it possible that creating a table with SAS proc sql will truncate a character variable at 255 characters? Does it have to do with the library engine type?
I'm using a PCFILES libname like this (note the dbmax_text option):
libname mylib PCFILES PATH = "C:\path\to\my\32bit\MS Acccess.ACCDB" dbmax_text=4000;
Then I do a proc sql like this:
proc sql noprint;
create table work.cbdata as
select
distinct var1,
var2,
...
from mylib.var2015
where
upcase(var1) = "DIQ"
order by var1
;
quit;
var2
is getting truncated at 255 even though it's format is listed as $4000.
in the column property view. When I do this as a data step, all of the character data comes through:
data vardb;
set mylib.var2015;
if var1 = "DIQ";
run;
I have 40-50 sql procedures like this embedded in my macro library, so I would prefer not to refactor all the macros to use data steps (if that's even possible). Does anyone know either
a) if there is some option in proc sql to make it respect the dbmax_text.
or
b) any documentation about how SAS processes the character lengths in the create table statements of proc sql?
EDIT - adding some screen shots.
SAS thinks the variables are 4000 characters long:
var2 length=4000,
instead of justvar2,
and see if it helps? – Dominic Comtois