1. The CAN-FIND function does not lock records or return data to the record buffer.
2. The default locking mode for the CAN-FIND function is NO-LOCK. That is, if no locking mode is specified with the CAN-FIND function, the NO-LOCK option is assumed.
3. The CAN-FIND function simply reports whether a specific record exists and whether it can be fetched in the locking mode specified in the CAN-FIND option. That is, if the record exists and can be retrieved using the specified lock mode, the CAN-FIND function returns TRUE otherwise it returns FALSE.
4. The CAN-FIND + NO-LOCK returns TRUE if the record exists regardless whether that record is locked by another user using SHARE-LOCK or EXCLUSIVE-LOCK or not.
5. The CAN-FIND + SHARE-LOCK returns TRUE if the record exists and is not held with an EXCLUSIVE-LOCK by another user. In other words, it returns TRUE if the records exists and is held NO-LOCK by another user and it also returns TRUE if the record exists and is held SHARE-LOCK by another user.
6. The CAN-FIND + SHARE-LOCK function waits if the record exists and is held EXCLUSIVE-LOCK by another user and the message “[file-name] in use by [user] on [tty]. Wait or choose CANCEL to stop. (2624)” is displayed to give the user the choice of waiting till the records is released or canceling. In this case, if the users cancels, the CAN-FIND function returns FALSE.
7. The CAN-FIND + SHARE-LOCK + NO-WAIT function returns FALSE immediately if the record does not exist or is held EXCLUSIVE-LOCK by another user.