BookmarkSubscribeRSS Feed
ANIRBAN2
Fluorite | Level 6

Hi,

 

If any 1 can help how to create a live weather details in sas connecting to a website.

using Proc http.

User shall give input  "City".

it will provide live weather details.

 

  

3 REPLIES 3
Rick_SAS
SAS Super FREQ

What have you tried so far? Can you use PROC HTTP to access the website you want? Are you getting information back, but you need help processing the data? Please provide more details.

ANIRBAN2
Fluorite | Level 6
No I am not able to get the live data from the website.
ANIRBAN2
Fluorite | Level 6

filename resp "%sysfunc(getoption(WORK))/echo.json";
proc http
url="https://www.weather-forecast.com/locations/London/forecasts/latest"
method="GET"
out=resp;
run;



data _null_;
infile resp;
input;
put _infile_;
run;

 

 

 

This code is providing me the total information of the portal in html

How can I get the relevant weather information in json format.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 543 views
  • 0 likes
  • 2 in conversation