
This is a directory of quick and dirty subroutines that could make your
life easier when you write your new software.  They are all Macro source
files and are all built with the command:

		$ MACRO <file-name>

The subroutines are:

DELAY -- delay a process for some length of time.  Takes one parameter,
the time to delay, as an ASCII string descriptor.  Example calls from
FORTRAN or BASIC are:

		CALL DELAY('0 00:30:00.00')		! wait 30 seconds
		CALL DELAY('1-JAN-1988 00:00:00.00')	! wait until 1/1/87

MOVMBX -- causes all your temporary mailboxes to behave as they would
under V3.x, i.e. the logical names for them are in the GROUP table. This
requires GRPNAM privilege to use.  Call it with no parameters before
attempting to create any mailboxes.

		CALL MOVMBX

PCA$OBJ -- This is for PCA users who may move their images to machines
that do not have PCA (for example, a heterogenous VAXcluster like ours).
Rather than scream bloody murder if a PCA'd program is moved to a system
without PCA, this will just generate an error and then run the program.

QPRINT -- This is a subroutine that provides simple access to print queues
for (what else?) printing files.  There are two entry points: QPRINT, which
generates an error if it cannot print the job, and SNDPRT, which returns
an error status through R0.  Calling formats are:

	status=SNDPRT('file_name','queue_name',
		delete_on_completion,'form_name', no_feed)

	CALL QPRINT(same parameters) for system error handling

	file_name		- ASCII descriptor of the file name
	queue_name		- ASCII descriptor of the queue name
	delete_on_completion	- Boolean to tell wether the file should
				  be deleted after being printed
				  FALSE = don't delete, TRUE = delete
	form_name		- ASCII descriptor of the form name
	no_feed			- Boolean to tell wether the symbiont
				  should insert form_feeds in the printout
				  FALSE = insert form feeds, TRUE = don't

SETDMA -- This is for people (like us) who have DMZ32's and FMS.  DMZ32's
are DEC's 24 port remote-distribution terminal lines, and they do not work
very well in DMA mode.  FMS assumes that if a terminal can do DMA, it IS
doing DMA -- therefore not working well with our DMZ's with DMA turned off.
SETDMA turns on DMA for the lifetime of a single image.  Call it with no
parameters from any language.  At image exit, if DMA was not turned on, it
will turn it off.  If DMA was on the whole time, SETDMA is a no-op.

SETEXIT -- The poor man's exit handler.  Sets up an exit handler and a
CTRL/Y trap so that CTRL/Y forces an exit.  Pass it a subroutine address
and it will execute that subroutine before exiting.  FORTRAN example:

	external die
	call setexit(die)
	.
	.
	.
	subroutine die
	call sys$delprc(,)
	return
	end

SETUNIQUE -- sets unique process names the same way SPAWN does.  Pass it
a single parameter, the ASCII descriptor of the process name.  If someone
else has that process name, concatenate a _n to it.  Example:

	CALL SETUNIQUE('FOO')	! if FOO exists, become FOO_1.  If FOO_1
				! exists, then become FOO_2, and so on.

TRACEBACK -- forces a traceback from your program wherever you may want it.
Traceback has an optional ASCII descriptor parameter for an identifying
text before the stack unwind.  This does not change the normal flow of
execution of your code, unless you have a condition handler that has a
"catch-all" handler built in.  Calling format:

	CALL TRACEBACK
	CALL TRACEBACK('Finishing phase 1.')



					Eric Richards
					Gould Ocean Systems Division
					18901 Euclid Ave.
					Cleveland, OH 44117
					216/486-8300 Ex. 3073


[01-Oct-1986]
