December Vol. 2 No. 3 1980 Editor's Comments This Pageswapper is rather skinney and a little late because of a lack of contributions. I tend to attribute this to the lateness of the distribution of VMS 2.0. Many of us expected it a year earlier. It turns out that there was more to add to and modify in VMS in getting from 1.0 to 2.0 than most of us recognize. Hopefully by the time you read this your VAX will be perking away under VMS 2.0. Our site's version arrived a couple of weeks ago and we are really impressed with it. Anyhow, I think people were tired of writing about problems with VMS 1.x and being told to wait for 2.0 so we haven't been getting many contributions. I certainly expect to be deluged with comments, hints, EURIKA's and what-tha's as soon as 2.0 reaches wide distribution. Due to the lateness of the hour (month? year?) this issue will not be distributed until after the Fall Symposium. I hope you all enjoyed it and gained from the gathering in San Diego. I will be unable to attend due to pressing business obligations so please send me some articles describing what transpired. There are plans to get written reports on the question and answer session. If these are legible, I will try to include them in the next Pageswapper. Page 2 ANNOUNCEMENTS INFO INFO is a Relational Database Management System and Productivity Language which operates under control of the VAX/CMS operating system. With an exceptionally good user interface, INFO allows first time users such as managers and secretaries to become productive within a couple of hours. Using the Productivity Language, a programmer can develop an entire application in a quarter to a tenth of the time required using COBOL. INFO was designed for simplicity of use without sacrificing the power and flexibility needed to handle most applications on a totally self-contained basis. The first-time computer user will find its command structure comprehensive within the framework of ordinary language usage. Explicit error messages guide the user through the rapid learning process and improve data entry accuracy with both visual and audio responses to typing errors. INFO consists of 5 functional parts. They are as follows: 1. Data Entry 2. Query 3. Data Manipulation 4. Report Generation 5. Programming The DEFINE command prompts the user to describe a datafile which will be used by INFO. This datafile definition can be either (1) a new datafile which will have records added to it by the INFO ADD or INPUT FORM commands, or (2) an existing datafile which has been created in other languages. No matter how the original datafile was created, it may be added to, updated, queried, reported on, and manipulated by either INFO or other languages. The following feature descriptions define how INFO operates on a datafile, but do not preclude the manipulation of the same datafile by other languages. 1. Data Entry may be accomplished with prompts for each item within a record, or all on one line by separating the items with a comma (or any other user defined delimiter). Special date handling features, leap year recognition, implicit or explicit century specification, and an internal Julian conversion procedure to allow computations involving dates. INPUT FORM provides for screen formatting of data entry including range checking, field verification, and table look-up. An update form may be created for screen handling to update records. Page 3 2. Query may be on any item in the record. There is Boolean AND/OR/XOR record selection with the RESELECT, NSELECT (not selected) and the ASELECT (additional select) commands. The query capability is enhanced by the powerful "containing" and "not containing" logical operators. Logical Operators are: LT Less Than LE Less than or Equal EQ Equal NE Not Equal GE Greater than or Equal GT Greater Than CN Containing NC Not Containing Selection determines which records will be processed by subsequent commands. 3. Data Manipulation - with the UPDATE command, every item-name is a key to access records. One record can be accessed by one key and the next by a different key. The CALCULATE command provides complete FORTRAN-like arithmetic processing. Additionally, CALCULATE commands may be performed within REPORTs and SPECIAL FORMs. SORT can be performed on up to 20 keys in alternate ascending and descending order if desired. 4. Report Generation - the LIST command provides an immediate display of all selected records on the user's terminal. DISPLAY item-name, item-name, etc., gives a columnar report of the designated items at the user's terminal. PRINT item-name, etc., does the same at the system printer. REPORT prompts column by column for item names and operators required. Calculations of any complexity can be included. Totals and Subtotals are specified with a single character. This is the simplest to use report generator in the industry today, yet powerful far beyond mere data retrieval with the inclusion of the calculation capability. SPECIAL FORM allows for the printing of checks, invoices, mailing lists, or any other formatted output. 5. Programming - within INFO the user may stack commands incorporating all of the interactive commands, as well as IF-ELSE-ENDIF and DO-DOEND logic into stored command streams call PROGRAMs. The PROGRAM command prompts line-by-line for INFO code. In this manner, complete applications and full systems of any complexity may be developed using only INFO. Up to 10 files (including the SELECTed file) may be RELATEd simultaneously. This allows the user to: Page 4 1. Establish relational databases. Tree structures can be created using related flat files. 2. Add new data items, records, and associate new datafiles with the database without changing the application programs. 3. Handle unanticipated uses of data or spontaneous inquiries at the user's terminal. 4. Have different programs dynamically relating different logical files for different applications. PASSWORD protection can be applied to individual items (fields) and to individual commands to restrict access or functionality where required. Subroutine calls to FORTRAN, COBOL, system commands, or other routines can be added to and imbedded in INFO by the user. APPLICATIONS Henco sells the full set of integrated or stand alone accounting applications (Payroll, Accounts Receivble, Accounts Payable, and General Ledger). The more than 250 users have developed all kinds of applications from educational administration to manufacturing to savings and loans. DEFINITIONS A datafile is a collection of records stored on any disk media. INFO associated with each datafile an Item Dictionary which completely describes one record of the datafile. Datafile names may be any combination of letters and numbers that begin with a letter, up to a maximum of 32 characters. The special character '+', '-', or '.' may be included, but blanks are not allowed. Item names may be any combination of letters up to a maximum of 16 characters. There are eleven types of items. Each type of items has specific size limitations. C - character - maximum 2048 characters. D - dates - common widths are 5 (MM/DD), 8 (MM/DD/YY), and 10 (MM/DD/YYYY). I - numbers without decimal places. N - numbers with decimal places. B - binary - must be 1-4 bytes (FORTRAN integers) Page 5 F - floating point - must be 4-8 bytes (FORTRAN single and double precison floating point numbers) P - packed decimal (trailing sign, implied decimal point, maximum of 8 bytes (15 digits and sign)). L - numbers stored wiht decimal places and leading fill character - maximum is 15 bytes including sign. V - numbers with implied decimal places and zero fill - maximum of 15 bytes including sign. O - numbers with implied decimal places and overpunch - maximum of 14 bytes including sign. The arithmetic operators are: + addition - subtraction * multiplication / division ** exponentiation LN natural logarithms WD width of text (excluding trailing blanks) A logical expression has the form: item-name operator constant --------- -------- -------- PART-NUMBER EQ 5372839G or item-name operator item-name --------- -------- --------- DATE LE $TODAY Internal items are: $TODAY contains today's date (D item) $MONTH contains current month (C item) $DAY contains current day (C item) $YEAR contains current year (I item) $NUM1 - $NUM40 work items to store intermediate computations (N item) $CHR1 - $CHR40 work items to store intermediate character manipulations $DAT1 - $DAT40 work items for temporary storage of dates $IDX1 - $IDX9 internal index counter used with arrayed items $RECNO record number of current record $NOREC number of records in SELECTed file $NOSEL number of records currently selected $REPDAT date to be printed on reports $PAGENO last page number on report $PAGEST starting page for next report Page 6 There is a screen painter for generating formatted screens for fast data entry and update. INFO is terminal independent and supports over twenty terminal types. Henco was formed in 1975. There are currently 250 INFO installations on Prime and Honeywell Level 6's which include companies from the size of General Motors and Xerox to smaller corporations which do all of their data processing with INFO. For further information, contact James Willcox at HENCO, INC. 35 Walnut Street Wellesley, Mass. 02181 Tel: (617) 237-4156 Telex: 710-383-7529 Editor's comments: I have had an opportunity to read the INFO Primer and the INFO Programmer's Reference Manual and 'play' with INFO. The two documents are very readable and describe the product adequately. A few more examples would be extremely helpful. It is often hard to visualize ones own problems in the framework of a simple example. INFO works as described and certainly warrants serious investigation. I have not had time to put a large database or a complex interrelationship onto the system with INFO so I have no idea how the system responds under load. Further, I am not sure how the journaling, rollback, backup, recovery and rollforward facilites of INFO compare to other data base managements systems. Henco appears to have picked a number of machines to support INFO on and this should force its improvement in all areas as customers find more and more uses for it. Those of you who are looking for a data base product for VAX/VMS would do well to spend some time reviewing INFO. Bob Nusbaum FMS Product Manager Digital Equipment Corp. 146 Main Street Maynard, Mass. 01754 VAX-11 FMS TO SHIP EARLY ______ ___ __ ____ _____ Digital Equipment Corporation is pleased to announce that VAX-11 FMS has concluded an extremely successful field test and will be available from the SDC considerably earlier than the first quarter of 1981 that we originally announced. VAX-11 FMS will be available in late September, 1980. Some little known facts about VAX-11 FMS: Page 7 o A single copy of the VAX-11 FMS Form Driver will support both VT100s and VT52s concurrently (unlike FMS-11, where separate copies of the Form Driver are required). o The interface for calling VAX-11 PL/I will be fully documented and supported when VAX-11 FMS ships. o The VAX-11 FMS Form Driver has an integrated DEBUG mode which allows program errors detected by the Form Driver to generate explanatory error messages to the bottom line of the terminal. o A number of unsupported demo programs similar to those making up the FMS-11/RSX Demo Kit (which was available only to Software Specialists) will be included on the VAX-11 FMS distribution kits as instructional examples. How Big Must a SWAPFILE Be? by R. O. Weber Cyclotron Institute Texas AM University _ College Station, Texas 77843 When the swapper decides to outswap a process, it writes the pages currently in the process's working set into the file [SYSEXE]SWAPFILE.SYS. The Installation Guide states that the number of blocks in SWAPFILE must be equal to the product of the two system parameters MAXPROCESSCNT and WSMAX. Other DEC spokespersons will say that if SWAPFILE is smaller than MAXPROCESSCNT times WSMAX, the number of processes allowed on the system will be reduced accordingly. The number MAXPROCESSCNT times WSMAX seems needlessly large for the SWAPFILE size especially since MAXPROCESSCNT includes two processes - NULL and SWAPPER - which cannot be swapped. For this reason, I have studied the code VMS uses to determine how many processes a given SWAPFILE can support and have written a short FORTRAN program which uses that algorithm to determine the exact size a SWAPFILE must be in order to support a given number of processes. The code is listed below and my best attempt at explaining it follows. During system boot, the SWAPFILE is divided into slots. Each slot is large enough to accomodate all the pages in the largest possible working set, WSMAX, plus the maximum number of non-page-table pages in a process header. The pages used for the page tables need not be counted because they are treated as part of the working set and will be saved in the same manner as other pages in the working set. Each time a process is created a test is made to insure that a SWAPFILE slot is available for that process. The test is done by keeping a count of the number of created processes in the system and never allowing that number to exceed the number of slots in SWAPFILE. The NULL and SWAPPER processes are not created in the normal sense and thus do not enter into the count of created processed in the system. As would seem Page 8 reasonable, SWAPFILE slots are not reserved for the unswappable NULL and SWAPPER processes. The size of the SWAPFILE can thus be loosely expressed as: (WSMAX + NONPTPHDPAGES) * (MAXPROCESSCNT - 2) The influence of this statement can be seen in lines 64 and 66 of the program. Lines 46 thru 62 are devoted to computing the number of non-page- table pages in a process header. Lines 48 thru 60 compute and sum the sizes of the major process header constituents; the fixed portion, the working set list, and the process section table. Lines 55 thru 60 add the space required by several arrays containing information about the pages occupied by the process header itself. The program requires as input four VMS system parameters and three data structure size constants, as does the VMS code which it emulates. The VMS system parameters are: MAXPROCESSCNT, used to determine the number of processes SWAPFILE must support; PROCSECTCNT, used to determine the size of the process section table portion of the process header; WSMAX, used in determining the size of a SWAPFILE slot and the size of the working set list portion of the process header; and VIRTUALPAGECNT, used to determine the size of the process page tables. WSL$CLENGTH gives the size of one entry in the working set list and can be determined by expanding the macro $WSLDEF found in SYS$LIBRARY:LIB.MLB. PHD$CLENGTH gives the size of the fixed portion of the process header and can be determined by expanding the macro $PHDDEF. SEC$CLENGTH gives the size of one entry in the process section table and can be determined by expanding the macro $SECDEF. The values of these constants, under VMS V1.6, are given in the comments in the program. Checking the size of and number of SWAPFILE slots can be accomplished by using SDA on the currently running system. The command "EXamine SWP$GLSFTBAS;40" will display the first two entries in the swap file table. Each entry is of the form shown below. The first entry is for the shell process, which is used as the source for an inswap each time a new process is created. The second entry is for SWAPFILE. The EXamine command above assumes that the size of a swap file table entry is 20(hex), which is the size under VMS V1.6. If the size changes for V2.0 or later, the size field of the shell process entry, which is in a fixed position relative to SWP$GLSFTBAS, can be used to determine the size of an entry. The slot count and slot size fields of the SWAPFILE entry give the number of swap slots and the size of each swap slot, respectively. Page 9 SWAP FILE TABLE ENTRY +--------------+--------------+--------------+--------------+ ! slot size !max. I/O size ! slot count ! +-----------------------------+--------------+--------------+ ! spare ! +--------------+--------------+-----------------------------+ !pg.flt. clust.! type ! size ! +--------------+--------------+-----------------------------+ ! pointer to window control block for swap file ! +-----------------------------------------------------------+ ! base virtual block window of first slot ! +-----------------------------------------------------------+ ! bitmap ! +------------------------- -----------------------+ ! (64 bits) ! +-----------------------------------------------------------+ ! spare ! +-----------------------------------------------------------+ Within the program, the names SGN$GWMAXPRCCNT, SGN$GWMAXPSTCT, SGN$GLMAXWSCNT, SGN$GLMAXVPGCT, SGN$GLPTPAGCNT and SGN$GLPHDPAGCT are spelled the same as actual names in the system image which contain real copies of the values they represent. Other names having the standard DEC name format are used in a way similar to the way in which names defined by a $???DEF macro might be used. PROGRAM SWAP_FILE_SIZE ! This program calculates an exactly correct swap file size given ! the values of the following: ! MAXPROCESSCNT (system parameter - SYSGEN) ! PROCSECTCNT (system parameter - SYSGEN) ! WSMAX (system parameter - SYSGEN) ! VIRTUALPAGECNT (system parameter - SYSGEN) ! WSL$C_LENGTH (from $WSLDEF, 4 in V1.6) ! PHD$C_LENGTH (from $PHDDEF, '118'X in V1.6) ! SEC$C_LENGTH (from $SECDEF, '20'X in V1.6) ! All required values are prompted for. This program represents ! my way of remembering the way VMS calculates the number of pages ! in a process header (in module SYSBOOT) and the size of a slot in ! the swap file (in module SYSINIT). ! Ralph O. Weber 9-JUN-1980 IMPLICIT INTEGER*4 (A-Z) 1 FORMAT ('$'A) 2 FORMAT (I) 3 FORMAT (Z) TYPE 1, 'MAXPROCESSCNT (in decimal):' ACCEPT 2, SGN$GW_MAXPRCCT TYPE 1, 'PROCSECTCNT (in decimal):' ACCEPT 2, SGN$GW_MAXPSTCT Page 10 TYPE 1, 'WSMAX (in decimal):' ACCEPT 2, SGN$GL_MAXWSCNT TYPE 1, 'VIRTUALPAGECNT (in decimal):' ACCEPT 2, SGN$GL_MAXVPGCT TYPE 1, 'WSL$C_LENGTH (in hexadecimal):' ACCEPT 3, WSL$C_LENGTH TYPE 1, 'PHD$C_LENGTH (in hexadecimal):' ACCEPT 3, PHD$C_LENGTH TYPE 1, 'SEC$C_LENGTH (in hexadecimal):' ACCEPT 3, SEC$C_LENGTH SGN$GL_PTPAGCNT = (SGN$GL_MAXVPGCT*4 + 511) / 512 FIXED_PHD_BYTES = PHD$C_LENGTH + 511 WSL_BYTES = SGN$GL_MAXWSCNT * WSL$C_LENGTH PRC_SECT_BYTES = SGN$GW_MAXPSTCT * SEC$C_LENGTH BASIC_PHD_PAGES = (FIXED_PHD_BYTES + WSL_BYTES + 1 PRC_SECT_BYTES)/ 512 BASIC_PHD_BYTES = (BASIC_PHD_PAGES * 512) + 511 PHD_PGS_ARY_BTS = (BASIC_PHD_PAGES + SGN$GL_PTPAGCNT) * 8 NONPT_PHD_BYTES = BASIC_PHD_BYTES 10 NONPT_PHD_BYTES = NONPT_PHD_BYTES + PHD_PGS_ARY_BTS PHD_PGS_ARY_BTS = (PHD_PGS_ARY_BTS/512) * 8 IF (PHD_PGS_ARY_BTS.NE.0) GO TO 10 SGN$GL_PHDPAGCT = NONPT_PHD_BYTES / 512 SFT$W_SLOTSZ = SGN$GL_MAXWSCNT + SGN$GL_PHDPAGCT SWAP_FILE_SZ = (SGN$GW_MAXPRCCT - 2) * SFT$W_SLOTSZ !!!!!!!!!!!!!!!!!!! !NB. I can use MAXPROCESSCNT-2 because two processes, NULL and ! SWAPPER, are mystically created by INIT without aid of ! SYS$CREPRC. SYS$CREPRC maintains the swap slot counters ! and it is unaware of NULL and SWAPPER. NULL and SWAPPER ! also cannot be swapped under any circumstances. ! MAXPROCESSCNT, on the other hand, controls the number of ! PCB slots and NULL and SWAPPER do require PCB slots. TYPE *, 'Swap file size must be at least', SWAP_FILE_SZ, 1 'blocks.' STOP END The following is a table showing the swap file size computed by the program and using MAXPROCESSCNT times WSMAX for several cases of interest to me. Page 11 MAXPROC- PROCSECT- VIRTUAL- swap file size ESSCNT CNT WSMAX PAGECNT program standard 20 20 250 4096 4590 5000 24 20 250 4096 5610 6000 24 20 250 8192 5632 6000 24 20 256 8192 5764 6144 24 20 512 8192 11440 12288 The standard method of computing swap file size appears to produce sizes which are too large by at least WSMAX.