18.4.15 TPTH Parameter

This path is used to keep LANSA temporary files together. For example, the import.log, export.log and x_err.log.

TPTH's behaviour is changed in V15: it is no longer looking for TEMP or TMP environment variables. The temporary path evaluation depends on the platform.

The temporary path directory is resolved in the following order:

1.  TPTH x_run parameter, in any of the accepted locations for an x_run parameter.

2.  Try to create the temporary directory, depending on the platform:

   Windows: "<rootdir>/tmp" directory.

   Other platforms: "<sysdir>/tmp" directory.

3.  Try to use the existing directory, depending on the platform:

   On Linux: /tmp

   On other platforms: <sysdir>

4.  It should never get here, but if it does, a Fatal error occurs. Interactive jobs will show a message box and server jobs will output a message to STDOUT. On Windows the Listener can be run as a process rather than as a service to see these messages (lcolist –sstop; lcolist –c –d –x)

For example

On Windows, LANSA installed under "c:\program files\lansa":

   <sysdir> under 64bit is "c:\program files\lansa\x_win64\x_lansa"

   <sysdir> under 32bit is "c:\program files\lansa\x_win95\x_lansa"

   <rootdir> is "c:\program files\lansa"

Enclosing double quotes and all trailing path separators and blanks are stripped before validating the directory.

If the directory does not exist then an attempt will be made to create it. If it fails then the next step is used.

On Linux and IBM i, the log directory follows the same path as the temporary directory on Windows. That is:

1.  LOGDIR environment variable

2.  <sysdir>/log directory, if it exists or if it can be created

3.  <sysdir>