Attachment 1.1.2 Read-in File 2 (background) of IBES data
* read background file (File 2) of IBES data ;
libname ibes '$HOME/IBES' ;
options ls=105 ps=57 obs = 1000 ;
proc format ;
value $reportf
I = 'Actual'
R = 'Report'
;
data ibes.backgrnd ;
array vars {4} price fy0aeps qtr0aeps inanndiv ;
infile '/u82/IBES/IBESSUM/2BKG9608' ;
input ticker $ 1-6
statpyy 7-8
statpmm 9-10
deciloca 11
price 12-18
priceday 19-20
shareout 8.3
fy0yy 29-30
fy0mm 31-32
fy0aeps 33-38
fy0rptf $ 39
qtr0yy 40-41
qtr0mm 42-43
qtr0aeps 44-49
qtr0rptf $ 50
inanndiv 51-56
epsgrw5y 5.2
epsstb5y 5.2
;
if shareout = -9999.999 then shareout = . ;
if fy0mm = 0 then fy0mm = . ;
if qtr0mm = 0 then qtr0mm = . ;
if epsgrw5y = -99.99 then epsgrw5y = . ;
if epsstb5y = -99.99 then epsstb5y = . ;
do i=1 to 4 ;
if vars{i} = -99999 then vars{i} = . ;
vars{i} = vars{i}/(10**deciloca) ;
end ;
drop i deciloca ;
proc print ;
title 'IBES Data' ;
title3 'Background Data' ;
title5 'First 1000 Observations' ;
var ticker
statpyy
statpmm
price
priceday
shareout
fy0yy
fy0mm
fy0aeps
fy0rptf
qtr0yy
qtr0mm
qtr0aeps
qtr0rptf
inanndiv
epsgrw5y
epsstb5y
;
format fy0rptf qtr0rptf $reportf. ;
run ;
This page hosted by
Get your own Free Home Page