.FL CAPITALIZE .PS 60,72 .LM 8 .RM 72 .P 4,1 .AP .S 2 .c ;RASM MODIFICATIONS .s 3 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. .s 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. .s The standard protocol is: .ls .le 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. .le 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. .le 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. .els .s I am using the Rev B VERSATEC RASM routine, for which the required modifications are as follows: .s .ls .le 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 PARM_FILE and VECT_FILE; RASM reads in the actual file names and attaches the above logical names to them. .le 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. .le 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. .els 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 .s .lit 0 ==> successful completion 1 ==> paramter/file mismatch (bad input file) 3 ==> INBUF array improperly dimensioned 4 ==> Map buffers exceeded .end lit .pg .c ;CODE MODIFICATIONS .s .c ;RASM .s At the beginning of the main program RASM, insert the following declaratives: .s .lit INTEGER STAT, SYSMSG, SYS$CRELOG, ERROR, PFLEN, VFLEN INTEGER CPU, DIO CHARACTER*48 PFILE, VFILE, LVNAME .end lit .s Then remove the format statements numbered 1, 2, 3, 4, 6. Insert the following: .s .LIT 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 .end lit .s Next, modify all TYPE statements in RASM: change .s .lit TYPE n to ERROR = n GO TO 7899 .end lit .s Delete entirely the line .s .lit TYPE 6, LOST, MAXQ .end lit .s At the end of the main program, replace the line .s .lit 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 .end lit .pg .s 4 .c ;IOPKG.MAR .s Modify both FAB's to accept logical names. .s .lit 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=, - .end lit .pg .s 2 .c ;MTX.MAR .s .LIT Change LV_DESC: \_LV:\ to LV_DESC: \LV\ .END LIT .s The section of code beginning with .LIT 10$: $ALLOC_S DEVNAM=LV_DESC and ending with the line JUST BEFORE 25$: $ASSIGN_S DEVNAM=LV_DESC - CHAN=LVCHAN .END LIT .s 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.