#============================================================================== # Changes the keyflag value of a zone in a roster. #============================================================================== changekeyflag IS OP R label { TV zoneaddr := label seek labels R; newkey := NOT . zoneaddr pick keyflags R; IF TV THEN (Truth ?OK_done)(R @@ [0,zoneaddr,Ikeyflags] := newkey) ELSE (Falsehood ?Zone_not_found)(R) ENDIF } #============================================================================== # User interface that gathers data to change the keyflag of a zone. # Calls changekeyflag to actually perform the change. #============================================================================== chkeyint IS OP DBName RName { IF RName ~= DBName THEN oldlabel := phrase toupper trimblanks first promptwindow ('CHANGING KEYFLAG')[' NAME OF ZONE : ']; IF oldlabel IN labels (value RName) THEN errchk newr := (changekeyflag (value RName) oldlabel); IF first errchk THEN RName assign newr; IF cursor_row = 7 THEN calculatedisplay (value RName) ELSE replace&exit ENDIF ELSE comments string second errchk; replace&exit ENDIF ELSE comments 'Zone not found'; replace&exit ENDIF ELSE comments 'Can''t change Master'; replace&exit ENDIF }