BookmarkSubscribeRSS Feed
rak123
Calcite | Level 5

in one of the codes that I am working on has:

if startdate ne. ; * subsetting if: exclude obs meeting condition;

What does that bold statement do in this code.

Thanks.

4 REPLIES 4
art297
Opal | Level 21

As long as this is open code, it doesn't have any effect.  The subsetting ends with the first semicolon, the asterisk indicates that the rest of the line (up to the 2nd semicolon) is a comment.

rak123
Calcite | Level 5

thnx for your reply. if the asterisk sign is not present then what does it really mean...

tacit
Fluorite | Level 6

It mens select startdate not missing rows!

Robert_Bardos
Fluorite | Level 6

Comments in SAS can be of the form

  •   /* comment enclosed in slash-asterisk and asterisk-slash respectively */
  • * comment as per "if the first nonblank character after a semicolon (or when it is the very first character in the entire source code) is an asterisk then everything up to the next semicolon will be treated as a comment" ;
  • %* comment in macro language syntax. Similar rule as before applies, ie. has to be terminated by a semicolon and has to come first after a statement boundary ;

Now all this is extremely abbreviated and subject to omissions/errors that my fellow peers will eventually point out.

What it boils down to in the context of your question:

The "bold statement" is nothing but a comment that tries to explain the non-bold statement (ie. the subsetting if) to its left.

Hope this makes sense

Robert

sas-innovate-white.png

🚨 Early Bird Rate Extended!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Lock in the best rate now before the price increases on April 1.

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 4 replies
  • 1454 views
  • 0 likes
  • 4 in conversation