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

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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