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).

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 812 views
  • 0 likes
  • 3 in conversation