! ----- GET_UIC.FUN ----- ! ! ----- SUBROUTINE TO GET UIC (FOR "OTH" DIVISION USERS) ----- ! ! ---------- PASSED: ---------- ! ! ----- BACKWARDS = TRUE if we're moving backwards thru prompts ! ----- DEBUG_MODE = TRUE if Debug Mode was enabled ! ----- DIV = User-entered division for this new user ! ----- HELD_DIVS_CTR = Count of held MASTER_div identifiers ! ----- PRIVILEGED = TRUE if user has SETPRV privilege ! ----- PLEASE_TRY_AGAIN = "Please Try Again" error message ! ! ---------- RETURNED: ---------- ! ! ----- ACTION_SEQ = Next User Input Sequence routine ! ----- BACKWARDS = TRUE if we're moving backwards thru prompts ! ----- GRP = User-entered UIC group (from VALID_UIC) ! ----- MBR = User-entered UIC member (from VALID_UIC) ! ! ----- Last Change 07/16/93 by Brian Lomasky ----- ! SUB GET_UIC %INCLUDE "NUSER.INC" DECLARE WORD RECORD_FOUND ! TRUE IF MATCHING RECORD FOUND DECLARE STRING TEMP_STRING ! TEMPORARY STRING DECLARE WORD VALID_ENTRY ! TRUE IF VALID ENTRY EXTERNAL WORD FUNCTION VALID_UIC(WORD, & STRING) ! VERIFY A USER-ENTERED UIC IF DIV = "OTH" THEN VALID_ENTRY = FALSE BACKWARDS = FALSE ! NOT MOVING BACK THRU PROMPTS ELSE VALID_ENTRY = TRUE IF BACKWARDS THEN ACTION_SEQ = ACTION_SEQ - 1% EXIT SUB END IF END IF WHILE NOT VALID_ENTRY RECORD_FOUND = TRUE WHEN ERROR IN LINPUT #98%, & "Enter the UIC for this user: "; & TEMP_STRING USE RECORD_FOUND = FALSE CONTINUE END WHEN IF NOT RECORD_FOUND THEN BACKWARDS = TRUE! MOVING BACK THRU PROMPTS EXIT SUB END IF ! ----- UPPERCASE AND DISCARD ANY GARBAGE CHARS ----- TEMP_STRING = EDIT$(TEMP_STRING, 38%) IF TEMP_STRING = "B" THEN BACKWARDS = TRUE! MOVING BACK THRU PROMPTS EXIT SUB END IF IF TEMP_STRING = "" THEN PRINT PRINT "Error - You must enter a" + & " UIC for this user" + & TRM$(PLEASE_TRY_AGAIN) PRINT ITERATE END IF ! ----- VERIFY FOR A VALID UIC ----- ITERATE IF VALID_UIC(TRUE, TEMP_STRING) VALID_ENTRY = TRUE NEXT ! ----- CONTINUE WITH DESIRED PROMPT ----- ACTION_SEQ = ACTION_SEQ + 1% END SUB