Retrieving Quarterly External Debt Statistics for Multiple Countries

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

                   SAS SAMPLE LIBRARY

       Name: wbgoex07.sas
Description: Example program from SAS/ETS User's Guide,
             The SASEWBGO Interface Engine
      Title: Retrieving Quarterly External Debt Statistics for Multiple 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, 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 DEBTEXT.MAP file and DEBTEXT.xml.
             To assign a fileref to the external file to be processed,
             use the following form of the libname statement:

          libname wbgo sasewbgo  "%sysget(WBGO)"
           countrylist='aus;gbr;usa'
           idlist='DT.DOD.DSTM.CD.GG.AR.US,DT.DOD.DECT.CD.GG.AR.US,DT.DOD.DSTC.CD.GG.AR.US,DT.DOD.DSCD.CD.GG.AR.US'
           range='2014Q2:2016Q3'
           outxml=debtext
           AUTOMAP=replace
           MAPREF=MyMap
           XMLMAP="/sasusr/playpens/saskff/wbgo/test/debtext.map"
           FORMAT=xml;

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

title 'Retrieve Quarterly External Debt Statistics';
libname wbgo sasewbgo "<physical path name>"
   countrylist='aus;gbr;usa'
   idlist='DT.DOD.DSTM.CD.GG.AR.US,DT.DOD.DECT.CD.GG.AR.US,DT.DOD.DSTC.CD.GG.AR.US,
           DT.DOD.DSCD.CD.GG.AR.US'
   range='2014Q2:2016Q3'
   outxml=debtext
   AUTOMAP=replace
   MAPREF=MyMap
   XMLMAP="<fully qualified file name to map file with .map file extension>"
   ;

data mydebtext;
   set wbgo.debtext;
run;

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