BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
JVmano
Calcite | Level 5

Sup guys, I have this code and I want that result always have a a minus count, like this code, I have a temp valor and I want the value-273,15 but I don't know how to do it.

 

Code:

 

filename resp temp;

/* Neat service from Open Notify project */
proc http
url="http://api.openweathermap.org/data/2.5/weather?q=Curitiba,br&APPID=c1c9bc3307a38be77bdd9dacc4f5b435"
method= "GET"
out=resp;
run;

/* Assign a JSON library to the HTTP response */
libname space JSON fileref=resp;

/* Print result, dropping automatic ordinal metadata */
title "Your temperature is here";
proc print data=space.main (drop=ordinal:); /* the "main" is the amount I want to decrease by 273.15 */
run;

 

Thank you.

1 ACCEPTED SOLUTION
3 REPLIES 3
PaigeMiller
Diamond | Level 26

Subtracting a value has to be done in a data step, or in SQL, or I suppose you could do it PROC IML as well. You can't do it in PROC PRINT.

--
Paige Miller
Reeza
Super User
PROC PRINT is a display procedure, it does not calculate variables or statistics except for totals.

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