################################################ # # # SYSGEM Enterprise Manager 2.3 build 5665 # # Copyright (C) 2009 SYSGEM AG # # # # Contents : Include Files # # # # Created by : SAcM # # Timestamp : 2013-08-27 11:46:45 # # # ################################################ # 101 SAcM_Update_VMS_Account_Comment 102 $! 102 $ UpdateVMSAccountComment: 102 $ subroutine 102 $! 102 $ show process 102 $ ! 102 $ ! See if SYSUAF logical is set (& define if not) 102 $ ! 102 $ call define_sysuaf 102 $ ! 102 $ ! Start accounts executable via a foreign command. 102 $ ! 102 $ call AccountsExe 'P1 ! sets up symbol SSM_ACCOUNTS_EXE to point to the correct ssm-accounts-XXX.exe depending on hardware type 102 $ ! 102 $ accounts == SSM_ACCOUNTS_EXE 102 $ ! 102 $ ! Make sure account exists - if not then go no further. 102 $ ! 102 $ ! Show the account, send output to the null device. 102 $ ! 102 $ define /user sys$output nl: 102 $ mcr authorize show 'INPUT_UN 102 $ ! 102 $ if $status .ne. SS_NORMAL 102 $ then 102 $ write sys$output "@{{SE Account ''INPUT_UN' does not exist." 102 $ exit SS_ABORT 102 $ endif 102 $ ! 102 $ sud_userdata = "''INPUT_CT'" 102 $ sud_username = "''INPUT_UN'" 102 $ call dcl_command "accounts -s" 102 $ ! 102 $ ! Update Audit Trail 102 $ ! 102 $ call AddAuditTrailSysuaf "''P1'" - 102 "''INPUT_UN' Comment Field Modified by Sysgem" - 102 "modify" - 102 "flush mandatory alarm audit" 102 $ ! 102 $ ! 102 $ endsubroutine 102 $! 103 User=[System] Access=[Edit + Execute] 103 Token=[SAcM Full :: SAcM_Enable_VMS_Account] Access=[Edit + Execute] 103 Token=[SAcM Full :: Edit VMS Agent Include Files] Access=[Edit + Execute] @ 101 SAcM_Verify_Update_VMS_Account_Comment 102 $! 102 $! VMS DCL script to update a SYSUAF Account "Comment" field providing that the "Owner" field matches the input. 102 $! 102 $ VerifyUpdateVMSAccountComment: 102 $ subroutine 102 $! 102 $ show process 102 $ ! 102 $ ! See if SYSUAF logical is set (& define if not) 102 $ ! 102 $ call define_sysuaf 102 $ ! 102 $ ! Start accounts executable via a foreign command. 102 $ ! 102 $ call AccountsExe 'P1 ! sets up symbol SSM_ACCOUNTS_EXE to point to the correct ssm-accounts-XXX.exe depending on hardware type 102 $ ! 102 $ accounts == SSM_ACCOUNTS_EXE 102 $ ! 102 $ ! Make sure account exists - if not then go no further. 102 $ ! 102 $ ! Show the account, send output to the null device. 102 $ ! 102 $ define /user sys$output nl: 102 $ mcr authorize show 'INPUT_UN 102 $ ! 102 $ if $status .ne. SS_NORMAL 102 $ then 102 $ write sys$output "@{{SE Account ''INPUT_UN' does not exist." 102 $ exit SS_ABORT 102 $ endif 102 $ ! 102 $ ! Verify that the Owner field matches the input 102 $ ! 102 $ define/user sys$output sys$scratch:sysgem_account_owner.tmp 102 $ mcr authorize sho 'INPUT_UN 102 $ call GetUIC_Owner sys$scratch:sysgem_account_owner.tmp 102 $ ! 102 $ if INPUT_ON .nes. ENTRY_ON 102 $ then 102 $ write sys$output "@{{SE Owner-Mismatch - Owner field: ''ENTRY_ON' does not match input specification: ''INPUT_ON'" 102 $ exit SS_ABORT 102 $ endif 102 $ ! 102 $ ! user exists and owner field matches - so update the comment field 102 $ ! 102 $ sud_userdata = "''INPUT_CT'" 102 $ sud_username = "''INPUT_UN'" 102 $ call dcl_command "accounts -s" 102 $ ! 102 $ ! Update Audit Trail 102 $ ! 102 $ call AddAuditTrailSysuaf "''P1'" - 102 "''INPUT_UN' Comment Field Modified by Sysgem" - 102 "modify" - 102 "flush mandatory alarm audit" 102 $ ! 102 $ ! 102 $ endsubroutine 102 $! 103 User=[System] Access=[Edit + Execute] 103 Token=[SAcM Full :: SAcM_Enable_VMS_Account] Access=[Edit + Execute] 103 Token=[SAcM Full :: Edit VMS Agent Include Files] Access=[Edit + Execute] @ 101 SAcM_GetVMS_UIC_Owner 102 $! 102 $ GetUIC_Owner: 102 $ subroutine 102 $! 102 $ is_open = 0 102 $ open /read /error=on_error tmp 'P1 102 $ is_open = 1 102 $! 102 $ next_line: 102 $ read /end_of_file=on_eof /error=on_error tmp line 102 $! 102 $! Fatal. 102 $! 102 $ if f$locate("UAF-F-",line) .lt. f$length(line) 102 $ then 102 $ write sys$output "@{{SE ''line'" 102 $ goto next_line 102 $ endif 102 $! 102 $! Error. 102 $! 102 $ if f$locate("UAF-E-",line) .lt. f$length(line) 102 $ then 102 $ write sys$output "@{{SE ''line'" 102 $ goto next_line 102 $ endif 102 $! 102 $! Warning. 102 $! 102 $ if f$locate("UAF-W-",line) .lt. f$length(line) 102 $ then 102 $ write sys$output "@{{SW ''line'" 102 $ goto next_line 102 $ endif 102 $! 102 $! Owner field from UAF default record 102 $! 102 $! Example: "Username: MIKET001 Owner: MikeT001" 102 $! 102 $ linelen = f$length(line) 102 $ index1 = f$locate("Owner: ", line) 102 $ if index1 .lt. linelen 102 $ then 102 $ ! 102 $ ! Isolate Owner field 102 $ ! 102 $ ENTRY_ON == f$extract(index1+8, 'linelen, line) 102 $ ! 102 $ endif 102 $ goto next_line 102 $! 102 $ on_error: 102 $ on_eof: 102 $! 102 $ if is_open .eq. 1 then close tmp 102 $! 102 $!mks set noverify 102 $ endsubroutine 102 $! 102 $!_______________________________________________________ 102 $! 103 User=[System] Access=[Edit + Execute] 103 Token=[SAcM Full :: SAcM_GetVMS_UIC_Group] Access=[Edit + Execute] 103 Token=[SAcM Full :: Edit VMS Agent Include Files] Access=[Edit + Execute] @ # # # # License Information. # #{{PRODUCT:Include Files #{{CREATED_BY:Sysgem AG,Zurich,8008,Switzerland # # Checksum. # #{{CHECKSUM:71A7-8318-3700-682F-8BA4-5D59-7651-720C