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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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