From:	MERC::"uunet!CRVAX.SRI.COM!RELAY-INFO-VAX" 30-APR-1992 08:55:01.47
To:	info-vax@kl.sri.com
CC:	
Subj:	Re: Clearing screens on a vt320 in vms

In article <1992Apr25.142854.1258@EE.Surrey.Ac.UK>, 
R.Smithers@ee.surrey.ac.uk (Russell Smithers) writes:
> How do I clear a vt320 terminal in c on a VMS?


Clearing Screens on a vt330/vt220/vt240/vt100


/* note sys$output is opened as a 
   binary file. if we leave it as text file */
/* ie. take the default, 
   then it automatically does a line feed after the  */
/* text, hence clear screen is 
followed by a line feed.                    */

#include stdio
FILE *fp,*fopen();

MAIN ()
{
 if ((fp = fopen("SYS$OUTPUT:","wb")) == NULL)
     printf("Cannot open file SYS$OUTPUT \n");
 else
    { 
     fprintf(fp,"\033[H\033[2J");
     fprintf(fp,"\033[1;r");
     fclose(fp);
    }    
}

Hope this helps,

	Declan Higgins.     .......... dhiggins@bfsec.bt.co.uk



