SASERAIN Interface Engine

Syntax: SASERAIN Interface Engine

The SASERAIN interface engine uses standard engine syntax to read the observations or data values for one or more World Weather Online data sets that can each contain one or more time series. Table 1 summarizes the options that the SASERAIN engine uses. In addition, there is one required option: APIKEY=’rain_api_key’.

Table 1: Summary of LIBNAME libref SASERAIN Options

Option Description
APIKEY= Specifies the required World Weather Online access key that enables you to access the data that the World Weather Online website provides
AUTOMAP= Specifies whether or not to overwrite the existing XML map file
CONDITIONS= Specifies whether or not to return only the current weather conditions upon output. CONDITIONS=YES means that variables for both the current conditions and the weather forecast appear in the output. The default (NO) means that only the local weather forecast variables appear in the output.
CONNECT= Specifies whether or not you need the connect method for a secure connection via a proxy server. You must specify the PROXY= option when you use the CONNECT=ON option.
DATE= Specifies the beginning date for past weather data for the specified range: specify the start date in YYYY-MM-DD format.
DAY= Specifies that the local weather forecast is to be current weather, not past weather. When you specify either today or tomorrow, you get today’s weather forecast. This is used with the NUM_OF_DAYS= option to specify a range for obtaining local weather forecast data.
DEBUG= Specifies whether or not to include diagnostic message logging in the SAS log window
ENDDATE= Specifies the end date for past weather for the specified range: specify the end date in YYYY-MM-DD format. The end date must have the same month and year as the DATE= option.
FORECAST= Specifies whether or not to return the weather forecast for a given postal code, zip code, and latitude/longitude values
FORMAT= Specifies a file extension that indicates the type of file to retrieve. Only XML is supported for the SASERAIN interface engine.
FREQ= Specifies the frequency (interval) of the selected weather forecast data as a character string, such as DAILY, 24HOURLY, HOURLY, 3HOURLY, 6HOURLY, 12HOURLY, or DAY/NIGHT
FX24= Specifies whether or not to return the 24-hour weather forecast at a three-hour interval for a given location (city and country, postal code, zip code, or latitude and longitude)
NUM_OF_DAYS= Specifies the number of days to report (starting from today). This is used for reading the local weather forecast data. The default for the SASERAIN engine is 2 days of forecast data, and the maximum is 15 days (premium weather API).
OUTCC= Specifies the name of the current conditions SAS data set, which contains current conditions data returned by the World Weather Online API. This option is ignored when CONDITIONS=NO. For more information, see the CONDITIONS= option.
OUTXML= Specifies the name of the SAS data set and the XML file, which usually contains the weather forecast data returned by the World Weather Online API. When you do not specify the OUTCC= option, the SASERAIN interface prepends 'CC_' to the name specified in the OUTXML= option to create the name for the current conditions SAS data set. See the OUTCC= option.
PROXY= Specifies the proxy server that you want to use (if you have trouble connecting without specifying a proxy). If you also need the connect method for a secure connection, use the CONNECT=ON option in addition to the PROXY= option. See the CONNECT= option.
QUERY= Specifies a required list of World Weather Online location codes. To select more than one location, list the World Weather Online query codes (q-codes), separated by semicolons. There is a limit of nine World Weather Online location codes in the QUERY= option. This is a required option.
TP= Specifies the time period (interval) of the selected weather forecast data in number of hours: 1, 3, 6 (default), 12, or 24 hours.
XMLMAP= Specifies the fully qualified file name for the XML map that the SASERAIN engine creates. This file name is usually the same as the one in the OUTXML= option.


Last updated: June 19, 2025