From:	MERC::"uunet!CRVAX.SRI.COM!RELAY-INFO-VAX"  8-MAY-1992 21:23:04.01
To:	info-vax@kl.sri.com
CC:	
Subj:	Re: Clearing screens in VMS.


Since everyone's posting their favorite solution, here's mine:

$ esc[0,7]=27
$ si[0,7]=15
$ e = esc+""","""
$ Sc == "Write Sys$Output "+ -
     """"+si+e+"[?4l"+e+"[H"+e+"[r"+e+">"+e+"[2J"+e+"[0m"+""""

I know it looks complicated. It not only clears the screen and resets the cursor
to the top, but it also clears a few other weird modes, like graphics character
set and other things that occasionally happen when you TYPE a binary file by
accident. Also, the sc string itself is a command that does these things. The
string itself is safe to do a show symbol on, because all the escape sequences
are broken in half. I did this because I got tired of my screen clearing in the
middle of a show sym/g/all.

This may use some stuff that only works on VT200 series or later, I'm not sure.
I'm also sure that there are other things that could be reset. I just haven't
ever had to worry about them much.
--
Terry Poot <tp@mccall.com>                   The McCall Pattern Company
(uucp: ...!rutgers!depot!mccall!tp)          615 McCall Road
(800)255-2762, in KS (913)776-4041           Manhattan, KS 66502, USA

