n is either 1 (true) or 0 (false). The default value is 0.
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.Miscellanous class (as described in the class reference) or by editing the CPF in a text editor (as described in the Editing the Active CPF section of the “Introduction to the Configuration Parameter File” chapter in this book).