GLOBAL INSIGHT:DRI/McGraw-Hill Format CITIBASE Files with RANGE Option


/*--------------------------------------------------------------

                    SAS Sample Library

        Name: datex04d.sas
 Description: Example program from SAS/ETS User's Guide,
              The DATASOURCE Procedure

   Title: GLOBAL INSIGHT:DRI/McGraw-Hill Format CITIBASE Files with RANGE Option
 Product: ETS  SAS/ETS Software                               
  System: ALL                                                 
    Keys: DATASOURCE  data extraction from various sources    
   Procs: DATASOURCE                                          
    Data: sasmisc: citidem.dat (DATASOURCE database files)    
   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 citidem.dat file. 
          To assign a fileref to the external file to be processed,
          use the following form of the filename statement:

filename citidemo "%sysget(DATASRC_DATA)citidem.dat" RECFM=D LRECL=80;
--------------------------------------------------------------*/

filename citidemo "%sysget(DATASRC_DATA)citidem.dat" RECFM=D LRECL=80;
proc datasource filetype=citibase infile=citidemo interval=week
                outby=keyrange out=citiout outselect=on;
   keep WSP:;
   range from '01dec1990'd;
run;

title1 'Summary Information on Weekly Data for CITIDEMO File';
proc print data=keyrange;
run;

title1 'Weekly Data in CITIDEMO File';
proc print data=citiout;
run;