Object Reference : Object View and Procedure Reference : Pool
  
 
fetch
Fetch objects from databases or databank files into the workfile.
fetch reads one or more objects from EViews databases or databank files into the active workfile. The objects are loaded into the workfile using the object in the database or using the databank file name. EViews will first expand the list of series using the pool operator, and then perform the fetch.
If you fetch a series into a workfile with a different frequency, EViews will automatically apply the frequency conversion method attached to the series by setconvert. If the series does not have an attached conversion method, EViews will use the method set by Options/Date-Frequency in the main menu. You can override the conversion method by specifying an explicit conversion method option.
Syntax
pool_name.fetch(options) pool_ser1 [pool_ser2 pool_ser3 ...]
The fetch command keyword is followed by a list of object names separated by spaces. The default behavior is to fetch the objects from the default database (this is a change from versions of EViews prior to EViews 3.x where the default was to fetch from individual databank files).
You can precede the object name with a database name and the double colon “::” to indicate a specific database source. If you specify the database name as an option in parentheses (see below), all objects without an explicit database prefix will be fetched from the specified database. You may optionally fetch from individual databank files or search among registered databases.
You may use wild card characters, “?” (to match a single character) or “*” (to match zero or more characters), in the object name list. All objects with names matching the pattern will be fetched.
To fetch from individual databank files that are not in the default path, you should include an explicit path. If you have more than one object with the same file name (for example, an equation and a series named CONS), then you should supply the full object file name including identifying extensions.
Options
 
d=db_name
Fetch from specified database.
d
Fetch all registered databases in registry order.
i
Fetch from individual databank files.
notifyillegal
When in a program, report illegal EViews object names. By default, objects with illegal names are automatically renamed. (Has no effect in the command window.)
prompt
Force the dialog to appear from within a program.
The database specified by the double colon “::” takes precedence over the database specified by the “d=” option.
In addition, there are a number of options for controlling automatic frequency conversion when performing a fetch. The following options control the frequency conversion method when copying series and group objects to a workfile, converting from low to high frequency:
 
c=arg
Low to high conversion methods: “r” (constant match average), “d” (constant match sum), “q” (quadratic match average), “t” (quadratic match sum), “i” (linear match last), “c” (cubic match last).
The following options control the frequency conversion method when copying series and group objects to a workfile, converting from high to low frequency:
 
c=arg
High to low conversion methods removing NAs: “a” (average of the nonmissing observations), “s” (sum of the nonmissing observations), “f” (first nonmissing observation), “l” (last nonmissing observation), “x” (maximum nonmissing observation), “m” (minimum nonmissing observation).
High to low conversion methods propagating NAs: “an” or “na” (average, propagating missings), “sn” or “ns” (sum, propagating missings), “fn” or “nf” (first, propagating missings), “ln” or “nl” (last, propagating missings), “xn” or “nx” (maximum, propagating missings), “mn” or “nm” (minimum, propagating missings).
If no conversion method is specified, the series-specific or global default conversion method will be employed.
Examples
To fetch M1, GDP, and UNEMP pool series from the default database, use:
pool1.fetch m1? gdp? unemp?
To fetch M1 and GDP from the US1 database and UNEMP from the MACRO database, use the command:
pool1.fetch(d=us1) m1? gdp? macro::unemp
Use the “notifyillegal” option to display a dialog when fetching the series MYILLEG@LNAME that will suggest a valid name and give you to opportunity to name the object before it is inserted into a workfile:
pool2.fetch(notifyillegal) myilleg@lname
Cross-references
See “EViews Databases” for a discussion of databases, databank files, and frequency conversion. Appendix A. “Wildcards” describes the use of wildcard characters.
See also Series::setconvert, Pool::store, and Pool::store.