Resources

Using Fiscal Date Range Restriction

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

                    SAS Sample Library

        Name: crpex09.sas
 Description: Example program from SAS/ETS User's Guide,
              The SASECRSP Interface Engine
    Title: Using Fiscal Date Range Restriction
  Product: SAS/ETS Software
     Keys: CCM data access, CRSPAccess, Fiscal date range
    Procs: SASECRSP
    Notes: Read this before you run this sample.
           The CRSP CCM database resides in the  CRSP_CST folder. You
           must install your CRSP COMPUSTAT Merged data
           and define your Windows system environment
           variable, CRSP_CST, to point to the physical path
           of your installed CRSP CCM database. Use the following
           form of the libname statement:

libname crsp1 sasecrsp "%sysget(CRSP_CST)"
        setid=200
        gvkey=6066 gvkey=12141 gvkey=10107
        range='f19940101-19941231';
----------------------------------------------------------------*/
title 'Extract data for fiscal year 1994 for several companies';

libname _all_ clear;
libname crsp1 sasecrsp "%sysget(CRSP_CST)"
        setid=200
        gvkey=6066 gvkey=12141 gvkey=10107
        range='f19940101-19941231';

data rnd_eps (keep = gvkey rcaldt fiscaldt iq4 iq9 iq19 iq69);
   set crsp1.iqitems;
run;

proc print data=rnd_eps label;
run;