The SASEXCCM Interface Engine

Example 51.1 Retrieving SALE Data for One GVKEY

This simple example shows how to retrieve SALE data for one particular GVKEY=6066 (IBM). Because the ITEMLIST= option does not specify a keyset, the default (standard) keyset, KEYSET_TAG=STD, is selected. For brevity, a subset of the data that contains the most recent figures is specified by the WHERE statement.

title 'Retrieve SALE data for IBM';
libname _all_ clear;

libname crsp sasexccm "\\bb04smb01\thirdparty\lnx\crspdata\cmz201201\"
   setid=250
   gvkey=6066
   itemlist="sale";

data recentsales;
    set crsp.annitem;
    where datadate >= '1jan2000'd;

proc print data=recentsales;
run;

Output 51.1.1: SALE Data for GVKEY=6066

Retrieve SALE data for IBM

Obs KYGVKEY KEYSET_TAG DATADATE SALE
1 6066 STD 20001229 88396.0000
2 6066 STD 20011231 85866.0000
3 6066 STD 20021231 81186.0000
4 6066 STD 20031231 89131.0000
5 6066 STD 20041231 96293.0000
6 6066 STD 20051230 91134.0000
7 6066 STD 20061229 91424.0000
8 6066 STD 20071231 98786.0000
9 6066 STD 20081231 103630.0000
10 6066 STD 20091231 95758.0000
11 6066 STD 20101231 99871.0000