BookmarkSubscribeRSS Feed
ari2495
Obsidian | Level 7

HI, i'm trying to understand a code, i found the following:

data Db_1;
set db;
variable= variable*(-1) ;
run;

what could be the reason? i can't understand this data step

1 REPLY 1
PaigeMiller
Diamond | Level 26

You could actually try running the code and seeing what happens with your own eyes, does the value of VARIABLE change? What does it change to?

 

But let me ask another question — forget SAS for a moment, just answer based upon what you have learned about math in your life — what do you get if you multiply a number, let's say the number 5, by -1 ? Do this in your head or on paper, what do you get?

--
Paige Miller

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!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 416 views
  • 0 likes
  • 2 in conversation