From: Richard [maher_rjNOmaSPAM@hotmail.com.invalid] Sent: Wednesday, July 12, 2000 8:09 AM To: Info-VAX@Mvb.Saic.Com Subject: Re: RE: Direct OPCOM messages to e-mail account Hi Carleen, As promised here's a quick program that may or may not be of any use to you whatsoever. Please let me know if it helps. I've never used these services before but if "they do what they say on the tin" then it may work. The idea revolves around "cluster buddies" :-) To take your example where there are 3 nodes say A, B and C then A will watch B and B will watch C and C will watch A. This should be set up by the system manager in the node specific startup. You should define a system logical CLUSTER_BUDDY at exec mode to point to the node that should be watched. You should then $run/detach sys$system:loginout.exe/input = "a com file that just runs the following image" /output = "a log file that you can check every now and then" You may want to change it so that all nodes loop around checking for all other nodes but then you'll get multiple pager messages. There are obviously short falls with this strategy but you could say that about any strategy. do a $MAC/LIS on the following:- .title External Symbol Definitions $psldef GLOBAL $lnmdef GLOBAL $cluevtdef GLOBAL .end Then do a $COB/LIS on the following:- identification division. program-id. pair_up. * data division. working-storage section. * 01 remove_node_ast pointer value external remove_node_ast. 01 cluevt$c_remove pic 9(9) comp value external cluevt$c_remove. 01 lnm$m_case_blind pic 9(9) comp value external lnm$m_case_blind. 01 psl$c_exec pic 9(9) comp value external psl$c_exec. 01 psl$c_user pic 9(9) comp value external psl$c_user. 01 ss$_wasclr pic 9(9) comp value external ss$_wasclr. 01 ss$_wasset pic 9(9) comp value external ss$_wasset. 01 ss$_normal pic 9(9) comp value external ss$_normal. 01 sys_status pic 9(9) comp. * 01 buddy_list. 03 item_string. 05 pic 9(4) comp value 6. 05 pic 9(4) comp value external lnm$_string. 05 pointer value reference node_name. 05 pointer value reference node_name_len. 03 pic 9(9) comp. 01 ast_params. 03 node_name pic x(6). 03 node_name_len pic 9(4) comp. 03 test_flag pic x value "Y". 01 test_handle pic 9(18) comp. * procedure division. 00. call "sys$trnlnm" using by reference lnm$m_case_blind by descriptor "LNM$SYSTEM_TABLE", "CLUSTER_BUDDY" by reference psl$c_exec, buddy_list giving sys_status. if sys_status not = ss$_normal call "lib$stop" using by value sys_status. move function upper-case (node_name(1:node_name_len)) to node_name. *+ * Take the phone off the hook until we're ready. *- call "sys$setast" using by value 0 giving sys_status. if sys_status not = ss$_wasset call "lib$stop" using by value sys_status. call "sys$setcluevt" using by value cluevt$c_remove, remove_node_ast by reference ast_params by value psl$c_user by reference test_handle giving sys_status. if sys_status not = ss$_normal call "lib$stop" using by value sys_status. call "sys$tstcluevt" using by reference test_handle by value psl$c_user, 0 giving sys_status. if sys_status not = ss$_normal call "lib$stop" using by value sys_status. display "Initialization complete. Hibernating...zzzzzzzzz". call "sys$setast" using by value 1 giving sys_status. if sys_status not = ss$_wasclr call "lib$stop" using by value sys_status. call "sys$hiber". stop run. * end program pair_up. identification division. program-id. remove_node_ast. * data division. working-storage section. * 01 my_entry_mask pointer value external remove_node_ast. 01 cluevt$c_remove pic 9(9) comp value external cluevt$c_remove. 01 psl$c_user pic 9(9) comp value external psl$c_user. 01 ss$_nosuchnode pic 9(9) comp value external ss$_nosuchnode. 01 ss$_normal pic 9(9) comp value external ss$_normal. 01 sys_status pic 9(9) comp. * 01 node_list pic 9(9) comp. 01 syi_iosb. 03 iosb_status pic 9(9) comp. 03 pic 9(9) comp. * linkage section. 01 ast_params. 03 node_name pic x(6). 03 node_name_len pic 9(4) comp. 03 test_flag pic x. procedure division using ast_params. 00. call "sys$setcluevt" using by value cluevt$c_remove, my_entry_mask by reference ast_params by value psl$c_user, 0 giving sys_status. if sys_status not = ss$_normal call "lib$stop" using by value sys_status. if test_flag = "Y" display "This a Test Run only". call "sys$getsyiw" using by value 0, 0 by descriptor node_name(1:node_name_len) by reference node_list, syi_iosb by value 0, 0 giving sys_status. if sys_status = ss$_normal move iosb_status to sys_status. *+ * You would replace the following "display" statements with calls * to your pager software or lib$spawns etc. *- evaluate sys_status when ss$_normal display "Ok! it wasn't us :-)" when ss$_nosuchnode display node_name (1:node_name_len), " has left the building!" when other call "lib$stop" using by value sys_status end-evaluate. if test_flag = "Y" display "Test Complete" move "N" to test_flag. exit program. * end program remove_node_ast. Then link a,b and you're away! Regards Richard Maher. * Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful