I have an existing SAS table that is produced from my company's SQL database. One of the fields contains each record's audit trail and I am trying to parse that field for reporting purposes. When I read the table into SAS the length, format, and informat are 2000 which is truncating some of the data contained in the field. I have tried changing the length, format, and informat as follows:
data want;
length audit $ 10000; informat audit $10000.; format audit $10000.;
set datain.have;
run;
But, the result is still a truncation at 2000 characters. I'm assuming there is nothing else I can do in SAS and need to contact the SQL DB admin to change the format of the field in the source data set.
Thoughts?
If you are reading the data from a remote database check or change the setting for DBMAX_TEXT option on the libname or connect statement. SAS will normally truncate long character values to that maximum length before moving the data to SAS.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.