Resources

Using the LIBNAME Statement to Access All Keys

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

                    SAS Sample Library

        Name: crpex02.sas
 Description: Example program from SAS/ETS User's Guide,
              The SASECRSP Interface Engine
    Title: Using the LIBNAME Statement to Access All Keys
  Product: SAS/ETS Software
     Keys: Stock data access, CRSPAccess
    Procs: SASECRSP
    Notes: Read this before you run this sample.
           The CRSP database resides in the  CRSP_MSTK folder. You
           must install your CRSP monthly stock data
           and define your system environment
           variable, CRSP_MSTK, to point to the physical path
           of your installed CRSP database. Use the following
           form of the libname statement:

libname testit2 sasecrsp "%sysget(CRSP_MSTK)"
        setid=20
        range='19950101-19950228';
----------------------------------------------------------------*/

title2 'Define a range inside the data range ';
title3 'My range is ( 19950101-19950228 )';

libname _all_ clear;
libname testit2 sasecrsp "/r/tappan/vol/vol1/crsp1/data201212/MIZ201212/"
        setid=20
        range='19950101-19950228';
data a;
   set testit2.ask(obs=30);
run;

proc print data=a;
run;