Resources

Drop Using N-literals-Writing Time Series to the SAS Data Set

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

                   SAS Sample Library

        Name: famex03a.sas
 Description: Example program from SAS/ETS User's Guide,
              The SASEFAME Interface Engine
   Title: Drop Using N-literals-Writing Time Series to the SAS Data Set
 Product: SAS/ETS Software
    Keys: FAME data extraction
   Procs: SASEFAME
   Notes: Read this before you run this sample.
        The database resides in the ets/sasmisc folder. You
        must copy the database to a writeable folder before
        using it. Then define your Windows system environment
        variable, FAME_DATA, to the path of your
        writeable folder containing
        the oecd1.db file (FAME database).
        To assign a fileref to the external file to be processed,
        use the following form of the libname statement:

libname famedir sasefame "%sysget(FAME_DATA)"
        convert=(freq=annual technique=constant);
----------------------------------------------------------------*/
options validvarname=any;

%let FAME=%sysget(FAME);
%put(&FAME);
%let FAMETEMP=%sysget(FAME_TEMP);
%put(&FAMETEMP);

libname famedir sasefame "%sysget(FAME_DATA)"
        convert=(freq=annual technique=constant);

libname mydir "%sysget(FAME_TEMP)";

data mydir.a;  /* add data set to mydir */
   set famedir.oecd1;
   drop 'ita.dirdes'n--'jpn.herd'n 'tur.dirdes'n--'usa.herd'n;
   where date between '01jan88'd and '31dec93'd;
run;

title1 "OECD1: TECH=Constant, FREQ=Annual";
title2 "Drop Using N-literals";

proc print data=mydir.a;
run;