File: interactive.com

package info (click to toggle)
dnprogs 2.43.2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,936 kB
  • ctags: 3,872
  • sloc: ansic: 24,686; cpp: 10,608; makefile: 769; sh: 551; awk: 13
file content (27 lines) | stat: -rw-r--r-- 711 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$! Example "INTERACTIVE" task for dntask
$!
$! Put this command procedure in your SYS$LOGIN directory and
$! call it from Linux using the command 
$!    dntask -i myhost::interactive
$! You can then type in DCL commands and the output will be send to
$! standard output on the Linux machine.
$!
$! For a non-interactive task see SHOW_SYSTEM.COM
$!
$ open/read/write linux sys$net
$ nextcmd:
$!
$ cmd="!"
$ read /prompt="" /end=eof_end /error=error_end linux cmd
$ if "''cmd'" .eqs. "exit" then $ goto endtask
$ if "''cmd'" .eqs. "" then $ goto nextcmd
$ define/nolog/user sys$output linux
$ define/nolog/user sys$input linux
$ cmd
$ goto nextcmd
$!
$ error_end:
$ eof_end:
$ endtask:
$ close/nolog linux
$ exit