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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.