ALCOBJ (Allocate Object) command
When the name of a DDM file is specified on the Allocate Object (ALCOBJ) command on the source server, the command allocates the DDM file on the source server and its associated file or file member on a target server.
The command places locks on both the DDM file and the remote file in each pair. (These files are locked on both servers to ensure that they are not changed or deleted while the files or members are locked.) One or more pairs of files (DDM files on the source server and remote files on one or more target servers) can be allocated at the same time.
Each DDM file is always locked with a shared-read (*SHRRD) lock. Shared-read is used for the DDM files regardless of the lock types that might have been specified on the command to lock other local files at the same time.
The lock placed on the remote file depends on the type of target server:
- When the target is an iSeries™ server or a System/38™, the resulting locks on the remote file are the same as if the file is a local database file. That is, the iSeries or the System/38 remote file is also locked with a shared-read lock, and the member (the one specified, or the first one) is locked with the lock type specified on the command.
- When the target is not an iSeries server or a System/38, the remote file is locked with the specified lock type, except that some non-iSeries target servers might use a stronger lock than was specified on the command. If an ALCOBJ command specifies multiple DDM files, and one or more are on non-iSeries target servers, those remote files are locked with the lock type specified on the command. If a member name is specified for a remote server that does not support members, the lock request is rejected with an error message, unless the member name is the same as the DDM file name.
- Member names and iSeries target servers on the ALCOBJ command
If a member name is specified with the DDM file name on an ALCOBJ command, the member (in the remote file) is locked with the lock type specified on the command.
- Lock multiple DDM files with the ALCOBJ command
One ALCOBJ command can be used to specify multiple DDM files that are associated with remote files located on multiple target servers. If it is not possible to lock all the files on all the servers, none are locked.
- ALCOBJ command completion time with DDM
When DDM-related files are being allocated, a longer time will be required for the command to complete because of the additional time required for communications to occur between the source and target servers.
Parent topic:
DDM-related CL command considerations
Related reference
Allocate Object (ALCOBJ) and Deallocate Object (DLCOBJ) commands