filePro / environment variables / putenv

Kenneth Brody kenbrody at bestweb.net
Tue Mar 22 08:36:51 PST 2005


Let me clarify something about filePro's use of environment/config variables
and the PUTENV statement.

When filePro starts, it reads the config file once.  If someone were to edit
the file afterwards, any running filePro program will not see any of those
changes.

For most variables, filePro reads its value only once, the first time it
needs to use it.  If you use PUTENV to set/change the value of a variable
prior to filePro's first look at it, filePro will see the new value.

For example, TEXTNORMAL is needed immediately upon startup, so using PUTENV
to change it will have no effect on the current program.  (It will, of
course, affect anything run via SYSTEM.)

However, PFONEHEAD is not needed until filePro needs to print a page header.
Therefore, using PUTENV to change its value prior to anything being printed,
such as in @ONCE or while processing the very first output record, will have
the desired effect.

I happen to use a similar setting myself.  I have an import process that
needs to import a text file with very long lines.  In my @ONCE event, I have
a PUTENV "PFIMPBUF","32000" to ensure that PFIMPBUF is set, regardless of
any config file setting.

-- 
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody        | www.hvcomputer.com |                             |
| kenbrody/at\spamcop.net | www.fptech.com     | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <mailto:ThisIsASpamTrap at gmail.com>


More information about the Filepro-list mailing list