! ----- GET_FOREIGN_DCL_COMMAND_LINE.FUN ----- ! ! ----- SUBROUTINE TO GET AND VERIFY ANY FOREIGN DCL COMMAND ----- ! ----- (User must have SETPRV privilege in order to specify any ----- ! ----- foreign DCL command) ----- ! ! ---------- PASSED: ---------- ! ! ----- DIVISION_CTR = Count of valid divisions ! ----- DIVISION_NAMES() = List of valid divisions ! ----- PRIVILEGED = TRUE if user has SETPRV privilege ! ! ---------- RETURNED: ---------- ! ! ----- DCL_ACTION = Specified DCL action (blank if none) ! ----- PARAM1 = 1st Parameter for the DCL action (blank if n/a) ! ----- PARAM2 = 2nd Parameter for the DCL action (blank if n/a) ! ----- PARAM3 = 3rd Parameter for the DCL action (blank if n/a) ! ! ----- Last Change 08/09/93 by Brian Lomasky ----- ! SUB GET_FOREIGN_DCL_COMMAND_LINE(STRING PARAM1, STRING PARAM2, & STRING PARAM3) %INCLUDE "NUSER.INC" DECLARE STRING COMMAND_STRING ! USER'S FOREIGN COMMAND STRING DECLARE WORD COMMAND_STRING_LEN ! LENGTH OF COMMAND_STRING DECLARE LONG LOCAL_STATUS ! LOCAL SYSTEM SERVICE EXIT STAT DECLARE STRING NEXT_PARAM ! NEXT EXTRACTED DCL PARAMETER DECLARE LONG PARAM_POS ! POSITION AFTER NEXT PARAMETER DECLARE WORD TEMP ! TEMPORARY WORD VARIABLE DECLARE STRING TEMP_FIRST_NAME ! TEMPORARY FIRST NAME DECLARE STRING TEMP_LAST_NAME ! TEMPORARY LAST NAME DECLARE WORD VALID_ENTRY ! TRUE IF VALID ENTRY EXTERNAL STRING FUNCTION CAPITALIZE_FIRST( & STRING) ! CAPITALIZE STRING EXTERNAL LONG FUNCTION & LIB$GET_FOREIGN ! GET FOREIGN DCL COMMAND LINE EXTERNAL SUB VALID_DISK_DEVICE( & STRING) ! VERIFY FOR A VALID DISK DEVICE EXTERNAL WORD FUNCTION VALID_UIC(WORD, & STRING) ! VERIFY A USER-ENTERED UIC ! ----- GET ANY USER-SPECIFIED FOREIGN DCL COMMAND LINE ----- LOCAL_STATUS = LIB$GET_FOREIGN(COMMAND_STRING,, & COMMAND_STRING_LEN) IF LOCAL_STATUS <> SS$_NORMAL THEN PRINT "Unexpected error from LIB$GET_FOREIGN:" CALL LIB$STOP(LOCAL_STATUS BY VALUE) END IF COMMAND_STRING = LEFT(COMMAND_STRING, COMMAND_STRING_LEN) ! ----- UPPERCASE AND REMOVE ANY GARBAGE CHARACTERS ----- COMMAND_STRING = EDIT$(COMMAND_STRING, 172%) COMMAND_STRING_LEN = LEN(COMMAND_STRING) ! ----- PARSE USER-SPECIFIED PARAMETER STRING FOR ----- ! ----- QUALIFIERS ----- DCL_ACTION = COMMAND_STRING ! ASSUME ONLY ACTION SPECIFIED PARAM1 = "" ! ASSUME NO SUBSEQUENT PARAMETER PARAM2 = "" ! ASSUME NO SUBSEQUENT PARAMETER PARAM3 = "" ! ASSUME NO SUBSEQUENT PARAMETER ! ----- EXTRACT THE REQUIRED ACTION ----- ! ----- LOCATE FIRST SPACE (IF ANY) ----- PARAM_POS = POS(COMMAND_STRING, " ", 1%) IF PARAM_POS <> 0% THEN ! IF NO EMBEDDED SPACES: ! ----- EXTRACT THE ACTION ----- DCL_ACTION = LEFT(COMMAND_STRING, PARAM_POS - 1%) ! ----- REMOVE ACTION AND ANY LEADING SPACES ----- COMMAND_STRING = EDIT$(RIGHT(COMMAND_STRING, & PARAM_POS), 8%) ! ----- LOCATE NEXT SPACE (IF ANY) ----- PARAM_POS = POS(COMMAND_STRING, " ", 1%) ! ----- IF NO NEXT SPACE, THEN ASSUME SPACE AFTER ----- ! ----- LAST PARAM ----- PARAM_POS = LEN(COMMAND_STRING) + 1% IF PARAM_POS = 0% END IF ! ----- VERIFY FOR VALID ACTIONS ----- SELECT TRM$(DCL_ACTION) CASE "DEFAULT" ! DEV/DIR FOR A USER ON A NODE CASE "DIVISION" ! DIVISION FOR A USER ON A NODE CASE "GRANT" ! GRANT AN IDENTIFIER TO A USER CASE "IDENTIFIER_NODES" ! LIST OF NODES THAT IDENT IS ON CASE "MODIFY_DEVICE" ! MODIFY THE DEVICE FOR A USER CASE "MODIFY_UIC" ! MODIFY THE UIC FOR A USER CASE "MODIFY_USERNAME" ! MODIFY THE USERNAME FOR A USER CASE "NEXT_AVAIL_UIC" ! CALCULATE NEXT AVAILABLE UIC CASE "NODES" ! LIST OF NODES THAT USER IS ON CASE "QUOTA" ! ADD OR DELETE A DISK QUOTA CASE "REVOKE" ! REVOKE AN IDENT FROM A USER CASE "UIC" ! UIC FOR A USER ON A NODE CASE "" ! NO DCL PARAMETER CASE ELSE PRINT PRINT "%Error - Unrecognized foreign DCL" + & " parameter: " + TRM$(DCL_ACTION) + "..." + BEL PRINT PRINT "Notify your VAX System Manager" + BEL CALL SYS$EXIT(ERROR_WITH_NO_PUTMSG BY VALUE) END SELECT ! ----- EXTRACT ANY SUBSEQUENT PARAMETERS ----- WHILE PARAM_POS <> 0% ! UNTIL NO MORE SPACES FOUND ! ----- LOCATE NEXT SPACE (IF ANY) ----- PARAM_POS = POS(COMMAND_STRING, " ", 1%) IF PARAM_POS = 0% THEN ! IF NO NEXT SPACE: ! ----- IF ANY PARAMETER IS REMAINING ----- IF LEN(COMMAND_STRING) <> 0% THEN ! ----- ASSUME SPACE AFTER LAST ----- ! ----- PARAM ----- PARAM_POS = LEN(COMMAND_STRING) + 1% ELSE ITERATE ! DONE IF NO MORE PARAMS/SPACES END IF END IF ! ----- EXTRACT NEXT SPECIFIED PARAMETER ----- NEXT_PARAM = LEFT(COMMAND_STRING, PARAM_POS - 1%) ! ----- VERIFY PARAMETER DEPENDING ON THE DESIRED ----- ! ----- ACTION ----- SELECT TRM$(DCL_ACTION) CASE "DEFAULT" ! DEV/DIR FOR A USER ON A NODE IF PARAM1 = "" THEN ! ----- STORE SPECIFIED USERNAME ----- PARAM1 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM1) > 12% THEN PRINT PRINT "Error -" + & " Username is" & + " too long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ELSE IF PARAM2 <> "" THEN PRINT PRINT "Error -" + & " Too many" + & " DCL parameters" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ! ----- STORE SPECIFIED NODE NAME ----- PARAM2 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM2) > 6% THEN PRINT PRINT "Error -" + & " Nodename is" & + " too long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF END IF CASE "DIVISION" ! DIVISION FOR A USER ON A NODE IF PARAM1 = "" THEN ! ----- STORE SPECIFIED USERNAME ----- PARAM1 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM1) > 12% THEN PRINT PRINT "Error -" + & " Username is" & + " too long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ELSE IF PARAM2 <> "" THEN PRINT PRINT "Error - Too" + & " many DCL" + & " parameters" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ! ----- STORE SPECIFIED NODE NAME ----- PARAM2 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM2) > 6% THEN PRINT PRINT "Error -" + & " Nodename is" & + " too long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF END IF CASE "GRANT" ! GRANT AN IDENTIFIER TO A USER IF PARAM1 = "" THEN ! ----- STORE SPECIFIED USERNAME ----- PARAM1 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM1) > 12% THEN PRINT PRINT "Error -" + & " Username" + & " is too long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ELSE IF PARAM2 = "" THEN ! ----- STORE SPECIFIED ----- ! ----- IDENTIFIER ----- PARAM2 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM2) > 32% THEN PRINT PRINT "Error -" & + " Ident" + & "ifier" & + " is too" + & " long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ELSE IF PARAM3 <> "" THEN PRINT PRINT "Error - Too" + & " many DCL" + & " parameters" & + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ! ----- STORE SPECIFIED ----- ! ----- NODE NAME ----- PARAM3 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM3) > 6% THEN PRINT PRINT "Error -" + & " Nodename" + & " is too long" & + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF END IF END IF CASE "IDENTIFIER_NODES" ! LIST OF NODES THAT IDENT IS ON IF PARAM1 <> "" THEN PRINT PRINT "Error - Too many DCL" + & " parameters" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG BY VALUE) END IF ! ----- STORE SPECIFIED IDENTIFIER NAME ----- PARAM1 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM1) > 31% THEN PRINT PRINT "Error - Identifier name" & + " is too long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG BY VALUE) END IF CASE "MODIFY_DEVICE" ! MODIFY THE DEVICE FOR A USER IF PARAM1 = "" THEN ! ----- STORE SPECIFIED USERNAME ----- PARAM1 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM1) > 12% THEN PRINT PRINT "Error -" + & " Username is" & + " too long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ELSE IF PARAM2 = "" THEN ! ----- STORE SPECIFIED ----- ! ----- DEVICE ----- PARAM2 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM2) > 31% THEN PRINT PRINT "Error -" + & " Device" + & " is too" + & " long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ELSE IF PARAM3 <> "" THEN PRINT PRINT "Error -" + & " Too many" + & " DCL" + & " parameters" & + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ! ----- STORE SPECIFIED ----- ! ----- NODE NAME ----- PARAM3 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM3) > 6% THEN PRINT PRINT "Error -" + & " Nodename" + & " is too long" & + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF END IF END IF CASE "MODIFY_UIC" ! MODIFY THE UIC FOR A USER IF PARAM1 = "" THEN ! ----- STORE SPECIFIED USERNAME ----- PARAM1 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM1) > 12% THEN PRINT PRINT "Error -" + & " Username is" & + " too long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ELSE IF PARAM2 <> "" THEN PRINT PRINT "Error - Too" + & " many DCL" + & " parameters" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ! ----- STORE SPECIFIED UIC ----- PARAM2 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM2) > 14% THEN PRINT PRINT "Error - UIC" + & " is too long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF END IF CASE "MODIFY_USERNAME" ! MODIFY THE USERNAME FOR A USER IF PARAM1 = "" THEN ! ----- STORE SPECIFIED USERNAME ----- PARAM1 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM1) > 12% THEN PRINT PRINT "Error -" + & " Username is" & + " too long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ELSE IF PARAM2 <> "" THEN PRINT PRINT "Error - Too" + & " many DCL" + & " parameters" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ! ----- STORE SPECIFIED NEW USER ----- PARAM2 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM2) > 12% THEN PRINT PRINT "Error - New" + & " Username is" & + " too long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ! ----- EXTRACT ALL FOLLOWING ----- ! ----- CHARACTERS AS THE NEW ----- ! ----- OWNER NAME ----- PARAM3 = EDIT$(RIGHT( & COMMAND_STRING, PARAM_POS), 8%) IF LEN(PARAM3) > 31% THEN PRINT PRINT "Error - New" + & " Owner name" + & " is too long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ! ----- ENSURE NO EMBEDDED QUOTES ----- TEMP = POS(PARAM3, '"', 1%) IF TEMP <> 0% THEN PRINT PRINT "Error - Owner" + & " name can" + & " not contain" & + " quotes" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ! ----- LOCATE COMMA POSITION ----- TEMP = POS(PARAM3, ",", 1%) IF TEMP = 0% THEN PRINT PRINT "Error - Owner" + & " name format" & + " must be:" + & " Last," & + " First" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF TEMP_LAST_NAME = & TRM$(LEFT(PARAM3, TEMP - 1%)) TEMP_FIRST_NAME = EDIT$(RIGHT( & PARAM3, TEMP + 1%), 136%) ! ----- CAPITALIZE ONLY THE FIRST ----- ! ----- CHARACTERS ----- TEMP_FIRST_NAME = & CAPITALIZE_FIRST( & TEMP_FIRST_NAME) TEMP_LAST_NAME = & CAPITALIZE_FIRST( & TEMP_LAST_NAME) ! ----- REFORMAT THE OWNER NAME ----- PARAM3 = TEMP_LAST_NAME + & ", " + TEMP_FIRST_NAME ! ----- SET TO EXIT LOOP ----- PARAM_POS = 0% END IF CASE "NEXT_AVAIL_UIC" ! CALCULATE NEXT AVAILABLE UIC ! ----- VERIFY THE PARAMETER AS BEING A ----- ! ----- VALID DIVISION CODE (AND NOT ----- ! ----- "OTHER") ----- VALID_ENTRY = FALSE DIV_INDEX = -1% ! -1 ALLOWS PGM DIVISION WHILE DIV_INDEX < DIVISION_CTR AND & NOT VALID_ENTRY DIV_INDEX = DIV_INDEX + 1% IF DIVISION_NAMES(DIV_INDEX) = & NEXT_PARAM THEN VALID_ENTRY = TRUE END IF NEXT IF VALID_ENTRY THEN IF PARAM1 <> "" THEN PRINT PRINT "Error -" + & " Too many" + & " DCL parameters" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ! ----- STORE DIVISION ARRAY INDEX ----- ! ----- VALUE FOR THE SPECIFIED ----- ! ----- DIVISION IN THE PARAMETER ----- PARAM1 = NUM1$(DIV_INDEX) ELSE PRINT PRINT "%Invalid division: " + & NEXT_PARAM + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG BY VALUE) END IF CASE "NODES" ! LIST OF NODES THAT USER IS ON IF PARAM1 <> "" THEN PRINT PRINT "Error - Too many DCL" + & " parameters" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG BY VALUE) END IF ! ----- STORE SPECIFIED USERNAME ----- PARAM1 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM1) > 12% THEN PRINT PRINT "Error - Username is" + & " too long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG BY VALUE) END IF CASE "QUOTA" ! ADD OR DELETE A DISK QUOTA SELECT NEXT_PARAM CASE "ADD" ! ADD A DISK QUOTA DCL_ACTION = "QUOTA_ADD" CASE "DELETE" ! DELETE A DISK QUOTA DCL_ACTION = "QUOTA_DELETE" CASE ELSE PRINT PRINT "%Invalid quota action: " & + NEXT_PARAM + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG BY VALUE) END SELECT CASE "QUOTA_ADD", "QUOTA_DELETE" ! ----- IF NO DISK YET FOUND: ----- IF PARAM1 = "" THEN ! ----- STORE SPECIFIED DISK ----- ! ----- DEVICE ----- PARAM1 = EDIT$(NEXT_PARAM, 2%) ! ----- EXTRACT DISK SPECIFICATION ----- ! ----- (LESS :) ----- TEMP = POS(PARAM1, ":", 1%) IF TEMP < 2% THEN PRINT PRINT "Error -" + & " Invalid disk" & + " device syntax" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF PARAM1 = LEFT(PARAM1, TEMP - 1%) ! ----- VERIFY FOR VALID DISK ----- ! ----- DEVICE ----- CALL VALID_DISK_DEVICE(PARAM1) ELSE ! IF NO UIC YET FOUND: IF PARAM2 <> "" THEN PRINT PRINT "Error - Too" + & " many DCL" + & " parameters" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ! ----- STORE SPECIFIED UIC ----- PARAM2 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM2) > 14% THEN PRINT PRINT "Error - UIC" + & " is too long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF END IF CASE "REVOKE" ! REVOKE AN IDENT FROM A USER IF PARAM1 = "" THEN ! ----- STORE SPECIFIED USERNAME ----- PARAM1 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM1) > 12% THEN PRINT PRINT "Error -" + & " Username is" & + " too long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ELSE IF PARAM2 = "" THEN ! ----- STORE SPECIFIED ----- ! ----- IDENTIFIER ----- PARAM2 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM2) > 32% THEN PRINT PRINT "Error -" & + " Ident" + & "ifier" + & " is too long" & + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ELSE IF PARAM3 <> "" THEN PRINT PRINT "Error -" & + " Too many" & + " DCL" + & " parameters" & + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ! ----- STORE SPECIFIED NODE NAME ----- PARAM3 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM3) > 6% THEN PRINT PRINT "Error -" & + " Nodename" & + " is too" + & " long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF END IF END IF CASE "UIC" ! UIC FOR A USER ON A NODE IF PARAM1 = "" THEN ! ----- STORE SPECIFIED USERNAME ----- PARAM1 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM1) > 12% THEN PRINT PRINT "Error -" + & " Username is" & + " too long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ELSE IF PARAM2 <> "" THEN PRINT PRINT "Error - Too" + & " many DCL" + & " parameters" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF ! ----- STORE SPECIFIED NODE NAME ----- PARAM2 = EDIT$(NEXT_PARAM, 2%) IF LEN(PARAM2) > 6% THEN PRINT PRINT "Error -" + & " Nodename is" & + " too long" + BEL CALL SYS$EXIT( & ERROR_WITH_NO_PUTMSG & BY VALUE) END IF END IF END SELECT IF PARAM_POS > LEN(COMMAND_STRING) THEN ! IF LAST PARAM WAS EXTRACTED: ! ----- INIT COMMAND STRING TO NULL ----- COMMAND_STRING = "" ELSE ! ----- REMOVE NEXT PARAMETER AND ANY ----- ! ----- LEADING SPACES ----- COMMAND_STRING = EDIT$(RIGHT( & COMMAND_STRING, PARAM_POS), 8%) END IF NEXT ! ----- VERIFY THAT ALL REQUIRED PARAMETERS WERE SPECIFIED ----- IF DEBUG_MODE THEN PRINT "DEBUG>DCL_ACTION=" + TRM$(DCL_ACTION) + "*" PRINT "DEBUG>PARAM1=" + PARAM1 + "*" PRINT "DEBUG>PARAM2=" + PARAM2 + "*" PRINT "DEBUG>PARAM3=" + PARAM3 + "*" END IF ! ----- ENSURE THAT THE DCL COMMAND USER IS PRIVILEGED ----- IF TRM$(DCL_ACTION) <> "" AND NOT PRIVILEGED THEN PRINT "Error - You are not allowed to use" + & " the DCL command option" + BEL PRINT " Aborting..." + BEL PRINT "Notify your VAX System Manager" + BEL CALL SYS$EXIT(ERROR_WITH_NO_PUTMSG BY VALUE) END IF SELECT TRM$(DCL_ACTION) CASE "DEFAULT" ! DEV/DIR FOR A USER ON A NODE IF PARAM1 = "" THEN ! IF NO DIVISION CODE: PRINT PRINT "%Aborting due to missing" + & " foreign DCL parameter..." + BEL CALL SYS$EXIT(ERROR_WITH_NO_PUTMSG BY VALUE) END IF CASE "DIVISION" ! DIVISION FOR A USER ON A NODE IF PARAM1 = "" THEN ! IF NO DIVISION CODE: PRINT PRINT "%Aborting due to missing" + & " foreign DCL parameter..." + BEL CALL SYS$EXIT(ERROR_WITH_NO_PUTMSG BY VALUE) END IF CASE "GRANT" ! GRANT AN IDENTIFIER TO A USER ! ----- ERROR IF NO USERNAME OR IDENTIFIER ----- IF PARAM1 = "" OR PARAM2 = "" THEN PRINT PRINT "%Aborting due to missing" + & " foreign DCL parameter(s)..." + BEL CALL SYS$EXIT(ERROR_WITH_NO_PUTMSG BY VALUE) END IF CASE "IDENTIFIER_NODES" ! LIST OF NODES THAT IDENT IS ON IF PARAM1 = "" THEN ! IF NO DIVISION CODE: PRINT PRINT "%Aborting due to missing" + & " foreign DCL parameter..." + BEL CALL SYS$EXIT(ERROR_WITH_NO_PUTMSG BY VALUE) END IF CASE "MODIFY_DEVICE" ! MODIFY THE DEVICE FOR A USER ! ----- ERROR IF NO USERNAME OR DEVICE ----- IF PARAM1 = "" OR PARAM2 = "" THEN PRINT PRINT "%Aborting due to missing" + & " foreign DCL parameter(s)..." + BEL CALL SYS$EXIT(ERROR_WITH_NO_PUTMSG BY VALUE) END IF ! ----- EXTRACT DISK SPECIFICATION (LESS :) ----- TEMP = POS(PARAM2, ":", 1%) IF TEMP < 2% THEN PRINT PRINT "Error - Invalid disk device syntax" + BEL CALL SYS$EXIT(ERROR_WITH_NO_PUTMSG BY VALUE) END IF PARAM2 = LEFT(PARAM2, TEMP - 1%) ! ----- VERIFY FOR VALID DISK DEVICE ----- CALL VALID_DISK_DEVICE(PARAM2) CASE "MODIFY_UIC" ! MODIFY THE UIC FOR A USER ! ----- ERROR IF NO USERNAME OR UIC ----- IF PARAM1 = "" OR PARAM2 = "" THEN PRINT PRINT "%Aborting due to missing" + & " foreign DCL parameter(s)..." + BEL CALL SYS$EXIT(ERROR_WITH_NO_PUTMSG BY VALUE) END IF ! ----- VERIFY FOR A VALID UIC ----- PLEASE_TRY_AGAIN = "" IF VALID_UIC(FALSE, PARAM2) THEN PRINT BEL CALL SYS$EXIT(ERROR_WITH_NO_PUTMSG BY VALUE) END IF ! ----- CHANGED_UIC_GRP contains the Decimal UIC group ! ----- CHANGED_UIC_MBR contains the Decimal UIC member ! ----- GRP contains the Decimal UIC group ! ----- MBR contains the Decimal UIC member CASE "MODIFY_USERNAME" ! MODIFY THE USERNAME FOR A USER ! ----- ERROR IF NO USERNAME OR NEW USERNAME OR ----- ! ----- OWNER NAME ----- IF PARAM1 = "" OR PARAM2 = "" OR PARAM3 = "" THEN PRINT PRINT "%Aborting due to missing" + & " foreign DCL parameter(s)..." + BEL CALL SYS$EXIT(ERROR_WITH_NO_PUTMSG BY VALUE) END IF CASE "NEXT_AVAIL_UIC" ! CALCULATE NEXT AVAILABLE UIC IF PARAM1 = "" THEN ! IF NO DIVISION CODE: PRINT PRINT "%Aborting due to missing" + & " foreign DCL parameter..." + BEL CALL SYS$EXIT(ERROR_WITH_NO_PUTMSG BY VALUE) END IF CASE "NODES" ! LIST OF NODES THAT USER IS ON IF PARAM1 = "" THEN ! IF NO DIVISION CODE: PRINT PRINT "%Aborting due to missing" + & " foreign DCL parameter..." + BEL CALL SYS$EXIT(ERROR_WITH_NO_PUTMSG BY VALUE) END IF CASE "QUOTA" PRINT PRINT "%Aborting due to missing" + & " foreign DCL parameter..." + BEL CALL SYS$EXIT(ERROR_WITH_NO_PUTMSG BY VALUE) CASE "QUOTA_ADD", "QUOTA_DELETE"! ADD OR DELETE A DISK QUOTA ! ----- IF NO DISK OR UIC: ----- IF PARAM1 = "" OR PARAM2 = "" THEN PRINT PRINT "%Aborting due to missing" + & " foreign DCL parameter(s)..." + BEL CALL SYS$EXIT(ERROR_WITH_NO_PUTMSG BY VALUE) END IF ! ----- VERIFY FOR A VALID UIC ----- PLEASE_TRY_AGAIN = "" IF VALID_UIC(FALSE, PARAM2) THEN PRINT BEL CALL SYS$EXIT(ERROR_WITH_NO_PUTMSG BY VALUE) END IF ! ----- CHANGED_UIC_GRP contains the Decimal UIC group ! ----- CHANGED_UIC_MBR contains the Decimal UIC member ! ----- GRP contains the Decimal UIC group ! ----- MBR contains the Decimal UIC member CASE "REVOKE" ! REVOKE AN IDENT FROM A USER ! ----- ERROR IF NO USERNAME OR IDENTIFIER ----- IF PARAM1 = "" OR PARAM2 = "" THEN PRINT PRINT "%Aborting due to missing" + & " foreign DCL parameter(s)..." + BEL CALL SYS$EXIT(ERROR_WITH_NO_PUTMSG BY VALUE) END IF CASE "UIC" ! UIC FOR A USER ON A NODE IF PARAM1 = "" THEN ! IF NO DIVISION CODE: PRINT PRINT "%Aborting due to missing" + & " foreign DCL parameter..." + BEL CALL SYS$EXIT(ERROR_WITH_NO_PUTMSG BY VALUE) END IF END SELECT END SUB