Resources

NOAA Storm Warning Data, WARN, with ID= Option for a Specific Date

/*----------------------------------------------------------------

                   SAS SAMPLE LIBRARY

       Name: noaaex01.sas
Description: Example program from SAS/ETS User's Guide,
             The SASENOAA Interface Engine
      Title: NOAA Storm Warning Data, WARN, with ID= Option for a Specific Date
    Product: SAS/ETS Software
       Keys: NOAA Severe Weather Data Inventory data extraction
      Procs: SASENOAA
      Notes: Read this before you run this sample.
             The sample data provided resides in the ets/sasmisc folder,
             and is only provided so that you can see how the data you download
             is supposed to look. The XML data that SASENOAA downloads
             should look the same as the sample data.

             You can define a system environment variable
             named NOAA_DATA that designates the path of your writeable folder
             where the maps and XML files from the NOAA SWDIWS are to be
             written.

             In this example, you might use:
                   export NOAA_DATA=/sasusr/playpens/saskff/noaa/test/

             so that the C1NCO1.xml and C1NCO.map files are created and placed
             in the NOAA_DATA location. The XML file along with the MAP file
             contain the data for all the warnings for the specified date range,
             and once we run the example, c1nco.sas7bdat and c1nco_M.sas7bdat
             are the two SAS data sets that are created by the SASENOAA engine.

             To assign a libref to the external file to be processed,
             you can use the NOAA_DATA environment variable in the
             following form of the libname statement:

           libname noaa sasenoaa "%sysget(NOAA_DATA)"
              FORMAT=XML
              OUTXML=c1nco
              AUTOMAP=replace
              MAPREF=MyMap
              XMLMAP="%sysget(NOAA_DATA)c1nco.map"
              NOAASET=warn
              ID='397190'
              RANGE='20060505:20060506'
              ;

             Alternatively, you can specify a path to an already existing
             physical folder such as "/sasusr/playpens/saskff/noaa/test/" as shown in the
             code that follows.
 ----------------------------------------------------------------*/


options validvarname=any
   sslcalistloc="/SASSecurityCertificateFramework/1.1/cacerts/trustedcerts.pem";

title 'Retrieve Warning Data with ID= Option for May 5, 2006';
libname _all_ clear;
libname mylib "/sasusr/playpens/saskff/noaa/doc/";

libname noaa sasenoaa "/sasusr/playpens/saskff/noaa/test/"
   noaaset=warn
   id='397190'                /* create c1nco_m data set */
   range='20060505:20060506'
   outXml=c1nco               /* create c1nco  data set */
   automap=replace
   mapref=MyMap
   xmlmap="/sasusr/playpens/saskff/noaa/test/c1nco.map"
   format=xml;

data mylib.myc1nco;
   set noaa.c1nco;
run;

proc contents data=mylib.myc1nco; run;
proc print data=mylib.myc1nco(obs=5); run;