Example 39.4 Retrieving Items with Global Options

This example shows how to retrieve data on total assets (ATQ) and after tax gain or loss (GLAQ) with the global option for turning on footnote items, which uses the following syntax:

   ITEMLIST="f:itm_name1;itm_name2;....itm_nameN"

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 data for IBM with Footnotes';
libname _all_ clear;

libname crsp sasexccm "%sysget(CRSP_CCM)"
  setid=250
  gvkey=6066
  itemlist="f:atq;glaq";

data recent;
    set crsp.qtritem;
    where datadate >= '1jan2004'd;

proc print data=recent;
run;

Output 39.4.1 Data Items with Footnotes
Retrieve data for IBM with Footnotes

Obs KYGVKEY KEYSET_TAG DATADATE ATQ ATQ_FN1 GLAQ GLAQ_FN
1 6066 STD 20040331 101825.0000 JR .  
2 6066 STD 20040630 99582.0000 JR .  
3 6066 STD 20040930 100676.0000 JR .  
4 6066 STD 20041231 109183.0000 JR .  
5 6066 STD 20050331 104899.0000   .  
6 6066 STD 20050630 103388.0000   732.5550 NC
7 6066 STD 20050930 101009.0000   0.0000 NC
8 6066 STD 20051230 105748.0000   0.0000 NC
9 6066 STD 20060331 102468.0000   .  
10 6066 STD 20060630 103377.0000   .  
11 6066 STD 20060929 104155.0000   .  
12 6066 STD 20061229 103234.0000   29.2500 NR
13 6066 STD 20070330 101619.0000   .  
14 6066 STD 20070629 102548.0000   81.0000  
15 6066 STD 20070928 108609.0000   0.0000  
16 6066 STD 20071231 120431.0000   0.0000  
17 6066 STD 20080331 121823.0000   .  


Note: This procedure is experimental.