TEC by Ownership

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

                   SAS SAMPLE LIBRARY

       Name: oecdex05.sas
Description: Example program from SAS/ETS User's Guide,
             The SASEOECD Interface Engine
      Title: TEC by Ownership
    Product: SAS/ETS Software
       Keys: OECD data retrieval
      Procs: SASEOECD
      Notes:

           libname oecd saseoecd "%sysget(OECD_DATA)"
              SETID=TEC7_REV4
              OUT=TR7
              INSET0=keylist0
              INSET1=keylist1
              INSET2=keylist2
              INSET3=keylist3
              INSET4=keylist4
              INSET5=keylist5
              START='2011'
              END='2015'
              ;
 ----------------------------------------------------------------*/

options validvarname=any
   sslcalistloc="<physical path and file name to specify your security certificates>";

data keylist0;
   length key0 $2;
   key0='2'; output; /* indicator is trade value */
run;

data keylist1;
   length key1 $3;
   key1='GBR'; output; /* reporting country is United Kingdom */
run;

data keylist2;
   length key2 $2;
   key2='1'; output; /* flow is imports */
   key2='2'; output; /* flow is exports */
run;

data keylist3;
   length key3 $8;
   key3='TOTAL'; output;  /* partner country or zone is Total */
run;

data keylist4;
   length key4 $3;
   key4='D'; output;  /* ownership is domestically controlled enterprises */
run;

data keylist5;
   length key5 $8;
   key5='TOTAL'; output;  /* ISIC Sectors is total economy */
run;

title 'Request TEC7_REV4 Data for United Kingdom';

LIBNAME myLib saseoecd "physical path to your folder for storing the OECD data"
   setid=TEC7_REV4
   inset0=keylist0
   inset1=keylist1
   inset2=keylist2
   inset3=keylist3
   inset4=keylist4
   inset5=keylist5
   out=TR7
   start='2011'
   end='2015'
   ;

data mytech;
    set myLib.TR7;
run;


proc print data=mytech; run;