BookmarkSubscribeRSS Feed
luis
Calcite | Level 5
Hi all,
I am new in SAS and I am trying to interpret some codes.
I found the following line:
DBPLANT=X IN (1 3)
I haven't found the explanation for the IN command. Does it means that variable DBPLANT takes value of 1 if X is equal to 1 or 3, or if X is belongs to the closed interval 1 through 3.
Thanks in advance,
Luis
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Yes, the operand(s) in parantheses can be separated by a blank or comma. Here is a Google advanced argument against the SAS.COM site which yields some DOC and technical / conference reference matches for reference:

in operator site:sas.com


Scott Barry
SBBWorks, Inc.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
I was able to find the phrase "IN operator" in the SAS 9.1.3 SP4 online documentation for SAS, under INDEX tab.

Scott
milts
Pyrite | Level 9
Hi Luis,

You got it right. It takes the value of 1 if X is equal to 1 or 3.

Regards,
Milton

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 3 replies
  • 1178 views
  • 0 likes
  • 3 in conversation