PLB_CURDIR Keyword
PLBWIN, PLBCE or PLBLinux
PLB_CURDIR={directory}
This optional keyword allows specification of the current working directory. The need for the PLB_CURDIR directory is to address a Windows OS multiple thread issue where a change to the current working directory affects all of the threads. This problem can occur for the Application Server or the Automation Server when a PL/B application requires unique working directories for all threads.
When the PL/B current directory is set, the runtime will perform the following actions when executing a program:
The PL/B current directory is the default directory for all OPEN or PREP operations when a path is not specified in the file name.
The PL/B current directory is the default directory when an BATCH, EXECUTE or ROLLOUT instruction is executed.
When the PL/B current directory is specified, the PATH CHANGE instruction will only change the PL/B current directory. If the PL/B current directory is not specified and a PATH CHANGE is executed, only the OS working directory is set.
When the PL/B current directory is specified, the PATH CURRENT instruction will return the PL/B current directory. If the PL/B current directory is not specified, the PATH CURRENT returns the current operating system working directory.
When the PL/B current directory is specified, the PATH CREATE instruction will use the PL/B current directory when the user specified string does not specify a pathed name.
When the PL/B current directory is specified, the PATH DELETE instruction will use the PL/B current directory when the user specified string does not specify a pathed name.
Note that in addition to this keyword the GETMODE and SETMODE instructions may be used or the runtime's 'z' command line option.
Example:
See Also: PLBWIN Keywords, Compiler and Runtime Options
![]() |