An RPC normally occurs for each write or update operation on an SFS file that does not use client-side caching (that is, the operational force feature of SFS is enabled). All file changes that result from input-output operations are committed to disk before control returns to the application.
You can change this behavior so that the result of input-output operations on SFS files might not be committed to disk until the files are closed (that is, a lazy-write strategy is used). If each change to an SFS file is not immediately saved, the application can run faster.
To change the default commit behavior for all the SFS files in your application, set the ENCINA_VSAM_AUTO_FLUSH environment variable to OFF before you run the application:
export ENCINA_VSAM_AUTO_FLUSH=OFF
To set the flush value differently for certain files, code a putenv() call that sets ENCINA_VSAM_AUTO_FLUSH before the OPEN statement for each file for which you want to change the flush value. During a program, the environment-variable settings that you make in a putenv() call take precedence over the environment-variable settings that you make in an export command.
Example: setting and accessing environment variables
If client-side caching is in effect for an SFS file (that is, environment variable ENCINA_VSAM_CACHE is set to a valid nonzero value), the setting of ENCINA_VSAM_AUTO_FLUSH for the file is ignored. Operational force is disabled for that file.
related tasks
Setting environment variables
related references
SFS file system
Runtime environment variables