|
Chapter Contents |
Previous |
Next |
| The SASEFAME Interface Engine |
This example creates a view using the SQL procedure's from and using clauses. See "SQL Procedure Guide, Version 7" for details on SQL views.
title1 'famesql5: PROC SQL Dual Embedded Librarys w/ FAME option';
options validvarname=any;
/* Dual Embedded Library Allocations (With FAME Option) */
/********************************************************/
/* OECD1 Database */
/******************/
title2 'OECD1: Dual Embedded Library Allocations with FAME Option';
proc sql;
create view fameview as
select date, 'fin.herd'n
from lib1.oecd1
using libname lib1 sasefame '/economic/databases/testdat'
convert=(tech=constant freq=annual),
libname temp '/usr/local/scratch/mine'
quit;
title2 'OECD1: Print of View from Embedded Library with Option';
proc print data=fameview;
run;
Output 5.5.1: Printout of the fameview of OECD data
/* SUBECON Database */
/********************/
title2 'SUBECON: Dual Embedded Library Allocations w/ FAME Option';
proc sql;
create view fameview as
select date, gaa
from lib1.subecon
using libname lib1 sasefame '/economic/databases/testdat'
convert=(tech=constant freq=annual),
libname temp '/usr/local/scratch/mine'
quit;
title2 'SUBECON: Print of View from Embedded Library with Option';
proc print data=fameview;
run;
Output 5.5.2: Printout of the fameview of DRI Basic Ecomonic data
|
|
title2 'DB77: Dual Embedded Library Allocations with FAME Option';
proc sql;
create view fameview as
select date, ann, 'qandom.x'n
from lib1.db77
using libname lib1 sasefame '/economic/databases/testdat'
convert=(tech=constant freq=annual),
libname temp '/usr/local/scratch/mine'
quit;
title2 'DB77: Print of View from Embedded Library with Option';
proc print data=fameview;
run;
Output 5.5.3: Printout of the fameview of DB77 data
|
|
/* DRIECON Database */
/********************/
title2 'DRIECON: Dual Embedded Library Allocations w/ FAME Option';
proc sql;
create view fameview as
select date, husts
from lib1.driecon
using libname lib1 sasefame '/economic/databases/testdat'
convert=(tech=constant freq=annual),
libname temp '/usr/local/scratch/mine'
quit;
title2 'DRIECON: Print of View from Embedded Library with Option';
proc print data=fameview;
run;
Note that the SAS option VALIDVARNAME=ANY was used at the top of this example due to special characters being present in the time series names. The output from this example shows how each fameview is the output of the SASEFAME engine's processing. Note that different engine options could have been used in the USING LIBNAME clause if desired.
Output 5.5.4: Printout of the fameview of DRI Basic Ecomonic data|
|
|
Chapter Contents |
Previous |
Next |
Top |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.