| This is off the top of my head; I know I've done something like
this before, but you may have to play around a bit to get it to
work.
-Rick
$ ! Set the terminal /NOLINE and /NOESCAPE to inhibit escape processing.
$ ! Set the terminal /NOECHO so the responses won't echo.
$ ! Then, request the report twice. Perform several reads to get back
$ ! The responses.
$ ! I can't find a TT_ECHO item for GETDVI, so I'm assuming it's
$ ! on..
$ esc_mode = f$getdvi("SYS$COMMAND:","TT_ESCAPE")
$ edit_mode = f$getdvi("SYS$COMMAND:","TT_EDITING")
$ SET TERM/NOESCAPE/NOLINE_EDIT/NOECHO
$ ESC[0,7]==27
$ WRITE SYS$OUTPUT ESC,"Z",ESC,"Z" ! Request ident
$ READ/PROMPT=""/TIME=1/ERROR=OK SYS$COMMAND FOO ! Read the escape
$OK:
$ READ/PROMPT=""/TIME=1/ERROR=OK1 SYS$COMMAND RESPONSE
$OK1:
$ READ/PROMPT=""/TIME=1/ERROR=OK2 SYS$COMMAND FOO ! Read the escape
$OK2:
$ READ/PROMPT=""/TIME=1/ERROR=OK3 SYS$COMMAND FOO ! Second response
$OK3:
$ IF esc_mode THEN SET TERM/ESCAPE
$ IF edit_mode THEN SET TERM/LINE_EDIT
$ SET TERM/ECHO
$ WRITE SYS$OUTPUT RESPONSE
$ EXIT
|
| re: .1
Thanks, that seemed to do the trick. Weird stuff, though, considering
that VMS is bright enough to parse escape sequences.
You will find a TT_NOECHO that you can use to check if /ECHO is set ...
-- Jeff
|