The SASEXCCM Interface Engine

Example 51.5 Retrieving All GVKEYs and Company Names

This example shows how to retrieve the GVKEY and name for every company in the CCM database.

title 'Retrieve All GVKEYs and Company Names';
libname _all_ clear;

libname crsp sasexccm "\\bb04smb01\thirdparty\lnx\crspdata\cmz201201\"
  setid=250
  itemlist="company";

proc contents data=crsp.company;
proc print data=crsp.company(keep=kygvkey conm obs=20);
run;

For brevity, only the first 20 observations are shown, and only KYGVKEY and CONM are kept in Output 51.5.1.

Output 51.5.1: First 20 GVKEYS and Company Names

Retrieve All GVKEYs and Company Names

The CONTENTS Procedure

Data Set Name CRSP.COMPANY Observations .
Member Type DATA Variables 38
Engine CRSPCCM Indexes 0
Created 03/02/2015 16:30:33 Observation Length 3232
Last Modified 03/02/2015 16:30:33 Deleted Observations 0
Protection   Compressed NO
Data Set Type   Sorted NO
Label      
Data Representation Default    
Encoding Default    

Alphabetic List of Variables and Attributes
# Variable Type Len Format Informat Label
33 ADD1 Char 68 65. 65. ADD1
34 ADD2 Char 68 65. 65. ADD2
35 ADD3 Char 68 65. 65. ADD3
36 ADD4 Char 68 65. 65. ADD4
37 ADDZIP Char 24 24. 24. ADDZIP
38 BUSDESC Char 2000 2000. 2000. BUSDESC
2 CIK Char 12 10. 10. CIK
20 CITY Char 104 104. 104. CITY
5 CONM Char 256 255. 255. CONM
29 CONML Char 104 100. 100. CONML
7 COSTAT Char 4 1. 1. COSTAT
19 COUNTY Char 104 100. 100. COUNTY
9 DLDTE Num 8 8. 8. DLDTE
10 DLRSN Char 12 8. 8. DLRSN
3 EIN Char 12 10. 10. EIN
32 FAX Char 24 18. 18. FAX
15 FIC Char 16 3. 3. FIC
6 FYRC Num 8 2. 2. FYRC
24 GGROUP Char 12 4. 4. GGROUP
25 GIND Char 12 6. 6. GIND
23 GSECTOR Char 12 2. 2. GSECTOR
26 GSUBIND Char 12 8. 8. GSUBIND
14 IDBFLAG Char 12 1. 1. IDBFLAG
17 INCORP Char 12 8. 8. INCORP
8 IPODATE Num 8 8. 8. IPODATE
1 KYGVKEY Num 8 6. 6. GVKEY
16 LOC Char 4 3. 3. LOC
22 NAICS Char 8 6. 6. NAICS
31 PHONE Char 24 18. 18. PHONE
12 PRICAN Char 12 8. 8. PRICAN
13 PRIROW Char 12 8. 8. PRIROW
11 PRIUSA Char 12 8. 8. PRIUSA
21 SIC Num 8 4. 4. SIC
27 SPCINDCD Num 8 4. 4. SPCINDCD
28 SPCSECCD Num 8 4. 4. SPCSECCD
18 STATE Char 12 8. 8. STATE
4 STKO Num 8 1. 1. STKO
30 WEBURL Char 68 60. 60. WEBURL

Retrieve All GVKEYs and Company Names

Obs KYGVKEY CONM
1 1000 A & E PLASTIK PAK INC
2 1001 A & M FOOD SERVICES INC
3 1002 AAI CORP
4 1003 A.A. IMPORTING CO INC
5 1004 AAR CORP
6 1005 A.B.A. INDUSTRIES INC
7 1006 ABC INDS INC
8 1007 ABKCO INDUSTRIES INC
9 1008 ABM COMPUTER SYSTEMS INC
10 1009 ABS INDUSTRIES INC
11 1010 ACF INDUSTRIES HOLDING CORP
12 1011 ACS ENTERPRISES INC
13 1012 ACS INDUSTRIES INC
14 1013 ADC TELECOMMUNICATIONS INC
15 1014 ADDSCO INDUSTRIES INC
16 1015 ADI ELECTRONICS INC
17 1016 AEC INC
18 1017 AEL INDUSTRIES -CL A
19 1018 AES TECHNOLOGY SYSTEMS INC
20 1019 AFA PROTECTIVE SYSTEMS INC