BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
himalayancat
Fluorite | Level 6

HI All,

i was not comfortable not having any value after "NE", am i understanding it correctly as per my log message in Below program??

i read some documentation , https://v8doc.sas.com/sashtml/macro/z0543542.htm

and also referred Carpenters's Guide to Macro, Still not clear .

I am not clear what "NE" is comparing against!!

 

%macro jack(vals);

%if  &vals.  ne %then %do;

%put "Note:Has some values, therefore logical expression resolves to 1, which is True";

%end;

%else %do;

%put "Note:Does not have any value, therefore logical expression 0, which is false";

%end;

%mend;

%jack(nothing);

%jack();

 

So, is it going to be true anything except Missing values for &vals.!!

 

Thank You,

HimalayanCat

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jagadishkatam
Amethyst | Level 16
Here NE blank space in the if condition indicates that if the macro parameter i.e., &vals is not blank then execute the condition to print in log the message 'Note:Has some values, therefore logical expression resolves to 1, which is True' else output to the log a message saying that 'Note does not have any value, therefore logical expression 0, which is false'
Thanks,
Jag

View solution in original post

3 REPLIES 3
jvdl
Obsidian | Level 7
Jagadishkatam
Amethyst | Level 16
Here NE blank space in the if condition indicates that if the macro parameter i.e., &vals is not blank then execute the condition to print in log the message 'Note:Has some values, therefore logical expression resolves to 1, which is True' else output to the log a message saying that 'Note does not have any value, therefore logical expression 0, which is false'
Thanks,
Jag

sas-innovate-wordmark-gradient-background 3.pngSAS Innovate

Call for content now open!

It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.

Submit your proposal →

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2287 views
  • 0 likes
  • 4 in conversation