Resources

Creating a View of DRI Basic Economic Data Using the SQL Procedure

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

                   SAS Sample Library

        Name: famex05b.sas
 Description: Example program from SAS/ETS User's Guide,
              The SASEFAME Interface Engine
   Title: Creating a View of DRI Basic Economic Data Using the SQL Procedure
 Product: SAS/ETS Software
    Keys: FAME data extraction, View FAME data
   Procs: SASEFAME, SQL
   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 subecon.db file (FAME database).
        To assign a fileref to the external file to be processed,
        use the following form of the libname statement:

libname lib1 sasefame "%sysget(FAME_DATA)"
        convert=(tech=constant freq=annual);
----------------------------------------------------------------*/
title2 'SUBECON: Dual Embedded Library Allocations with FAME Option';
options validvarname=any;

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

proc sql;
   create view fameview as
   select date, gaa
      from lib1.subecon
      using libname lib1 sasefame "%sysget(FAME_DATA)"
                         convert=(tech=constant freq=annual),
            libname temp "%sysget(FAME_TEMP)";
quit;

title2 'SUBECON: Print of View from Embedded Library with FAME Option';
proc print data=fameview;
run;