CRSP Daily NYSE/AMEX Combined Stocks
/*--------------------------------------------------------------
SAS Sample Library
Name: datex09.sas
Description: Example program from SAS/ETS User's Guide,
The DATASOURCE Procedure
Title: CRSP Daily NYSE/AMEX Combined Stocks
Product: SAS/ETS Software
System: ALL
Keys: DATASOURCE data extraction from various sources
Procs: DATASOURCE
Data: sasmisc: dxccal95.dat (DATASOURCE database files)
dxcsub95.dat
Notes: Read this before you run this sample.
The database resides in the ets/sasmisc folder. You
must copy the database to a writeable folder before
using it. Then define your Windows system environment
variable, DATASRC_DATA, to the path of your
writeable folder containing
the dxccal95.dat and dxcsub95.dat files.
To assign a fileref to the external file to be processed,
use the following filename statement:
filename dxci "%sysget(DATASRC_DATA)dxccal95.dat" RECFM=F LRECL=130;
filename dxc "%sysget(DATASRC_DATA)dxcsub95.dat" RECFM=F LRECL=400;
--------------------------------------------------------------*/
filename dxci "%sysget(DATASRC_DATA)dxccal95.dat" RECFM=F LRECL=130;
filename dxc "%sysget(DATASRC_DATA)dxcsub95.dat" RECFM=F LRECL=400;
/*--- create output data sets from character format DX files ---*/
/*- create securities output data sets using DATASOURCE -------*/
/*- statements -*/
proc datasource filetype=crspdcs ascii
infile=( dxci dxc )
interval=day
outcont=dxccont
outkey=dxckey
outall=dxcall
out=dxc
outevent=dxcevent
outselect=off;
range from '15aug95'd to '28aug95'd ;
where cusip in ('12709510','35614220');
run;
title1 'Date Range 15aug95-28aug95 ';
title3 'DX Security File Outputs';
title4 'OUTKEY= Data Set';
proc print data=dxckey;
run;
title4 'OUTCONT= Data Set';
proc print data=dxccont;
run;
title4 "Listing of OUT= Data Set for cusip in ('12709510','35614220')";
proc print data=dxc;
run;
title4 "Listing of OUTEVENT= Data Set for cusip in ('12709510','35614220')";
proc print data=dxcevent;
run;