$! ********************************************************************** $! * ONSYS.COM * $! * Execute a command on a remote system. * $! * * $! * Format: * $! * @ONSYS nodename[,nodename...] command * $! * Example: * $! * @ONSYS JUICE,FLASH SHOW USERS/FULL * $! * * $! * ** A default DECnet proxy is required on the remote system(s). * $! * * $! * 3-DEC-1999 RDJ Command Procedure Creation. * $! ********************************************************************** $ On Control_Y Then Goto Abort $ If (P1 .EQS. "") .OR. (P2 .EQS. "") $ Then $ Write SYS$OUTPUT "%",F$Parse(F$Environment("Procedure"),,,"Name"),"-W-SYNTAX, invalid command syntax" $ Write SYS$OUTPUT " Format: ",F$Parse(F$Environment("Procedure"),,,"Name")," nodename command" $ Exit %x3804a $ EndIf $ Tmp_File = "ONALL.TMP" $ ESC[0,8] = 27 $ NodeList = F$Edit(P1,"Trim,UpCase") $ CmdTotal = P2 + " " + P3 + " " + P4 + " " + P5 + " " + P6 + " " + P7 + " " + P8 $ Cmd = F$Edit(CmdTotal,"Trim,UpCase,UnComment") $ NodeNum = 0 $ Get_Next_Node: $ Node = F$Element(NodeNum,",",NodeList) $ If Node .EQS. "," Then Goto No_More_Nodes $ Write SYS$OUTPUT ESC,"[1mExecuting on node ''Node'...",ESC,"[0m" $ Close/NoLog ComFile $ Open/Write ComFile 'Node'::'Tmp_File' $ Write ComFile "$ Define SYS$OUTPUT SYS$NET" $ Write ComFile "$ ",Cmd $ Write ComFile "$ Deassign SYS$OUTPUT" $ Close ComFile $ Type 'Node'::"0=''Tmp_File'" $ Delete/NoLog/NoConfirm 'Node'::'Tmp_File';* $ NodeNum = NodeNum + 1 $ Goto Get_Next_Node $ No_More_Nodes: $ Exit $! $ Abort: $ Close/NoLog ComFile $ If F$Type(Node) .NES. "" $ Then $ If F$Search("''Node'::''Tmp_File'") .NES. "" Then - Delete/NoLog/NoConfirm 'Node'::'Tmp_File';* $ EndIf $ Write SYS$OUTPUT "" $ Write SYS$OUTPUT "(aborted)" $ Exit