BookmarkSubscribeRSS Feed
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.


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.

Calcite | Level 5

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

Fluorite | Level 6

It mens select startdate not missing rows!

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


Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 4 in conversation