OpenVMS Source Code Demos

DECNET_DEMO_C.COM

$!===========================================================================
$! title  : Decnet_demo_c.com (decnet demo client)
$! author : Neil Rieck
$! created: 2011-08-02
$! notes  :
$! 1. This program will start a program (TASK) on a remote node
$! 2. The DECnet task name must be <= 16 chars but some specs say 12
$! 3. If not installed in DECnet, the remote program must be in the remote
$!	user's directory
$! 4. Don't want to send a password from the script? Define a SYSUAF proxy
$!===========================================================================
$   set noon
$   say :== write sys$output
$   open/read/write server kawc15"neil password"::"task=decnet_demo_s"
$   msg = "hello there 1 2 3"
$   say "-i-sending: ",msg
$   write server msg
$   read/wait/time_out=5 server buffer
$   say "-i-received: ", buffer
$my_error:
$   close server
$   exit