This is an example I created to get the current temperature from my weather station as uploaded to wunderground.com.
The code is developed in RPG and SQL to run on an IBMi (AS400).
The 2 source files are:
gettemp.sql - Stand alone SQL statement.
gettemp.sqlrpgle - RPG program which includes the SQL statement above.
The wunderground.com API documentation is at: docs.google.com/document/d/1KGb8bTVYRsNgljnNH67AMhckY8AQT2FVwZ9urj8SWBs/edit