I have a string macro variable %let string=abc and a dataset column that contains values def ghi.
How do I use datastep to run &string. through the entire column to create an indicator macro variable to show that abc does not exist in the column?
You can use
call symput()to create a macro variable in a data step.The code below creates a macro variable which has value 0 if the string is not found in the data, and value 1 if the string is found: