You've stumbled upon one of our "gray" areas when it comes to default name handling. Our COPY documentation currently states:
Code: Select all
When parts of the source or destination specification are not provided, EViews will fill in default values where possible. The default container is the active workfile, unless the “::” prefix is used in which case the default container is the default database. The default page within a workfile is always the active page. The default name for the destination object is the name of the object within the source container.
Even though your particular call to COPY uses a very specific file path to your source workfile, the way our code was designed is that the COPY operation first looks for open workfiles that match the specified filename. If not found, it looks for databases (and aliases) that match the specified name. And unfortunately (or fortunately, depending on who you ask), our EViews database interface supports reading from EViews workfiles (thus we can treat a specific EViews workfile as an EViews database, but only to limited degree).
Thus our code then "opens" the source workfile, but only as an EViews database, with limited object support. This specifically means you can only read series, groups, vectors, matrices, and scalar objects.
We realize that in our attempt to make the COPY operation more flexible (by being able to read from databases) but then also adding support to treat a workfile as a database, we inadvertently created the expectation amongst our users that the COPY operation would work for workfiles that are not open. Our COPY operation was not originally designed with this in mind and thus when you try to do this, you are limited to the objects I mentioned above.
To clear up this confusion, most likely we will have to add support to copy objects from an unopened workfile in the near future, but for now I would explicitly leave open (or re-open) any workfiles you wish to use as a copy source, especially if you need to copy complex objects such as an equation object.