data tty;
set _admit;
if indexw((compress('ED','IP','AV',"'")),EncType) then output;
run;
enctype has values
'ED','IP','AV' for each record.
I get the folowing error.
ERROR 72-185: The COMPRESS function call has too many arguments.
It is not clear to me what you are trying to do. Could you explain? - PG
Refering to the documentation, compress compresses one string at a time, not multiple.
And why do you want to compress ' from hard coded strings apparently not containing that char?
My guess is that you want to see if EncType has any of the listed values...?
If the subset is the only logic you wish to use, a where clause should be more suitable:
where EncType in ('ED','IP','AV');
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.
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.