The CLOSE command

Jeff Harrison jeffaharrison at yahoo.com
Thu Feb 16 09:26:52 PST 2006


--- Howard Wolowitz <howiewz at beonthenet.com> wrote:

> If I do lookups to multiple files using the same
> lookup name (a common 
> practice at Aljex) and then I issue a CLOSE for that
> lookup name - what 
> happens?
> 
> Do all the lookup files get closed or only the last
> one to use that name?
> 
> Example:
> 
> lookup pro=1disp ....
> gosub process
> lookup pro=2disp ...
> gosub process
> lookup pro=3disp
> gosub process
> close pro
> 
> Howie
> 
> 

Interesting question.  I assumed all would be closed,
but I did a quick test using the 5.0.10D9 DEMO for
Windows.  The system array @allfiles[] shows that only
files associated with the last lookup of that name get
closed.

Here is the code I used to test this.  (I even tried
two consecutive closes but it had no effect).

::ky="":
::lookup pro = file1 k=ky i=a -ng:
::lookup pro = file2 k=ky i=a -ng:
::lookup pro = file3 r=("1") -n:
::a = listbox(@allfiles):
::close pro:
::close pro:
::a = listbox(@allfiles):

So, that begs the question, "How do you close those
other files?"  Or, "Is the @allfiles array inaccurate,
or misleading?"

Jeff Harrison
jeffaharrison at yahoo.com

Author of JHExport and JHImport.  The easiest and
fastest ways to generate code for filePro exports and imports.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Filepro-list mailing list