[comp.os.vms] typeahead?

LEICHTER@VENUS.YCC.YALE.EDU ("Jerry Leichter ", LEICHTER-JERRY@CS.YALE.EDU) (05/16/88)

	I just hate it when a vendor tells me "it can't be done".  I am trying
	to support a product that does not allow for a startup file.  The
	product is fairly complex, complete with a script language (like DCL).
	Since there  are a number of environmental variables that our users
	could profitably set  at startup time (abbreviations, search paths,
	terminal type, etc.) I assumed there would be a startup file.  The
	vendors, who develop on PRIMOS, tell me they don't have a portable
	startup mechanism, PRIMOS has some sort of "RESTART" work around.

	So I started playing with redefining SYS$INPUT, ^Y, deassigning,
	CONTINUE, etc.  but to no avail.  The terminals being used are without
	answerback, but I wondered--is it possible to write to the terminal
	typeahead buffer?

Sure.  All you have to do is write some kernel-mode code that finds the type-
ahead buffer, synchronizes properly with the I/O system, and stuffs the
characters in.

Now, if you want something SUPPORTABLE, that won't require a lot of hacking
and system crashes along the way, that can be guaranteed to work in later
versions of VMS - well, that's another story.

	I've read the terminal driver manual to no avail.  Can one flush the
	typeahead buffer and then write to it?

Actually, it is possible to "prime" the input buffer - but only as part of
the input operation - i.e., you'd have to change the program.  This facility
is used by DCL to implement multiple-line recall.  But that won't help you
here.

					        If so, I could stuff the
	"extra"  command I want executed immediately after the command to
	start the package:   "ARC^M&RUN STARTUP".  Is this too far fetched?

I'm afraid so.

Without more details about the particular problem, it's not easy to propose
solutions.  If all else fails, running the program through a controller that
use a PTY driver (from DECUS or elsewhere) would provide a solution, though
hardly the best one.

	(Waiting for the vendor to  see the light might take a while.)

Refusing to buy the product until it is fixed can be very illuminating!

							-- Jerry

R1ECGF@AKRONVM.BITNET (Doug Greenwald) (05/19/88)

We here run a Prime under Primos.  If you could tell us something about
what the package is, maybe someone here could help with your initialize
problem.

     Doug.