Allocate Object (ALCOBJ) command

When the name of a DDM file is specified on the Allocate Object (ALCOBJ) command on the client system, the command allocates the DDM file on the client system and its associated file or file member on a server system.

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 client system and remote files on one or more server systems) 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 server system:

  • When the target is an IBM i 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 IBM i 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 IBM i or a System/38, the remote file is locked with the specified lock type, except that some non-IBM i 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-IBM i 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.