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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.