Locking files

The Java™ program can lock a file to prevent other users from accessing the file while the first Java program is using the file.

Lock types are as follows. You can find more information about the lock types in the AS400File Javadoc.

To give up the locks obtained through the lock() method, the Java program starts the releaseExplicitLocks() method.