Attachment 1.1.1 Read-in File 1 (summary) of IBES data
* read summary file (File 1) of IBES data ;
options ls=72 ps=57 ; * obs = 100000 ;
proc format ;
value $periodf
0 = 'LTG '
1 = 'FY 1 '
2 = 'FY 2 '
3 = 'FY 3 '
4 = 'FY 4 '
5 = 'FY 5 '
6 = 'Qtr1 '
7 = 'Qtr2 '
8 = 'Qtr3 '
9 = 'Qtr4 '
A = 'Semi1'
B = 'Semi2'
C = 'Semi3'
D = 'Semi4'
;
data ;
array estis {5} estimed estimean estistdv estihigh estilow ;
infile '/u82/IBES/IBESSUM/1SUM9608' ;
file '/scratch/1SUM9608.raw' ;
if _n_ = 1 then do ;
put 'load data' ;
put 'infile *' ;
put 'into table summary' ;
put 'fields terminated by '','' ' ;
put '(' ;
put 'ticker, ';
put 'statpyy, ';
put 'statpmm,';
put 'foreendy,';
put 'foreendm,';
put 'foreperi,';
put 'numestis,';
put 'numup,';
put 'numdown,';
put 'estimed,';
put 'estimean,';
put 'estistdv,';
put 'estihigh,';
put 'estilow';
put ')' ;
put 'begindata' ;
end ;
input ticker $ 1-6
statpyy 7-8
statpmm 9-10
foreendy 11-12
foreendm 13-14
foreperi $ 15
numestis 16-17
numup 18-19
numdown 20-21
estimed 22-27
estimean 28-33
estistdv 34-39
estihigh 40-45
estilow 46-51
deciloca 52
;
if foreendm = 0 then foreendm = . ;
do i=1 to 5 ;
if estis{i} = -99999 then estis{i} = . ;
estis{i} = estis{i}/(10**deciloca) ;
end ;
put ticker','
statpyy','
statpmm','
foreendy','
foreendm','
foreperi','
numestis','
numup','
numdown','
estimed','
estimean','
estistdv','
estihigh','
estilow
;
format foreperi $periodf. ;
drop i deciloca ;
/* for future possible use*********************
proc print ;
title 'IBES Data' ;
title3 'Summary Statistics' ;
title5 'First 1000 Observations' ;
var ticker
statpyy
statpmm
foreendy
foreendm
foreperi
numestis
numup
numdown
estimed
estimean
estistdv
estihigh
estilow
;
format foreperi $periodf. ;
run ;
********************************************/
This page hosted by
Get your own Free Home Page