n is either 1 (true) or 0 (false). The default value is 0.
When FileMode is enabled (n = 1), if a file that does not exist is opened for reading or writing, a new file is created. When this parameter is not enabled, a new file is not created (unless specified in the OPEN command parameters).
Suppose InterSystems IRIS® data platform encounters an OPEN command such as:
When FileMode=1 the new file is created automatically, even though the “N” parameter is not specified with the OPEN command. The result when FileMode=1 is equivalent to adding the N parameter to each OPEN command, so that the above OPEN command is equivalent to:
On the other hand, when InterSystems IRIS encounters an OPEN command and no N parameter is provided and the file does not already exist, then if FileMode=0 there is no result from the OPEN command except that the process hangs until interrupted.
Changing This Parameter
On the Compatibility page of the Management Portal (System Administration > Configuration > Additional Settings > Compatibility), in the FileMode row, click Edit. Select FileMode to enable this setting.
To change this parameter for a single process only (as opposed to instance-wide), use the FileMode()Opens in a new tab method of the %SYSTEM.ProcessOpens in a new tab class. See the class reference for details.