you can also prxmatch and \s (this means space).
data have;
input word & $20.;
datalines;
wiseman
young man
unwise man
oldman
;
data want;
set have;
if prxmatch('/\s/', trim(word)) then flag = 'Y';
else flag = 'N';
run;
... View more
@icecubescb please mark @novinosrin solution as the correct answer if it answers your question.
I would consider if NOTSORTED is good usage in this case but otherwise is pretty much the standard response.
... View more