! ----- VALIDATE_NODE_IDENTIFIER.FUN ----- ! ! ----- FUNCTION TO VALIDATE AN IDENTIFIER (ON ALL CLUSTER NODES) ----- ! ! ---------- PASSED: ---------- ! ----- THE_IDENT = Identifier name to be validated ! ---------- RETURNED: ---------- ! ----- (VALIDATE_NODE_IDENTIFIER returns TRUE if the ! ----- identifier exists on any node, otherwise ! ----- returns false) ! ----- (NODE_LIST is a comma-separated list of the node ! ----- names that this identifier exists on) ! ! ----- Last Change 07/06/93 by Brian Lomasky ----- ! FUNCTION WORD VALIDATE_NODE_IDENTIFIER(STRING NODE_LIST) %INCLUDE "NUSER.INC" DECLARE WORD IDENTIFIER_EXISTS ! TRUE IF IDENTIFIER EXISTS DECLARE WORD I_O_CHNL ! RIGHTSLIST I/O CHNL TO ACCESS EXTERNAL WORD FUNCTION SEARCH_RIGHTSLIST(WORD, WORD, & WORD) ! READ MATCHING RIGHTSLIST REC VALIDATE_NODE_IDENTIFIER = TRUE ! ASSUME ERROR STATUS IF DEBUG_MODE THEN PRINT "DEBUG>----- Call VALIDATE_NODE_IDENTIFIER" PRINT "DEBUG>THE_IDENT=" + TRM$(THE_IDENT) END IF ! ----- SEE IF THE_IDENT ALREADY EXISTS ON ANY CLUSTER ----- ! ----- NODE ----- I_O_CHNL = 0% IDENTIFIER_EXISTS = FALSE NODE_LIST = "" ! ----- FOR EACH OPEN FILE: ----- WHILE I_O_CHNL < RIGHTSLIST_COUNTER I_O_CHNL = I_O_CHNL + 1% ! ----- SKIP IF RIGHTSLIST IS UNAVAILABLE ----- ITERATE IF TRM$(RIGHTSLIST_SPECS(I_O_CHNL)) = "" KGB_NAME = THE_IDENT ! ----- SEE IF IDENTIFIER ALREADY EXISTS ----- IF SEARCH_RIGHTSLIST(I_O_CHNL, 2%, FALSE) THEN ! ----- SET FLAG ----- IDENTIFIER_EXISTS = TRUE ! ----- ACCUM LIST OF NODES THAT ----- ! ----- IDENTIFIER EXISTS ON ----- NODE_LIST = NODE_LIST + TRM$( & RIGHTSLIST_NODES(I_O_CHNL)) + "," END IF NEXT EXIT FUNCTION IF IDENTIFIER_EXISTS VALIDATE_NODE_IDENTIFIER = FALSE! RETURN SUCCESS STATUS END FUNCTION