! ----- SEARCH_RIGHTSLIST.FUN ----- ! ! ----- FUNCTION TO READ MATCHING RIGHTSLIST RECORD ----- ! ----- RETURNS TRUE IF MATCH, FALSE IF NO MATCH ----- ! ! ----- Last Change 07/22/93 by Brian Lomasky ----- ! FUNCTION WORD SEARCH_RIGHTSLIST(WORD I_O_CHNL, WORD KEY_TO_USE, & WORD LOCK_IT) %INCLUDE "NUSER.INC" DECLARE WORD ERR_FLAG ! TRUE IF RECORD NOT FOUND ERR_FLAG = FALSE ! ASSUME RECORD WAS FOUND WHEN ERROR IN IF LOCK_IT THEN SELECT KEY_TO_USE CASE 0% GET #I_O_CHNL, KEY #0% EQ KGB_IDENTIFIER CASE 1% GET #I_O_CHNL, KEY #1% EQ & KGB_HOLDER_STRING CASE 2% GET #I_O_CHNL, KEY #2% EQ KGB_NAME END SELECT ELSE SELECT KEY_TO_USE CASE 0% GET #I_O_CHNL, KEY #0% EQ & KGB_IDENTIFIER, REGARDLESS CASE 1% GET #I_O_CHNL, KEY #1% EQ & KGB_HOLDER_STRING, REGARDLESS CASE 2% GET #I_O_CHNL, KEY #2% EQ & KGB_NAME, REGARDLESS END SELECT END IF USE IF ERR = BUCKET_LOCKED THEN SLEEP 1% RETRY END IF IF ERR = REC_NOT_FOUND OR ERR = END_OF_FILE THEN ERR_FLAG = TRUE ! SET "RECORD NOT FOUND" FLAG CONTINUE END IF EXIT HANDLER END WHEN IF ERR_FLAG THEN ! IF "RECORD NOT FOUND" FLAG IS SET: ! ----- RETURN ERROR STATUS ----- SEARCH_RIGHTSLIST = FALSE ELSE IF NOT LOCK_IT THEN UNLOCK #I_O_CHNL END IF ! ----- RETURN SUCCESS STATUS ----- SEARCH_RIGHTSLIST = TRUE END IF END FUNCTION