Re: Pathname for SPERFORM
Posted in 1994
>From: walt@mathcs.emory.edu (Walt Hultgren {rmy}) >Subject: Re: Pathname for SPERFORM >Date: 23 Aug 1994 13:45:33 -0400 >X-Informix-List-Id: <news.8326> > >dennisp@informix.com (Dennis Pimple) writes: >>Just to clarify a bit: sperform and sacego will look in current >>directory first, then in each directory of DBPATH for the appropriate >>.frm/.arc file. > >I just verified that this is indeed the case under ISQL 4.11.UC1 and >SE 5.01.UC1. I'm usually pretty good about reading all documentation, but >I confess that I missed this point. I guess I assumed that since the >environment variable was named *PATH, it would act like the shell's PATH. > >What's the rationale behind initially ignoring DBPATH? Am I correct in >assuming that if I inadvertently cd to the parent directory of my production >database, I will be working against it even though DBPATH contains only the >absolute pathname(s) of my test directory structure? > >I suggest that a better approach would be to use the current directory if >DBPATH is not set, or use *only* DBPATH exactly as set if it is non-null. >Is anyone making specific use of the fact that the current directory is >always checked regardless of DBPATH's value? FYI: Bug B11568 is currently about the top of the list I have to work on. A shortened version of the bug report is attached. Basically, it says that if your SE database is located in /some/where/dbase.dbs, the only forms, reports, SQL scripts, etc which are shown after the database is selected are those in /some/where, regardless of DBPATH. And in OnLine, since it cannot locate your database in a directory, it works only with the current directory. I haven't experimented, but I suspect from a brief code inspection that if you have a database under both SE and OnLine, and you choose the OnLine version, then you get to see the forms etc in the directory where the SE version of the database is located. The rationale behind always searching the current directory first is that the current directory is where any forms -- or reports, or scripts -- which are created or compiled by the current session are saved, and it would very annoying to create a form and then not be able to run it. I am unable to fix the code which always scans '.' before scanning any other directory (because it isn't under my control), so that behaviour is with us for the foreseeable future. I also consider this behaviour to be correct given the rationale above, and the fact that it is documented, and always has been. (As a matter of idle fact, the behaviour described by B11568 as a bug has also been documented for a long time, but that is a case of mistaken functionality). I am expecting to get this bug fixed so that ISQL always follows the contents of DBPATH, regardless of whether it is an OnLine or SE database which is in use, but there will always be an implicit '.' in front of the PATH. You have a minimal opportunity to comment on this proposed fix. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> BUG NUMBER 11568 08/23/94 Product: ISQL Date: 11/04/91 Type: SW DBPATH NOT USED TO LIST FORMS AND REPORTS FOR SELECTED DATABASE When a user has an OnLine database selected and has forms and reports, associated with this database, located in a directory noted in the DBPATH, these forms and reports should appear on the screen when the user goes to run or modify a form or report. Instead, only the forms or reports in the current directory appear, regardless of whether they are associated with the database or not. Jonathan Leffler notes: ISQL is not going to detect whether the form or report is intended to be used with the current database or not, but it should list all the forms or reports in any directory on DBPATH at all times.