In the compiled executable machine code, the null statement is not present at all. It has mutated into the location where the next machine code instruction to be executed is stored.
See my select() example. The only thing left from the null statement is the JMP that jumps to the first instruction after the end; but that JMP is coded at the end of all the branches.
This conversation seems to have disappeared down a rabbit hole of semantic confusions. Here is the question as originally stated.
1. What makes null statement not just null ,global and executable?
I do not quite comprehend executable nature of null statement in the 1st place though there is an example in the docs that seems rather in comprehensive to me at least. Also, I do not find great utility to trust its executable component beyond its step boundary and specification of values embedded with semicolons . 2ndly, how does it become a global statement? So use anywhere as it says in the docs? How anywhere after all?
An executable statement is one like an assignment statement that is executed during the running of a data step. As apposed to a statement like FORMAT or LENGTH that is just used to define the variables. Don't get yourself distracted into trying figure out what it "executes". That is not the distinction being make by labeling it as "executable".
A GLOBAL statement is one that can be used anywhere. Since the null statement does not really do anything SAS allows you to include them everywhere. So the they are GLOBAL.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.