User’s Guide : EViews Fundamentals : EViews Databases : Working with DRIPro Links
  
Working with DRIPro Links
 
Enabling DRI Access
Creating a Database Link
Understanding the Cache
Configuring Link Options
Dealing with Illegal Names
Issues with DRI Frequencies
Limitations of DRI Queries
Dealing with Common Problems
EViews has the ability to remotely access databases hosted by DRI. Subscribers to DRI DRIPro data services can use these features to access data directly from within EViews.
Although the interface to remote databases is very similar to that of local databases, there are some differences due to the nature of the connection. There are also some issues specifically related to accessing DRI data. The following sections docOnce you have found the series of interest, you may drag-and-drop (or copy-and-paste) the series directly into an EViews workfile in the usual fashion.
ument these differences.
Enabling DRI Access
In order to access DRI data services, you will need to have an active DRIPro account. If you are not an existing DRIPro customer but may be interested in becoming one, you should contact Global Insight for details ( http://www.globalinsight.com).
Access to DRI data will not be possible unless you have already installed and configured the DRIPro server software. If you have difficulties with getting the software to work, you should contact Global Insight directly for technical support.
Creating a Database Link
A remote DRI database is represented in EViews by a database link. A database link resembles a local database, consisting of a set of files on disk, but instead of containing the data itself, a database link contains information as to how to access the remote data. A database link also contains a cache in which copies of recently retrieved objects are kept, which can substantially reduce the time taken to perform some database operations.
You can create a database link by following a similar procedure to that used to create a local database. Select File/New/Database… from the main menu, then select DRIPro Link in the field Database/File Type. The dialog should change appearance so that a number of extra fields are displayed. Enter the name you would like to give the new database link in Cache name/path. You may wish to name the database link after the DRI databank to which it links.
In the Connection name field you should enter the name of the DRIPro connection you would like to use, as it appears in the Connection Settings box in the DRIPro configuration program. If you have only configured a single connection, and have not modified the connection name, the connection name will be DEFAULT, and this will be filled in automatically by EViews if you leave the field blank.
In the DRI Databank field you should input the full name of the DRIPro bank to which you would like to connect, not including any leading “@” sign. For example, to connect to the DRI U.S. Central database, you should enter the name uscen. Each EViews database link may be associated with only one DRI databank, although you can create as many database links as you require.
The Local Password field may be used to set a password that must be entered whenever you wish to use the database link. This should not be confused with your DRIPro username and password, which you must already have provided in the DRIPro configuration program. Accessing a database link which contains a local password will cause a dialog to appear which prompts the user to input the password. Access to the remote database is only provided if the remote password is valid. Leave this field blank if you do not want a password to be attached to the database link.
When you have finished filling in the dialog fields, click on the OK button. A new database will be created and a database window should appear on the screen.
The database link window is very similar to a normal EViews database window. You should be able to perform basic query operations and simple fetching of series without any special instructions. Note, however, that it is not possible to modify a remote DRI database from within EViews, so operations which involve writing to the database have been removed. There are a number of other complications related to dealing with DRIPro databases that are described “Issues with DRI Frequencies”.
Understanding the Cache
A database link includes a cache of recently fetched objects which is used to speed up certain operations on the database. In some circumstances, fetching an object from the database will simply retrieve a copy from the local cache, rather than fetching a fresh copy of the data from the remote site. Even if a fresh copy is retrieved, having a previous copy of the series in the cache can substantially speed up retrieval.
You can regulate the caching behavior of the database link in a number of different ways. The basic option which determines under what circumstances a new copy of the data should be fetched is the days before refresh. If you attempt to fetch an object from the database link, and the copy of the object currently in the cache was fetched more recently than the days before refresh value, then the object currently in the cache will be returned instead of a fresh copy being fetched. For example, if days before refresh is set to one, any object which has already been fetched today will be retrieved from the cache, while any object which has not yet been fetched today will be retrieved from the remote site. Similarly, if days before refresh is set to seven, then an object in the cache must be more than a week old before a new copy of the object will be fetched. If days before refresh is set to zero, then a new copy of the data is fetched every time it is used.
You can change the days before refresh setting by clicking on the Proc button at the top of the database link window, then choosing Link Options… from the pop-up menu. A dialog will appear:
The dialog contains a number of fields, one of which is labeled Days before refreshing objects. Type a new number in the field to change the value.
The same dialog also contains a button marked Reset cache now. This button can be used to modify the behavior documented above. Clicking on the button causes the cache to mark all objects in the cache as out of date, so that the next time each object is fetched, it is guaranteed that a fresh copy will be retrieved. This provides a simple way for you to be certain that the database link will not return any data fetched before a particular time.
The dialog also contains some options for managing the size of the cache. The field marked Maximum cache size in kilobytes can be used to set the maximum size that the cache will be allowed to grow to on disk. If the cache grows above this size, a prompt will appear warning you that the cache has exceeded the limit and asking if you would like to compact the cache. Compacting is performed by deleting objects from oldest to newest until the cache size is reduced to less than three quarters of its maximum size. The cache is then packed to reclaim the empty space.
You can also completely clear the contents of the cache at any time by clicking on the button marked Reset & Clear Cache Now.
You can always examine the current contents of the database cache by clicking on the Cache button at the top of the database link window. This will display the names of all objects currently in the cache.
Configuring Link Options
The Database Link Options dialog also allows you to specify a number of timeout values. In most cases, the default values will behave acceptably. If you believe you are having problems with EViews aborting the connection too early, or you would like to shorten the times so as to receive a timeout message sooner, then enter new values in the appropriate fields.
Connection timeout—is the length of time, in seconds, that EViews will wait for a response when first connecting to DRI. Depending on the type of connection you are making to DRI, this can take a significant amount of time.
Conversation timeout—is the length of time, in seconds, that EViews will wait for a response from DRIPro when carrying out a transaction after a connection has already been made.
The values are attached to a particular database link, and can be reset at any time.
Dealing with Illegal Names
DRI databanks contain a number of series with names which are not legal names for EViews objects. In particular, DRI names frequently contain the symbols “@”, “&” and “%”, none of which are legal characters in EViews object names. We have provided a number of features to allow you to work with these series within EViews.
Because the “@” symbol is so common in DRI names, while the underline symbol (which is a legal character in EViews) is unused, we have hard-coded the rule that all underlines in EViews are mapped into “@” symbols in DRI names when performing operations on an DRI database link. For example, if there is a series with the name JQIMET@UK, you should refer to this series inside EViews as JQIMET_UK. Note that when performing queries, EViews will automatically replace the “@” symbol by an underline in the object name before displaying the query results on the screen. Consequently, if you are fetching data by copying-and-pasting objects from a query window, you do not need to be aware of this translation.
For other illegal names, you should use the object aliasing features (see “Object Aliases and Illegal Names”) to map the names into legal EViews object names.
Issues with DRI Frequencies
DRI databases have a different structure than EViews databases. An EViews database can contain series with mixed frequencies. A DRI database can contain data of only a single frequency. In order that similar data may be grouped together, each DRI databank is actually composed of a series of separate databases, one for each frequency. When working with DRI data from within DRIPro software, you will often have to specify at exactly which frequency a particular series can be found. In some cases, a DRI databank may contain a series with the same name stored at several different frequencies.
Because this approach is inconsistent with the way that EViews works, we have tried to create a simpler interface to DRI data where you do not need to keep track of the frequency of each series that you would like to fetch. Instead, you can simply fetch a series by name or by selecting it from the query window, and EViews will do whatever is necessary to find out the frequency for you.
An ambiguity can arise in doing this, where a series with the same name appears at a variety of different frequencies in the DRI databank. By default, EViews resolves this ambiguity by always fetching the highest frequency data available. EViews will then perform necessary frequency conversions using the standard rules for frequency conversion in EViews (see “Frequency Conversion”).
In many cases, this procedure will exactly replicate the results that would be obtained if the lower frequency data was fetched directly from DRIPro. In some cases (typically when the series in question is some sort of ratio or other expression of one or more series), the figures may not match up exactly. In this case, if you know that the DRI data exists at multiple frequencies and you are familiar with DRI frequency naming conventions, you can explicitly fetch a series from a DRI database at a particular frequency by using a modified form of the command line form of fetch. Simply add the DRI frequency in parentheses after the name of the series. For example, the command:
fetch x(Q) y(A)
will fetch the series X and Y from the current default database, reading the quarterly frequency copy of X and the annual frequency copy of Y. If you request a frequency at which the data are not available, you will receive an error message. You should consult DRI documentation for details on DRI frequencies.
Limitations of DRI Queries
Queries to DRI database links are more limited than those available for EViews databases. The following section documents the restrictions.
First, queries on DRI databases allow only a subset of the fields available in EViews databases to be selected. The fields supported are: name, type, freq, start, end, last_update and description.
Second, the only fields which can be used in “where” conditions in a query on a DRIPro database link are name and description. (EViews does not support queries by frequency because of the ambiguities arising from DRI frequencies noted above).
Each of these fields has only one operator, the “matches” operator, and operations on the two fields can only be joined together using the “and” operator.
The “matches” operator is also limited for queries on DRI databases, matching only a subset of the expressions available for EViews databases. In particular, the pattern expression in a query on an DRI database must either have the form
a or b or … c
or the form
a and b and … c
Mixing of “and” and “or” is not allowed, and the “not” operator is not supported.
Patterns, however, are allowed and follow the normal EViews rules where “?” denotes any single character and “*” denotes zero or more characters.
Sorting of results by field is not supported.
Dealing with Common Problems
As stated in the introduction, you must install and configure the DRIPro software before EViews will be able to connect to DRI. If you cannot connect to DRI using the DRIPro software, you should contact DRI directly for assistance.
Assuming that you have correctly configured your DRIPro connection, in most cases EViews will be able to recover adequately from unexpected problems which arise during a DRIPro session without user intervention. Sometimes this will require EViews to automatically disconnect then reconnect to DRI.
There are some circumstances in which EViews may have problems making a connection. In order to connect to DRI, EViews uses a program written by DRI called DRIprosv. You can tell when this program is running by looking for the icon labeled “DRIpro server” in the Windows taskbar. Because of problems that can arise with multiple connections, EViews will not attempt to use the program if it is already running. Instead, EViews will report an error message “DRI server software already running”. If there is another application which is using the connection to DRI, you can simply close down that program and the DRIPro server software should shut down automatically. If this is not the case, you may have to close down the DRIPro server software manually. Simply click on the icon in the Windows taskbar with the right mouse button, then select Close from the pop-up menu.
You may also use this as a procedure for forcing the DRIPro connection to terminate. Closing down the server software may cause EViews to report an error if it is currently carrying out a database transaction, but should otherwise be safe. EViews will restart the server software whenever it is needed.
Note that running other DRIPro software while EViews is using the DRIPro server software may cause EViews to behave unreliably.