mumps.unlock()

Decrements the lock count for a MUMPS global. Note that MUMPS locks are advisory, meaning that MUMPS will not enforce locking automatically. It is the responsibility of your application code to check for and honor any outstanding locks before setting a MUMPS global.

Arguments

ArgumentData TypeRequiredDescription
globalNamestringYesThe name of the global to examine
subscriptsarrayNoAn array of subscripts

Return Value

None. Unlocking a global that has not been locked has no effect and will be ignored.

Example

CFScript
var mumps = new lib.cfmumps.Mumps();
mumps.open();

if(mumps.lock("patients", ["WILLIS", "JOHN", "DOB")) {
	mumps.set("patients", ["WILLIS", "JOHN", "DOB"], "12/1/1980");
	mumps.unlock("patients", ["WILLIS", "JOHN", "DOB"]);
}
else {
	writeOutput("<p>Lock failed.</p>");
}

mumps.close();


CFML
<cfset mumps = new lib.cfmumps.Mumps()>
<cfset mumps.open()>

<!--- lock ^patients("WILLIS, JOHN","DOB") --->
<cfif mumps.lock("patients", ["WILLIS, JOHN", "DOB"])>
  <cfset mumps.set("patients", ["WILLIS, JOHN", "DOB"], "12/1/1980")>
  <cfset mumps.unlock("patients", ["WILLIS, JOHN", "DOB"])>
<cfelse>
  <p>Lock failed.</p>
</cfif>

<cfset mumps.close()>