RASM MODIFICATIONS The program which actually delivers the plot information to the device runs as a subprocess under VQ. Communication between VQ and the subprocess is via mailboxes, and must adhere to a rigid protocol; failure to do so results in loss of synch, and you must restart everything to get going again. The program usually run in the subprocess is a slightly modified RASM, but if you are willing to make some mods to QRX and VQ, you can run anything you want there. The standard protocol is: 1. VQ delivers three lines of information to the subprocess. They contain, respectively, the name of the parameter file, the name of the vector file, and the name of the device to which the plot is directed. 2. VQ expects one, AND ONLY ONE, line to be returned from the subprocess. In FORTRAN terms, the data returned is the completion code, the CPU time used in seconds, and the number of direct IOs, in (' DONE ', i2, 1x, i4, 1x, i6) format. If accounting is turned off, the CPU time and IOs need not be supplied. 3. It is vital that all error printout statements be removed, and replaced with code which sets the completion code. Cluttering the mailbox with any kind of output other than the line described above will cause failure. I am using the Rev B VERSATEC RASM routine, for which the required modifications are as follows: 1. Vanilla RASM assumes that the files to be plotted are PARM.PLV and VECTR1.PLV, in the current default directory. I have modified IOPKG.MAR to open PARMFILE and VECTFILE; RASM reads in the actual file names and attaches the above logical names to them. 2. Vanilla RASM allocates the device "LV:". From the presence of the colon, I assume that they meant for this to be a logical name; if so, I don't understand the underscore. In any event, the device name must be read in by the main program, and the logical name "LV:" attached to it. Further, the allocate must be removed from MTX.MAR; the spooler allocates (and KEEPS) the plot device. 3. Standard RASM puts out a bunch of messages about lines used, vectors used, and so forth; these have been eliminated in favor of a single line at the end. Page 2 RASM inputs three lines: one is the PARM file name, two is the VECTR1 file name, and three is the device name. It outputs one line only, which contains a status code. The code is 0 ==> successful completion 1 ==> paramter/file mismatch (bad input file) 3 ==> INBUF array improperly dimensioned 4 ==> Map buffers exceeded Page 3 CODE MODIFICATIONS RASM At the beginning of the main program RASM, insert the following declaratives: INTEGER STAT, SYSMSG, SYS$CRELOG, ERROR, PFLEN, VFLEN INTEGER CPU, DIO CHARACTER*48 PFILE, VFILE, LVNAME Then remove the format statements numbered 1, 2, 3, 4, 6. Insert the following: ACCEPT 10, PFLEN, PFILE 10 FORMAT( Q, A ) ACCEPT 10, VFLEN, VFILE ACCEPT 10, LVLEN, LVNAME C STAT = SYSMSG(SYS$CRELOG(%VAL(2), 'PARM_FILE', 1 PFILE(1:PFLEN), ) ) C STAT = SYSMSG(SYS$CRELOG(%VAL(2), 'VECT_FILE', 1 VFILE(1:VFLEN), ) ) C STAT = SYSMSG(SYS$CRELOG(%VAL(2), 'LV', 1 LVNAME(1:LVLEN), ) ) C ERROR = 0 Next, modify all TYPE statements in RASM: change TYPE n to ERROR = n GO TO 7899 Delete entirely the line TYPE 6, LOST, MAXQ At the end of the main program, replace the line STOP '** End of RASM **' with CALL RXSTAT ( CPU, DIO ) CPU = (CPU+50) / 100 PRINT 8000, ERROR, CPU, DIO 8000 FORMAT(' DONE ', I2, 1X, I4, 1X, I6) CALL EXIT Page 4 IOPKG.MAR Modify both FAB's to accept logical names. Change PARM_FAB: $FAB FNA=PARM_NAME, - FNS=PARM_NAME_SIZ, - to PARM_FAB: $FAB FNM=, - And change VECTR1_FAB: $FAB FAB=VECTR1_NAME, - FNS=VECTR1_NAME_SIZ, - to VECTR1_FAB: $FAB FNM=, - Page 5 MTX.MAR Change LV_DESC: \_LV:\ to LV_DESC: \LV\ The section of code beginning with 10$: $ALLOC_S DEVNAM=LV_DESC and ending with the line JUST BEFORE 25$: $ASSIGN_S DEVNAM=LV_DESC - CHAN=LVCHAN must be removed. This is the code which allocates the device, and waits until it gets it. RASMX runs as a sub-process to VQ, and VQ owns the device permanently.