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
6066 |
STD |
20001229 |
88396.0000 |
88396.0000 |
36406.0000 |
6066 |
STD |
20011231 |
85866.0000 |
85866.0000 |
35119.0000 |
6066 |
STD |
20021231 |
81186.0000 |
81186.0000 |
34550.0000 |
6066 |
STD |
20031231 |
89131.0000 |
89131.0000 |
37900.0000 |
6066 |
STD |
20041231 |
96293.0000 |
96293.0000 |
39798.0000 |
6066 |
STD |
20051230 |
91134.0000 |
91134.0000 |
35152.0000 |
6066 |
STD |
20061229 |
91424.0000 |
91424.0000 |
40091.0000 |
6066 |
STD |
20071231 |
98786.0000 |
98786.0000 |
44310.0000 |
12141 |
STD |
20000630 |
22956.0000 |
22956.0000 |
9755.0000 |
12141 |
STD |
20010629 |
25296.0000 |
25296.0000 |
11132.0000 |
12141 |
STD |
20020628 |
28365.0000 |
28365.0000 |
12744.0000 |
12141 |
STD |
20030630 |
32187.0000 |
32187.0000 |
13974.0000 |
12141 |
STD |
20040630 |
36835.0000 |
36835.0000 |
14969.0000 |
12141 |
STD |
20050630 |
39788.0000 |
39788.0000 |
16877.0000 |
12141 |
STD |
20060630 |
44282.0000 |
44282.0000 |
22442.0000 |
12141 |
STD |
20070629 |
51122.0000 |
51122.0000 |
23754.0000 |
6066 |
19923 |
CB |
Samuel J. Palmisano |
6066 |
19923 |
CE |
Samuel J. Palmisano |
6066 |
19923 |
DI |
Samuel J. Palmisano |
6066 |
19923 |
PR |
Samuel J. Palmisano |
6066 |
145583 |
CR |
Timothy S. Shaughnessy |
6066 |
145583 |
VP |
Timothy S. Shaughnessy |
6066 |
145584 |
CF |
Mark Loughridge |
6066 |
145584 |
SP |
Mark Loughridge |
6066 |
167114 |
EP |
Nicholas M. Donofrio |
12141 |
64144 |
CB |
William H. Gates III |
12141 |
64144 |
DI |
William H. Gates III |
12141 |
64147 |
CE |
Steven A. Ballmer |
12141 |
64147 |
DI |
Steven A. Ballmer |
12141 |
152605 |
CF |
Christopher P. Liddell |
12141 |
152605 |
SP |
Christopher P. Liddell |
12141 |
175292 |
CO |
Brian Kevin Turner |
Copyright © SAS Institute Inc. All rights reserved.