All,
I have a simple question. How can one perform a logical test to validate if a macro variable has missing value ?
For e.g.:
%Let a = .;
%Put &a.;
%If &a = %str() %Then
%Do;
%Put "1";
%End;I thought something like this, but doesn't get me too far.
@Astounding ,
Thank you for your response. May I ask you to offer a little more clarity ,
%Let a = . ;
%if %length(&a) %then
%do;
%put 1;
%end;
%else;
%put 0;
%end; This returns an error. Can you point as to what is wrong ? Additionally, can you point me to the paper you are referring to ?
@UdayGuntupalli wrote:
(...) Additionally, can you point me to the paper you are referring to ?
Just for completeness, this is (most likely) the paper Astounding referred to: https://support.sas.com/resources/papers/proceedings09/022-2009.pdf
%If &a = %Then %Do;%Put "1";%End;
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.