BookmarkSubscribeRSS Feed
Lawongd
Calcite | Level 5

 

I am new to SAS an I will like to perform this operation in SAS

 

7-1*0+3/3

(7-1)*0+3/3

(7-1)*0+(3/3)

 

Thank you

 

5 REPLIES 5
PeterClemmensen
Tourmaline | Level 20

Hi and welcome to the SAS Communities.

 

data _null_;
   a=7-1*0+3/3;     put a=;
   a=(7-1)*0+3/3;   put a=;
   a=(7-1)*0+(3/3); put a=;
run;
Lawongd
Calcite | Level 5

Thanks 

How can i write 

 

data _null_;
a=7-1*0+3/3; put a=;
a=(7-1)*0+3/3; put a=;
a=(7-1)*0+(3/3); put a=;
run;

 

in IML or Macro language?

PeterClemmensen
Tourmaline | Level 20
proc iml;
    a=7-1*0+3/3; print a;
    a=(7-1)*0+3/3; print a;
    a=(7-1)*0+(3/3); print a;
quit;
andreas_lds
Jade | Level 19

@Lawongd wrote:

Thanks 

How can i write 

 

data _null_;
a=7-1*0+3/3; put a=;
a=(7-1)*0+3/3; put a=;
a=(7-1)*0+(3/3); put a=;
run;

 

in IML or Macro language?


 

The SAS Macro language is used to create sas-code and should not be used for calculations!

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

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