Example 39.2 Retrieving SALE Data for Multiple Companies

This example shows how to retrieve several data items for several GVKEYs. Note how the item offtitl is not an annual item and is stored in its own member. The default (standard) keyset is used for all items. For brevity, a subset of the data with the most recent figures is specified by the WHERE statement.

title 'Retrieve Sales, Revenue, Liabilities, and Officer data for IBM and MSFT';
libname _all_ clear;

libname crsp sasexccm "%sysget(CRSP_CCM)"
   setid=250
   gvkey=6066
   gvkey=12141
   itemlist="sale;revt;lct;offtitl";

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

proc print data=recentannitems;
proc print data=crsp.offtitl;
run;

Output 39.2.1 Data Items for IBM and Microsoft
Retrieve Sales, Revenue, Liabilities, and Officer data for IBM and MSFT

Obs KYGVKEY KEYSET_TAG DATADATE SALE REVT LCT
1 6066 STD 20001229 88396.0000 88396.0000 36406.0000
2 6066 STD 20011231 85866.0000 85866.0000 35119.0000
3 6066 STD 20021231 81186.0000 81186.0000 34550.0000
4 6066 STD 20031231 89131.0000 89131.0000 37900.0000
5 6066 STD 20041231 96293.0000 96293.0000 39798.0000
6 6066 STD 20051230 91134.0000 91134.0000 35152.0000
7 6066 STD 20061229 91424.0000 91424.0000 40091.0000
8 6066 STD 20071231 98786.0000 98786.0000 44310.0000
9 12141 STD 20000630 22956.0000 22956.0000 9755.0000
10 12141 STD 20010629 25296.0000 25296.0000 11132.0000
11 12141 STD 20020628 28365.0000 28365.0000 12744.0000
12 12141 STD 20030630 32187.0000 32187.0000 13974.0000
13 12141 STD 20040630 36835.0000 36835.0000 14969.0000
14 12141 STD 20050630 39788.0000 39788.0000 16877.0000
15 12141 STD 20060630 44282.0000 44282.0000 22442.0000
16 12141 STD 20070629 51122.0000 51122.0000 23754.0000

Retrieve Sales, Revenue, Liabilities, and Officer data for IBM and MSFT

Obs KYGVKEY OFID OFCD OFNM
1 6066 19923 CB Samuel J. Palmisano
2 6066 19923 CE Samuel J. Palmisano
3 6066 19923 DI Samuel J. Palmisano
4 6066 19923 PR Samuel J. Palmisano
5 6066 145583 CR Timothy S. Shaughnessy
6 6066 145583 VP Timothy S. Shaughnessy
7 6066 145584 CF Mark Loughridge
8 6066 145584 SP Mark Loughridge
9 6066 167114 EP Nicholas M. Donofrio
10 12141 64144 CB William H. Gates III
11 12141 64144 DI William H. Gates III
12 12141 64147 CE Steven A. Ballmer
13 12141 64147 DI Steven A. Ballmer
14 12141 152605 CF Christopher P. Liddell
15 12141 152605 SP Christopher P. Liddell
16 12141 175292 CO Brian Kevin Turner


Note: This procedure is experimental.