|  | 
   Out might be able to tweak the following DCL to perform the required
   task...  (The following is a generic tool used to invoke a specified
   command on a remote node -- one could update this procedure, or one
   could specify the appropriate PCSI command directly.  This suggestion
   would likely be based on what Jim mentioned in .1...)
$!
$!***************************************************************************
$!*                                                                         *
$!*  COPYRIGHT (c) 1988, 1992 BY                                            *
$!*  DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASSACHUSETTS.                 *
$!*  ALL RIGHTS RESERVED.                                                   *
$!*                                                                         *
$!*  THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED  *
$!*  ONLY IN  ACCORDANCE WITH  THE  TERMS  OF  SUCH  LICENSE  AND WITH THE  *
$!*  INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR  ANY  OTHER  *
$!*  COPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY  *
$!*  OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE IS  HEREBY  *
$!*  TRANSFERRED.                                                           *
$!*                                                                         *
$!*  THE INFORMATION IN THIS SOFTWARE IS  SUBJECT TO CHANGE WITHOUT NOTICE  *
$!*  AND  SHOULD  NOT  BE  CONSTRUED AS  A COMMITMENT BY DIGITAL EQUIPMENT  *
$!*  CORPORATION.                                                           *
$!*                                                                         *
$!*  DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE  OR  RELIABILITY OF ITS  *
$!*  SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.                *
$!*                                                                         *
$!***************************************************************************
$!
$!	RDECW.COM
$!
$!	RDECW.COM is used to get an application running on a remote node
$!	(over DECnet) and with a DECwindows display aimed back at the
$!	originating node.
$!
$!	The following command options or formats -- searched in order --
$!	are available.  Each command template is followed by an example of
$!	the template.
$!
$!	    = To activate a DECwindows terminal on the remote node:
$!		$ @SYS$LOGIN:RDECW    <node>	#DECTERM
$!		$ @SYS$LOGIN:RDECW    XDELTA	#DECTERM
$!
$!	    = To activate an image on the specified remote node...
$!		$ @SYS$LOGIN:RDECW    <node>	<image>
$!		$ @SYS$LOGIN:RDECW    XDELTA	SYS$SYSTEM:DECW$MAIL.EXE
$!
$!	    = To execute a single DCL command on the remote node...
$!		$ @SYS$LOGIN:RDECW    <node>	<dcl-command>
$!		$ @SYS$LOGIN:RDECW    XDELTA	NOTES/DECWINDOWS
$!
$!	DCL commands and utilities (such as NOTES) that support and/or accept
$!	a /DECWINDOWS or /FORMAT=DECWINDOWS display qualifier should always
$!	be specified with the DECwindows display qualifier enabled.
$!
$!	CONFIGURATION and SET-UP: A copy of this procedure must reside in the
$!	local login directory *and* the login directory of any node it is to
$!	be used remotely on.  (The remote directory might be a default network
$!	username/account, or it might be the default directory for a proxy
$!	login, or it could be the directory associated with an explicitly
$!	specified access control string.)
$!
$!	If you choose to modify this command procedure, *please* rename the
$!	result -- to avoid potential protocol collisions with this procedure.
$!	Do not (re)use the name RDECW.COM!  Thanks!
$!
$!
$!	M O D I F I C A T I O N    H I S T O R Y
$!
$!	V0.0-000|0|	prehistory	Steve Hoffman (XDELTA::HOFFMAN)
$!	RDECW.COM procedure written.
$!
$!	V1.2-000|2|	28-Feb-1990	Steve Hoffman (XDELTA::HOFFMAN)
$!	added protocol checks, added support for DCL commands.  This
$!	procedure assumes CREATE/TERM is present -- which means it
$!	will work on DECwindows V2 or better (VMS V5.3 and up) only.
$!
$!	V1.2-000|3|	06-Jan-1992	Steve Hoffman (XDELTA::HOFFMAN)
$!	(Hopefully) improved the set-up and configuration requirement
$!	comments.
$!
$!
$
$DECTERM:	SUBROUTINE
$   remnode = "''p1'"
$   Create/Terminal=DECTERM/Detach/Applic/Line/Logged_In "@SYS$LOGIN:LOGIN.COM"
$   Exit
$   EndSubroutine
$
$DECTERM:	SUBROUTINE
$   remnode = "''p1'"
$   Create/Terminal=DECTERM/Detach/Applic/Line/Logged_In "@SYS$LOGIN:LOGIN.COM"
$   Exit
$   EndSubroutine
$
$   Set NoOn
$   Set NoVerif
$   vers = "V1.1-000|2|RDECW"	! version|protocol|task
$   Goto 'F$Mode()'
$
$INTERACTIVE:
$
$!	This part runs only on the local/initiating/client node.
$
$DO_P1:
$   p1 = F$Edit(p1,"COLLAPSE,UPCASE") - "::"
$   If F$Leng(p1) .eq. 0
$   Then
$	msg = "Error reading input"
$	Read/Prompt="Node? "/Error=DONE Sys$Command p1
$	Goto DO_P1
$   EndIf
$DO_P2:
$   p2 = F$Edit(p2,"COLLAPSE,UPCASE")
$   If F$Leng(p2) .eq. 0
$   Then
$	msg = "Error reading input"
$	Read/Prompt="Application? "/Error=DONE Sys$Command p2
$	Goto DO_P2
$   EndIf
$   msg = "Error creating network connection"
$   Open/Read/Write/Error=DONE netlun 'p1'::"task=RDECW"
$   Read netlun remvers
$   Write netlun vers
$   msg = "Protocol error, mismatched RDECW versions"
$   remvers = F$Edit("''remvers'","UPCASE,COLLAPSE")
$   if F$Elem(1,"|","''vers'") .nes. F$Elem(1,"|","''remvers'") then goto DONE
$   msg = "Protocol error, unknown remote procedure"
$   if F$Elem(2,"|","''vers'") .nes. F$Elem(2,"|","''remvers'") then goto DONE
$   msg = "Error creating network connection"
$   Write netlun p2
$   Close netlun
$   msg = ""
$   Goto DONE
$!
$NETWORK:
$
$!	This part runs only on the remote/receiving/server node.
$
$   Set Verify
$   msg = "Error receiving network connection"
$   Open/Read/Write/Error=DONE netlun Sys$Net
$   Write netlun vers
$   Read netlun remvers
$   msg = "Protocol error, mismatched RDECW versions"
$   remvers = F$Edit("''remvers'","UPCASE,COLLAPSE")
$   if F$Elem(1,"|","''vers'") .nes. F$Elem(1,"|","''remvers'") then goto DONE
$   msg = "Protocol error, unknown remote procedure"
$   if F$Elem(2,"|","''vers'") .nes. F$Elem(2,"|","''remvers'") then goto DONE
$   msg = "Error receiving network connection"
$   Read netlun applic
$   Close netlun
$   remnode = F$TrnLnm("SYS$REM_Node") - "::"
$   Set Display/Create/Node='remnode'
$   If F$Len(remnode) .ne. 0
$   Then
$	prcnam = "''remnode'_" + F$Fao("!XW",f$getjpi(0,"PROC_INDEX"))
$	prcnam = F$Extr(0,15,prcnam)
$	Set Process/Name="''prcnam'"
$	If F$Extr(0,1,applic ) .eqs. "#"
$	Then
$	    applic = applic - "#"
$	    Call 'Applic' 'remnode'
$	Else
$	    If F$Search("''applic'","SYS$LOGIN:.EXE") .nes. ""
$	    Then
$		RUN 'applic'
$	    Else
$		'applic'
$	    EndIf
$	EndIf
$   Else
$	msg = "No remote node defined."
$	Goto DONE
$   EndIf
$
$   Exit
$
$BATCH:
$OTHER:
$   msg = "Unsupported F$MODE()"
$
$DONE:
$   If F$TrnLnm("netlun") .nes. "" Then CLOSE netlun
$   If F$Len(msg) .ne. 0 Then Write Sys$Output msg
$   Stop
$   Exit
 |