Making changes to a user space
The Change User Space (QUSCHGUS) API can be used to change both system domain and user domain user spaces. Updates to user spaces are only replicated when using this API.
User spaces can be updated directly by using the Retrieve Pointer to User Space (QUSPTRUS) API to get a pointer to the object and then writing directly into the space. However, these updates made directly to the user space are not replicated.
Applications should be examined to understand if user spaces are updated directly by using the QUSPTRUS API. If the application must write directly into a replicated user space, the application can be updated to asynchronously replicate the object by adding a call to the QUSCHGUS API after a block of updates are made to the user space. A call to the QUSCHGUS API will cause the entire user space to be replicated, via a save of the user space and restore on the target.
The active/passive environment is recommended when writing directly into the user space to avoid conflicting updates which may be overwritten. If active/active replication is required, it can be achieved by locking the user space object in the application code before making updates to the user space. The Allocate Object (ALCOBJ) command can be used with the MIRROR(*YES) parameter to lock the object on both nodes.
There may be additional locking considerations if the application will be running during resynchronization processing.