PAGESWAPPER Allocate UBA Map Registers in the same 32K Unibus Address Space By: Chuan C. Kao Northrop Avionics Integration Laboratory Northrop Corporation, Hawthorne, California 90250 An Unibus address in VAX 11/780 consists of 18 bits. Bits 16 and 17, the Unibus address extension bits, label the four 32K Unibus address space portions as 0, 1, 2, and 3. Some Unibus devices can not, in a block transfer, access more than one 32K portion of Unibus address space. For these devices, bits 16 and 17 of all Unibus addresses used in the block transfer must remain static. Examples of these devices are DEC DR11B, and Multiplex Bus Terminal (Digital Technology Inc.). The buffers in VAX memory are mapped into Unibus 18-bit address space via UBA map registers. The UBA map register number constitutes the upper nine bits of the 18-bit Unibus address. VAX UBA map registers can also be grouped into four sets: 0-3. An UBA contains 496 map registers numbered from 0 to 495. So the four sets of UBA map registers are: 0-127, 128-255, 256-383, and 384-495. UBA map register set 0, 1, or 2 contains 128 map registers each, and set 3 contains 112 UBA map registers. A device driver program for a device with the 32K Unibus address space accessing restriction as described above must ensure that the UBA map registers allocated belong to the same set, such that the Unibus addresses composed will fall into the same 32K Unibus address space. PAGESWAPPER - March 1984 - Volume 5 Number 9 Allocate UBA Map Registers in the same 32K Unibus Address Space VAX/VMS does not provide a "supported" routine that will allocate UBA map registers of the same set. (A VAX/VMS routine is "supported" if it is documented in the manual "Guide to Writing a Device Driver".) Therefore, an algorithm is given in this article to allocate a specified number of UBA map registers that are of the same UBA map register set. The logic description and an implementation of the algorithm, which is named ALLOCATE_UBAMAPREG_SAMESET, will both be presented. The logic description and an implementation of an example calling code will also both be shown. In algorithm ALLOCATE_UBAMAPREG_SAMESET, there is no "unsupported" VMS routines or data structures assumed. That is, the algorithm once implemented should be compatible with future VMS releases. A simple analysis of the algorithm will be given at the end of the article. The logic description of algorithm ALLOCATE_UBAMAPREG_SAMESET The algorithm assumes two VMS supported routines. The first one is IOC$ALOUBAMAPN, which will allocate a requested number of UBA map registers. The UBA map registers allocated are specified by the first UBA map register number (CRB$L_INTD+VEC$W_MAPREG) and total number of UBA map registers (CRB$L_INTD+VEC$B_NUMREG). The execution status will be returned by routine IOC$ALOUBAMAPN via register R0. The second routine called is IOC$RELMAPREG, which will release a group of UBA map registers as specified by the first UBA map register number (CRB$L_INTD+VEC$W_MAPREG) and total number of UBA map registers (CRB$L_INTD+VEC$B_NUMREG). The steps of setting up required input parameters, and the steps of checking output parameters, of these two VMS routines are not shown in the following PDL-like description of the algorithm. Instead, the logic shown below uses a variable STATUS_FLAG as the output parameter of the algorithm, and CONTINUE_FLAG as a local variable to control the "Do while" loop. The following is a PDL-like logic description of the algorithm: 2 PAGESWAPPER - March 1984 - Volume 5 Number 9 Allocate UBA Map Registers in the same 32K Unibus Address Space Set CONTINUE_FLAG to 1 Do while (CONTINUE_FLAG) Call IOC$ALOUBAMAPN to get a specified number of UBA map registers. If failed (No extent of the requested size exists.) If there are sub-extents temporarily kept then Loop to call routine IOC$RELMAPREG to release all sub-extents temporarily kept. endif Set CONTINUE_FLAG to 0 (to exit the "Do while" loop). Set STATUS_FLAG to 0 (to indicate failure). else (found an extent of requested size.) If the extent is in the same quarter then (Bits 7-8 of the first and those of the last map registers, or bits 16-17 of an assembled 18-bit Unibus address, are equal.) If there are sub-extents temporarily kept then Loop to call routine IOC$RELMAPREG to release all sub-extents temporarily kept. endif Set CONTINUE_FLAG to 0 (to exit the "Do while" loop). Set STATUS_FLAG to 1 (to indicate success). else (The extent resides on the boundary of two quarters.) Identify the two sub-extents out of the extent just obtained. (The two sub-extents belong to different but adjcent quarters.) Keep the first sub-extent. Call routine IOC$RELMAPREG to release the second sub-extent. Fall through the "Do while" loop and try again. endif endif enddo (end of the "Do while" loop) 3 PAGESWAPPER - March 1984 - Volume 5 Number 9 Allocate UBA Map Registers in the same 32K Unibus Address Space An implementation of algorithm ALLOCATE_UBAMAPREG_SAMESET ;++ ; Define tables to control UBA map register sub-extents ; temporarily kept and are to be released. Each UBA map ; register sub-extent is defined by the first map register ; number and the total number of map registers. The table ; entries are paired together by table index. For example, ; the first table entry of table TEMP_MAPREG is paired with ; the first table entry of table TEMP_NUMREG. These tables ; are internal to, and only accessed by routine ; ALLOCATE_UBAMAPREG_SAMESET. ; ; The reason why the table sizes are three entries is explained ; in the last section of this article. ;-- TEMP_MAPREG: ;The first map register number .REPT 3 ;Up to three sub-extents .WORD 0 ; .ENDR ; TEMP_NUMREG: ;Total number of map registers .REPT 3 ;Up to three sub-extents .BYTE 0 ; .ENDR ; .SBTTL ALLOCATE_UBAMAPREG_SAMESET ;++ ; ALLOCATE_UBAMAPREG_SAMESET: ; ; This routine loops to allocate a requested number of UBA ; map registers of the same 32K Unibus address space. ; ; Input: ; R3=# of map registers requested. ; R5=UCB address ; R8=CRB address ; ; Output: ; R0=Status code. One means success. In this case, CRB ; fields CRB$L_INTD+VEC$W_MAPREG and ; CRB$L_INTD+VEC$B_NUMREG specifies the UBA map ; registers allocated. A zero in R0 means failure. ; In this case, CRB fields CRB$L_INTD+VEC$W_MAPREG ; and CRB$L_INTD+VEC$B_NUMREG contain zeros. ;-- ALLOCATE_UBAMAPREG_SAMESET: ;Entry point PUSHR #^M ;Save registers CLRL R7 ;Initialize # of sub-extents ;to be kept temporarily 4 PAGESWAPPER - March 1984 - Volume 5 Number 9 Allocate UBA Map Registers in the same 32K Unibus Address Space ALLOCATE_LOOP: ;R3=# of map registers ;requested ;R5=UCB address JSB G^IOC$ALOUBAMAPN ;Request the map registers BLBC R0,RELEASE_SUBEXTENTS ;Branch if failed MOVZWL CRB$L_INTD+VEC$W_MAPREG(R8),R2; ;Get the first map reg # MOVZBL CRB$L_INTD+VEC$B_NUMREG(R8),R1; ;Get total # of map registers ADDL3 R2,R1,R0 ;Calculate the last map reg # DECL R0 ;Get the last map reg # ASHL #-7,R0,R0 ;Get bits 7-8 of the last ;map reg # ASHL #-7,R2,R2 ;Get bits 7-8 of the first ;map reg # CMPL R0,R2 ;Are bits 7-8 equal ? BNEQ IDENTIFY_SUBEXTENTS ;Branch if not MOVZWL CRB$L_INTD+VEC$W_MAPREG(R8),R10; ;Save the first map reg # MOVZBL CRB$L_INTD+VEC$B_NUMREG(R8),R11; ;Save total # of map registers MOVZBL #1,R0 ;Set status code BRB RELEASE_SUBEXTENTS ;Quit IDENTIFY_SUBEXTENTS: ;Identify two sub-extents MOVW CRB$L_INTD+VEC$W_MAPREG(R8),- ;Save the first map TEMP_MAPREG[R7] ; register # MOVZWL CRB$L_INTD+VEC$W_MAPREG(R8),R2;Get the 1st map reg ;# of the first sub-extent BISL3 #^X7F,R2,R0 ;Get the last map register ;# of the first sub-extent SUBL3 R2,R0,R1 ;Calculate total of map reg. ;of the first sub-extent INCL R1 ;Get the total of map ;registers of the first ;sub-extent MOVB R1,TEMP_NUMREG[R7] ;Save the total of map reg. ;of the first sub-extent INCL R7 ;Increment the # of ;sub-extents temporarily kept INCL R0 ;Get the first map reg. # ;of the second sub-extent MOVZBL CRB$L_INTD+VEC$B_NUMREG(R8),R2;Get total of map reg SUBL R1,R2 ;Get total # of map reg. of ;the second sub-extent MOVW R0,CRB$L_INTD+VEC$W_MAPREG(R8);Save the first ;map register #. MOVB R2,CRB$L_INTD+VEC$B_NUMREG(R8);Save total # of 5 PAGESWAPPER - March 1984 - Volume 5 Number 9 Allocate UBA Map Registers in the same 32K Unibus Address Space ;map registers. JSB G^IOC$RELMAPREG ;Release the second sub-extent BRW ALLOCATE_LOOP ;Branch back to try again RELEASE_SUBEXTENTS: ;Release sub-extents kept ;temporarily PUSHL R0 ;Save status code TSTL R7 ;Any sub-extents to release ? BLEQ LOOP_DONE ;Branch if not RELEASE_LOOP: ; SUBL3 #1,R7,R0 ;Get a table index MOVW TEMP_MAPREG[R0],- ;Save the first map CRB$L_INTD+VEC$W_MAPREG(R8);register # MOVB TEMP_NUMREG[R0],- ;Save total # of CRB$L_INTD+VEC$B_NUMREG(R8);map registers JSB G^IOC$RELMAPREG ;Release map registers ;R0-R2 destroyed SOBGTR R7,RELEASE_LOOP ;Loop back if more to do LOOP_DONE: ; ;Assume failure CLRW CRB$L_INTD+VEC$W_MAPREG(R8);Clear CRB fields CLRB CRB$L_INTD+VEC$B_NUMREG(R8);(Same) ; POPL R0 ;Get status code back BLBC R0,LOOP_DONE2 ;Branch if failed MOVW R10,- ;Restore the 1st map CRB$L_INTD+VEC$W_MAPREG(R8);register # MOVB R11,- ;Restore total # of map CRB$L_INTD+VEC$B_NUMREG(R8);registers. LOOP_DONE2: ; POPR #^M ;Restore registers RSB ; 6 PAGESWAPPER - March 1984 - Volume 5 Number 9 Allocate UBA Map Registers in the same 32K Unibus Address Space The logic description of an example calling code When one plans to use routine ALLOCATE_UBAMAPREG_SAMESET, the following decisions which are application dependent must be made: (1) The number of UBA map registers to be requested (2) Routine ALLOCATE_UBAMAPREG_SAMESET is called in controller (unit) initialization routine or in start i/o routine (3) Error processing should the status code from routine ALLOCATE_UBAMAPREG_SAMESET indicate a failure. Here the algorithm of an example calling code is given. In this example, the goal is to allocate the maximum number of UBA map registers out of an UBA map register set. As pointed out earlier in this article, an UBA map register set can have either 128 or 112 map registers. Therefore, in this example, an attempt of allocating 128 UBA map registers is tried. If that is not achievable, 112 will be tried. If both attempts fail, an application dependent error processing will be started. Error processing is application dependent so is not elaborated in the example. If this example is included in the device controller (unit) initialization routine and if both attempts of allocating UBA map registers fail, it means when the target device is connected, there have been more than 384 out of 496 UBA map registers already preallocated by other device driver programs. It then is fair to say that the Unibus is being used close to its maximum limit and the Unibus configuration needs to be reviewed. One example of such an Unibus configuration would be connecting more than four target devices on the same Unibus. When the fifth target device is connected, there will be not enough UBA map registers left. Therefore, the success rate of the UBA map register allocation as shown in the example is reasonably high. The following is a PDL-like description of the logic: Call routine ALLOCATE_UBAMAPREG_SAMESET to allocate 128 map reg. If failed then Call routine ALLOCATE_UBAMAPREG_SAMESET to allocate 112 map reg. If failed then 7 PAGESWAPPER - March 1984 - Volume 5 Number 9 Allocate UBA Map Registers in the same 32K Unibus Address Space Start application specific error processing. endif endif 8 PAGESWAPPER - March 1984 - Volume 5 Number 9 Allocate UBA Map Registers in the same 32K Unibus Address Space An implementation of the calling code ;++ ; When this portion of code is entered, assume: ; ; R6=DDB address ; R8=CRB address ; PUSHR #^M ;Save registers ; ; Register usage: ; ; R5=UCB address ; R3=Number of map registers to allocate ; R0=Status code returned by routine ALLOCATE_UBAMAPREG_SAMESET ; MOVL DDB$L_UCB(R6),R5 ;Get address of UCB. MOVZBL #128,R3 ;# of map registers to ;allocate JSB ALLOCATE_UBAMAPREG_SAMESET ;Make the request BLBS R0,ALL_DONE ;Branch if successful ;The first attempt failed. ;Try a smaller size MOVZBL #112,R3 ;# of map registers to ;allocate JSB ALLOCATE_UBAMAPREG_SAMESET ;Make the request BLBS R0,ALL_DONE ;Branch if successful ;Both attempts failed. ; ; Application dependent error processing should be added here. ; ; BRB ALL_DONE ;Quit ALL_DONE: POPR #^M ;Restore registers ; ; End of example calling code ;-- 9 PAGESWAPPER - March 1984 - Volume 5 Number 9 Allocate UBA Map Registers in the same 32K Unibus Address Space Analysis and Conclusion In algorithm ALLOCATE_UBAMAPREG_SAMESET, the maximum number of temporarily kept sub-extents is three. This is why: Assume: M=Total UBA map registers requested when calling algorithm ALLOCATE_UBAMAPREG_SAMESET T=Total calls of IOC$ALOUBAMAPN in algorithm ALLOCATE_UBAMAPREG_SAMESET E=Maximum number of temporarily kept sub-extents in algorithm ALLOCATE_UBAMAPREG_SAMESET Observe: E =< T - 1. For 0 < M =< 128, T =< 4. Therefore, E =< 3. A popular method to solve the problem of a device with the 32K Unibus address space accessing restriction consists of the following: (1) Preallocate UBA map registers in a controller (unit) initialization routine via VMS routine IOC$ALOUBAMAPN. (2) Do not check whether the UBA map registers allocated belong to the same 32K Unibus address space. Should a failure occur, there is no recovery or retry mechanism provided. (3) Connect the target device via SYSGEN before any other devices sharing the same Unibus. It guarantees that sufficient UBA map registers of the same map register set (set zero) will be available when VMS routine IOC$ALOUBAMAPN is called. (Remember driver programs of 10 PAGESWAPPER - March 1984 - Volume 5 Number 9 Allocate UBA Map Registers in the same 32K Unibus Address Space other devices on the same Unibus may also preallocate UBA map registers at device connect time.) The main drawback of this approach is that if multiple devices of the same 32K Unibus address space accessing restriction are connected on the same Unibus, in order to allow all devices of concern to be functional, one of the following two conditions must be met: (1) The total number of UBA map registers preallocated by all devices of concern is less than 128. In this case, only UBA map registers of the first map register set (set zero) are to be preallocated. (2) If multiple UBA map register sets are needed (the total number of UBA map registers preallocated exceeds 128), no device will end up with UBA map registers of two consecutive map register sets. These are very restrictive requirements. It usually is an unpleasant if not a difficult job for the system manager to ensure all devices are connected via SYSGEN in the right order. Should more than one driver program provided by different vendors adopt the same approach as described above, the situation could be even confusing. If algorithm ALLOCATE_UBAMAPREG_SAMESET is implemented in a controller (unit) initialization routine to preallocate UBA map registers at device connect (and system boot) time, the obvious advantage of this algorithm over the approach described above is that the target devices and other devices sharing the same Unibus can be connected via SYSGEN in any order. That is because the algorithm is able to detect if the UBA map registers allocated belong to the same 32K Unibus address space, and if not, will continue the attempt until it succeeds or fails. The problem solved by, and the logic used in, algorithm ALLOCATE_UBAMAPREG_SAMESET are simple and basic in the field of handling extents-like data structures. As long as an extent-like data structure is used, the logic used in the algorithm can solve similiar problems in applications such as dynamic memory buffer management or network message routing. That is, there could be other utilizations of the algorithm discussed. 11 PAGESWAPPER - March 1984 - Volume 5 Number 9 In this issue... In this issue... Allocate UBA Map Registers in the same 32K Unibus Address Space . . . . . . . . . . . . . . . . . . . 1 In this issue... . . . . . . . . . . . . . . . . . 12 Editor's Workfile . . . . . . . . . . . . . . . . 13 UDA50 Upgrade Modules . . . . . . . . . . . . . . 14 DECUS Library Notes . . . . . . . . . . . . . . . 14 Letters to the Pageswapper . . . . . . . . . . . . 15 Migration/Host-Development Sessions at Cincinnati 16 RMS I/O for Improved Fortran I/O Performance . . . 18 Comparison of Three Versions of RUNOFF . . . . . . 37 INPUT/OUTPUT . . . . . . . . . . . . . . . . . . . 69 LUG Agenda . . . . . . . . . . . . . . . . . . . . 90 LUG Meeting Reports . . . . . . . . . . . . . . . 92 VAX System SIG Committee List . . . . . . . . . . 93 INPUT/OUTPUT Submission Form . . . . . . . . . . . 96 System Improvement Request Submission Form . . . . 98 General material for publication in the Pageswapper should be sent (US mail only -- no "express" services please) to: Larry Kilgallen, PAGESWAPPER Editor Box 81, MIT Station Cambridge, MA 02139-0901 Preference is given to material submitted as machine-readable text (best is Runoff source). Please do not submit program source, as that is better distributed on the VAX SIG tape. Material for "The DBMS Monitor" section of the Pageswapper (pertaining to VAX-11 DBMS) should be sent to: Julie Llewellyn United Technologies Microelectronics Center 1365 Garden of the Gods Road Colorado Springs, CO 80907 Change of address, reports of non-receipt, and other circulation correspondence should be sent to: DECUS U.S. Chapter, MRO2-1/C11 Attention: Publications Department One Iron Way Marlborough, MA 01752 USA Only if discrepancies of the mailing system are reported can they be analyzed and corrected. 12 PAGESWAPPER - March 1984 - Volume 5 Number 9 Editor's Workfile Editor's Workfile by Larry Kilgallen, Pageswapper Editor As we approach the end of the first year of paid newsletter subscriptions it is inevitable that some adjustments will be in order. At a meeting of newsletter editors last month the consensus was to keep essentially the same division and couplings of various newsletters (e.g. Pageswapper is a separate publication). Some price adjustment was obviously necessary, however, based on the cost of producing various newsletters. Some have a higher pagecount and some have a lower pagecount that this one, and frequency of publication varies. Final rates have not yet been decided, but it is clear that the price for the Pageswapper will be higher than for this year. The VAX SIG leadership is trying to balance what DECUS staff tells us the costs are against what we feel are acceptable prices and pagecounts. Efforts will be made to control the price increase, consistent with timely publication schedules, but the end result will surely be a price increase of some degree. Sometimes we work in a vacuum, so I would appreciate any letters indicating reader sentiment regarding pricing vs. timely publication vs. size of each issue. One good note for US government installation: Apparently in the past year there has been some difficulty because DECUS will not invoice separately for subscriptions (i.e. payment must accompany order) and the government will not pay until it gets an invoice. The resulting deadlock has apparently been resolved in the form of some magic wording the DECUS staff has come up with for the subscription form. That wording (it was recently alleged) is enough to cause government agencies to deal with the subscription form as with an invoice and both parties are satisfied. Isn't bureaucracy wonderful? This issue's article comparing several Runoff versions can also be found in an issue of the Multitasker (RSX SIG newsletter) coming soon to a mailbox near you. Compatibility mode implementations may not be your big high in life, but for someone who wants a particular feature not available in the DEC native mode implementation, they may be the answer. The Pageswapper would welcome similar comparative articles regarding SIG tape programs, and from a look at this month's I/Os, we could use one quickly regarding programs to communicate between machines over async ports. 13 PAGESWAPPER - March 1984 - Volume 5 Number 9 UDA50 Upgrade Modules UDA50 Upgrade Modules by Larry Kilgallen, Pageswapper Editor Someone at my own LUG (Boston VAX LUG) pointed out a little paragraph from DEC regarding replacement UDA50 modules. Essentially, there are two new modules M7485 and M7486 which replace two old modules M7161 and M7162. The point of interest is that the modules are not upward or downward compatible; you have to have either two of the new style or two of the old -- no mix and match. If a failure requires replacement of one of the old modules, a new style module can be used only if BOTH modules are replaced. My informant also states that the new modules are required in order to (successfully) run an RA81. DECUS Library Notes By Larry Kilgallen, Pageswapper Editor New to the DECUS Library (well, November 28, 1983) is the submission of PRETTY - the formatter for BLISS source files. Some people hate this, but personally I grew to love it during the years it was distributed with the Bliss compiler. Now DEC lawyers have ruled there shall be no unsupported software shipped with supported products, but the Languages and Tools folks have thoughtfully sent PRETTY to the DECUS library, complete with sources. This version only claims to support Bliss Version 3 and it still had the access violation on long lines, but at least with source one can fix it. You can order PRETTY from the DECUS library as program VAX-71; for details call them at (617) 467-4135. Or if you wait long enough, perhaps the first member to do bug fixes will submit it to the SIG Tape as well. 14 PAGESWAPPER - March 1984 - Volume 5 Number 9 Letters to the Pageswapper Letters to the Pageswapper Hewlett Packard Post Office Box 10151 Palo Alto, CA 94303-0866 February 10, 1984 Larry Kilgallen PAGESWAPPER Editor Box 81, MIT Station Cambridge, MA 02139-0901 Dear Pageswapper, Allen A. Watson presented his solution to the problem of becoming another user without having to log off and log back on again. This is particularly useful, as he points out, since logging off destroys any context of your current process activity, such as local symbols, current directory, or active supbrocesses. DECnet provides a useful way of accomplishing this by allowing one to SET HOST 0, which always starts up a new terminal session on the current host, without disturbing the current session. I use this method extensively, so that most of the time I do not need to use a privileged account unless I actually need it. The problem is then, how to get the SET HOST command to work on a system that does not have DECnet support. It turns out that we do not have DECnet either, but that this functionality is available on every VMS system. All you have to do is $ RUN SYS$SYSTEM:SYSGEN CONNECT NET/NOADAPTER/DRIVER=NETDRIVER $ @SYS$MANAGER:NETCONFIG your node name your node address (we use 4) etc. and insert @SYS$MANAGER:STARTNET into your system startup command procedure. Your network will not have any devices to talk to the outside world, but DECnet commands that are confined to a single node will work just fine, including the desired SET HOST 0 command. Larry Baker Scientific Computing Facility Hewlett-Packard Laboratories 15 PAGESWAPPER - March 1984 - Volume 5 Number 9 Migration/Host-Development Sessions at Cincinnati Migration/Host-Development Sessions at Cincinnati February 16, 1984 Larry Kilgallen, PAGESWAPPER Editor Box 81, MIT Station Cambridge, MA 02139-0901 Dear Sir, Strange as it seems, with winter's grip still on me as I write this letter, it is time to get ready for the Spring (almost summer) DECUS Symposium in Cincinnati. The Migration/Host-Development Working group is sponsoring a number of sessions at this symposium which may be of interest to users either migrating between RSX and VMS systems or who are using VMS as a host development system. Sessions on VAX-11 RSX V1.0 (the new, improved, but very unbundled RSX AME) will be sponsored by the RSX SIG. However, the AME is a VAX layered product, and anyone migrating work between RSX and VMS should find the sessions worth while. We will also have a session on RTEM which allows RT11 code to be developed and tested using VMS and the AME. Of particular interest to those who would like to use VMS to host development work for attached real time systems, will be a number of sessions on VAXelan. The primary meeting of the working group will be a Migration/Host-Development Workshop. The abstract for this session is as follows: Users who use VAXs either as a host to develop software for other systems, or who must migrate their between a VAX and another system often have unique problems. No prepared talks for this workshop are planned. Instead, users migrating work between VMS and RSX, RT11, RSTS and non-DEC environments or using VMS as a host development system (DEC micros, non-DEC micros, whatever) will have a unique forum to talk about their problems, needs, and successes. DEC representatives will be available to answer questions of users having problems with using the AME or RTEM under VMS. Finally, there will be an opportunity to meet others with similar interests and concerns. There are a number of possible formats for this workshop, so if if anyone has interest in this workshop it would be helpful if they could pass comments and suggestions on to 16 PAGESWAPPER - March 1984 - Volume 5 Number 9 Migration/Host-Development Sessions at Cincinnati me PRIOR to the meeting (the more PRIOR, the better particularly if I need to find DEC representatives to address certain issues). One format would give the bulk of the available time to users presenting AME problems, migration, or host development issues to DEC in a Q&A fashion. A second approach, would be to allow users who have done something neat, who have experience with a specific topic, or who just generally have something to say, be given 5-10 minutes to make a mini-presentation. A third approach, would be to break into small special topic discussion groups (the AME, migration problems, using VMS to develop and test code for micros, etc.). See you in Cincinnati!, James Downward KMS Fusion, Inc P.O. Box 1567 Ann Arbor, Mich. 48106 (313)-769-8500 17 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance RMS I/O for Improved Fortran I/O Performance by: Robert A. Harris Leeds & Northrup Co. Dickerson Road North Wales, Pa. 19454 February 7, 1984 Through the use of RMS I/O the performance of I/O operations in a Fortran program can be doubled. Utilities written in Fortran which process sequential input files and generate similar sequential output files only need the most simple forms of I/O, however, Fortran I/O is set up to deal with extensive formatting and data conversion. This general nature of Fortran I/O adds much to its overhead. If the Fortran I/O is bypassed and RMS used instead, much of this overhead can be eliminated. Besides, Fortran eventually calls RMS to do the actual I/O, so we are just cutting out the middle man. Getting started with RMS I/O is really easy and what follows is an introduction to using it (just the way to get your feet wet). From there it is just putting one foot in front of the other to expand into more complex and powerful RMS I/O features. All Fortran Implementation We will start with defining a simple program to read, process, and write a file. To keep the processing section simple we will perform a dumb DETAB routine (much better implementations have been done elsewhere, however, if done here it would just add to the size of the example program). ------------------------------ PROGRAM DETAB C--------------------------------------------------------------- C FORIO.FOR - This program is the first part of an example to C demonstrate the performance improvements that may be C obtained by using RMS I/O. This version of the program C uses all Fortran I/O. C--------------------------------------------------------------- C 26-Jan-1984 R. A. Harris Initial Coding C--------------------------------------------------------------- C IMPLICIT INTEGER*4 (A-Z) C PARAMETER INPUT=1 18 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance PARAMETER OUTPUT=2 PARAMETER MAXLEN=256 CHARACTER RECORD*(MAXLEN) CHARACTER BLANK*(8) /' '/ C CALL LIB$INIT_TIMER() ! Initialize performance timer. C OPEN( UNIT=INPUT, STATUS='OLD', READONLY, SHARED ) OPEN( UNIT=OUTPUT, STATUS='NEW', RECL=MAXLEN, 1 DISPOSE='DELETE', CARRIAGECONTROL='LIST' ) C DO WHILE( .TRUE. ) C C Read a record from the input file. C READ( INPUT, 10, END=199 ) LENGTH, RECORD(1:LENGTH) 10 FORMAT( Q, A ) C C Detab the record. C I = 0 DO WHILE( I .LT. LENGTH ) I = I + 1 IF ( RECORD(I:I) .EQ. CHAR(9) ) THEN J = (( I + 7 ) / 8 ) * 8 K = J - I + 1 L = LENGTH + K - 1 RECORD(I:L) = BLANK(1:K) // 1 RECORD(I+1:LENGTH) LENGTH = L ENDIF ENDDO C C Write the detabbed record to the output file. C WRITE( OUTPUT, 20 ) RECORD(1:LENGTH) 20 FORMAT( A ) C ENDDO 199 CONTINUE C CLOSE( UNIT=INPUT ) CLOSE( UNIT=OUTPUT, DISPOSE='KEEP' ) C CALL LIB$SHOW_TIMER() ! Display performance values. C CALL EXIT END ------------------------------ 19 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance Program Generation To compile, link, and run the program enter: $ FORTRAN FORIO.FOR $ LINK FORIO $ ASSIGN/USER input.dat FOR001 $ ASSIGN/USER output.dat FOR002 $ RUN FORIO Performance When the above All Fortran program is run on a lightly loaded VAX-11/780 against a text file that is 4951 records long (663 blocks) the performance information displayed by the LIB$SHOW_TIMER call is as follows: ELAPSED=0:0:23.85 CPU=0:0:20.01 BUFIO=8 DIRIO=95 FAULTS=689 RMS I/O Implementation The following are routines to perform the same operations as the above Fortran implementation, except this time RMS I/O is used instead of Fortran I/O: Fortran Main Routine. ------------------------------ PROGRAM DETAB C--------------------------------------------------------------- C RMSIO.FOR - This program is second part of an example to C demonstrate the performance improvements that may be C obtained by using RMS I/O. This version of the program C uses RMS I/O to reduce overhead and increase the C execution speed. C--------------------------------------------------------------- C 26-Jan-1984 R. A. Harris Initial Coding 20 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance C--------------------------------------------------------------- C IMPLICIT INTEGER*4 (A-Z) C PARAMETER INPUT=1 PARAMETER OUTPUT=2 PARAMETER MAXLEN=256 CHARACTER RECORD*(MAXLEN) CHARACTER BLANK*(8) /' '/ C EXTERNAL OPEN_OLD EXTERNAL OPEN_NEW EXTERNAL RMS$_EOF C CALL LIB$INIT_TIMER() ! Initialize performance timer. C C Open input and output files, only use the USEROPEN keyword C to specify the RMS I/O routines to gain control of the C FAB and RAB for each of the files. C OPEN( UNIT=INPUT, STATUS='OLD', READONLY, SHARED, 1 USEROPEN=OPEN_OLD ) OPEN( UNIT=OUTPUT, STATUS='NEW', RECL=MAXLEN, 1 DISPOSE='DELETE', CARRIAGECONTROL='LIST', 1 USEROPEN=OPEN_NEW ) C DO WHILE( .TRUE. ) C C Read a record from the input file. C STATUS = GET( INPUT, RECORD, LENGTH ) IF ( STATUS .EQ. %LOC(RMS$_EOF) ) GOTO 199 IF ( .NOT. STATUS ) CALL EXIT( STATUS ) C C Detab the record. C I = 0 DO WHILE( I .LT. LENGTH ) I = I + 1 IF ( RECORD(I:I) .EQ. CHAR(9) ) THEN J = (( I + 7 ) / 8 ) * 8 K = J - I + 1 L = LENGTH + K - 1 RECORD(I:L) = BLANK(1:K) // 1 RECORD(I+1:LENGTH) LENGTH = L ENDIF ENDDO C C Write the detabbed record to the output file. C STATUS = PUT( OUTPUT, RECORD, LENGTH ) IF ( .NOT. STATUS ) CALL EXIT( STATUS ) C 21 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance ENDDO 199 CONTINUE C CLOSE( UNIT=INPUT ) CLOSE( UNIT=OUTPUT, DISPOSE='KEEP' ) C CALL LIB$SHOW_TIMER() ! Display performance values. C CALL EXIT END ------------------------------ Macro Open Old Routine This Macro routine gains control via the USEROPEN keyword in the Fortran OPEN statement. It is used to open an existing file. This routine will also save the RAB address (Record Access Block). The RAB will be needed later when we read records from the input file. ------------------------------ .title OPEN_OLD - open an existing file. .ident /V1.0/ ;--------------------------------------------------------------- ; OPENOLD.MAR - the function of this routine is to gain ; control via the Fortran USEROPEN keyword in the OPEN ; statement and to perform the actual RMS open. The ; address of the file RAB is saved for future use by ; our own RMS I/O GET and PUT routines. ; ; Calling Procedure for OPEN_OLD ; ; external open_old ; ... ; open( unit=1, status='OLD', useropen=open_old ) ; ; Entry parameters: ; ; on entry the FAB address, the RAB address, and the ; address of the Fortran Unit number for the file are ; passed in the parameter list. The FAB is used to open ; the file and the RAB is used to connect a record stream ; to the file for performing record reads. The Unit ; number is used to index into a table for saving the RAB ; address. 22 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance ; ;--------------------------------------------------------------- ; 26-Jan-1984 R. A. Harris Initial Coding. ;--------------------------------------------------------------- ; $ssdef ; define system status codes ; .external rab_table ; define RAB table address ; fab = 4 ; address of FAB rab = 8 ; address of RAB unit = 12 ; address of Fortran UNIT number ; .psect rms_exe, long, exe, nowrt, rd, shr .entry open_old, M<> ; ; Open an existing file. ; $open fab=@fab(ap) ; Open the file blbc r0, 999$ ; if error; exit ; ; Connect a record stream to the file. ; $connect rab=@rab(ap) ; connect a record stream blbc r0, 999$ ; if error; exit ; ; Save the RAB address in an external table to be used ; by the GET routine. Use the Fortran unit number ; as the index into the table. ; movl @unit(ap), r0 ; fetch Unit number for index movl rab(ap), - ; store RAB addr in external rab_table[r0] ; table. ; ; Return with good completion code in R0 ; movl #ss$_normal, r0 ; set good completion code 999$: ret ; return ; .end ------------------------------ 23 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance Macro Open New Routine This Macro routine gains control via the USEROPEN keyword in the Fortran OPEN statement. It is used to create a new file and open it. This routine will also save the RAB address (Record Access Block). The RAB will be needed later when we write records to the output file. ------------------------------ .title OPEN_NEW- create and open a new file. .ident /V1.0/ ;--------------------------------------------------------------- ; OPENNEW.MAR - the function of this routine is to gain ; control via the Fortran USEROPEN keyword in the OPEN ; statement and to perform the actual RMS create and open. ; The address of the file RAB is saved for future use by ; our own RMS I/O PUT routine. ; ; Calling Procedure for OPEN_NEW ; ; external open_new ; ... ; open( unit=1, status='NEW', useropen=open_new ) ; ; Entry parameters: ; ; on entry the FAB address, the RAB address, and the ; address of the Fortran Unit number for the file are ; passed in the parameter list. The FAB is used to ; create and open the file. The RAB is used to ; connect a record stream to the file for performing ; record writes. The Unit number is used to index ; into a table for saving the RAB address. ; ;--------------------------------------------------------------- ; 26-Jan-1984 R. A. Harris Initial Coding. ;--------------------------------------------------------------- ; $ssdef ; .external rab_table ; define RAB table address ; fab = 4 ; address of FAB rab = 8 ; address of RAB unit = 12 ; address of Fortran UNIT number ; .psect rms_exe, long, exe, nowrt, rd, shr .entry open_new, M<> ; 24 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance ; Create a new file and open it. ; $create fab=@fab(ap) ; Create a new file. blbc r0, 999$ ; if error; exit ; ; Connect a record stream to the file. ; $connect rab=@rab(ap) ; connect a record stream blbc r0, 999$ ; if error; exit ; ; Save the RAB address in an external table to be used ; by the PUT routine. Use the Fortran unit number ; as the index into the table. ; movl @unit(ap), r0 ; fetch Unit number for index movl rab(ap), - ; store RAB addr in an external rab_table[r0] ; table. ; ; Return with good completion code in R0 ; movl #ss$_normal, r0 ; set good completion 999$: ret ; return ; .end ------------------------------ Macro GET Routine This Macro routine is used to read a record from an open file. The RAB address saved earlier by the open routine is used here to read a record. The RAB contains information to tell RMS which opened file to read, where to store the record read, processing option flags, and a whole lot more. The RAB also returns completion information including the length of the record just read. ------------------------------ .title GET - routine to get a record .ident /V1.0/ ;--------------------------------------------------------------- ; GET.MAR - The function of this routine is to input a record ; from the opened file specified by the passed Fortran ; Unit number. ; 25 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance ; Calling Procedure for GET ; ; status = get( unit, buffer, size ) ; ; Parameters: ; ; unit - is an integer*4 value containing the Fortran ; Unit number for the file. Passed by reference. ; buffer - is the buffer (character string) to input the ; record into. Passed by descriptor. ; size - is an integer*4 variable where the length of the ; input record will be returned. Passed by ; reference. ; status - is an integer*4 variable where the GET ; completion status will be returned. If the ; end of the file is detected then RMS$_EOF will ; be returned. ; ; rab_table - is a global symbol where the OPEN_OLD or ; OPEN_NEW routine stored the RAB for the file. ; The Fortran unit number is used as an index ; into the table to fetch the correct RAB address. ; ;--------------------------------------------------------------- ; 26-Jan-1984 R. A. Harris Initial Coding. ;--------------------------------------------------------------- ; $rabdef ; define offsets into the RAB ; .external rab_table ; define RAB table address ; get_unit = 4 ; addr Fortran unit number get_buf = 8 ; addr input string descriptor get_siz = 12 ; addr to return input record length to ; .psect rms_exe, long, exe, nowrt, rd, shr .entry get, M ; ; Fetch the address of the RAB for this unit from the ; external table. ; movl @get_unit(ap), r1 ; fetch Unit number for index movl rab_table[r1], r6 ; fetch address of RAB ; ; Set the RMS flag in the RAB which specifies that record is ; to be moved directly into the user's buffer. ; bicl2 #rab$m_loc, - ; set no LOC mode rab$l_rop(r6) ; ; Store the address of the user's buffer and its size. ; movl get_buf(ap), r5 ; fetch address of str desc movw (r5), - ; store buffer size 26 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance rab$w_usz(r6) ; in the RAB movl 4(r5), - ; store buffer address rab$l_ubf(r6) ; in the RAB ; ; Read a record from the file. The RMS completion code is ; returned in R0. R0 will then be returned from this ; routine on exit. ; $get rab=(r6) ; read a record. ; ; Return the record's length to the user. ; movzwl rab$w_rsz(r6), - ; copy record length into @get_siz(ap) ; users passed variable. ; ; Return to the caller with RMS GET completion code in R0. ; ret ; return ; .end ------------------------------ Macro PUT Routine. This Macro routine is used to output a record to an open file. The RAB address saved earlier by the open routine is used here to write the record. The RAB contains information to tell RMS which opened file to write, where the record to write is located, processing option flags, and a whole lot more. ------------------------------ .title PUT - routine to output a record .ident /V1.0/ ;--------------------------------------------------------------- ; PUT.MAR - The function of this routine is to output a record ; to the opened file specified by the passed Fortran Unit ; number. ; ; Calling Procedure for PUT ; ; status = PUT( unit, buffer, size ) ; ; Parameters: ; ; unit - is an integer*4 value containing the Fortran 27 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance ; Unit number for the file. Passed by reference. ; buffer - is the buffer (character string) to output to ; the file. Passed by descriptor. ; size - is an integer*4 value where the length of the ; output record is stored. Passed by reference. ; status - is an integer*4 variable where the PUT routine ; completion status will be returned. ; ; rab_table - is a global symbol where the OPEN_OLD or ; OPEN_NEW routine stored the RAB for the file. ; The Fortran Unit number is used as an index ; into the table to fetch the correct RAB address. ; ;--------------------------------------------------------------- ; 26-Jan-1984 R. A. Harris Initial Coding. ;--------------------------------------------------------------- ; $rabdef ; define offsets into RAB. ; .external rab_table ; define RAB table address ; put_unit = 4 ; addr of Fortran unit number put_buf = 8 ; addr of output string descriptor put_siz = 12 ; addr of length to write ; .psect rms_exe, long, exe, nowrt, rd, shr .entry put, M ; ; Fetch the address of the RAB for this unit from the ; external table using the Fortran Unit number as the ; index into the table. ; movl @put_unit(ap), r1 ; fetch Unit number for index movl rab_table[r1], r6 ; fetch address of RAB ; ; Store the address of the user's buffer and its size. ; movw @put_siz(ap), - ; store length of buf to write rab$w_rsz(r6) ; in the RAB movl put_buf(ap), r5 ; fetch adr of str descriptor movl 4(r5), - ; store addr of buffer rab$l_rbf(r6) ; in the RAB ; ; Write a record to the file. The RMS completion code is ; returned in R0. R0 will then be returned from this ; routine on exit. ; $put rab=(r6) ; write the buffer ; ; Return to the caller. R0 contain the completion status. ; ret ; return ; .end 28 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance ------------------------------ Macro RAB Address Table This Macro module is used to define a global table where RAB addresses may be stored by the open routines and referenced by the GET and PUT routines. ------------------------------ .title RAB_TABLE - Table for storing RAB addresses .ident /V1.0/ ;--------------------------------------------------------------- ; RABTABLE.MAR - This module contains a table for storing ; RAB addresses that are used by several RMS I/O interface ; routines. The Fortran Unit number is used as the index ; into the table. ;--------------------------------------------------------------- ; .psect rms_wrt, long, noexe, wrt, rd ; rab_table_size == 100 ; Max Unit number - 1 rab_table:: .blkl rab_table_size ; RAB addr storage table ; ; The above double equal sign (==) and the double colon (::) ; indicate that the symbols are to be globally defined. ; .end ------------------------------ Program Generation To compile, link, and run the program enter: $ FORTRAN RMSIO.FOR $ MACRO OPENOLD, OPENNEW, PUT, GET, RABTABLE $ LINK RMSIO, OPENOLD, OPENNEW, PUT, GET, RABTABLE $ ASSIGN/USER input.dat FOR001 $ ASSIGN/USER output.dat FOR002 $ RUN RMSIO 29 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance Performance When the RMS I/O implementation is run against the same text file as above the following performance values are obtained: ELAPSED=0:0:14.89 CPU=0:0:13.25 BUFIO=8 DIRIO=95 FAULTS=285 Performance Comparison Run Time Statistics When the run time statistics for the RMS I/O implementation are compared against the All Fortran implementation you will note the following differences: o Elapsed time is 37% less o CPU time is 34% less o Page faults are 59% less Please note that there is a large decrease in the number of page faults. This decrease is one of the significent reasons for a saving in CPU time. In addition, on a heavily loaded CPU the page fault reduction can be even greater. 30 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance SPM Statistics When the VAX-11 System Performance Monitor (SPM) is linked into the 2 programs and the tests run again, the following histogram data is obtained: All Fortran Implementation +----+----+----+----+----+----+----+----+ DETAB |**************************************** 44.97% FOR$IO_END |** 1.89% FOR$IO_ELEM |*** 2.91% FOR$READ_SF |* 0.51% FOR$WRITE_SF |* 0.47% FOR$$CB |*** 3.52% FOR$$IO_BEG |*** 3.38% FOR$$REC_PROC |*** 2.36% FOR$$UDF_RF |******* 6.76% FOR$$UDF_WF |**** 4.58% FOR$$FMT_INTRP |**** 4.47% LIB$TIMER | 0.04% OTS$$LUN | 0.04% +----+----+----+----+----+----+----+----+ P1_SPACE |********************** 24.08% +----+----+----+----+----+----+----+----+ SYSTEM_SPACE | 0.04% +----+----+----+----+----+----+----+----+ RMS I/O Implementation +----+----+----+----+----+----+----+----+ DETAB |**************************************** 62.14% GET |** 2.03% PUT |* 1.23% FOR$$CB | 0.12% FOR$$OPEN_DEFLT| 0.12% +----+----+----+----+----+----+----+----+ P1_SPACE |********************** 34.30% +----+----+----+----+----+----+----+----+ SYSTEM_SPACE | 0.06% +----+----+----+----+----+----+----+----+ In the All Fortran implementation ten (10) run-time routines are consuming about 26% of the CPU time to perform the I/O. In the RMS I/O implementation the same results are obtained using less than 4% of the total CPU time. The remaining 22% (of the 26%) is now being used more productivily by the DETAB main routine and code located in P1 space. This is the second reason why the RMS I/O implementation runs faster, there is less code being executed. 31 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance SPM Data Collection I should discuss a little bit how SPM obtains the histogram data. The DETAB program is linked with SPM data collection modules. These modules collect program counter samples by trapping a clock interrupt every 10 milliseconds and writing the samples to a file. However, if you check the histograms you will see that there is almost no time spent in system space, but a large amount spent in P1 space. This may appear strange since much of the actual I/O is performed by system services located in system space and execpt for DCL there should not be any code to execute in P1 space. My theory on this is that the system service vectors are stored in P1 space and that while we are in system space we are in a mode which prevents the clock sample interrupts from being delivered. Therefore when we return from system services the clock is ready to interrupt our process and as soon as we drop back to user mode the timer AST is delivered. This would tend to concentrate collection samples at the return point from system services which is in P1 space. This is just my theory, yours may vary. Implementation Differences Fortran Main Program Differences There are several differences in the main programs between the All Fortran and RMS I/O implementations. What follows is an explaination of what these changes and additions are: o In the OPEN statement the USEROPEN keyword is used. The USEROPEN keyword allows the user to specify a subroutine which is given control after Fortran builds a File Access Block (FAB) and a Record Access Block (RAB) for the file specified in the OPEN statement, however, the file is not opened. The user supplied routine (OPEN_OLD or OPEN_NEW) is responsible for actually performing the file open. It is necessary to specify the user supplied subroutine name in an EXTERNAL statement before specifing the routine in the USEROPEN keyword. This is why EXTERNAL OPEN_OLD EXTERNAL OPEN_NEW 32 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance have been added to the RMS I/O implementation. When the user supplied routine is called, the Fortran Unit number, the address of the FAB, and the address of the RAB for the file are passed to the routine. Before the files are opened and a record stream connected, the user may make modifications to the FAB and/or RAB. The "VAX-11 Fortran User's Guide" describes the initial state to the FAB and RAB when the routine gets control. Additional information on the FAB and RAB may also be obtained from the "VAX-11 Record Management Services Reference Manual". The routines used in the example do just 3 things. They either open an existing file or create a new one, connect a record stream to the file so that records may be read or written, and they store the address of the RAB (needed to read and write records) into a table using the Fortran Unit number as an index. o RMS$_EOF tested for instead of END=199. In the All Fortran implementation the READ statement includes the keyword END=199. This tells Fortran that if the end of file is detected, control is to be transferred to the Fortran statement label 199. To perform the same function in the RMS I/O implementation, the return status from the GET routine must be tested for RMS$_EOF. RMS$_EOF is returned by RMS when end-of-file is detected. Now the only problem is for the Fortran program to obtain the numeric value for RMS$_EOF. This is solved by specifing EXTERNAL RMS$_EOF in the program and then when it is referenced to use the %LOC(RMS$_EOF) built-in function. The Linker will resolve the value of RMS$_EOF from one of the System Default libraries. o The return status from the GET and PUT routines must be explicitly tested for errors. Fortran I/O supplies this service automatically. 33 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance Macro Routines The Macro routines are only used by the RMS I/O implementation. They supply the interface between the Fortran program and the RMS system services. The example routines shown are well commented and should be self explanatory (I hope). Limitations and Restrictions The example program used in this paper has several limitations and restrictions. Most of these are a result of trying to keep the processing section simple so as to not confuse the issue and make the size of the program larger then necessary. o The program is no longer portable to a non-VAX CPU. This is one of the trade offs in seeking performance. o Tabs as the last character on a line can cause problems depending on whether the program was compiled with bounds checking on character strings. o Nul length lines can cause problems depending on whether the program was compiled with bounds checking. o Files with other than 'Carriage Return' carriage control (such as Fortran carriage control) will not be properly detabbed. Plus all output files will be 'Carriage Return' type files regardless of the type of input file. o Text imbedded within quoted text strings where tabs should be preserved are lost. This also applies to Fortran hollerith and Macro ASCII strings. o Files which contain explicit carriage control characters (, , , etc...) will not be properly be handled. o The use of logical names to pass the name of the input and output files is crude. A better approach is to build a set of Command Line Definitions, then let DCL parse the command line and supply the file names via the DCL interface routines CLI$GET_VALUE & CLI$PRESENT (see the VAX-11 Utilities Reference Manual). o The DETAB code is very simple minded. Faster and more flexable implementations may be performed by using the MOVTUC (Move Translated Until Character) instruction. 34 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance o There is no error checking in the Macro routines to insure that the Fortran Unit number does not exceed the maximum size of the RAB address table. o The error reporting is very simple minded in the example RMS I/O implementation. A better way of reporting the error might be to replace the call to EXIT with a call to a routine which looks something like the following: SUBROUTINE RMS_ERROR( UNIT, STATUS ) ... CHARACTER FILENAME*(255) ... INQUIRE( UNIT, NAME=FILENAME ) PRINT *, '*** I/O Error on file ', FILENAME CALL EXIT( STATUS ) ... END This routine could even be improved by using a user defined message file and LIB$STOP (or LIB$SIGNAL) instead of the PRINT and EXIT (see the VAX-11 Utilities Reference Manual) Conclusion RMS I/O offers significent performance improvements with just a little more programming effort. In addition, once a set of working RMS interface routines are coded, they can be used with even less effort in future projects. I strongly encourage you to understand and implement this example. If you do, I think you will find that it will place a new and powerful tool in your possession. By the way, it is left as an exercise for the interested student, to correct the limitations in the example and to write a companion program to entab a file. 35 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance References 1. "VAX-11 Fortran Lanaguage Reference Manual", Order No. AA-D034B-TE o See sections on the USEROPEN keyword of the Fortran OPEN statement. 2. "VAX-11 Fortran User's Guide", Order No. AA-DO35B-TE o See sections on USEROPEN keyword of the Fortran OPEN statement. o See the Appendix on the USEROPEN keyword. 3. "VAX-11 Record Management Services Reference Manual", Order No. AA-D031D-TE o See sections on the $CREATE & the $OPEN file processing macros o See sections on the $GET & the $PUT record processing macros o See sections on the FAB (File Access Block) o See sections on the RAB (Record Access Block) o Also of interest are the NAM (Name Block) and the XAB (eXtended Attribute Block) 4. "VAX-11 Macro User's Guide", Order No. AA-D033D-TE 5. "VAX-11 Macro Language Reference Manual", Order No. AA-D032D-TE 6. "VAX Architecture Handbook", Order No. EB-19580-20 7. "VAX-11 SPM Reference Manual", Order No. AA-R580A-TE 8. "VAX-11 Utilities Reference Manual", Order No. AA-H781B-TE o See the section on the Command Definition Utility (SET COMMAND) 36 PAGESWAPPER - March 1984 - Volume 5 Number 9 RMS I/O for Improved Fortran I/O Performance o See the section on the Message Utility Comparison of Three Versions of RUNOFF by: Allen A. Watson, THE BERGEN RECORD Disclaimer The author makes no guarantee of the accuracy or completeness of this comparison. The final arbiter of how any Runoff program works is a computer and a test case. The purpose of this document is to share the results of my research with you so you may perform your own, final evaluations. Acknowledgements For their invaluable contribution to the documentation of RSX systems, Charles Spalding and John Clement, authors and maintainers of the two RSX Runoffs discussed in this document, deserve our hearty thanks. The program Runoff exists in many versions. On our RSX11M-Plus systems we have two: Spalding Runoff, Version S1.4 and Clement Runoff, Version BL3.11. Spalding's version is also the current RSX SIG Runoff Working Group official version. Clement Runoff, Version BL3.11 is available on the RSX SIG tape for Fall, 1983 in UIC [332,13]; Spalding Runoff, Version S1.4 is on the same tape in UIC [307,50] and also may be purchased from the DECUS library. 37 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF On our VAX systems, we have these two plus Digital Standard Runoff (DSR), both built in compatibility mode. All three versions have many basic features in common. The general run-of-the-mill document can be processed by any of the Runoff programs and produce nearly identical results. Each version, however, has certain unique features not available in one or both of the other versions. This document is intended to help you select which version of Runoff you want to use for a given document. A comparison chart is given here comparing the features of the three versions. The chart is divided into three sections: 1. Commands 2. Flags 3. Command Line Switches The chart does not explain what any command does, it merely indicates whether or not the feature is included in the version of Runoff. Some features will have numbers referencing a note that follows the chart, describing how the command differs from other versions or what it does if it is unique to the particular version of Runoff. (Commands unique to DSR are not explained in notes because anyone who has a VAX has DSR and its documentation.) Commands that are in one version but not in another are printed in bold face; commands that are common to all versions are printed in light type. These are the subset of commands that can safely be used in a text file and run through any of the three versions of Runoff without producing errors. Lesser differences (such as number of spaces indented, or lines skipped) are not noted. The user should realize, however, that because of these minor differences no two versions of Runoff are likely to produce absolutely identical output even if the input is identical and contains only commands common to the to versions. Following this comprehensive chart are several other smaller charts that list: Features common to all three versions Features common to DSR and Clement Runoff, Version BL3.11 Features common to DSR and Spalding Runoff, Version S1.4 Features common to Clement Runoff, Version BL3.11 and Spalding Runoff, Version S1.4 Features unique to DSR Features unique to Clement Runoff, Version BL3.11 Features unique to Spalding Runoff, Version S1.4 38 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF Alternate no no yes[64] Alternate Alternating Title no no yes[64] Alternating Title Appendix yes yes yes Autobreak no yes[1] no Autobreak Autocontents no no yes[66] Autocontents Autohyphenate no yes[2] no[65] Autohyphenate Autojustify yes no no Autojustify Autoparagraph yes yes yes Autosubtitle yes yes yes Autotable yes no no Autotable Autotitle no yes[3] no Autotitle Begin Bar yes yes no Begin Bar Blank yes yes yes Block no no yes[67] Block Break yes yes yes Center yes yes yes Center Text no yes[4] no Center Text Chain no no yes[68] Chain Chapter yes yes yes Chapter Layout no yes[5] no Chapter Layout Comment yes yes yes Contents no no yes[69] Contents Control Characters yes no no Control Characters Date yes no no Date Define Command no yes[6] no Define Command Define Escape no yes[7] no Define Escape Define Substitute no yes[8] no Define Substitute Define Subscript no yes[9] no Define Subscript Define Superscript no yes[10] no Define Superscript Define Variable Space no yes[11] no Define Variable Space Disable Bar yes yes no Disable Bar Disable Blocks no no yes[70] Disable Blocks Disable Bolding yes no no Disable Bolding Disable Contents no no yes[71] Disable Contents Disable Escape no yes[12] no Disable Escape Disable Equation no yes[13] no Disable Equation Disable Hyphenation yes yes no[97] Disable Hyphenation Disable Indexing yes yes yes Disable Output no no yes[75] Disable Output Disable Overstriking yes yes no Disable Overstriking Disable Running no no yes[76] Disable Running Disable Special no no yes[77] Disable Special Disable Substitution no yes[14] no Disable Substitution Disable Tabs no yes[15] no Disable Tabs Disable Toc yes yes no[71] Disable Toc Disable Underlining yes yes no Disable Underlining Display Appendix yes yes no Display Appendix Display Chapter yes yes no Display Chapter Display Elements yes yes no Display Elements Display Levels yes yes no Display Levels Display Number yes yes no Display Number Display Subpage yes yes no Display Subpage Do Contents no no yes[72] Do Contents Do Index yes yes yes 39 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF Dump no no yes[73] Dump Ellipses no yes[16] no Ellipses Else yes no yes Else Enable Bar yes yes no Enable Bar Enable Blocks no no yes[74] Enable Blocks Enable Bolding yes no[17] no Enable Bolding Enable Contents no no yes[78] Enable Contents Enable Escape no yes[18] no Enable Escape Enable Equation no yes[19] no Enable Equation Enable Hyphenation yes yes no[97] Enable Hyphenation Enable Indexing yes yes yes Enable Levels no yes[20] no Enable Levels Enable Output no no yes[79] Enable Output Enable Overstriking yes yes no Enable Overstriking Enable Running no no yes[80] Enable Running Enable Special no no yes[81] Enable Special Enable Tabs no yes[21] no Enable Tabs Enable Toc yes yes no[78] Enable Toc Enable Substitution no yes[22] no Enable Substitution Enable Underlining yes yes no Enable Underlining End Bar yes yes no End Bar End Center no yes[23] no End Center End Footnote yes yes no[82] End Footnote End List yes yes yes End Literal yes yes yes End Note yes yes yes End Option no no yes[83] End Option End Separated Equation no yes[24] no End Separated Equation End Subpage yes yes yes Endif yes yes no[83] Endif End Text no yes[25] no End Text Entry yes yes yes Eof no no yes[89] Eof Even no no yes[90] Even Exclude no no yes[91] Exclude Figure yes yes yes[84] Figure Deferred yes yes no[84] Figure Deferred Fill yes yes yes First Title yes yes no[85] First Title Flags Accept yes yes no[86] Flags Accept Flags Bold yes no[26] no Flags Bold Flags Break yes yes no Flags Break Flags Capitalize yes yes yes[87] Flags Comment yes no[27] no Flags Comment Flags Control yes yes no Flags Control Flags Escape no yes[28] no Flags Escape Flags Equation no yes[29] no Flags Equation Flags Hyphenate yes yes yes[87] Flags Index yes yes no Flags Index Flags Lowercase yes yes no Flags Lowercase Flags Overstrike yes yes no Flags Overstrike Flags Period yes no no Flags Period Flags Space yes yes no Flags Space Flags Special no yes[30] no Flags Special 40 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF Flags Subindex yes yes yes[87] Flags Substitute yes yes no Flags Substitute Flags Underline yes yes no Flags Underline Flags Uppercase yes yes no Flags Uppercase Flags All yes yes no[81] Flags All Footnote yes yes yes[88] Footnote Line no no yes[92] Footnote Line Half Spacing no yes[31] no Half Spacing Header Level yes yes yes Headers Lower yes yes yes[93] Headers Mixed yes yes yes[93] Header No Page no yes[32] no[94] Header No Page Header Page no yes[33] no[94] Header Page Header Spacing no yes[34] no[95] Header Spacing Headers Upper yes yes yes[93] Headers On yes yes yes[93] Hyphenation no no yes[97] Hyphenation If yes yes no[96] If IfNot yes yes no[96] IfNot Immediate Test Page no yes[35] no Immediate Test Page Immediate Test Text no yes[36] no Immediate Test Text Include no no yes[91] Include Indent yes yes yes Indent Levels no yes[37] no Indent Levels Index yes yes yes Justify yes yes yes Keep yes yes no[98] Keep Layout yes yes[38] no[99] Layout Left yes yes no[100] Left Left Margin yes yes yes Level Style no no yes[101] Level Style List yes yes yes List Element yes yes yes[102] Literal yes yes yes[103] Lock no yes[39] no Lock Lower Case yes yes yes No Alternate no no yes[64] No Alternate No Alternating Title no no yes[64] No Alternating Title No Autobreak no yes[40] no No Autobreak No Autohyphenate no yes[41] no No Autohyphenate No Autojustify yes no no No Autojustify No Autoparagraph yes yes yes No Autosubtitle yes yes no[106] No Autosubtitle No Autotitle no yes[42] no No Autotitle No Control Characters yes no no No Control Characters No Date yes no no No Date No Ellipses no yes[43] no No Ellipses No Fill yes yes yes No Flags no no yes[77] No Flags No Flags flag-name yes yes yes[104] No Flags All yes yes no[77] No Flags All No Half Spacing no yes[44] no No Half Spacing No Headers On yes yes yes[93] No Hyphenation no no yes[97] No Hyphenation 41 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF No Justify yes yes yes No Keep yes yes no No Keep No Number yes yes yes No Number Chapter no yes[45] no No Number Chapter No Paging yes yes no No Paging No Period yes no yes No Period No Space yes yes no No Space No Subtitle yes yes no[105] No Subtitle No Title no yes[46] no No Title No Underline no yes[47] no No Underline Note yes yes yes[115] Number no no yes[116] Number Number Appendix yes yes yes[117] Number Chapter yes yes yes[117] Number Index yes no no Number Index Number Level yes yes no Number Level Number List yes yes no Number List Number Page yes yes no[116] Number Page Number Running yes no no Number Running Number Subpage yes yes no Number Subpage Odd no no yes[118] Odd Option no no yes[119] Option Page yes yes yes Page Format no no yes[121] Page Format Page Name no no yes[122] Page Name Page Size yes yes yes[120] Paper Size yes yes yes[120] Paging yes yes no Paging Paragraph yes yes yes[123] Period yes yes yes Permanent Footnote no yes[48] no[48] Permanent Footnote Print no no yes[124] Print Print Contents no no yes[125] Print Contents Print Index yes yes yes[126] Quote Character no no yes[127] Quote Character Repeat yes no no Repeat Require yes yes yes[128] Reset Escape no yes[49] no Reset Escape Reset Substitute no yes[50] no Reset Substitute Right yes yes[129] no[129] Right Right Justify no no yes[129] Right Justify Right Margin yes yes yes Send Toc yes yes no[69] Send Toc Separated Equation no yes[51] no Separated Equation Set Date yes no no Set Date Set Level yes no no Set Level Set Paragraph yes yes no Set Paragraph Set Time yes no no Set Time Skip yes yes yes Spacing yes yes yes Standard no no yes[130] Standard Style Chapter no yes[52] no Style Chapter Style Headers yes yes no Style Headers Subpage yes yes yes 42 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF Subtitle yes yes yes Tab Left no yes[53] no Tab Left Tab Right no yes[54] no Tab Right Tab Stops yes yes yes Test Page yes yes yes[131] Test Text no yes[55] no Test Text Text no yes[56] no Text Title yes yes yes[132] Top Margin no yes[57] no[133] Top Margin Underline no yes[58] no Underline Underline Spaces no yes[59] no Underline Spaces Underline No Spaces no yes[60] no Underline No Spaces Upper Case yes yes yes Variable yes no no Variable Variable Spacing no yes[61] no Variable Spacing Variant no yes[62] no[62] Variant Xlower yes no mp Xlower Xupper yes no no Xupper 43 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF RUNOFF COMPARISON CHART ______ __________ _____ RUNOFF FLAG CHARACTERS ______ ____ __________ FLAG TYPE CHARACTER DSR CLEMENT SPALDING ____ ____ _________ ___ _______ ________ Accept or Quote _ yes yes yes Bold * yes no[26] no Bold Break | yes yes[63] no Break Capitalize < yes yes yes Comment ! yes no[27] yes Comment Comment .; yes yes no Comment Control . yes yes yes Hyphenate = yes yes yes Index > yes yes no Index Subindex > yes yes yes[87] Lowercase \ yes yes yes Overstrike % yes yes no Overstrike Period + yes no no Period Explicit space # yes yes yes Substitute $$ yes yes[107] no Substitute Underline & yes yes yes Uppercase ^ yes yes yes Equation 1 { no yes[29] no Equation 1 Equation 2 } no yes[29] no Equation 2 44 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF RUNOFF COMPARISON CHART ______ __________ _____ RUNOFF COMMAND LINE SWITCHES ______ _______ ____ ________ In the case of switches the versions differ greatly in syntax, but often offer similar functionality. RSX versions use MCR-like switches, whereas DSR uses DCL-like switches. For this reason the actual switch is listed under the appropriate version in the table. Most MCR-like switches can be negated if prefaced with a minus sign, e.g. "/-HY". SWITCH FUNCTION DSR CLEMENT ______ ________ ___ _______ SPALDING ________ Underline using Backspace /BACKSPACE /UL:B /UL:B Underline using overprint default /UL:L /UL:L Simulate underline /SEPARATE[108] /UL:S /UL:S Disable underlining /NOUNDERLINE /UL:N /UL:N Specify non-spacing character for underline /NONSPACING -- -- Identify program version -- -- /ID Append output to file _ _ /AP Output indicated chapter range -- /CH:l:h /CH:l:h Output indicated appendix range -- /AP:l:h -- Output CR, LF's in file -- /CR[109] -- Output true Form-feeds /NOSIMULATE /FF /FF Hyphenate output -- /HY /HY Output indicated page range /PAGES=l:h[110] /PA:l:h /PA:l:h Set page height and width /FORMSIZE[111] /PS:h:w /PS:h:w Right shift output n spaces /RIGHT=n /RI:n /LE:n Spool output file to printer -- /SP /SP Force all uppercase output -- /UC /UC Wait at start of pages /PAUSE /WA /WA Allow alternating title -- -- /AL Set number blank lines at top /DOWN=n -- /DO:n Set max lines per page /FORMSIZE=n -- /LO:n Set default right margin -- -- /WI:n Set number lines in page header -- -- /HL:n Set blank lines for chapter -- -- /BL:n Set text portions to include /VARIANT --[62] /IN:n[112] Set text portions to exclude -- -- /EX:n[112] Set overstrikes for bold /BOLD=n -- -- Enable change bars /CHANGE_BARS -- -- Create intermediate TOC file /CONTENTS --[113] --[113] Output termination message /LOG -- -- Control output of error messages /MESSAGE -- -- Specify output file /OUTPUT=file --[114] --[114] Generate sequence numbers /SEQUENCE -- -- Trace Debugging Options /DEBUG -- -- 45 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF NOTES FOR CHARTS COMPARING THREE VERSIONS _____ ___ ______ _________ _____ ________ 1. AUTOBREAK allows optional line breaks after selected characters such as hyphen. 2. AUTOHYPHENATE allows user to control hyphenation by specifying the minimum number of letters before end of line in a hyphenated word. 3. AUTOTITLE in Clement automatically uses Chapter or Appendix titles as title at top of pages. Spalding does this by default and it cannot be turned off; specific TITLE commands must be given to override it. 4. CENTER TEXT allows centering of multiple text lines. 5. CHAPTER LAYOUT lets user specify layout of first page of a chapter differently than other pages in the document. 6. DEFINE COMMAND allows user to define Runoff command string macros, e.g. .DEFINE COMMAND/SECTION/S2.LM+5.RM-5.C; The command ".SECTION" will now be recognized as equivalent to the associated command string. 7. DEFINE ESCAPE defines non-printing escape sequences for control of printers and video terminals. lets you make use of special printer features on Diablo, NEC, and other newer printers, such as shadow printing, half-spacing, and graphics. Makes Runoff printer independent. 8. DEFINE SUBSTITUTE defines string for text substitution. Allows development of form letters, etc. 9. DEFINE SUBSCRIPT defines subscript escape sequence for half-spacing. 10. DEFINE SUPERSCRIPT defines superscript escape sequence for half-spacing. 11. DEFINE VARIABLE SPACE defines micro space for implementing variable spacing between words on printers such as Diablo. This is not proportional spacing. not Eliminates big interword gaps for more professional appearance. See note 61. 12. DISABLE ESCAPE disables escape sequence recognition. See note 7. 13. DISABLE EQUATION disables equation writing mode. See notes 19 and 29. 14. DISABLE SUBSTITUTION disables output of substitutions. See notes 8 and 22. 15. DISABLE TABS disables tab recognition. Tabs are treated as single spaces. 16. ELLIPSES causes tabbed text to be filled with ellipses ( . . . .) rather than spaces. 17. ENABLE BOLDING -- ability to define escape sequences in Clement Runoff, Version BL3.11 eliminates the need for DSR-style bolding by backspacing and retyping. For compatibility with DSR define shadow print escape 46 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF sequences for "^*" and "\*", the DSR bold flags. Bolding will not be possible for printers that do not support shadow printing. 18. ENABLE ESCAPE turns on escape sequence recognition. 19. ENABLE EQUATION turns on equation formatting: {A+B}/{C+D}+X is output as: A+B --- + X C+D NOTE The above sequence when followed by a NO FLAGS EQUATION command appeared to hang Runoff in a loop; there appear to be bugs in equation formatting. 20. ENABLE LEVELS controls output of header level text to document and table of contents files. In Spalding Runoff, Version S1.4, AUTOCONTENTS gives some similar control. 21. ENABLE TABS enables recognition of tabs if DISABLE TABS has been issued. 22. ENABLE SUBSTITUTION enables output of substitution strings. See note 8. 23. END CENTER ends a CENTER TEXT command. See note 4. 24. END SEPARATED EQUATION end separated equation mode. See note 51. 25. END TEXT ends a TEXT command. See note 55. 26. FLAGS BOLD is not required in Clement Runoff, Version BL3.11. See note 17. 27. FLAGS COMMENT -- Clement Runoff, Version BL3.11 implements the COMMENT command and recognizes semicolon as a comment indicator, but DSR files using "!" as a comment indicator will not process correctly through Clement. Spalding recognizes "!" or ".!", but not ".;". Use ".COMMENT" for total compatibility. 28. FLAGS ESCAPE defines and enables recognition of escape flags "^" and "\" and a third flag of your choice. See notes 7, 12 and 30. 29. FLAGS EQUATION enable recognition of equation formatting flags (left and right braces). See note 19. 30. FLAGS SPECIAL set up single character escape sequence recognition. See also notes 7, 12 and 28. 31. HALF SPACING allows you to set default spacing (like SPACING command) in half-space increments for printers that support this feature. See notes 9 and 10. 47 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF 32. HEADER NO PAGE sets Runoff to print headers with page number only, omitting the word "Page". See note 94. 33. HEADER PAGE sets Runoff to print headers with the word "Page" in front of page numbers. See note 94. 34. HEADER SPACING sets spacing between title and first line of text, initially set to 3. 35. IMMEDIATE TEST PAGE is the same as TEST PAGE except that it does not cause a break. Can be used within not text without disturbing fill. See note 123. 36. IMMEDIATE TEST TEXT is the same as TEST TEXT (see note 54) but does not cause a break. 37. INDENT LEVELS causes Header Level lines to be indented left and right "n" characters. 38. Clement Runoff, Version BL3.11 has four more LAYOUT styles than DSR: title top left, page bottom right; title top center, page bottom right; title top center, page alternating bottom left and right; and title top, page bottom, both alternating left and right. Thus layouts 0 through 3 are compatible; layouts 4 through 7 are not. 39. LOCK locks in page formatting parameters so they cannot be changed. Useful for merging several documents that were separately formatted. 40. NO AUTOBREAK turns off AUTOBREAK for selected characters. See note 1. 41. NO AUTOHYPHENATION turns off AUTOHYPHENATION. See note 2. 42. NO AUTOTITLE turns off AUTOTITLE. See note 3. 43. NO ELLIPSES turns off ellipses mode. See note 16. 44. NO HALF SPACING turns off HALF SPACING. See note 31. 45. NO NUMBER CHAPTER disables chapter numbering, allows running page numbers. See NUMBER RUNNING command in DSR (similar but not identical). 46. NO TITLE prevents printing of both title and subtitle. 47. NO UNDERLINE specifies characters that are not to be underlined; normally only spaces are not underlined. 48. PERMANENT FOOTNOTE specifies a permanent footnote to appear between the body of text on a page and any footnotes on that page. Use to specify a separator space and line for footnotes. See FOOTNOTE LINE in Spalding Runoff, Version S1.4. 49. RESET ESCAPE clears table of escape sequences. See note 7. 50. RESET SUBSTITUTE clears table of substitute strings. See note 8. 51. SEPARATED EQUATION causes Runoff to generate extra lines to separate an equation from other equations or text. 52. STYLE CHAPTER changes the style of chapter headers, similar to STYLE HEADERS. 53. TAB LEFT causes text following tabs to be left justified on the next tab stop. 48 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF 54. TAB RIGHT causes text following tabs to be right justified at the next tab terminator. Works with FLAGS BREAK to line up an arbitrary break character such as decimal points. 55. TEST TEXT works like TEST PAGE but tests to see if enough room is on the current page for n lines of text regardless of spacing. Same as TEST LINES in Spalding Runoff, Version S1.4. 56. TEXT begins a section of text you wish to keep all on one page. Similar to BLOCK in Spalding Runoff, Version S1.4 but does not continue to fill present page if text section will not fit. 57. TOP MARGIN sets the number of blank lines at the top of the page to n. 58. UNDERLINE specifies what characters are underlineable in addition to current specifications. Normally only spaces are not underlined. See note 47. 59. UNDERLINE SPACES enables underlining of spaces; identical to .UNDERLINE " ". See previous note. 60. UNDERLINE NO SPACES disables underlining of spaces. 61. VARIABLE SPACING enable variable interword spacing for Diablo compatible printers. See note 11. 62. VARIANT defines a label which is used to control subsequent IF commands for selective inclusion of input. Serves same purpose as /VARIANT command line switch in DSR and INCLUDE/EXCLUDE in Spalding Runoff, Version S1.4. 63. The BREAK flag character may also be used to align tab columns in Clement Runoff, Version BL3.11. 64. ALTERNATE and ALTERNATING TITLE -- alternating titles are controlled by the LAYOUT command in DSR and Clement Runoff, Version BL3.11. 65. Parameters controlled by AUTOHYPHENATE may be set by a Task Builder option in Spalding Runoff, Version S1.4. 66. AUTOCONTENTS controls what entries are made in Table of Contents: chapters, appendices, and index, or header levels. Clement Runoff, Version BL3.11 uses ENABLE LEVELS for similar control. 67. BLOCK defers output of a block of text to a later page if not enough space remains on the current page. See also TEXT command in Clement Runoff, Version BL3.11, note 55. 68. CHAIN chains to new input file and does not return. See also REQUIRE command. 69. CONTENTS in Spalding outputs text to one of three separate tables of contents. Used to create TOCs for figures and tables. Related but not identical to SEND TOC command in other versions. 70. DISABLE BLOCK turns off output of deferred blocks. See note 67. 71. DISABLE CONTENTS in Spalding Runoff, Version S1.4 turns off processing of contents commands. Same effect as DISABLE TOC in other versions. 49 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF 72. DO CONTENTS outputs all stored Tables of Contents. Executed automatically at end of input file(s). Explicit command can set different spacing for the three tables. 73. DUMP forces the output of all pending blocks and figures. 74. ENABLE BLOCKS allows output of deferred text blocks (BLOCK and FIGURE). See note 70. 75. DISABLE OUTPUT prevents output from being written to the output file. 76. DISABLE RUNNING disables consecutive page numbering and restores chapter-oriented numbering. See note 80. 77. DISABLE SPECIAL in Spalding Runoff, Version S1.4 disables recognition of Runoff's special characters. Nearly identical to NO FLAGS ALL in other versions. Spalding's NO FLAGS command disables only Capitalize, Hyphenate, and Subindex flags and there is no corresponding "FLAGS" command to turn all three on again. 78. ENABLE CONTENTS turns on processing of Table of Contents commands. Same as ENABLE TOC in other versions. 79. ENABLE OUTPUT restores writing of output to the output file after it has been disabled with DISABLE OUTPUT. 80. ENABLE RUNNING enables consecutive page numbering as opposed to chapter-oriented page numbering. Similar to numbering possible through LAYOUT command in other versions. 81. ENABLE SPECIAL turns on recognition of Runoff's special characters. Similar to FLAGS ALL in other versions. 82. Spalding supports footnotes. However, like many earlier RSX versions, the end of a footnote is signalled with an exclamation mark in column 1. In DSR this would flag a comment and be ignored. See also note 88 on FOOTNOTE. 83. END OPTION marks the end of an optional input section; identical to ENDIF in other versions. 84. FIGURE operates in all three versions with significant differences: DSR - outputs n blank lines. If there are not n lines left on the current page starts new page and outputs n lines at top of next page. Clement - Same as DSR. Spalding - Works like FIGURE DEFERRED in other versions. That is, if there are not n lines left on current page, text continues to fill current page and n lines are output on a later page. Also allows specification of offset space from surrounding text, and a figure caption line. 50 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF 85. In Spalding Runoff, Version S1.4 FIRST TITLE is not required to obtain a title on the first page. The same result can be achieved by placing a TITLE command before any other commands that cause output. 86. FLAGS ACCEPT does not exist in Spalding Runoff, Version S1.4. This version cannot selectively enable and disable recognition of the Accept Flag; however, the Accept Flag character can be changed with the QUOTE CHARACTER command. See note 127. 87. FLAGS commands in DSR and Clement Runoff, Version BL3.11 enable recognition of the flag and optionally ___ specify a new flag character. Spalding Runoff, Version S1.4 does not allow specification of a new flag character (except see QUOTE CHARACTER). Also, in Spalding the Subindex Flag does not function in text but only within INDEX or ENTRY commands. 88. FOOTNOTE in Spalding Runoff, Version S1.4 requires a numeric argument n giving the number of lines to reserve for the footnote. Sometimes this necessitates multiple passes through Runoff to adjust this argument properly. DSR and Clement Runoff, Version BL3.11 do not require or allow the argument; instead they automatically calculate the space required for the footnote. Spalding, however, automatically generates a nice footnote separator line. DSR and Clement do not. DSR requires the separator, if desired, to be included in the first footnote on each page with footnotes; this too can require multiple passes through Runoff to get it right. Clement allows a separator line to be defined (once for entire document) with the PERMANENT FOOTNOTE command. See note 92 on FOOTNOTE LINE command in Spalding. 89. EOF forces the logical end of the input file. 90. EVEN forces output to next even-numbered page; accepts a text argument as a caption. For example, to insure the next section begins on an odd-numbered page, you could use: .EVEN This page intentionally left blank .PAGE Has no effect if current page is even-numbered. 91. EXCLUDE and INCLUDE set options so that corresponding input sections will be ignored or processed. Basically same function as VARIANT in DSR and Clement Runoff, Version BL3.11. EXCLUDE and INCLUDE take numeric arguments; VARIANT takes a variant-name (alphabetic) for an argument. 92. FOOTNOTE LINE allows user to change character used in and length of line generated to separate footnotes from text. Same function but not as flexible as PERMANENT FOOTNOTE in Clement Runoff, Version BL3.11. 51 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF 93. HEADERS ON and NO HEADERS ON functionally exist in all three versions but with slightly different syntax that prevents full compatibility. The basic, abbreviated commands (.HD and .NHD) function identically, turning page header generation on and off. In DSR the full command is "HEADERS [ON]", where the word "ON" is optional. In Clement Runoff, Version BL3.11 it is "HEADER"; "ON" is not allowed. In Spalding Runoff, Version S1.4 it is "HEADER" also, but in addition the command takes four optional arguments specifying page header style, length, and margins. Thus in Spalding this command serves the added functions of HEADERS UPPER, HEADERS LOWER, and HEADERS MIXED in the other two versions, with an added option of HEADER BLANK. However in DSR one would say "HEADERS MIXED", but in Spalding and Clement one would say "HEADER MIXED". See also the STYLE HEADERS command. 94. The function of HEADER NO PAGE in Clement Runoff, Version BL3.11 is served by HEADER BLANK in Spalding Runoff, Version S1.4. HEADER PAGE in Clement translates approximately as HEADER MIXED (or other option) in Spalding. 95. HEADER SPACING in Clement Runoff, Version BL3.11 may be accomplished in Spalding Runoff, Version S1.4 by the HEADER command, specifying header length as the second parameter. 96. IF and IFNOT exist in Spalding Runoff, Version S1.4 as variations of the OPTION command. 97. HYPHENATION and NO HYPHENATION in Spalding Runoff, Version S1.4 serve the same purpose as ENABLE/DISABLE HYPHENATION in DSR and Clement Runoff, Version BL3.11. HYPHENATION also allows the option of hyphenating only at user-specified break points. 98. In Spalding Runoff, Version S1.4 the NO FILL command causes blank lines in input to be preserved in output, as ".NO FILL.KEEP" would do in other versions. 99. Previous versions of Spalding Runoff had a command called LAYOUT that performed entirely different functions. The name of the command has been changed to PAGE FORMAT in Spalding Runoff, Version S1.4 to avoid confusion with LAYOUT in other versions. 100. Not a real restriction since LEFT is a synonym for INDENT, which exists in all versions. 101. LEVEL STYLE allows control of spaces before and after header level text, number of lines for automatic test page, and use of run-in headers. It must be separately specified for each header level. Useful to eliminate blank lines between consecutive header level commands. Not the same as DISPLAY LEVELS in other versions. Not 102. LIST ELEMENT in Spalding Runoff, Version S1.4 allows optional inclusion of number of lines for automatic test page before the element; other versions use the test page value from the last PARAGRAPH command. 52 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF 103. LITERAL functions with slight differences in the three versions: DSR - No flags and command recognized except .END LITERAL. Tabs are expanded to spaces. Clement - Same as DSR; action taken on tabs is not specified in the manual. Spalding - No commands except .END LITERAL recognized. Flag characters are Flag characters are recognized unless disabled. This recognized allows such things as underlining in literal mode. Other versions must use NO FILL and KEEP to achieve this effect. Tabs are not converted to not spaces but are output as tabs; form feeds are also literally output. 104. NO FLAGS flag-name in Spalding Runoff, Version S1.4 f _ _ valid only for Capitalize, Hyphenate, and Subindex flags. 105. NO SUBTITLE cancels subtitles in DSR and Clement; in Spalding you use the SUBTITLE command with no text to cancel subtitles. If AUTOSUBTITLE is in effect in Spalding you must also issue an AUTOSUBTITLE 0 command. 106. In Spalding Runoff, Version S1.4 the equivalent of NO AUTOSUBTITLE is AUTOSUBTITLE 0. 107. In Clement Runoff a single dollar sign may be used to trigger user-defined substitutions as well as the date and time substitutions provided in DSR. 108. DSR allows choice of underline character; other versions use hyphen. 109. The /CR switch in Clement Runoff, Version BL3.11 allows output of files which in turn may be edited and re-passed through Runoff, or which can be copied by FLX. 110. DSR /PAGES switch allows five ranges to be specified. 111. DSR /FORMSIZE switch sets only lines per page. 112. Spalding /IN and /EX switches override INCLUDE and EXCLUDE commands in file. See notes 91, 96. 113. The DSR /CONTENTS switch is not required by the other versions. DSR creates tables of contents only when this switch is used. It then creates an intermediate file (of undefined format) that must be processed with a program called TOC; the resulting file with extension of ".RNT" must then be processed through Runoff again to produce a ".TOC" file. This has the advantage of allowing you to produce a final output file with the table of contents in the appropriate place; it has the disadvantage of having to run several programs. 53 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF Spalding Runoff, Version S1.4 creates tables of contents by default at the end of the output file. No separate program passes are needed. However, to organize the resulting output you must cut and paste the table(s) pages from the end to the beginning of the document. Clement Runoff, Version BL3.11 strikes a happy medium. The table is specified as a separate file name in the command line: RNO output-file,toc-file=input-file This produces a ".RNT" file directly; no TOC program is needed. The file must be processed again by Runoff. You can create a DOC and a TOC file and then append them, and print the combined result. 114. The /OUTPUT switch is not required in the RSX versions. The output file name is specified as part of the command line. 115. NOTE in Spalding accepts an optional numeric indent specifying indent to use on right and left. Default is 5, like other versions. 116. NUMBER n in Spalding starts (resumes) page numbering with n as next page number, if given. Same as NUMBER PAGE in other versions except NUMBER accepts only numeric arguments while NUMBER PAGE will also accept letters. 117. In Spalding NUMBER APPENDIX accepts only a letter for argument, and NUMBER CHAPTER accepts only letters. 118. ODD forces output to an odd page if current page is even. See Note 90. 119. OPTION n marks the start of a segment of input to be processed or ignored depending on the setting of the indicated option number. See INCLUDE and EXCLUDE. If n is negative the action is reversed, that is, if "INCLUDE 3" is in effect, "OPTION -3" will cause following text to be excluded. Thus, "OPTION n" equals excluded "IF" command in other versions, and "OPTION -n" equals "IFNOT". See notes 91 and 96. 120. PAGE SIZE or PAPER SIZE in Clement takes three additional, optional arguments that set left margin, top margin, and spacing defaults for the duration of the document. PAGE SIZE with no arguments will restore all five previously set defaults. Similar to PAGE FORMAT in Spalding, but parameters are not identical. See next note. 121. PAGE FORMAT in Spalding sets four parameters: top margin, lines per page (not counting top margin), base left margin, and default right margin (or line width). Similar to PAGE SIZE in Clement, see previous note. See also note 99. 54 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF 122. PAGE NAME in Spalding specifies a text string to output as prefix to page numbers. 123. Spalding adds two parameters to PARAGRAPH to give additional control to the automatic TEST PAGE done for paragraphs. The two added parameters do not affect auto-paragraphing, only explicit PARAGRAPH commands. The added parameters are LENGTH and END; see note 131 on TEST PAGE for meaning. This type of PARAGRAPH command can be used to correct situations where a single short last line of a paragraph falls at the start of a page (this is called a widow line in typesetting). Clement has provided the IMMEDIATE TEST PAGE command to handle the same problem. See note 35. 124. PRINT in Spalding displays a line of text on the user's terminal. This can be used to mark progress, but more importantly, as a prompt to the user for input for form letters, etc. For example: .PRINT Enter name: .REQUIRE TI: Note that other Runoffs do not allow "TI:" or "TT:" as a file spec. 125. PRINT CONTENTS n prints the contents of a single Table of Contents buffer (range 1 to 3) without any automatic setting of headings or margin, allowing fuller user control of format through preceding Runoff commands. See DO CONTENTS, note 72. 126. PRINT INDEX in Spalding accepts two parameters to control indenting of index items and the spacing between letter groups. 127. QUOTE CHARACTER in Spalding changes the quote character (Accept Flag) to be the specified character. used to allow free use of underbar character in normal text. Similar to FLAGS ACCEPT in other versions but does not change the status of the flag, only changes the character used. See note 86. 128. REQUIRE in Spalding does not take quotes around the file spec; nesting is limited to two levels unless you modify program code at the expense of index buffer space. Spalding allows the filespec to be "TI:" thus providing a means of interactive terminal input that does not exist in other versions. See note 124. 129. RIGHT JUSTIFY in Spalding is functionally equivalent to RIGHT in DSR and Clement. Enough subtle differences exist, however, to consider this a separate command in all three versions. The basic command format is: .RIGHT [JUSTIFY][[+-]n];text 55 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF In DSR RIGHT causes a break. "n", if omitted, places text flush to right margin. If positive, flush to a point n spaces to left of right margin. If negative, ____ flush to a point n spaces to right of right margin. _____ In Clement RIGHT does not cause a break. There may be ___ left-justified text on the same output line. "n" behaves as it does in DSR -- except that negative n appears not to work (gets error message because it exceeds right margin). In Spalding RIGHT JUSTIFY does not cause a break. "n", ___ if omitted, places text flush to the right margin. If _______ unsigned, places text flush right against column n. If ________ _______ ______ _ signed positive or signed negative, taken as relative ______ ________ ______ ________ to the right margin but in a sense reverse to that of _______ __ ____ __ other two versions. _____ ___ ________ 130. STANDARD in Spalding resets all of the following parameters to their original default values (program defaults, not ones set by command): Header Length, Left Margin, Right Margin, Page Format (top margin, lines per page, base left margin, line width), Spacing, Tab Stops, Paragraph (indent, skip, test), List skip, and List Element test page value. Re-enables Fill and Justify. Accepts single parameter to apply to text and header right margins. 131. TEST PAGE in Spalding accepts two additional optional parameters giving greater control over page breaks at the end of the paragraph. You can insure that if a ___ break occurs at least "end" lines will be output on the next page. The three parameters are: start - minimum lines to appear on current page. length - estimated number of lines for total text block. end - minimum number of lines to appear on the next page if length lines will not fit on current page. See also note 123. 132. TITLE in Spalding can output a title on the first page, ___ eliminating need for the FIRST TITLE command present in other versions. See not 85. 133. In Spalding, TOP MARGIN is set with the PAGE FORMAT command. 56 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF FEATURES COMMON TO ALL THREE VERSIONS ________ ______ __ ___ _____ ________ This table represents the common ground, the commands that should be "safe" to use in any of the three versions. If you limit yourself to these commands and features you should be able to process your input file through any of the three versions; if any editing is necessary it will be very minor (e.g. changing "HEADERS" to "HEADER"). Some commands included in this list have options in one version or other that do not exist in all versions, but the basic command function is common. COMMANDS ________ Appendix Autoparagraph Autosubtitle Blank Break Center Chapter Comment Disable Indexing Do Index Enable Indexing End List End Literal End Note End Subpage Entry Figure Fill Flags Capitalize Flags Hyphenate Flags Subindex Footnote Header Level Headers Lower Headers Mixed Headers Upper Headers Indent Index Justify Left Margin List List Element Literal Lower Case No Autoparagraph No Fill No Flags name No Headers No Justify No Number Note Number Appendix Number Chapter Page Page Size Paper Size Paragraph Period Print Index Require Right Margin Skip Spacing Subpage Subtitle Tab Stops Test Page Title Upper Case FLAGS _____ 1. Accept (_). 2. Capitalize (<). 3. Control (.). 4. Hyphenate (=). 5. Subindex (>). 6. Lowercase (\). 7. Explicit space (#). 8. Underline (&). 9. Uppercase (^). COMMAND LINE SWITCHES _______ ____ ________ 1. Control of underline mode: backspacing, overprint, simulation or none. 2. Control of form feed mode: actual or simulated with line feeds. 57 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF 3. Ability to output selected page range. 4. Preset page height in command line. 5. Right shift output from command line. 6. Wait at start of new page. OTHER _____ 1. Supports conditional processing of input; commands differ in Spalding. 2. Ability to produce alternating titles and page numbers. 3. Produce Tables of Contents. 4. Produce an Index with subindex entries. 58 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF FEATURES COMMON TO DSR AND CLEMENT ________ ______ __ ___ ___ _______ COMMANDS ________ Appendix Autoparagraph Autosubtitle Begin Bar Blank Break Center Chapter Comment Disable Bar Disable Hyphenation Disable Indexing Disable Overstriking Disable Toc Disable Underlining Display Appendix Display Chapter Display Elements Display Levels Display Number Display Subpage Do Index Enable Bar Enable Hyphenation Enable Indexing Enable Overstriking Enable Toc Enable Underlining End Bar End Footnote End List End Literal End Note End Subpage Endif Entry Figure Figure Deferred Fill First Title Flags Accept Flags Break Flags Capitalize Flags Control Flags Hyphenate Flags Index Flags Lowercase Flags Overstrike Flags Space Flags Subindex Flags Substitute Flags Underline Flags Uppercase Flags All Footnote Header Level Headers Lower Headers Upper Headers Mixed Headers On If Ifnot Indent Justify Keep Layout Left Left Margin List List Element Literal Lower Case No Autoparagraph No Autosubtitle No Fill No Flags name No Flags All No Headers On No Justify No Keep No Number No Paging No Space No Subtitle Note Number Appendix Number Chapter Number Level Number List Number Page Number Subpage Page Page Size Paper Size Paging Paragraph Period Print Index Require Right Right Margin Send Toc Set Paragraph Skip Spacing Style Headers Subpage Subtitle Tab Stops Test Page Title Upper Case Variant[62] FLAGS _____ 1. Accept (_). 2. Break (|). 3. Capitalize (<). 4. Semicolon as comment (.;). 5. Control (.). 6. Hyphenate (=). 7. Lowercase (\). 59 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF 8. Overstrike (%). 9. Space (#). 10. Subindex (>). 11. Substitute ($) including date substitution for $$DATE, etc. 12. Underline (&). 13. Uppercase (^). COMMAND LINE SWITCHES _______ ____ ________ 1. Control of underline mode: backspacing, overprint, simulation or none. 2. Control of form feed mode: actual or simulated with line feeds. 3. Ability to output selected page range. 4. Preset page height in command line. 5. Right shift output from command line. 6. Wait at start of new page. OTHER _____ 1. Ability to produce alternating titles and page numbers. 2. Produce an Index with subindex entries. 3. Ability to produce alternating titles and page numbers. 4. Produce Tables of Contents. Produce separate ".RNT" file for Table of Contents. 5. Produce an Index with subindex entries. 6. Selective conditional input sections using IF, IFNOT, etc. 60 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF FEATURES COMMON TO DSR AND SPALDING ________ ______ __ ___ ___ ________ COMMANDS ________ Appendix Autoparagraph Autosubtitle Blank Break Center Chapter Comment Disable Indexing Do Index Else Enable Indexing End List End Literal End Note End Subpage Entry Figure Fill Flags Capitalize Flags Hyphenate Flags Subindex Footnote Header Level Headers Lower Headers Mixed Headers Upper Headers Indent Index Justify Left Margin List List Element Literal Lower Case No Autoparagraph No Fill No Flags Capitalize No Flags Hyphenate No Flags Subindex No Headers No Justify No Number No Period Note Number Appendix Number Chapter Page Page Size Paper Size Paragraph Period Print Index Require Right Margin Skip Spacing Subpage Subtitle Tab Stops Test Page Title Upper Case FLAGS _____ 1. Accept (_). 2. Capitalize(<). 3. Comment (!). 4. Control (.). 5. Hyphenate (=). 6. Subindex (>). 7. Lowercase (\). 8. Explicit Space (#). 9. Underline (&). 10. Uppercase (^). COMMAND LINE SWITCHES _______ ____ ________ 1. Underline control: backspacing, overprint, simulation or none. 2. Output indicated chapter range. 3. Output true or simulated form feeds. 4. Enable or disable hyphenation. 5. Output selected page range. 6. Preset page height in command line. 7. Right shift output. 8. Wait at start of new page. 9. Control number of blank lines at top of page. 10. Control maximum lines per page. 61 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF OTHER _____ 1. FIGURE in Spalding equivalent to FIGURE DEFERRED in DSR. 2. Produce alternating titles and page numbers. 3. Produce index with subindex entries. 4. Enable or disable hyphenation. 5. Selective inclusion of input by variant parameters. 6. Output title on first page if desired. 7. Change accept flag character (different commands). 8. Turn autosubtitle off (different commands). 9. Right justify text in a line (different commands). 62 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF FEATURES COMMON TO CLEMENT AND SPALDING ________ ______ __ _______ ___ ________ COMMANDS ________ Appendix Autoparagraph Autosubtitle Blank Break Center Chapter Comment Disable Indexing Do Index Enable Indexing End List End Literal End Note End Subpage Entry Figure Fill Flags Capitalize Flags Hyphenate Flags Subindex Footnote Header Level Header Lower Header Mixed Header Upper Header Indent Index Justify Left Margin List List Element Literal Lower Case No Autoparagraph No Fill No Flags Capitalize No Flags Hyphenate No Flags Subindex No Headers No Justify No Number Note Number Appendix Number Chapter Page Page Size Paper Size Paragraph Period Print Index Require Right Margin Skip Spacing Subpage Subtitle Tab Stops Test Page Title Upper Case FLAGS _____ 1. Accept (_). 2. Capitalize(<). 3. Control (.). 4. Hyphenate (=). 5. Subindex (>). 6. Lowercase (\). 7. Explicit Space (#). 8. Underline (&). 9. Uppercase (^). COMMAND LINE SWITCHES _______ ____ ________ 1. Underline control: backspacing, overprint, simulation or none. 2. Output indicated chapter range. 3. Output true or simulated form feeds. 4. Output selected page range. 5. Preset page height and width in command line. 6. Right shift output. 7. Spool output file. 8. Wait at start of new page. 9. Force uppercase output. 63 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF FEATURES UNIQUE TO DSR ________ ______ __ ___ COMMANDS ________ Autojustify Autotable Control Characters Date Disable Bolding Enable Bolding Flags Bold Flags Comment Flags Period No Autojustify No Control Characters No Date Number Index Number Running Repeat Set Date Set Level Set Time Variable Xlower Xupper FLAGS _____ 1. Bold (*). 2. Period (+). COMMAND LINE SWITCHES _______ ____ ________ 1. Specify non-spacing underline character, /NONSPACING. 2. Set overstrikes for bolding, /BOLD=n. 3. Enable change bars, /CHANGE_BARS. 4. Create TOC file, /CONTENTS. 5. Output termination message, /LOG. 6. Direct output of error messages, /MESSAGE. 7. Specify output file, /OUTPUT (done without switch in other versions). 8. Generate sequence numbers in output, /SEQUENCE. 9. Debugging options to trace effect of certain commands, /DEBUG. OTHER _____ 1. Index and Table of Contents must be processed by two additional programs. 2. Index may be double-column. OBSERVATIONS ____________ DSR has very few unique features that cannot be found in one of the other versions. Bolding by overstriking may be useful if your printer cannot do shadow printing. A two-column index is nice but not a frequent necessity. Other than this, the most useful unique command -- which it seems would be easy to implement in the other versions -- is REPEAT. 64 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF FEATURES UNIQUE TO CLEMENT ________ ______ __ _______ COMMANDS ________ Autobreak Autohyphenate Autotitle Center Text Chapter Layout Define Command Define Escape Define Substitute Define Subscript Define Superscript Define Variable Space Disable Escape Disable Equation Disable Substitution Disable Tabs Ellipses Enable Substitution End Center End Separated Equation End Text Flags Escape Flags Equation Flags Special Half Spacing Header No Page Header Page Header Spacing Immediate Test Page Immediate Test Text Index Levels Layout(types 4-7) Lock No Autobreak No Autohyphenate No Autotitle No Ellipses No Half Spacing No Number Chapter No Title No Underline Permanent Footnote Reset Escape Reset Substitute Separated Equation Style Chapter Tab Left Tab Right Test Text Text Top Margin Underline Underline Spaces Underline No Spaces Variable Spacing Variant FLAGS -- Equation flags ({ and }). _____ COMMAND LINE SWITCHES _______ ____ ________ 1. /AP:l:h to output indicated appendix range. 2. /CR or /-CR to control output of CR, LF sequences. OBSERVATIONS ____________ Clement has many unique features, as can easily be seen from the above chart. To summarize them as best I can, they include: 1. Equation formatting. 2. User-definable text and command strings for substitution. 3. Ability to utilize unique printer features through escape sequences. 4. Improved use of tabs, with ability to tab left or right, or align on a break character. Plus filling with ellipses instead of spaces. 5. Added page layout formats. 6. user-definable Permanent Footnote. 7. user control of what is or is not underlined. 8. Improved user control over hyphenation and end-of-page conditions Clement has been extremely careful to maintain compatibility with DSR. For instance, he has 113 commands in common with DSR versus 64 for Spalding. If you avoid the commands in this chart 65 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF and use only those in "Features in Common to DSR and Clement" you should have no difficulty using DSR and Clement interchangeably. Clement even advises using the DSR manual as an additional reference, and provides instructions for building his program on a VAX/VMS system. Clement has also used his IF command very nicely to provide a means of building extensive RSX and VMS "Help Files" for Runoff directly from the same source file as used to produce his user manual. 66 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF FEATURES UNIQUE TO SPALDING ________ ______ __ ________ COMMANDS ________ Alternate Alternating Title AutoContents Block Chain Contents ________ Disable Blocks Disable Contents Disable Output _______ ________ Disable Running Disable Special Do Contents _______ _______ Dump Enable Blocks Enable Contents ______ ________ Enable Output Enable Running Enable Special ______ _______ End Option Eof Even ___ ______ Exclude Footnote Line Hyphenation _______ ___________ Include Level Style No Alternate _______ No Alternating Title No Flags No Hyphenation __ _____ __ ___________ Number Odd Option ______ ______ Page Format Page Name Print Print Contents Quote Character Right Justify _____ _________ _____ _______ Standard The commands underlined in the above table have unique names but names __________ their functions are duplicated in the other Runoffs by commands functions with different names. In the author's opinion Spalding's Runoff could profit by making these commands compatible with DSR and Clement. FLAGS -- (!) is used to indicate end of footnote. _____ SWITCHES ________ 1. /ID identifies program version. 2. /AP appends output to existing file. 3. /AL allows/disallows alternating titles. 4. /WI:n sets default right margin (width). 5. /HL:n sets number of lines in page header. 6. /BL:n sets blank lines at start of chapters. 7. /IN and /EX set text portions to include and exclude, overriding commands within the input file. overriding OTHER _____ 1. Allows comma as command separator in addition to semicolon. 2. Allows multiple input files on command line. 3. FIGURE works like FIGURE DEFERRED in other versions, and allows a caption line. 4. TITLE can place title on first page. 5. FLAGS commands do not allow specification of new character for flag. 6. (>) functions only as subindex flag in INDEX and ENTRY commands; does not serve as an Index Flag within text. 7. FOOTNOTE requires a numeric argument giving footnote size; also generates footnote separator line automatically. 67 PAGESWAPPER - March 1984 - Volume 5 Number 9 Comparison of Three Versions of RUNOFF 8. NO FILL preserves blank lines. 9. Added parameters to LIST ELEMENT for better control. 10. LITERAL mode recognizes and acts on flag characters such as underline. Tabs are not converted to spaces in literal mode. 11. AUTOSUBTITLE takes numeric parameters. 12. Table of Contents created at end of output file, not as separate file. 13. Some other commands with added parameters to control spacing and margins: NOTE, PAGE SIZE, PARAGRAPH, and TEST PAGE. 14. REQUIRE command does not want quotes around file specification; allows TI: as input file specification for terminal input. OBSERVATIONS ____________ The major unique features in Spalding can be summarized as follows: 1. Deferred output commands (BLOCK, FIGURE, FOOTNOTE) offer better control of page appearance. 2. The CHAIN and EOF commands provide added control over inclusion of secondary input files. 3. The PRINT command and the ability to REQUIRE input from the terminal add a unique means of interactive prompting and response. 4. Three separate Tables of Contents for text, figures and tables. 5. Greater control of final document appearance through EVEN, ODD, ALTERNATE, PAGE FORMAT, and PAGE NAME commands, and added parameters to LIST ELEMENT, NOTE, PAGE SIZE, PARAGRAPH, and TEST PAGE. 68 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT INPUT/OUTPUT A SIG Information Interchange A form for INPUT/OUTPUT submissions is available at the back of the issue. INPUT/OUTPUT 234 Caption: Runoff to Scribe Conversion Message: We are interested in software which will convert text files with RUNOFF formatting commands to text files with SCRIBE formatting commands. SCRIBE is a product of UNILOGIC, Ltd. of Pittsburgh, PA. Contact: Michael A. Huffenberger Battelle Columbus Laboratories 505 King Avenue Columbus, OH 43201 (614) 424-6445 Date: January 3, 1984 INPUT/OUTPUT 235 Caption: Relational Database Management Message: We have a relational database management system which interfaces to Cobol, Pascal and Fortran programs and has two interactive languages of its own for queries and application development. If anyone wants more information give me a telephone call. Contact: Colin Banfield Logica 64 Newman Street London, W1A 4SE, UK 44(1) 637-9111 Date: January 3, 1984 69 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT INPUT/OUTPUT 236 Caption: G-Floating Hardware - Response to I/O # 209 Message: Although we have not performed a careful study, switching some of our programs from software emulation of G-floating to the microcode version (on an FPA-equipped 780) caused about a two order of magnitude increase in their speed of execution. Well worth the cost if you intend to run much G-floating at all. Contact: H. Walter Johnson Raychem Corporation 300 Constitution Drive Menlo Park, CA 94025 (415) 361-3264 Date: January 4, 1984 Pageswapper Editor's Note I was under the impression that 780 FPAs did not handle G- or H- floating at all. If that is so, then the above results should also hold for non-FPA 780s. INPUT/OUTPUT 237 Caption: Status of print jobs Message: Does anyone know a way to find out how far a currently printing job in a VMS queue has gotten? The number of blocks, number of pages, or just percentage of the file left to be printed would be sufficient. Contact: Craig Waterbury AGENA/Safecom 4333 Brooklyn Avenue, NE Seattle, WA 98185 (206) 545-3169 Date: January 4, 1984 70 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT INPUT/OUTPUT 238 Caption: Lots of Terminals - Reply to I/O # 198 & 222 Message: At a previous place of employment, we had 88 active terminal ports on a VAX-11/780. At any one time, up to 40-45 users could be logged onto the system. The configuration was extremely large with greater than 4MB main memory, fast disks, and as many DMA devices as possible. The primary point is that you need a large 780. The users also have to be aware of the load on the machine. Some type of process killer is also necessary. Contact: Walter R. Crosby, Vice President R&D Property Technology, Incorporated 283 Dartmouth Street Boston, MA 02116 (617) 266-2115 Date: January 4, 1984 INPUT/OUTPUT 239 Caption: Analog Interface Support Message: We need the interface software (drivers) for Data Translation DT1711 Analog I/O board that will allow both block and continuous mode data capture. We have an 11/750 with VMS. Contact: Peter Handley P.O. Box 78323 Sandton, Transvaal, 2146 Republic of South Africa (011) 864-1860 Date: January 5, 1984 INPUT/OUTPUT 240 Caption: Printronix P-600 connection Message: We would like to move our P-600 (not a DEC LXY) from our PDP-11 (LP-11 type controller) to a DMF-32 on a VAX. Unfortunately, the documentation on pin assignments, etc. is unclear. Has anyone done this? 71 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT Contact: Bernard E. Wood P-15, MS D406 Los Alamos National Laboratory Los Alamos, NM 87545 (505) 667-1789 Date: January 5, 1984 INPUT/OUTPUT 241 Caption: Spread Sheet for VAX 11/750 Message: We need a spreadsheet program for our VAX-11/750. Contact: James Rieden Probe Systems, Incorporated 655 N. Pastoria Avenue Sunnyvale, CA 94086 (408) 732-6550 Date: January 5, 1984 INPUT/OUTPUT 242 Caption: Mag Tape Input Software - Reply to I/O # 214 Message: There is a program on the 1982 Spring Symposium VAX SIG tape called MTEXCH. I have been using it with complete success to read files off a multifile EBCDIC tape with varying block sizes. Contact: Patrick D. Heisinger McDonnell Douglas Automation, Department K247 P. O. Box 516 St. Louis, MO 63166 (314) 233-6203 Date: January 6, 1984 72 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT INPUT/OUTPUT 243 Caption: Need Modem Program Message: I need a modem program for our VAX/11-750, to let a user call out using an auto-dial modem to another system. The modem is connected to one line of our DZ-11. Contact: Jim Cordill Arco Exploration PRC-6050 P. O. Box 2819 Dallas, TX 75221 (214) 422-3119 Date: January 11, 1984 INPUT/OUTPUT 244 Caption: Accounting Software Needed Message: Looking for one or more accounting applications (or a complete system) which will run on the VAX 11/780. These would be used in teaching to familiarize students with real accounting systems. Free or low cost software preferred! Contact: Dr. Edward L. Summers Department of Accounting, GSB 3.200 University of Texas at Austin Austin, TX 78712 (512) 471-5215 Date: January 17, 1984 INPUT/OUTPUT 245 Caption: DR750/DR780 Message: We are interested in corresponding with anyone who has had or is trying to interface a DR32 to a custom (in-house) device. Contact: Allen Rueter 510 South Kingshighway Box 8131 Washington University St. Louis, MO 63110 (314) 362-7133 73 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT Date: January 18, 1984 INPUT/OUTPUT 246 Caption: File transfer between VAX and Microcomputers Message: We are currently working on methods of transferring files between our VAXes and various microcomputers on campus, and would be interested in other peoples experiences in this area, and in obtaining any useful software for this purpose. Contact: Michael Kerrisk Centre for Computing & Biometrics Lincoln College Canterbury, NEW ZEALAND 252-811 Date: January 19, 1984 INPUT/OUTPUT 247 Caption: Password Expiration for the VAX Message: Having seen the number of people wanting password expiration on the VAX I decided to write a program to do something about it. The result is a program called LOGINDATE. LOGINDATE is executed as part of the system wide login command procedure. It keeps track of various information on the most recent login of each user. In particular, it records login date, time and terminal along with the password and the date on which it was last changed. (The password stored is actually an encoded version from the UAF). If the password has not been changed in the last 30 days the user is asked to enter a new one. The program checks to make sure that the user name is not used as the password. The program is written in DCL and MACRO and wil run on VMS V3.0 and above. Complete source is available. Contact: John Briggs SPACECOM 1300 Quince Orchard Boulevard Gaithersburg, MD 20878 (301) 258-6965 Date: January 23, 1984 74 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT INPUT/OUTPUT 248 Caption: To users of Xerox Computer Systems Software Message: We are interested in contacting other DEC-based users of Xerox Computer Systems Software to discuss common problems. Contact: James Cahn Dixie Mill Supply Company P. O. Box 52005 New Orleans, LA 70152 (504) 525-6101 Date: January 25, 1984 INPUT/OUTPUT 249 Caption: RL01 Emulator Message: I am running a DSD-880 on my VAX 11/750. It emulates an RX02 and an RL02. The RX02 emulation works but the RL01 won't "CONFIGURE" properly (comes back with drive off line). Has anyone else encountered (solved?) this problem? Contact: Bill Robertson Communications Research Center, DSS P. O. Box 11490, Station H Nepean, Ontario CANADA K2H 852 (613) 596-9441 Date: January 27, 1984 INPUT/OUTPUT 250 Caption: Snoopy Calendar Message: The IBM 1130 user pool had a "snoopy calendar" program which would produce 12 cartoons and 12 months on 24 printer pages. It had a Fortran program and a data file for controlling the output. Is there a VAX version? Contact: J. L. Prather Technicon 511 Benedict Avenue Tarrytown, NY 10591 (914) 681-2694 75 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT Date: January 27, 1984 INPUT/OUTPUT 251 Caption: How to get a traceback - Reply to SIR # 2 Message: I hadn't realized how many people didn't knwo how to get a user-callable traceback (with SYSTEM traceback message). The answer is to call LIB$SIGNAL (%VAL(TRACE)) where TRACE = 98198 (hex). DEC doesn't seem to have a name for this value, which causes signal to output "symbolic stack dump follows" twice instead of the usual once. (The value has not changed in at least 3 years). Contact: Joel MacAuslan c/o Eikonix Corporation 23 Crosby Drive Bedford, MA 01730 (617) 275-5070 Date: January 31, 1984 INPUT/OUTPUT 252 Caption: Bug fix for program LNOTICE Message: There is a bug in the program LNOTICE which I submitted to the Fall 1983 SIG tape. This bug prevents existing records in the User Login Record file from being updated. To fix this problem, modify the file [VAX83C.BATTELLE.NOTICE]LNOTICE.MAR. In the definition of ULRRAB, remove the NLK option from the ROP field. Contact: Gary Grebus Battelle Columbus Labs 505 King Avenue Columbus, OH 43201 (614) 424-7156 Date: February 1, 1984 76 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT INPUT/OUTPUT 253 Caption: MODEM7 for the VAX Message: I need a program which will communicate with the CP/M MODEM7 program over dial-up lines. Cost is a factor. Free is just the right cost, however, distribution fees are reasonable. I confess that I haven't checked the SIG tapes yet, so a pointer in the right direction will help as well. Contact: Robert A. Harris MD-131 Leeds & Northrup Company North Wales, PA 19454 (215) 643-2000 x2380 Date: February 1, 1984 INPUT/OUTPUT 254 Caption: Lots of Terminals - Reply to I/Os # 222 & 198 Message: We have connected 112 terminals on a VAX, all on DZ-11's. Our environment is primarily engineering. We've had up to 55 concurrent users; typically performance degrades at 32 and up. The Load is a function of the task as well as user count and configuration. With 3 simultaneous simulations, performance bogs. We could accomodate 25 EDT sessions with less degradation. Contact: David J. Linton Allen-Bradley 1201 South Second Street Milwaukee, WI 53204 (414) 671-2000 extension 3328 Date: February 2, 1984 INPUT/OUTPUT 255 Caption: More Lots of Terminals - Reply to I/O #s 198 & 222 Message: We have a multiple-VAX environment and regularly have excess of 50 terminals logged in and running a wide variety of applications. I, personally, have configured and run on VAX's with excess of 100 terminals and had good measures of success in doing so. There are some significant items that affect the performance of the system if the system has not had 77 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT the hardware balanced properly and the system tuned correctly for interrupt I/O (in the case of DZ11's) or for DMA operations (in the case of DMF32's or lookalikes). System degradation with multiple terminal access is frequently caused by improper balancing of hardware on the UNIBUS's. Remember that there are 4 vertical interrupt levels (BR4, BR5, BR6, and BR7), but usually all terminal devices are set up to interrupt on BR5. This means that the same interrupt address line will be used by all interrupting devices on that same BR level. In the case of 64 terminals (DZ11-type) on the same UNIBUS, this interrupt load can be quite heavy. Typically, the DZ11 generates an interrupt for every 2 characters in the buffer or until a clock timeout, whichever occurs first. On some DZ11 lookalikes, buffering of up to 16 characters occurs before an interrupt is generated. An additional problem is that some UNIBUS disks (such as the RK07) are also set up to interrupt at BR5 as well as some printers. BR levels are changed on the controller by replacement of the BR level plug and modification of the device driver to understand that interrupts will be coming from other than the default BR level (if it has not already been coded in the driver). It is NOT a good idea to change the BR level unless you are fairly familiar with UNIBUS architecture and the VMS Interrupt Service Mechanism(s). Suffice it to say that there is a better than average chance that all terminals and low-priority devices on the same bus are competing for access to the same BR line. For Direct Memory Access (DMA) devices, such as the DMF32 and lookalikes, the UNIBUS has a specific line used for DMA access. There is no way to alter DMA line access (either the device is DMA or it is not), so you are stuck with DMA if it is bestowed upon you. This, however, can be a good and bad thing. Good in the respect that your terminal interface device can receive a great deal of characters before an interrupt is generated, thus drastically reducing the number of interrupts that are generated. This frees up the CPU for more useful work. Bad in that all DMA for all devices on the bus has to be done over the same DMA line. This can be especially harmful if a device such as a disk or a communications device (such as a DMR) are hierarch- ically placed before the terminal device. This can cause problems such as timeouts and data lates on the terminal device due to other DMA devices "hogging" the UNIBUS (hence the term "BUS HOG"). Also, DMA terminal devices perform DMA on OUTPUT ONLY! This means that all input operations from the terminal still cause interrupts to happen. 78 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT Your choice of either DMA or interrupt oriented terminal controllers will have a great impact upon how many terminals you can place upon your system. The number of interrupts is a key to how many terminals can be placed on a system or on a particular UNIBUS. If one hooks up 384 terminals (as suggested that the VAX 11/780 can handle in the VMS Software Product Description by DEC), and does not do anything with them, it is quite possible to run with 384 terminals hooked up. If you try to use them all at once, forget it. Also, baud rate has a lot to do with the amount of interupts. Obviously, a 9600 baud terminal will generate/receive greater numbers of interrupts than a 1200 baud (bits/sec) terminal will. To calculate overall baud rate in terms of bytes/sec, simply divide your baud rate by 10 (8 bits in 1 byte + 1 start bit and 1 stop bit). Hence, 1200 baud becomes 120 characters of data per second. The UNIBUS is capable of maximum transfer speeds up to 1.2 Mbyte/sec. Using the baud rate of the terminals and the known current UNIBUS bandwidth (the UNIBUS is actually capable of much higher rates of speed - in the order of 8Mbytes +) of 1.2 Mbytes, it is possible to calculate the total number of interrupts that can be generated by terminal devices before the bus bandwidth is saturated. This is but one parameter than can affect hardware throughput, but it gives the general idea. Another important parameter is the amount of time it takes the processor to service the interrupt. Obviously an 11/780 will be able to handle more interrupts than an 11/730. While DEC is very sketchy on actual throughput considerations and has not (to my knowledge) ever published the actual MIPS rating of the 11/780, our understanding is that it is supposed to be in the .9 MIPS range (I think that it is somewhat slower). What does all of this mean? Basically that an estimated total number of interrupts possible per second can be estimated for the processor by using off-the-shelf calculations and understanding speed ratings of the UNIBUS and the processor. Remember that the 11/780 has the capability of handling up to 4 UNIBUS's and that multiple terminal controller can be placed on each UNIBUS. Realistically, this number will give you a maximum possible throughput per second. Actual through- put will be substantially less due to other problems such as UNIBUS mapping inconsistencies, bus waits, timeouts, etc... I usually use 50% of the total as a reasonable maximum total interrupts per second number; that way I am not grossly dissappointed. This number gives me a total known number of characters per second that I know the 79 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT processor can handle. If I find out through performance tools (available from DEC and DECUS) that I am not getting this performance, a look at tuning and hardware layout is in order. Bear in mind that the number that you come up with will be a theoretical maximum that is only good for interrupts. It does not include the problem of application mix. How many terminals can go on a VAX? Hard to say, but, in summary, the following can help dictate it: 1. Application mix. If you are already I/O bound (such as with data base applications) or compute bound (such as with seismic applications), your terminal controller may not get enough shots at the CPU to get its interrupts processed. 2. Hardware layout. If there are 64 terminals, 4 disks, 12 line printers, 2 DMR's and a cartridge in a bare tree on your single UNIBUS, good luck. Frequently, re-distribution of interrupt and DMA load to other UNIBUS's can greatly improve terminal response and system response. 3. Tuning parameters. Some system parameters can be changed to affect terminal performance. Modification of most system parameters is directly dependent upon memory resources (you may need additional memory and no, I'm not a DEC salesman) and also upon requirements to run your application. Check out chapter 12 in the System Manager's Guide for information, or come to DECUS symposia. Invariably there is a session or two on tuning of systems for terminal or application performance. One other thing. Remember that modification of one system parameter can adversely affect other system parameters. Don't change what you don't understand or if you do, remember what they were originally set up to be. Also, never change too many at once as adverse performance could be due to a certain mix of parameter changes. This is difficult to track down unless changes have been done a little at a time. Tuning is a black art and care should be exercised. 4. Type of terminals. Block mode terminals running EDT usually generate less overhead than normal VT100 terminals due to much of the moving around and cursor control functions being done at the terminal and not at the CPU. Additionally, file transfers from a remote micro to the host over an RS232 interface can cause great deals of problems if done on a regular basis. The types of terminals that are used will have a great deal to do with interrrupt and DMA handling capabilities. 80 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT 5. Number of active terminals. If you are like most of us, it is think a while, type some, think some more. This means that even though you may have 64 + terminals hooked up at 1200 baud, you will NOT be getting 120 * 64 interrupts/second. This will usually be a variable number of active terminals based upon the time of day. If you are a timesharing service, expect the worst. Users will want to sign on, do their thing as fast as possible, and sign off. This could mean that 64 logged in terminals could be generating a great deal of data. 6. Screen-oriented applications. These types of applications always generate more "extra" interrupts than line-oriented applications. This is due to the necessity of generating escape sequences to place the data in the right spot on the screen. When cal- culating throughput, remember to add in the addi- tional overhead. 7. Unknowns. There is an old saying that fully applies to resource management - "Just because you are not paranoid doesn't mean that someone is not out to get you." Basically this means that a flaky modem and a terminal gone bananas can generate a lot of trash that the system will, of course, try to under- stand. This also introduces additional overhead. As you can see, there are a lot of variables that can directly affect the number of terminals that can be placed on an 11/780. You are advised to heed each one carefully as you can get very good performance out of 120 terminals or rotten performance out of 20 terminals depend- ing on how you configure the system hardware and software. Contact: Bill Hancock Sohio Petroleum Company 5420 LBJ Fwy., Suite 1000 Dallas, Texas 75240 (214) 387-5187 Date: February 13, 1984 Pageswapper Editor's Note At least one vendor supplies a terminal interface that does DMA on INPUT, with their own terminal driver and lots of outboard microcode to emulate all the various functions of the VMS terminal driver. DMA on input, of course, will not provide any savings when the program you run does single character reads. 81 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT INPUT/OUTPUT 256 Caption: IBM 3800 Access via 2780/3780 PE Message: We are interested in any software to send files to and IBM 3800 via the 2780/3780 protocol emulator, especially a friendly user interface. Any software expanding the functionality of REMOTE, especially in the area of return log file distribution, would also be handy. We are using hacks now but would like something on the order of the ET software with Galaxy on TOPS-10/20. Contact: Terrance L. Stowers Johnson & Johnson, MIC Route 202 Raritan, NJ 08869 (201) 524-1859 Date: February 1, 1984 INPUT/OUTPUT 257 Caption: VAX/VMS Billing Program Message: We have a VAX 750 and we developed a billing system which post-processes system accounting information to provide periodical account balances in terms of dollars spent. This includes software to keep track of user expenditures on a daily, monthly and accumulated basis, and to generate monthly invoices for each account. Users can also inquire about individual expenditure through a cost utility which provides charge information for a particular user for various accounting periods. Anyone interested? Contact: David wong Robert L. Cloud & Associates, Incorporated 125 University Avenue Berkeley, CA 94710 (415) 841-9296 Date: February 3, 1984 82 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT INPUT/OUTPUT 258 Caption: Linear Programming Package Available - Reply to I/O # 226 Message: The LINDO (Linear INteractive Discrete Optimizer) solves linear programs with up to 1000 rows and 5000 columns on a VAX. It is completely interactive and solves not only linear but also quadratic and integer problems. It has a variety of input and file options. Contact: Linus Schrage University of Chicago, Graduate School of Business 1101 East 58th Street Chicago, OK 60637 (312) 962-7449 Date: February 6, 1984 INPUT/OUTPUT 259 Caption: VAX-to-VAX File Transfer - Reply to I/Os # 174 & 184 Message: Kermit is a program originally written by Columbia University for DEC-20s and micros. Currently there are implementations for DEC 10/20 (TOPS), VMS, UNIX, IBM (VM/CMS), RT-11 (imperfect), and many micros. Hopefully, an RSX implementation will exist on the Fall 83 RSX SIG Tape. VMS implementations are on various SIG tapes. Kermit must exist on the remote system for file transfer, but not for "virtual terminal". Kermit-VAX will do EDT on a remote RSX system (slowly, but acceptably). Contact: Dennis Costello National Submicron Facility G-02 Knight Lab Cornell University Ithaca, NY 14853 (607) 256-2329 Date: February 6, 1984 83 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT INPUT/OUTPUT 260 Caption: XAA0: Times Out - Reply to I/O # 210 Message: We have 6 DR11Ws running on a 750 talking to our own hardware. Basically the problem is that the (unsupported) DEC supplied XADRIVER has large holes in it. Specifically in the start I/O routine (after 4$), DR11W interrupts are disabled while a low IPL piece of code executes. Also if your VAX responds quickly the ISR will give a device error due to the dubious clearing of signals in the XA-register routine. We wrote our own driver. Contact: Simon Powell 15-23 Fore Street Ipswich, Suffolk, England 0473-219661 Date: February 6, 1984 INPUT/OUTPUT 261 Caption: G-Floating Hardware Information - Reply to I/O # 209 Message: We use the 11/750 writeable control store for our own microcode. As a matter of interest we did some timings after having seen the above request (timings on a 750, register to register): 1) There's a negligible difference between 2 + 3 operands 2) In microcode, MULG is approximately 22 times faster than emulated, DIVG about 25 times faster, ADDG about 50 times faster and SUBG about 41 times faster. 3) In microcode, MULH is approximately 10 times faster, DIVH about 10 times, ADDH about 30 times and SUBH about 20 times. Contact: Simon Powell 15-23 Fore Street Ipswich, Suffolk, England 0473-219661 Date: February 7, 1984 84 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT INPUT/OUTPUT 262 Caption: Device name from FORTRAN LUN - Reply to I/O # 225 Message: The FORTRAN INQUIRE statement returns the fully specified name of a file associated with a logical unit number. (This name may then be parsed for the device name, in particular.) Specifically, the statement: INQUIRE (UNIT=lun,NAME=fname) returns the full name in 'fname' (=CHARACTER*127, in general) for unit 'lun'. Contact: J. MacAuslan Eikonix Corporation 23 Crosby Drive Bedford, MA 01730 (617) 275-5070 Date: February 7, 1984 INPUT/OUTPUT 263 Caption: Printing in Braille - Grade II Message: Utah Transit is seeking a way to print bus schedules from VAX 11/750 VMS, to a printer capable of printing Grade II Braille (shorthand). Any or all help on hardware or software/suggestions is appreciated. Contact: Butch Jentzsch Utah Transit Authority 3600 South 700 West Salt Lake City, Utah 84119 (801) 262-5626 Date: February 8, 1984 INPUT/OUTPUT 264 Caption: Wang/VAX Communications Software Message: I have a need to interface a Wang word processor system to a VAX 780. Primary need is ability to do Wang backups on VAX system for offload to tape and recovery of lost Wang files back to Wang system. 85 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT Contact: Dan Peebles P. O. Box 17500 Orlando, FL 32860-7500 (305) 889-1375 Date: February 9, 1984 INPUT/OUTPUT 265 Caption: Magnetic Tape Input Software - Reply to I/O # 214 Message: We also had the need to read EBCDIC tapes with multiple files and different blocking. Our local DEC office provided us with one of those nifty unsupported free programs they have running around. It is called TAPECOPY & reads ASCII or EBCDIC (translates) and you can read consecutive files changing the blocking factor and record size each time or carrying it. You can also skip files to process later ones (i.e. skip labels). Tapes must be ANSI, I believe. Contact: Allison Hamilton OCTRANSPO 1500 St. Laurent Boulevard Ottawa, ON CANADA KIV 0Z8 (613) 741-6440 ext 341 Date: February 14, 1984 Pageswapper Editor's Note TAPECOPY is another program available from VAX SIG tapes. INPUT/OUTPUT 266 Caption: Project Management Software Message: We are looking for software to assist us in project scheduling. Does anybody know a reasonably priced PERT or PERT-derivative? Is there anything in the public domain? Contact: Lars Poulsen ACC 720 Santa Barbara Street Santa Barbara, CA 93117 86 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT (805) 963-9431 Date: February 15, 1984 INPUT/OUTPUT 267 Caption: Obtaining a device name from Fortran LUN - Reply to I/O # 225 Message: I have a program which shows a method I have used. It allows for rooted directories, process permanent files, and concealed device names. Two special cases which may or may not work are files on another DECnet node and ANSI magtape files with special characters in the file names. I have not tried FOR$RAB; one reason is that I have found no DEC manual which describes it. Contact: Robert F. Miles ITT TELECOM 3100 Highwood Boulevard, Department 415 Dogwood Building Raleigh, NC 27604 (919) 878-8100 ext. 341 Date: February 16, 1984 Pageswapper Editor's Note I received a copy of the sample program in hardcopy form, but we try to avoid code in the Pageswapper. If this function is a common need, a SIG tape submission from one of the several respondents might be in order. INPUT/OUTPUT 268 Caption: Escape sequences to VT102 Printer Ports - Reply to I/O # 224 Message: Certain ESCAPE sequences are not passed through the printer port on VT102 and VT131 terminals. DEC FCO number 54-14185 (part EQ-01237-01) will correct this problem. An added bonus is improved response time of the cursor positioning keys (arrow keys) when running EDT! 87 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT Contact: Warren R. Miller Kimbrough Computer Sales 3705 Kipling Street Wheat Ridge, CO 80033 (303) 425-0663 Date: February 17, 1984 INPUT/OUTPUT 269 Caption: Fatal bug in UDA50 class driver Message: After installing our new RA60 disks, we found that running several of our images caused the system to crash. This did not occur on our RM05s. After several days of work, we were able to determine that the DUDRIVER will write odd byte data transfers, but a data read on odd byte transfers will CRASH the system. Contact: Earl Cory Bunker Ramo Corporation 31717 La Tienda Drive Westlake Village, CA 91362 (818) 889-2211, Ext. 2823 Date: February 20, 1984 INPUT/OUTPUT 270 Caption: UETP and SYSUAF consistency problem Message: When we delivered a system to a customer site recently, we discovered that the UETP module that tests GETJPI failed. After carefully scanning the source code, it was discovered that the test creates a detached process to get the GETJPI information. In doing so, it uses the SYSUAF file and extracts the users ACCOUNT field. If this field is not SYSTEST, the test fails without a hint as to why. WARNING - DO NOT ALTER THE ACCOUNT FIELD FOR SYSTEST IN SYSUAF UNTIL DEC FIXES THIS PROBLEM or at least documents in the UETP manual that is is a restriction. Contact: Earl Cory Bunker Ramo Corporation 31717 La Tienda Drive Westlake Village, CA 91362 (818) 889-2211, Ext. 2823 88 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT Date: February 20, 1984 INPUT/OUTPUT 271 Caption: JCL Simulator Message: Looking for a simulator to teach JCL on a VAX/VMS system. Contact: William K. Swisher 725 College Drive Batavia, OH 45103 (513) 732-2990 Date: February 21, 1984 INPUT/OUTPUT 272 Caption: Linear Programming Package - Reply to I/O # 226 Message: You might want to try LINDO. It is available from Professor Linus Schrage; Graduate School of Business; University of Chicago, Chicago, IL 60637. Contact: Alan I. Duchan Canisius College 1201 Main Street Buffalo, NY 14208 (716) 883-7000 Date: February 20, 1984 89 PAGESWAPPER - March 1984 - Volume 5 Number 9 LUG Agenda LUG Agenda The following LUG meeting information is published with the understanding that Pageswapper readers will receive it too late to attend the meetings. The purpose, rather, is to share meeting topic ideas among LUGS. o BAYVAX LUG (San Francisco area) - Thursday February 23, 1984 Our first speaker will be David Nunnerley/DEC - Spitbrook, Mass (sic). He will be discussing VAX clusters. Following this, we will have the 'Meet the Managers' session mentioned at the last meeting. Steve Garrett, DEC's District Software Services Manager in Santa Clara, will give a presentation on the Santa Clara office managerial organization and structure. Steve will introduce the DEC regional managers and describe the problem solving process and general functions of the region. There will be a question and answer session following Steve's presentation. Pageswapper Editor's Note From here in Boston it is a little easier to notice that DEC's Spit Brook Road facility (ZKO$) is actually in New Hampshire, but Californians are allowed such generalizations since the plant is within a TU58's throw of the Massachusetts border. o Seaboard PDP-11/VAX LUG - Monday February 6, 1984 This meeting will be held at Digital's Piscataway facility. In addition to housing two New Jersey District Headquarters, this facility also contains Digital's Field Computer Center and Personal Computer Demonstration Center. Our host will be Jeffry Hamburger from the Princeton Sales office. Jeff will discuss the upcoming seminar sessions that will be locally available to Digital customers on topics including local area networks, personal computing and office automation. Our main speakers and their topics: Richard Bartholomaus - Digital Personal Computers 90 PAGESWAPPER - March 1984 - Volume 5 Number 9 LUG Agenda Dick is a Small Systems Marketing Consultant based at Digital's Piscataway office. He has become well known to Digital's customers in the Princeton area over the last four years, principally through his sales of laboratory systems. His present position is to provide "pull through" marketing support for the personal computer range. Dick will be talking about new product releases in Digital's personal computer line. Margie McFadden - Digital Computer Services Margie has been with Digital for three years. She is a Software Specialist involved with marketing and running the Digital Computer Services Organization. Margie will be explaining a new range of service offerings that include: time sharing facilities, hardware rental and software consulting. LUG Steering Committee - SIG Tape Distribution We are developing a tape distribution tree within the LUG. If you are interested in receiving one of the SIG tapes, come to the meeting to get your name on the tree. In addition to developing the tree we will be discussing the procedures for obtaining a tape. A hardcopy index of the recent VAX SIG tape contents will be available for your perusal. Some members have expressed an interest in an informal get-together after the meeting. Get to know your fellow LUG members; join us afterward at some local restaurant for drinks ? and dinner ? and information exchange. The Seaboard PDP-11/VAX Local Users Group meets every two months in the central New Jersey area. 91 PAGESWAPPER - March 1984 - Volume 5 Number 9 LUG Meeting Reports LUG Meeting Reports o New Mexico VAX LUG - February 13, 1984 The meeting was attended by over 50 people, one of the largest turnouts we have had. John Mitchiner of Sandia gave an overview of what AI is, both in the general sense that has been around for a number of years, and for the new activity, the so-called expert systems. Ray Harrigan of Sandia talked principally of sensors as applied to robotics. Ken Ingham, a student of Dr. George Luger at UNM, talked of Hector, a natural language understanding program written in Prolog. Mary Sagartz of Sandia gave the group a very good and understandable talk on what is LISP and why LISP. She illustrated her talk with some LISP examples, showing the need and power of recursion. Lastly, Barry Marder of Sandia talked about an expert system he has built in LISP. The problem, simply stated, is that many decades of experience in a particular field are departing from Sandia because of retirement. Barry addressed this problem by designing an Expert system in Cable design. It took about 3 months of coding in Franz Lisp (that is really its name) and 1100 lines of code to capture the cable design expertise from a Sandia cable expert who is retiring. 92 PAGESWAPPER - March 1984 - Volume 5 Number 9 VAX System SIG Committee List VAX System SIG Committee List As of November 2, 1983 Joe Angelico - Volunteer Coordinator and System Management US Coast Guard CCGD8(DT) Hale Boggs Federal Building 500 Camp Street, New Orleans, LA. 70130 June Baker - Planning Joe L. Bingham - Librarian Mantech International 2320 Mill Road Alexandria, VA 22314 C. Doug Brown - Security Sandia Labs P.O. Box 2644 Albuquerque, NM 87185 Jack Cundiff - Assistant Symposium Coordinator Muskigum College New Concord, OH 43762 James R. Cutler - Hardware Software Results Corporation 2887 Silver Drive Columbus, OH 43211 Doug Dickey - Data Management SIG Interface CTEC, Inc. 6862 Elm Street McLean, VA 22101 Jim Downward - Migration and Host Development KMG Fusion Inc. 3621 So State Road, P.O. Box 1567 Ann Arbor MI 48106 Dan Fleury - Education University of Hartford West Hartford, CT 06117 Dennis Frayne - Real Time/Process Control McDonnell Douglas 5301 Bolsa Avenue Huntington Beach, CA 92646 Carl E. Friedberg - Internals In House Systems 165 William Street 93 PAGESWAPPER - March 1984 - Volume 5 Number 9 VAX System SIG Committee List New York, NY 10038 Stephen Gill - Commercial Ball Aerospace P.O. Box 1062 Boulder, Colorado 80306 Don Golden - Overseas Coordinator 500 Corporate Drive Sugarland, TX 77478 Gary Grebus - System Improvement Request Battelle Columbis Labs 505 King Avenue Columbus, OH 43201 Dr. Mark Hale - Education University of Florida 411 Weil Hall Gainesville, FL 32611 B. Hancock - Network Sohio Petroleum Company Two Lincoln Center 5420 LBJ Freeway, Suite 900/LB 03 Dallas, TX 75240 R. Haydt - Foreign Devices, Hardware/Software Information Consultants International Incorporated P. O. Box 2014, E. V. STA Ormond Beach, FL 32074 Jeffrey S. Jalbert - Symposium Coordinator Dennison University Granville, OH 43023 Ken Johnson - Handouts 800 N. Lindbergh Monsanto MS V2B St. Louis, MO 63043 Lawrence J. Kilgallen - Newsletter Editor Box 81, MIT Station Cambridge, MA 02139-0901 Margaret Knox - Chair Computation Center University of Texas Austin, Texas 78712 Ross W. Miller - Vice Chair and Working Group Coordinator Online Data Processing, Inc. N 637 Hamilton Spokane, WA 99202 94 PAGESWAPPER - March 1984 - Volume 5 Number 9 VAX System SIG Committee List Bob Robbins - VAXElan Array Computer Consultants 5364 Woodvale Drive Sarasota, FL 33582 Larry Robertson - Real Time/Process Control Bear Computer Systems Inc. 5651 Case Avenue North Hollywood, CA P. Sandwell - Graphics Seismograph Service Corporation P. O. Box 1590 Tulsa, OK 74102 David Schmidt - LUG Coordinator Management Sciences Associates 5100 Centre Avenue Pittsburgh, PA 15232 Al Siegel - Advisor Battelle Memorial Institute 505 King Avenue Columbus, OH 43201 D. Slater - Artificial Intelligence Mantech International 2320 Mill Road Alexandria, VA 22314 Louise Wholey - Languages and Tools Measurex Corporation One Results Way Cupertino, CA 95014 Douglas J. Wilson - Office Automation MIT Joint Computer Facility Room 5-137, 22 Massachusetts Avenue Cambridge, MA 02139 95 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT Submission Form INPUT/OUTPUT Submission Form A SIG Information Interchange Please reprint in the next issue of the Pageswapper If this is a reply to a previous I/O, which number? ________ Caption: ______________________________________________________ Message: ______________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ ________________________________________________________________ Contact: Name _______________________________________________________ Address ____________________________________________________ ____________________________________________________________ ____________________________________________________________ Telephone ____________________________ Signature _____________________________ Date ________________ Mail this form to: PAGESWAPPER Editor, DECUS, MRO2-1/C11, One Iron Way, Marlborough, MA 01752, USA 96 PAGESWAPPER - March 1984 - Volume 5 Number 9 INPUT/OUTPUT Submission Form Tear out to submit an I/O item PAGESWAPPER Editor DECUS, MRO2-1/C11 One Iron Way Marlborough, MA 01752 USA 97 PAGESWAPPER - March 1984 - Volume 5 Number 9 System Improvement Request Submission Form System Improvement Request Submission Form Page 1 of _____ ________________________________________________________________ Submittor: Firm: Address: Phone: ________________________________________________________________ How to write an SIR: Describe the capability you would like to see available on VAX systems. Be as specific as possible. Please don't assume we know how it's done on the XYZ system. Justify why the capability would be useful and give an example of its use. If you wish, suggest a possible implementation of your request. ________________________________________________________________ Abstract (Please limit to four lines): ________________________________________________________________ Description and examples (use additional pages if required) 98 PAGESWAPPER - March 1984 - Volume 5 Number 9 System Improvement Request Submission Form Tear out to submit an SIR Gary L. Grebus Battelle Columbus Laboratories 505 King Avenue Columbus, Ohio 43201 USA 99