The SASEXCCM Interface Engine

Getting Started: SASEXCCM Interface Engine

To specify what parts of the database to access, you supply two things: the appropriate keys for companies or securities you want to access, and the list of data items you want to retrieve.

When accessing CCM data, you select the companies you want to access by specifying the GVKEY for each company. GVKEY is Compustat’s unique identifer and primary key. You use the GVKEY= option to specify which GVKEY to include. If no GVKEYs are specified, data for all companies are retrieved. You can use this feature to obtain a list of all companies (including their name and GVKEY) in the CCM database, as shown in Example 40.5.

For example, the following statements access the CCM database for annual sales data for IBM (GVKEY=6066) and Microsoft (GVKEY=12141):

   LIBNAME myLib sasexccm 'physical-name'
      SETID=250
      GVKEY=6066   /* IBM */
      GVKEY=12141  /* MSFT */
      ITEMLIST='SALE';
   data yrlysale;
      set myLib.annitem;
   run;

When accessing CRSP Stock (STK) data, you select the securities you want to access by specifying their PERMNOs. You specify a PERMNO to include with the PERMNO= option. If no PERMNOs are specified, data for all securities in the database are retrieved. You can use this feature to obtain a list of all PERMNOs in the STK database.

For example, the following statements access the STK database for monthly shares data for IBM (permno=12490) and Microsoft (permno=10107):

   LIBNAME myLib sasexccm 'physical-name'
      SETID=20
      PERMNO=12490   /* IBM */
      PERMNO=10107  /* MSFT */
      ITEMLIST="MSHROUT.*;MSHRFLG.*";
   data mshares_all;
      set myLib.mshares;
   run;

When accessing CRSP Indices (IND) data, you select the security and indices data from the CRSP Daily or Monthly Stock and Indices database by specifying their INDNOs. You specify an INDNO to include with the INDNO= option. If no INDNOs are specified, data for all securities in the database are retrieved. You can use this feature to obtain a list of all INDNOs in the CRSP Stock Indices (IND) database.

For example, the following statements access the IND database for monthly consumer price index data (INDNO=1000709):

   LIBNAME myLib sasexccm 'physical-name'
      SETID=420
      INDNO=1000709  /* Consumer Price Index */
      ITEMLIST=
       "MREBAL.*;MRBBEGDT.*;MRBENDDT.*;MRUSDCNT.*;MMINID.*;MMAXID.*;MMINSTAT.*";

   data mindts_all;
      set myLib.mindhdr;
      set myLib.mrebal;
   run;

To specify the list of data items you want to retrieve, use the ITEMLIST= option. This option accepts a string that denotes a list of interested data items and the reporting format (for example, data format, population source, consolidation level, and so on) in standard CRSP notation using CRSP’s unique mnemonic text name itm_name and the mnemonic tag keyset. For details about CRSP notation, see the section The LIBNAME libref SASEXCCM Statement under the ITEMLIST= option.

After the LIBNAME is assigned, the database is opened. The selected data are organized into groups such as ANNITEM for annual time series data or LINK for event based CRSP/Compustat link data. You can also use the SAS DATA step to perform further subsetting and to store the resulting time series in a SAS data set.

SASEXCCM supports Linux X86 (LNX), Linux X64 (LAX), Solaris X64 (SAX), Solaris SPARC (S64), 32-bit Windows (W32), and 64-bit Windows (WX6).