Bakken Software Services

Specializing in the Pick / MultiValue Database & Environments

Home

Consulting

Education

Education Overview

Education - Schedule

Introduction to Pick / MV

Database Retrieval - Fund

Database Retrieval - Adv

Basic Programming

Enrollment

RPL

Tips & Tricks

Join Our Mailing List

Contact Us

Tips & Tricks - Pick Basic Lock Clause
Does your system support the use of the LOCK clause as part of the READ statement?
(Most MultiValue flavors do today, but if your application software was written long ago, you may want to consider adding this option)


The LOCK clause will allow your users a way out of maintenance applications when a record lock is encountered when processing a READU or MATREADU statement. 
Example:

READU  CUST.REC  FROM  CUST.FILE,  CUST.KEY  LOCKED
     CRT @(0,22):"CUSTOMER IN USE!  EXIT? (Y/N)":
     CRT @(45,22):
     INPUT RESPONSE
     IF RESPONSE = "Y"  THEN GOTO 1000 ;*  EXIT
     SLEEP 5  ; *  pause for 5 seconds, and then check if record is now available
     GOTO 50  ;*  Resume processing
END ELSE
   . . .
END

Note:  Individual MultiValue flavors may provide additional information that may be incorporated into the program logic.

For example R91 & MvBase automatically store the port# of the user that currently has the record locked in system buffer zero. This information may be used to get the actual user name or location and then display a bit more detailed message.


 

Bakken Software Services ... The Obvious Pick
 1-800-PICK-911
Sitemap