Hello, anybody knows how to check if macro variable's length exceeds max length (65534) while select into runs?
E.g.
proc sql;
select x into :y separated by " " from z;
quit;
Macro var Y is always created nevertheless its lenght, but when I'm trying to use it further it, of course, invokes an error if length is more than 65534
You may want to explore using the DICTIONARY TABLES and SAS-maintained member/view DICTIONARY.COLUMNS to at least verify the incoming data column/variable length before proceeding with another SELECT.
Search the SAS support http://support.sas.com/ website using this Google advanced argument or with using the SAS support website search:
Since the into: construct also does an implicit COMPBL type of compress, you have to scan each value on beforehand and calculating the real length of your macro variable. If your sample code was relevant, I think a simple data step will do the job.