PVSetEnvMode( ) |
Set Environment Variables |
intptr_t APIDEF PVSetEnvMode(HPVKENV hEnv, int iFlag, intptr_t iValue);
Where:
hEnv |
Handle to environment structure | ||||||||||||||||||||||
iFlag |
Selector of the environment variable to be modified Can be one of the following constants:
| ||||||||||||||||||||||
iValue |
Corresponding value for iFlag:
|
PVK_SetEnvMode( ) is used to set the value of environment variables. If successful, the function returns the previous value of the modified environment variable.
If specified and iValue is not valid, ERR_BAD_TYPE(-5) is returned. Returns PV_ERROR(-1) on failure.
PV_BURST_MODE
Normal processing of a file involves locking each area of the file as it is read. Activating burst mode greatly reduces the number of locks issued against a file. With Burst mode set, the PXPIO routines lock the file header for either 50 file operations or three-tenths of a second, whichever occurs first. This decreases the number of times the file must be locked and the number of times that internal buffers may need to be reloaded.
PV_DIRTY_READ
Dirty Read mode of operation skips the normal file consistency checks. Dirty reads can speed file processing by reducing the number of locks issued against a file. However, this may result in inconsistent data should the file be updated while being read by the PXPIO routines.
PV_LOCK_MODE
The Lock Mode is used to control whether to check for locked/extracted records when reading and writing. The default setting is to not check for locked records for backwards compatibility with older versions of the PXPIO routines.
PV_MAX_MB
The PV_MAX_MB setting is used to control the approximate size of a file in megabytes before additional segments are created. This setting is functionally equivalent to the 'MB' (mega-bytes) system parameter in PxPlus. Values for PV_MAX_MB must be in the range of 0 (zero) to two thousand (2000). The default is two thousand (2000). Specifying a value of 0 (zero) resets this parameter to its default.