Resources

Retrieving Gross Domestic Product Data for China

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

                   SAS SAMPLE LIBRARY

       Name: wbgoex01.sas
Description: Example program from SAS/ETS User's Guide,
             The SASEWBGO Interface Engine
      Title: Retrieving Gross Domestic Product Data for China
    Product: SAS/ETS Software
       Keys: WBGO data extraction
      Procs: SASEWBGO
      Notes: Read this before you run this sample.
             The sample data provided resides in the ets/sasmisc folder.
             If you are using automap=READONLY, copy the
             map of your incoming XML data to a writeable folder before
             using it. Then you can define a system environment variable,
             WBGO, to the path of your  writeable folder containing
             the G2START.MAP file and G2START.xml.
             To assign a fileref to the external file to be processed,
             use the following form of the libname statement:

           LIBNAME myLib sasewbgo "%sysget(WBGO)"
              OUTXML=g2start
              AUTOMAP=replace
              MAPREF=MyMap
              XMLMAP="%sysget(WBGO)g2start.map"
              COUNTRYLIST='chn'
              IDLIST='NY.GDP.PCAP.CD,NY.GDP.PCAP.KN,NY.GDP.PCAP.PP.KD'
              RANGE='2010:2016'
              FORMAT=xml
              ;
 ----------------------------------------------------------------*/



title 'WBGO Data: Gross Domestic Product (3 Series) for China';
LIBNAME myLib sasewbgo "<physical pathname>"
   OUTXML=g2start
   AUTOMAP=replace
   MAPREF=MyMap
   XMLMAP="<fully qualified name of map file with .map file extension>"
   COUNTRYLIST='chn'
   IDLIST='NY.GDP.PCAP.CD,NY.GDP.PCAP.KN,NY.GDP.PCAP.PP.KD'
   RANGE='2010:2016'
   ;

data gdp2chn;
   set myLib.g2start ;
run;

proc contents data=gdp2chn; run;
proc print data=gdp2chn(drop=total_count); run;