data work.all;
merge apple.emp_name (in = emp_n)
apple.emp_dept (in = emp_d);
by empid;
file print;
put NOT emp_d=;
run;
I code like above, but it doesn't work , the result is the logical value of the temporary emp_d ,not the 'not emp_d' , how should I do ?
data work.all;
merge apple.emp_name (in = emp_n)
apple.emp_dept (in = emp_d);
by empid;
file print;
not_emp_d=(not emp_d);
put NOT_emp_d=;
run;
data work.all;
merge apple.emp_name (in = emp_n)
apple.emp_dept (in = emp_d);
by empid;
file print;
not_emp_d=(not emp_d);
put NOT_emp_d=;
run;
Thank you for your help.
the "not emp_d " is a expression ,not a variable , here we need a variable , so have the expression ---not emp_d assigned to a variable , then the code works . Thanks again.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.