Retrieving Gross Domestic Product Data for All Countries

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

                   SAS SAMPLE LIBRARY

       Name: wbgoex02.sas
Description: Example program from SAS/ETS User's Guide,
             The SASEWBGO Interface Engine
      Title: Retrieving Gross Domestic Product Data for All Countries
    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, then you must 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 gdp5all.MAP file and GDP5ALL.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=gdp5all
              AUTOMAP=replace
              MAPREF=MyMap
              XMLMAP="%sysget(WBGO)gdp5all.map"
              COUNTRYLIST='all'
              IDLIST='NY.GDP.PCAP.CD,NY.GDP.PCAP.KN,NY.GDP.PCAP.PP.KD'
              RANGE='2010:2016'
              PAGE=22
              FORMAT=xml
              ;
 ----------------------------------------------------------------*/

title 'Retrieve GDP Data for All Countries';
libname wbgo sasewbgo "<physical path name>"
   OUTXML=gdp5all
   AUTOMAP=replace
   MAPREF=MyMap
   XMLMAP="<fully qualified file name to map file with .map file extension>"
   COUNTRYLIST='all'
   IDLIST='NY.GDP.PCAP.CD,NY.GDP.PCAP.KN,NY.GDP.PCAP.PP.KD'
   RANGE='2010:2016'
   PAGE=22
   ;

data mygdp5all;
   set wbgo.gdp5all;
run;

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