$ v = f$verify (1) $!+ $! FILENAME: nsr$tmp:QACLUS_preprocess.cmd $!- $ set noon $ this_procedure := 'f$environment ("procedure")' $ proc_filename := 'f$parse (this_procedure,,,"name")' $ facility = proc_filename $ call signal 'facility' i begdcl "Starting command procedure nsr$tmp:QACLUS_preprocess.cmd." "" log nsr$logs:NSREXT.log no screen $ call SYMCLONE_OP activate "CLUSTERMOUNTED" "" "" "" 3 34 30 $ call signal 'facility' i pre "Pre-processing device group CLUSTERMOUNTED, Src: $1$DGA6922, Tgt: $1$DGA7252" "" log nsr$lo gs:NSREXT.log noscreen $ MOUNT/norebuild/noassist $1$DGA7252: DBDS5_COM DISK_DBDS5_COM $ DEFINE/system/exec LGTO$DBDS5_COM $1$DGA7252: $ call signal 'facility' i pre "Pre-processing device group CLUSTERMOUNTED, Src: $1$DGA6944, Tgt: $1$DGA7253" "" log nsr$lo gs:NSREXT.log noscreen $ MOUNT/norebuild/noassist $1$DGA7253: CLUQUEMAN DISK_CLUQUEMAN $ DEFINE/system/exec LGTO$CLUQUEMAN $1$DGA7253: $ call signal 'facility' i pre "Pre-processing device group CLUSTERMOUNTED, Src: $1$DGA6929, Tgt: $1$DGA7233" "" log nsr$lo gs:NSREXT.log noscreen $ MOUNT/norebuild/noassist $1$DGA7233: DBDS4_COM DISK_DBDS4_COM $ DEFINE/system/exec LGTO$DBDS4_COM $1$DGA7233: $ call signal 'facility' i pre "Pre-processing device group CLUSTERMOUNTED, Src: $1$DGA6949, Tgt: $1$DGA7237" "" log nsr$lo gs:NSREXT.log noscreen $ MOUNT/norebuild/noassist $1$DGA7237: SYS_PRODUCTS DISK_SYS_PRODUCTS $ DEFINE/system/exec LGTO$SYS_PRODUCTS $1$DGA7237: $ call signal 'facility' i pre "Pre-processing device group CLUSTERMOUNTED, Src: $1$DGA6953, Tgt: $1$DGA7378" "" log nsr$lo gs:NSREXT.log noscreen $ MOUNT/norebuild/noassist $1$DGA7378: DEVSECUREMAX DISK_DEVSECUREMAX $ DEFINE/system/exec LGTO$DEVSECUREMAX $1$DGA7378: $ call signal 'facility' i pre "Pre-processing device group CLUSTERMOUNTED, Src: $1$DGA6957, Tgt: $1$DGA7254" "" log nsr$lo gs:NSREXT.log noscreen $ MOUNT/norebuild/noassist $1$DGA7254: DBDS_MAESTRO DISK_DBDS_MAESTRO $ DEFINE/system/exec LGTO$DBDS_MAESTRO $1$DGA7254: $ call signal 'facility' i pre "Pre-processing device group CLUSTERMOUNTED, Src: $1$DGA6958, Tgt: $1$DGA7255" "" log nsr$lo gs:NSREXT.log noscreen $ MOUNT/norebuild/noassist $1$DGA7255: DBDSSYS1 DISK_DBDSSYS1 $ DEFINE/system/exec LGTO$DBDSSYS1 $1$DGA7255: $ call signal 'facility' i pre "Pre-processing device group CLUSTERMOUNTED, Src: $1$DGA6959, Tgt: $1$DGA7256" "" log nsr$lo gs:NSREXT.log noscreen $ MOUNT/norebuild/noassist $1$DGA7256: DBDSSYS2 DISK_DBDSSYS2 $ DEFINE/system/exec LGTO$DBDSSYS2 $1$DGA7256: $ call signal 'facility' i pre "Pre-processing device group CLUSTERMOUNTED, Src: $1$DGA6964, Tgt: $1$DGA7257" "" log nsr$lo gs:NSREXT.log noscreen $ MOUNT/norebuild/noassist $1$DGA7257: DBDSCOM2 DISK_DBDSCOM2 $ DEFINE/system/exec LGTO$DBDSCOM2 $1$DGA7257: $ call signal 'facility' i pre "Pre-processing device group CLUSTERMOUNTED, Src: $1$DGA6965, Tgt: $1$DGA7258" "" log nsr$lo gs:NSREXT.log noscreen $ MOUNT/norebuild/noassist $1$DGA7258: DBDS_TAPESYS DISK_DBDS_TAPESYS $ DEFINE/system/exec LGTO$DBDS_TAPESYS $1$DGA7258: $ call signal 'facility' i pre "Pre-processing device group CLUSTERMOUNTED, Src: $1$DGA6966, Tgt: $1$DGA7229" "" log nsr$lo gs:NSREXT.log noscreen $ MOUNT/norebuild/noassist $1$DGA7229: DBDS_USERDSK DISK_DBDS_USERDSK $ DEFINE/system/exec LGTO$DBDS_USERDSK $1$DGA7229: $ call signal 'facility' i pre "Pre-processing device group CLUSTERMOUNTED, Src: $1$DGA6982, Tgt: $1$DGA7412" "" log nsr$lo gs:NSREXT.log noscreen $ MOUNT/norebuild/noassist $1$DGA7412: CSWS_DBDS DISK_CSWS_DBDS $ DEFINE/system/exec LGTO$CSWS_DBDS $1$DGA7412: $ call signal 'facility' s enddcl "Command procedure nsr$tmp:QACLUS_preprocess.cmd completed." "" log nsr$logs:NSREXT.log n oscreen $ junk = f$verify (v) $ exit $status $! $!=============================================================================== $! S U B R O U T I N E S E C T I O N $!=============================================================================== $!+ $! Standard VMS message format subroutine. $! FORMAT: $! $!- $ SIGNAL: SUBROUTINE $! $ subrtn_verify = f$verify(0) $ set noon $ set nocontrol = y $ sgnl__status = %x1FFD8000 $ prefix = f$fao( "!%D %!AS-!AS-!AS, ", 0, P1, P2, P3 ) $ log_text = ( f$edit( P6, "upcase,collapse" ) .eqs. "LOG" ) $ suppress_screen_output = ( f$edit( p8, "upcase,collapse" ) .eqs. "NOSCREEN" ) $ i = 3 $ ! $ S10: $ ! $ i = i + 1 $ if ( i .gt. 5 ) then goto s19 $ if ( p'i .eqs. "" ) then goto s19 $ text = p'i $ if ( f$type( text ) .eqs. "INTEGER" ) then text = f$message( text ) $ if ( f$extract( 0, 1, text ) .nes. "%" ) then text = prefix + text $ if ( i .ge. 5 ) then text[25,1] := "_" $ if ( .not. suppress_screen_output ) then write sys$output text $ if ( log_text ) $ then $ if f$search (P7) .eqs. "" $ then $ open /write sys$output_file 'P7' ! Open a new file for output. $ else $ open /append sys$output_file 'P7' ! Open existing file for output. $ endif $ write sys$output_file "''text'" ! Write message to the log file. $ close sys$output_file $ endif $ goto s10 $ ! $ S19: $ ! $ if ( P2 .eqs. "W" ) then P2 = "I" $ junk = f$verify (subrtn_verify) $ exit sgnl__status + f$locate( P2, "WSEIF" ) $ endsubroutine $! $!============================================================================================ $! Standard SYMCLONE operation subroutine. $! FORMAT: [ $! ] $! Example: CALL SYMCLONE_OP ACTIVATE "testdg" "xmensys2" LDEV "dga3109" "3" "34" "20" $! Useful Wait Time Combinations: 3 sec, 34%, 20 times and 3 sec, 33%, 30 times. $!============================================================================================ $ SYMCLONE_OP: SUBROUTINE $! $ CHECK_P1: $! $ p1keyword = "\" + "''f$edit (p1, "collapse,upcase")'" + "\" $ p1keyword_list = "\ACTIVATE" + - "\RECREATE" + - "\" $ if f$locate (p1keyword, p1keyword_list) .eq. f$length (p1keyword_list) $ then $ call SIGNAL SYMCLONE_OP F INVP1 - "''p1' is not a valid keyword." - "Valid P1 options are: ''p1keyword_list'" - log - 'ls_signal_filespec' $ else $ _directive = "''p1'" $ if (p1 .eqs. "ACTIVATE") then _vquals = "-precopy -cycled" $ if (p1 .eqs. "RECREATE") then _vquals = "-copied" $ endif $! $ END_CHECK_P1: $! $ _dgname = "''p2'" $! $ CHECK_P3: $! $ if (p3 .nes. "") $ then $ ! $ CHECK_P4: $ ! $ p4keyword = "\" + "''f$edit (p4, "collapse,upcase")'" + "\" $ p4keyword_list = "\PDEV" + - "\HDEV" + - "\LDEV" + - "\" $ if f$locate (p4keyword, p4keyword_list) .eq. f$length (p4keyword_list) $ then $ call SIGNAL SYMCLONE_OP F INVP4 - "''p4' is not a valid keyword." - "Valid P4 options are: ''p4keyword_list'" - log - 'ls_signal_filespec' $ else $ if (p4 .eqs. "PDEV") then _bcv_type = "pd" $ if (p4 .eqs. "HDEV") then _bcv_type = "dev" $ if (p4 .eqs. "LDEV") then _bcv_type = "ld" $ endif $ ! $ END_CHECK_P4: $ ! $ ! $ CHECK_P5: $ ! $ if (p5 .eqs. "") $ then $ call SIGNAL SYMCLONE_OP F NULLP5 - "P5 is NULL." - "A target device MUST be specified when a source device is specified" - log - 'ls_signal_filespec' $ endif $ ! $ END_CHECK_P5: $ ! $ _source = "''p3'" $ _target = "''p5'" $ _pair = "''_source' BCV ''_bcv_type' ''_target'" $ else $ _pair = "" $ endif $! $ END_CHECK_P3: $! $ CHECK_P6: $! $ seconds = 3 $ if (p6 .nes. "") then seconds = p6 $! $ END_CHECK_P6: $! $ CHECK_P7: $! $ pct_increase = 34 $ if (p7 .nes. "") then pct_increase = p7 $! $ END_CHECK_P7: $! $ CHECK_P8: $! $ max_count = 20 $ if (p8 .nes. "") then max_count = p8 $! $ END_CHECK_P8: $! $ count = 0 $ total_seconds = 0 $ wait_time_sec = seconds $ Symclone_Success = 0 $ call CONVERT_TIME_FORMAT 'wait_time_sec' mm_ss $! $ CLONE_OP_LOOP: $! $ set noon $ symclone -g '_dgname' verify '_vquals' '_pair' $ Symclone_Status = (%x0000ffff.and.$status)/8 $ set on $ SHOW SYMBOL *_STATUS $ valid_state = (Symclone_Status .eq. Symclone_Success) $ SHOW SYMBOL VALID_STATE $ if (.not. valid_state) $ then $ count = count + 1 $ if (count .eq. max_count) $ then $ count = count - 1 $ call signal 'facility' e svtimeout - "Symclone Verify operation timed out." - "Total wait time was ''total_seconds' seconds for a maximum of ''count' intervals." - log - nsr$logs:NSREXT.log $ endif $ wait 'mm_ss' $ total_seconds = total_seconds + seconds $ wait_time_sec = seconds + (seconds * pct_increase) / 100 $ call CONVERT_TIME_FORMAT 'wait_time_sec' mm_ss $ seconds = wait_time_sec $ goto CLONE_OP_LOOP $ else $ call signal 'facility' i svstat - "Symclone Verify operation statistics:" - "Total wait time was ''total_seconds' seconds for ''count' intervals." - log - nsr$logs:NSREXT.log $ gosub DO_'_directive' $ endif $! $ END_CLONE_OP_LOOP: $! $ if f$type (mm_ss) .nes. "" then delete/symbol/global mm_ss $ exit $status $! $ DO_RECREATE: $! $ symclone -g '_dgname' -v -noprompt recreate -precopy '_pair' -star $ emc$status = $status $ return $status $! $ DO_ACTIVATE: $! $ symclone -g '_dgname' -v -noprompt activate -consistent '_pair' -star $ emc$status = $status $ return $status $ ENDSUBROUTINE $!============================================================================================ $! Convert time format subroutine. $! FORMAT: $! Example: CALL CONVERT_TIME_FORMAT 92 mm_ss $! DESC: Converts decimal seconds to delta time (0:minute:seconds) format. This subroutine is $! limited to the delta time 00:59:59, after which it overflows. $!============================================================================================ $! $ CONVERT_TIME_FORMAT: subroutine $! $ cvtim = f$verify (0) $ dseconds = p1 $ 'p2' :== "" $ minutes = 0 $ seconds = 0 $ remainder_seconds = dseconds $ CONVERT_LOOP: $ if (dseconds .ge. 60) $ then $ remainder_seconds = dseconds - 60 $ minutes = minutes + 1 $ dseconds = remainder_seconds $ else $ seconds = remainder_seconds $ goto END_CONVERT_LOOP $ endif $ goto CONVERT_LOOP $ END_CONVERT_LOOP: $ if (minutes .gt. 59) then minutes = "GREATER_THAN_59_MINS" $ 'p2' :== "0:''minutes':''seconds'" $ junk = f$verify (cvtim) $ exit $status $ ENDSUBROUTINE