NET/MASTER Network Control Language (NCL) Reference Manual

LOCK
Verbs
106126 Tandem Computers Incorporated 3–119
Termination of the highest level NCL process releases all locks still held by that
process and all nested procedures.
The LOCK TYPE=TEST WAIT=YES construction can be used to create a flag for
signaling between NCL processes.
Refer to the PURGE command in the NonStop NET/MASTER MS Command
Reference Manual.
Example
In the following example, a procedure called LOCKIT contains three uses of the LOCK
verb. The contents of the &SYS.RETCODE system variable is displayed in each case
and contains the value 0 (zero):
LOCKIT: PROCEDURE
&TODAY = MONDAY
&DTIME = NIGHT
&LOCKTEXT = THIS IS RESTON
LOCK TYPE=EXCL PNAME=&TODAY MNAME=&DTIME
SAY "&SYS.RETCODE = " &SYS.RETCODE
LOCK TYPE=FREE PNAME=&TODAY MNAME=&DTIME
SAY "&SYS.RETCODE = " &SYS.RETCODE
LOCK TYPE=SHR PNAME=CUSTFILE WAIT=20 TEXT=&LOCKTEXT
SAY "&SYS.RETCODE = " &SYS.RETCODE
END LOCKIT