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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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