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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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