Previous Page | Next Page

The SASEHAVR Interface Engine

The LIBNAME libref SASEHAVR Statement

LIBNAME libref sasehavr ’physical nameoptions ;

The physical name specifies the location of the folder where your HAVER DLX database resides.

The following options can be used in the LIBNAME libref SASEHAVR statement:

FREQ=haver_frequency

specifies the HAVER frequency. All HAVER frequencies are supported by the SASEHAVR engine. Accepted frequency values are annual, year, yearly, quarter, quarterly, qtr, monthly, month, mon, week.1, week.2, week.3, week.4, week.5, week.6, week.7, weekly, week, daily, day.

START=start_date

specifies the start date for the time series in the form YYYYMMDD.

END=end_date

specifies the end date for the time series in the form YYYYMMDD.

KEEP=haver_variables

specifies the list of HAVER variables to be included in the output SAS data set. This list is comma-delimited and must be surrounded by quotes "".

DROP=haver_variables

specifies the list of HAVER variables to be excluded from the output SAS data set. This list is comma-delimited and must be surrounded by quotes "".

GROUP=haver_groups

specifies the list of HAVER groups to be included in the output SAS data set. This list is comma-delimited and must be surrounded by quotes "".

DROPGROUP=haver_groups

specifies the list of HAVER groups to be excluded from the output SAS data set. This list is comma-delimited and must be surrounded by quotes "".

SOURCE=haver_sources

specifies the list of HAVER sources to be included in the output SAS data set. This list is comma-delimited and must be surrounded by quotes "".

DROPSOURCE=haver_sources

specifies the list of HAVER sources to be excluded from the output SAS data set. This list is comma-delimited and must be surrounded by quotes "".

FORCE= FREQ

specifies that the selected variables are to be aggregated to the frequency in the FREQ= option. Aggregation is only supported from a more frequent time interval to a less frequent time interval, such as from weekly to monthly. See Aggregating to Quarterly Frequency Using the FORCE= FREQ Option for sample output and suggested error recovery from attempting a conversion that yields missing values when specifying a higher frequency conversion. This option is ignored if the FREQ= option is not set.

For a more complete discussion of HAVER frequencies and SAS time intervals see the section Mapping HAVER Frequencies to SAS Time Intervals. As an example,

   LIBNAME libref sasehavr 'physical-name'
           FREQ=MONTHLY;

By default, the SASEHAVR engine reads all time series in the HAVER database that you reference when using your SASEHAVR libref. The haver_startdate is specified in the form YYYYMMDD. The start date is used to delimit the data to a specified start date.

For example, to read the time series in the TEST library starting on July 4, 1996, you would specify

   LIBNAME test sasehavr 'physical-name'
           STARTDATE=19960704;

When you use the START= option, you are limiting the range of observations that are read from the time series and that are converted to the desired frequency. Start dates can help you save resources when processing large databases or when processing a large number of observations. It is also possible to select specific variables to be included or excluded from the SAS data set by using the KEEP= or the DROP= option.

   LIBNAME test sasehavr 'physical-name'
           KEEP="ABC*, XYZ??";
   LIBNAME test sasehavr 'physical-name'
           DROP="*SC*, #T#";

When the KEEP= or the DROP= option is used the resulting SAS data set will keep or drop the variables that you select in that option. There are three wildcards currently available: ’*’, ’?’ and ’’. The ’*’ wildcard corresponds to any character string and will include any string pattern that corresponds to that position in the matching variable name. The ’?’ means that any single alphanumeric character is valid. And finally, the ’’ wildcard corresponds to a single numeric character. You can also select time series in your data by using the GROUP= or the SOURCE= option to select on GROUP name or on SOURCE name. Alternatively, you can deselect time series by using the DROPGROUP= or the DROPSOURCE= option.

   LIBNAME test sasehavr 'physical-name'
           GROUP="CBA, *ZYX";
   LIBNAME test sasehavr 'physical-name'
           DROPGROUP="TKN*, XCZ?";
   LIBNAME test sasehavr 'physical-name'
           SOURCE="FRB";
   LIBNAME test sasehavr 'physical-name'
           DROPSOURCE="NYSE";

SASEHAVR selects only the variables that are of the specified frequency in the FREQ= option. If this option is not specified, SASEHAVR selects the variables that match the frequency of the first selected variable. If no other selection criterion are specified, by default, the first selected variable is the first physical DLXRecord read from the HAVER database. The FORCE= FREQ option can be specified to force the aggregation of all variables selected to be of the frequency specified in the FREQ= option. Aggregation is only supported from a more frequent time interval to a less frequent time interval, such as from weekly to monthly. See Aggregating to Quarterly Frequency Using the FORCE= FREQ Option for suggested recovery from using a frequency that does not aggregate the data appropriately. The FORCE= option is ignored if the FREQ= option is not specified.

Previous Page | Next Page | Top of Page