			RSX to VAX/VMS

	Enclosed are some command files we have developed to ease our
migration to VMS.  To make life simpler, we migrated command files which
were frequently used on our system to VMS.  Also there is a program
TESTFILE.EXE which can be used the same way .TESTFILE can be used on RSX.
IF $STATUS is not = 1, the file does not exist.  Set up TESTFILE as a 
foreign command. Then

$	TESTFILE <filespec>
$	IF $STATUS .NE. 1 THEN WRITE SYS$OUTPUT "<filespec> does not exist"

Using this makes command file writing much simpler.  A program like TESTFILE
is trivial to write using VAX Fortran's INQUIRE statement.  

      Enclosed also is the start, very tentative to be sure, of a subroutine
library to help us convert our RSX Fortran tasks to run under VMS without
coding changes. At present, CALL GETMCR and CALL WAIT are correctly supported,
CALL SPAWN and CALL RECIEV are cummied out for the present to let us build
and test several of our tasks. One Macro-32 subroutine is provided to
allow for the quadword multiply required for setting up the VMS time to wait
on. One Macro-32 subroutine is provided to replace the RSX GETADR routine,
and one is provided so that a Fortran program can find out how many
arguments were passed to it.

	Finally, enclosed is a start at some routines to do BLOCK I/O from
Fortran.  The idea was gotten from an article in the Page Swapper.  I 
interfaced the idea to the VAX Fortran USEROPEN statement.  The subroutines
are not yet complete since I have not been able to find the RMS routine
which is equivalent to $FCHNL for F77/FCS under RSX, ie I have no way of
finding the RAB address after I exit the USEROPEN routine given just the 
input LUN.  Hence, calls are provided for storing and reinserting a 
previously stored RAB address.  I SPRed my need for additional information,
so I suspect that eventually, I will get the information from the VMS
Fortran group.  Until then, I am supplying them, since it took me a bit of
work to get it to work with USEROPEN.  One additional warning.  My logic
on CREATE/OPEN is still screwed up. If I open a file as READONLY and the file
does not exist, it gets created.  I have not yet been able to figure out
how to tell from within the context of the USEROPEN routine whether or not
the file is is readonly and not to be created, etc.  Someday...  Till then,
however, I hope it saves someone some time.  It is remarkable how few
examples of using USEROPEN there.  120000 blocks of programs on an RM03
of various VAX Sig tapes and not a single user open, or a single use of
either RMS BLOCK I/O to a disk or QIO's to a disk for faster yet I/O.
Just wait till all you RSX types out there start trying to do your VMS
thing RSX style!!
					Jim Downward

					"Still RSX at Heart"
					03-May-1982
