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.