BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I cant figure out in 3.0 how to filter several different columns with the logical operator 'OR'...
1 REPLY 1
Cynthia_sas
Diamond | Level 26
Hi:
I no longer have EG 3.0 to test specifically. But in general, SAS expects OR conditions to be specified in one of 2 ways:
[pre]
if jobcode = 'PILOT' or jobcode='BAGCLK' or jobcode = 'FLTAT' . . .

if jobcode in ('PILOT', 'BAGCLK', 'FLTAT') . . .
[/pre]

So, if you are trying to select something that would look like this:
[pre]
if jobcode = 'PILOT' or 'BAGCLK' or 'FLTAT' . . .
[/pre]

Then EG would probably be unhappy. If you are using different columns, then the syntax would be similar:
[pre]
if jobcode = 'PILOT' or salary gt 50000 . . .
[/pre]

For help with the exact click path to get an OR condition in EG 3.0, you might consider contacting Tech Support.

cynthia

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 1 reply
  • 849 views
  • 0 likes
  • 2 in conversation