/* the transport file for creating datafmt */ filename sascat 'path to\datafmt.trp'; /* where you want the datafmt catalog to be stored */ libname lib1 'path to where you want to store the catalog'; /*- convert transport file, sascat, back to catalog, datafmt ---*/ proc cimport catalog=lib1.datafmt file=sascat; run; /* After running the code above and verifying you have all 12 dataformats, */ /* run the code below to test everything out */ filename calfile 'path to\calfile.bin'; filename secfile 'path to\sec2005.bin'; libname out 'where you want datasets stored'; proc datasource filetype=cry2dus c=lib1.datafmt infile=(calfile secfile) interval=day out=out.crspvar outkey=out.crspkey outevent=out.crspev; keep _all_; keepevent _all_; run; proc print data=out.crspkey; run; title4 "Partial Listing of OUT= Data Set for cusip='45920010'"; proc print data=out.crspvar( where=(cusip='45920010' and ( (date between '03may86'd and '09may87'd) or (date between '23dec86'd and '30dec87'd) )) ); run; title4 "Partial Listing of OUT= Data Set for cusip='45920010'"; proc print data=out.crspvar( where=(cusip='45920010' and ( (date between '30jun95'd and '07jul95'd) or (date between '30mar95'd and '07apr95'd) or (date between '23dec05'd and '30dec05'd) )) ); run; title4 'Partial Listing of OUTEVENT= Data Set'; proc print data=out.crspev( where=(cusip in ('45920010')) ); run; proc datasource filetype=cry2dui c=lib1.datafmt infile=calfile interval=day out=out.calvar; run; proc print data=out.calvar(firstobs=21260 obs=21269); run; proc datasource filetype=cry2dus c=lib1.datafmt infile=(calfile secfile) interval=day out=out.crspvar outkey=out.crspkey outevent=out.crspev; keep _all_; keepevent _all_; run; proc print data=out.crspkey; run; title4 "Partial Listing of OUT= Data Set for cusip='45920010'"; proc print data=out.crspvar( where=(cusip='45920010' and ( (date between '03may86'd and '09may87'd) or (date between '23dec86'd and '30dec87'd) )) ); run; title4 "Partial Listing of OUT= Data Set for cusip='45920010'"; proc print data=out.crspvar( where=(cusip='45920010' and ( (date between '30jun95'd and '07jul95'd) or (date between '30mar95'd and '07apr95'd) or (date between '23dec05'd and '30dec05'd) )) ); run; title4 'Partial Listing of OUTEVENT= Data Set'; proc print data=out.crspev( where=(cusip in ('45920010')) ); run;