|
It's a terminal window!
Here's my code to enable OPCOM messages to the session manager's
window. Most of the work is concerned with locating the TWAn:
device. You should be able to modify this proc so that it creates
a job-wide or system-wide logical name equated to 'tw', and then
your applications can open channels using the logical name.
$! Spawned from DECW$LOGIN.COM to set up the session
$! manager window as an operator terminal
$
$loop:
$ tw = f$getjpi(f$getjpi(0,"owner"),"terminal")
$ if tw .eqs. ""
$ then
$ wait 00:00:10
$ goto loop
$ endif
$
$ wait 00:00:30 ! it seems to take SM a while to be able to handle output
$
$ p = f$setprv("oper,security")
$ assign/user 'tw' sys$command
$ reply/enable
$ q = f$setprv(p)
$
$ exit
|
| $!Here is some code to do the same. More expensive and needs share priv
$!but doesn't need a system logical.
$!
$find_sess:
$ pid := 'f$pid(context)'
$ if "_''f$getjpi(pid,"imagname")'" .nes. -
"''f$logical("sys$common")'[SYSEXE]DECW$SESSION.EXE"
$ then if context .eq. 0 then exit ! quit if can't find it
$ goto find_sess
$ endif
$!
$ set proc/priv=share
$ open/write sessmgr _'f$getjpi(pid,"terminal")'
$ write sessmgr "Time now: " f$time()
$ close sessmgr
$ set proc/priv=noshare
$!
|