Help using Base SAS procedures

IN

Reply
N/A
Posts: 1

IN

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
Super Contributor
Super Contributor
Posts: 3,174

Re: IN

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.
Super Contributor
Super Contributor
Posts: 3,174

Re: IN

I was able to find the phrase "IN operator" in the SAS 9.1.3 SP4 online documentation for SAS, under INDEX tab.

Scott
Super Contributor
Posts: 321

Re: IN

Hi Luis,

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

Regards,
Milton
Ask a Question
Discussion stats
  • 3 replies
  • 133 views
  • 0 likes
  • 3 in conversation