BookmarkSubscribeRSS Feed
JDMTX
Fluorite | Level 6
All -

I have run into a situation where I need to recode a value in a data set using compound logic (if location ne land and water_depth gt 1500) then my recoded value is equal to deep water. The issue that I have is that the Recode Option in the Computer Field Wizard appears to be able to handle conditional logic statements that reference a single variable. Does anyone have any experience in Enterprise Guide 4.2 recoding values using conditional logic that makes use of multiple conditions that reference multiple variables? Any help would be great appreciated.

jm
2 REPLIES 2
Doc_Duke
Rhodochrosite | Level 12
just use the advanced expression builder and manually code your CASE clause for PROC SQL. It's a little more tedious than using the recode wizard, but works fine.
RichardH_sas
SAS Employee
Agreed with Doc - write a CASE expressions and build the column as an advanced expression. Documentation on the CASE syntax is here:
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/a002473682.htm

FYI, if you already started the column as a recode, in EG 4.2 there's the ability from the computed column window to switch the column over to an advanced expression (a recode is just a CASE expression with a point-and-click front end).

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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