n is either 1 (true) or 0 (false). The default value is 0.
This parameter has been retained for compatibility, but should not be used when building new applications.
SwitchOSdir specifies what happens to the current working directory (for accessing files by relative pathname, etc.) when you switch to a different namespace. When SwitchOSdir is enabled (n = 1), if you change namespaces, the current working directory remains unaltered no matter what namespace you switch to.
When this parameter is not enabled, if you change namespaces, the current working directory is changed to the directory of the default dataset for non-% globals of the new namespace. However, if this dataset is remote (networked to a different system), the current working directory is left unchanged.
For example, suppose SwitchOSdir is set to 1, or SwitchOSdir is set to 0 and the dataset is remote. In these cases, the current working directory does not change automatically as a result of changing the namespace, but you can always change the current working directory programmatically.
Changing This Parameter
On the Compatibility page of the Management Portal (System Administration > Configuration > Additional Settings > Compatibility), in the SwitchOSDir row, click Edit. Select SwitchOSDir to enable this setting.
Instead of using the Management Portal, you can change SwitchOSDir in the Config.MiscellanousOpens in a new tab class (as described in the class reference) or by editing the CPF with a text editor.
To change this parameter for a single process only (as opposed to instance-wide), use the SwitchOSDir()Opens in a new tab method of the %SYSTEM.ProcessOpens in a new tab class. See the class reference for details.