John Forkosh Associates ®
B a s i s   D e s i g n   D o c u m e n t
Copyright © 1989-2001, John Forkosh Associates, Inc.
All rights reserved.

Click for:   homepage,   resume





  ----------------------------------------------------------------------------
    June 20, 1989                                              Revision 2.00

                                 B A S I S
           ( T R A D E R  M A T R I X  P R I C I N G  S Y S T E M )

   Copyright (c) 1988,1989 John Forkosh Associates, Inc.  All Rights Reserved.
  ----------------------------------------------------------------------------



                          Document ID: JFA-89-024



             Prepared For:			    Prepared By:
            ---------------			   --------------
      Chase Manhattan Bank, N.A.	     John Forkosh Associates 
      One Chase Manhattan Plaza		    285 Stegman Parkway, #309
             New York, NY		      Jersey City, NJ 07305  
					          (201) 860-9677     

                                     ---
#EJECT
                    ---------------------------------------
                        T A B L E  O F  C O N T E N T S
                    ---------------------------------------


 PART ONE: OVERVIEW

    I.  Introduction
	1  Identification ...........................................
	2  Purpose of this Document .................................
	3  Other Applicable Documents ...............................
	4  Contacts .................................................
	5  Implementation Scope for Release 2.00 ....................
	6  Future Implementations ...................................

   II.	Installing Basis
	1  Host Requirements ........................................
	2  Distribution Media .......................................
	3  Suggested Directories ....................................
        4  Compiling and Linking ....................................
        5  Directory Maintenance ....................................
        6  Quote File Refresh .......................................

  III.	Operational Procedures
	1  Directories and Logicals .................................
	2  Accounts and Privileges ..................................
        3  System Startup ...........................................
        4  3PM and 5PM Closings .....................................
        5  System Shutdown ..........................................
        6  4:30AM Quote File Refresh ................................
	7  Checking Basis each Morning ..............................

   IV.	Dialog of Operational Procedures
	1  Manually Start Up Basis and Batch Queue ..................
	2  Manually Shut Down Basis .................................



 PART TWO:  USER REFERENCE MANUAL

    V.	Functional Specifications
	1  As Compared with Original Functional Requirements ........
	2  Additional Features ......................................

   VI.	Basis Screens, Navigation, and Data Entry
	1  Summary of Basis Screens .................................
	2  Summary of Basis Keystroke Commands ......................
	3  Basis Menus and Their Functions ..........................

  VII.	Menus

 VIII.	Relationships



 PART THREE:  DETAIL DESIGN

    X.  System Overview
	1  Major Components .........................................
	2  Basis System Block Diagram ...............................
	3  A Basis Source Filenames and Brief Descriptions ..........
	   B Chase Toolbox Filenames and Brief Descriptions .........
	   C Non-Critical Basis Test Programs and Utilities .........
	4  Price Update Data Flow Diagram ...........................
	5  High-Level Program Flow During Interactive Data Entry ....
	6  Breakout of Primary High-Level Interactive Flow ..........
	7  High-Level Program Flow During Server Price Update .......
	8  Breakout of Primary High-Level Price Update Flow .........
	9  High-Level Program Flow Showing Recursive Paths ..........

   XI.	Quote File Parsing and Formats
        1  Table-Driven File Parsing Routines
           A  Qdescrip.h Header File ................................
           B  Qload() and Qdump() Functions .........................
           C  Qconvert() Function ...................................
        2  Quote File Formats .......................................
           A  Treasury Bills (qb.prm) ...............................
           B  Notes and Bonds (qn.prm) ..............................
           C  Agencies (qa.prm) .....................................
           D  Zeroes (qz.prm) .......................................
           E  Futures (qf.prm) ......................................


        Basis Screen Generation and Formats
        1  Table-Driven Screen Generation Routines ..................
           A  Screens.h Header File .................................
           B  Edit-Setup() Function .................................
           C  Screen_Headers() Functions ............................
           D  ???_Object() Functions for each Screen ................
        2  Screen Formats ...........................................
           A  Trader/Salesperson Screen .............................
           B  Detail Screen .........................................
           C  Profile Screen ........................................
           D  Relation Screen .......................................
           E  Administrator Screen ..................................


        Profile and Privilege Files
        1  Scanfile Token Preprocessor Function .....................
        2  Setprof() and Putprof() Profile Interpreters .............
        3  Setpriv() and Putpriv() Privilege File Interpreters ......


	Calculations
	1  Recalc() .................................................
	2  Poy() ....................................................
	3  Update_Relations() .......................................


	Communications
	1  Excelan Software .........................................
	2  Basis Socket Control Structures ..........................
	3  Basis Message Queue ......................................
	4  Fmtskt() .................................................
	5  Sendsktw() and Recvsktw() ................................
	6  Recvskt() and Dequeuer() .................................


        Data Dictionary
        1  VMS Logicals .............................................
        2  Quote File Layouts .......................................
        3  Internal Issue Structure .................................
        4  Windowing Control Information ............................
        5  TCP/IP Socket Control Information ........................
#EJECT
                   -----------------------------------------
                       PART ONE, SECTION I: INTRODUCTION
                   -----------------------------------------


    I.1 IDENTIFICATION

	o Title: Basis Trader Matrix Pricing System, Release 2.00

	o Mnemonic: BTMPS-2.00

	o Document ID: JFA-89-024

	o Revision History:
          03/01/89 John Forkosh         Initial release of document.
          06/20/89 John Forkosh         List of source filenames updated,
					additional sections added.


    I.2 PURPOSE OF THIS DOCUMENT

	This document contains all major design information necessary
	for the coding/implementation of Basis Release 2.00.  (See John
	Forkosh for more details.)  Included are:

	     o	A description of all implemented functionality.

	     o	A complete list of all source file names, and brief function
		descriptions for each module.

	     o	Data-flow-like diagrams illustrating the major transactions
		supported by Basis.

	     o	High-level block diagrams and structure charts for the
		system as a whole, and for major subsystems in more
		detail.

	     o	Terse discussions, as necessary, to place the diagrams
		in their proper perspective within Basis.

	For Operations, this document also contains an Installation Guide
	and Operations Manual that describes (a) how to install Basis from
	its distribution source directory or from archived source code
	files, and (b) the maintenance procedures that must be performed
	to keep Basis running properly.

	For traders and other users, this document contains a complete
	User Manual, including a brief functional description of Basis
	along with sample screen layouts, etc, and a thorough discussion
	of the navigation and data-entry facilities provided by Basis and
	their use.  This section also includes a summary of the System
	Administrator's responsibilities and the facilities Basis provides
	for him to fulfill them.



    I.3 OTHER APPLICABLE DOCUMENTS

	     o	"Functional Specifications for Chase Trader Pricing Matrix",
		document id 018SA, undated.  (See Don Roth for more details.)

	     o	"Chase Trader Matrix Pricing System" functional specification
		document, dated September 9, 1988, including a block diagram
		by Dan Johnson dated 8/24/88.  (See Julian Gammon for more
		details.)

	     o	The "C Utility Library User Guide Version 3.0" from
		Essential Software, Inc., P.O.Box 1003, Maplewood, NJ 07040,
		(201)762-6965.  (Note that Chase's "toolbox" is partly a port
		of these PC routines to the VAX, and partly "home-grown"
		extensions to them.  See Jay Denkberg for more details.)

	     o	EXOS 8044-01 Reference Manual, Publication No. 4200025-00,
		Revision C, April 15, 1988.  From Excelan, Inc.,
		2180 Fortune Drive, San Jose, CA 95131, (408)434-2285.
		(See Andrew Freeman or Farid Tammadon for more details.)

	     o	"Hewlett-Packard LaserJet II Printer User's Manual",
		Manual Part No. 33440-90901, Second Edition July 1987
		(for hardcopy reports generated in qreports.c and reports.h)

	     o	BTMPS-89-002 Basis Source Code Listing.  (See John Forkosh
		for more details.)



    I.4 CONTACTS

	The following people have either participated in the design and
	development of Basis, or are familiar with some aspect of
	the project:

	     o	Ron Chapman,           Basis Business Analyst, Functional Specs
		Chase 552-2272 (Home: 718-658-0456)

	     o	Jay Denkberg,          Chase toolbox, Computational routines
		Chase 552-7687 (Home: 516-292-3365)

	     o	John Forkosh,          Designed and Coded Basis Application
		285 Stegman Parkway #309, Jersey City, NJ 07305, (201)860-9677

	     o	Andrew Freeman,       Installed Excelan, Prime-to-Vax Interface
		Chase 552-2835 (Home: 203-853-7363)

	     o *Julian Gammon,         Basis Business Analyst, Functional Specs
		Chase 552-2274 (Home: 201-246-4876)

	     o	Brenda London,         Basis Project Secretary
		Chase 552-1387 (Home: 718-941-2195)

	     o	Mike Petrovich,        Excelan sales rep
		Excelan, (408)473-9600

	     o	Erin Resh,             Computational routines, file formats
		Chase 552-5673 (Home: 201-549-6171)

	     o	Don Roth, V.P.         Current Basis Project Manager
		Chase 552-3231

	     o	James Salter,          Excelan tech rep
		Excelan, (408)434-7146

	     o	Farid Tamaddon,        Original Basis Project Manager
		Chase 552-5092 (Home: 516-671-4089)

	     o	Tony Warren,           Excelan tech rep
		Excelan, (408)434-1528

	     o	Regina Welkner,        Ongoing Chase Toolbox maintenance.
		Chase 552-1772 (Home: 718-965-9773)

	There are also several government traders who have used Basis
	during its acceptance testing phase, and who are therefore
	reasonably familiar with its functionality.  All these people
	can be reached at 552-3081, and are listed in order of their
	familiarity with Basis:

	     o	Brian Sullivan
	     o	Howard Sternberg
	     o	Dana Levy
	     o	Dave Lambert
	     o	Steve Harosomowicz
	     o	Eugene Miller
	     o	Jeff Gundell
	     o *John Fritz

	All people referenced in this document should be listed above.
	Note that all the Chase people are mutually acquainted, so,
	if the above information becomes out-of-date, then locating any
	one of them will probably help you locate the others.

     *	No longer at Chase.



    I.5 IMPLEMENTATION SCOPE FOR RELEASE 2.00

	Basis Release 2.00 comprises more-or-less complete functionality
	for the trader workstation component (BASIS.CREV2), as well as
	inter-process communication among traders (via TCP/IP datagrams)
	through the server, as described in the two functional specifications
	documents referenced in Section I.3.  For a more complete
	description of current Basis functionality, see the Functional
	Specifications in Part Two below.


    I.6 FUTURE IMPLEMENTATIONS

	A variety of modifications and enhancements to Basis functionality
	have been suggested.  Among these are the following:

	o Incorporating an incoming CMIX feed and generating an outgoing
	  ticker.

	o Incorporating corporate bonds into the universe of securities
	  that is managed by Basis.

	o Designing a risk management screen on which traders can track
	  their positions throughout the trading day.

	o Migrating the communications subsystem from Excelan TCP/IP
	  to Decnet.
#EJECT
            ------------------------------------------------------
                         SECTION II: INSTALLING BASIS
            ------------------------------------------------------


   II.1	HOST REQUIREMENTS

	Basis is designed to run on a VAX under VMS.  After observing
	its responsiveness on several such platforms, it appears
	that a Microvax II is unable to provide adequate interactive
	response time.  On a Microvax III, screen responsiveness still
	leaves room for improvement, but seems to have satisfied the
	needs of traders running the test system.  Memory requirements
	are substantial.  The Server process currently requires between
	one and two Mb, and each trader process requires approximately one.
	These requirements are divided among (a)universe of issues,
	(b)window memory, (c)code, and (d)ancillary arrays/variables/etc.
	The first two can be adjusted by means of #define-ed variables
	within the code (although any adjustments will, unfortunately,
	probably be upwards).  Code is slightly less than 200K for each
	trader process, and a bit less than 100K for the Server.
	"Ancillary arrays" (i.e., additional static heap storage such as
	the arrays for "frozen" quotes, and not counting any automatic
	storage dynamically pushed and popped from the stack) are hard
	to estimate separately.  A very rough guess is 100-200K per
	process.

	While memory requirements will increase roughly linearly with
	the number of traders, cpu usage will increase faster than
	linearly.  This is because each time any trader enters a price
	(for an issue he's trading), that information must be sent to
	every other trader.  Moreover, if the initially sent price is
	a basis issue for another trader, he, in turn, will generate
	many new prices, all of which must be sent.  Basis has various
	mechanisms to minimize the accumulation of this type of overhead,
	but there's no way to eliminate it.  Our test system has supported
	five traders on a Microvax III.  During a normal trading day,
	each of five traders uses approximatelu eight minutes of cpu time.
	When only four traders have been logged on, this reduces to
	five minutes per trader.  The Server (not counting the Dumper
	processes that it spawns whenever the quote files need to be
	rewritten) uses about 23 seconds for initialization, and less
	than 10 additional seconds during the remainder of the day.

	Disk requirements for Basis are reasonably minimal.  A complete
	set of all Basis source, object, and executable files occupies
	somewhat less than 6000 blocks (3Mb), and a single set of
	quote files occupies less than 500 blocks.  Therefore, a
	carefully-managed system (where all old files are purged regularly)
	can reside within 10,000 blocks.  Disk I/O occurs primarily
	during initialization when the Server and each trader process
	reads the current quote files, and when the Dumper process
	(spawned by the Server as necessary) rewrites the quote files
	during the day.  Thus, neither a particularly large nor a
	particularly fast disk subsystem is required for Basis.

	The communications requirement for Basis is that its host
	contain the Excelan TCP/IP board and that all associated software
	has been installed.  Basis also needs the TCP/IP host tables
	set up so that it can communicate with the Prime (POLARIS)
	to transfer quote file data back and forth.  The only person
	at Chase currently capable of performing any of these tasks is
	Andrew Freeman.  To check that the communications are working
	properly, try using the Excelan-provided "ftp" and "telnet"
	servers manually.  If these behave as advertised, then all
	Basis requirements are probably satisfied also.

	Offline tests have indicated that Excelan's TCP/IP has a maximum
	throughput of approximately 75 UDP datagrams per second.  These
	particular tests were run with datagrams containing 1024 bytes
	each.  Additional tests have shown that the falloff in rate with
	increasing packet size is much slower than linear, so it makes
	sense to increase the number of bytes per message (there's an
	Excelan maximum of 8K).  Basis currently tries to pack 36 price
	quotes per message (about 1100 bytes), but sends out any
	partially-full buffer after two seconds.  Before sending any
	physical packet, each trader process sleeps for 150ms to try
	to insure that no two consecutive packets arrive at the Server
	too quickly.  As more traders begin to use Basis, that delay
	may have to be increased (or a more effective mechanism developed).

	If Excelan is not available, a subset of Basis can be tested
	anyway.  First of all, DO NOT attempt to bring up the Basis Server
	process (by running $@BSERVER.COM) as described below.
	Then, when you run the trader workstation process (basis.exe),
	include the switch "-hNONE" on the command line to indicate that the
	host node is not available.


   II.2	DISTRIBUTION MEDIA

	Basis is available in two "distribution" forms.  Most likely,
	the machine on which Basis is to be installed already contains
	a single directory containing all source, object, executable,
	DCL, etc files (including this one).  If not, such a directory
	will have to be reconstructed.  This can be done in one of two
	ways.  First, an online "central repository" for Basis is located
	at PADS::DUA0:[BASIS.REV2], and copying all files from that
	directory across Decnet to your target directory should recreate
	all required Basis files.  If the PADS:: directory seems
	unavailable, Jay Denkberg may be able to help locate it.

	If, however, no recent online version of Basis is available,
	Basis can also be restored from a set of floppy-disk-based
	"archive" files by following the procedure described below.
	If these archive files are also not available, a VAX backup tape
	is your last resort.

	All Basis source files have been backed up in a simple
	archive format in five files: BASIS1.xxx through BASIS5.xxx,
	where "xxx" is some indication of the backup cycle.  These archive
	files consist entirely of "printable ascii" characters.  Each
	fits on a single 360K DSDD floppy disk, and a copy of them should
	be available from either Don Roth, Farid Tamaddon, or Jay Denkberg.

	A separate diskette contains some old copy of the quote files
	that constitute the necessary initialization data for Basis.
	The current version of these files is normally available on the
	Prime, and Erin Resh should know how to get them.  If the current
	quote files are unobtainable, these diskette files should permit
	Basis to be installed and tested independently of them.

	The archive format allows one large file to contain many smaller
	ones by the following simple convention:
		/*$OPEN=filename1.extension*/
		first line of the file1
		...
		last line of the file1
		/*$CLOS=filename1.extension*/
		/*$OPEN=filename2.extension*/
		lines of file2
		/*$CLOS=filename2.extension*/
		etc

	Un-archiving such a file is accomplished by a DCL procedure
	called uncat.com which is located in BASIS5.xxx.  You may have
	to use an editor to manually strip a copy of uncat.com out
	of that archive if an external copy is not already available
	(it probably won't be if you've had to resort to this procedure).
	Once you have uncat.com, create a directory path [BASIS.REV2],
	or anything appropriate, set default to your [.REV2], and copy all
	five archive files into it along with uncat.com.  Then issue
		$ @uncat basis1.xxx
		$ @uncat basis2.xxx
		etc.
	At this point your directory should contain all source files
	necessary to build the current running version of Basis.

	Note: To reconstruct an archive, the procedure cat.com can be
	used along with the table-of-contents files BASIS1.TOC through
	BASIS5.TOC as follows:
		$ @cat basis1.toc basis1.xxx
		$ @cat basis2.toc basis2.xxx
		etc.
	Each line of the .toc files contain a single filename.extension,
	and the last line of each .toc file contains a single CR,LF
	(a null line).  The current version of these .toc files was
	uncat-ted above, and you'll need to carefully keep them up-to-date
	if you want these procedures to remain robust.  Make sure never
	to $@cat one archive file within another since the simple $@uncat
	procedure is unable to deal with nested /*$OPEN=*/.../*$CLOS=*/
	blocks.


   II.3	SUGGESTED DIRECTORIES

	In its runtime environment, Basis expects to find its files in
	the four directories referenced by the (groupwide) logicals
	BRUN:, BDAT:, BOUT:, and BXFR: (which are defined in bass.com)
	as discussed below in Section III.1.  In principle, you can
	point these logicals anywhere, but it's suggested that you create
	the following four directories and the corresponding assignments:
		$ assign/group dua0:[basis.rev2] brun:
		$ assign/group dua0:[basis.data] bdat:
		$ assign/group dua0:[basis.out]  bout:
		$ assign/group dua0:[basis.transfer] bxfr:
	That is, create a directory [basis] on dua0: containing the four
	subdirectories [basis.rev2], [basis.data], [basis.out], and
	[basis.transfer].  To begin installation, your Basis system, as
	discussed in Section II.2, should all reside in directory [basis.rev2].
	Note that device dua0: is recommended because the operators back it
	up more frequently.

	The default device/directory of all Basis traders should be
	dua0:[basis] itself.  Consequently, you'll need to copy
	[basis.rev2]login.com to [basis]login.com.  Similarly you'll also
	need to copy joulog.com and termset.exe (once that's linked) to
	[basis]. The following table lists the mandatory initial contents
	of each directory (except for brun: which must contain all .exe
	and .com files):
		[basis]			[basis.data]
		-------			-------------
		login.com		basis.prv
		joulog.com		datefile.dat
		termset.exe		input.com
					qfiles.toc
					traders.dat
					*.prf
					qa.prm,qb.prm,etc
	Files in [basis.out] are created while the Basis Server is running,
	and that directory is just a target for them.  Files in
	[basis.transfer] should normally be created by the Prime-resident
	cpl that send new quote files to the Vax every morning about 4:15am.
	In [basis.data] the privilege file basis.prv can be created or
	updated by the system administrator who runs Basis as -tadmin,
	so copying it from [basis.rev2] is optional.  Similarly, the .prf
	files will be created for each trader when he first logs on to
	Basis if they don't already exist.


   II.4	COMPILING AND LINKING

	Several command procedures are available to conveniently compile
	and link all Basis source into object and executable files.
	These procedures are "portable" to any working directory
	in that they assume a logical "homedir" has been
	defined, and then run from it.  Therefore, be sure to
		$ assign [basis.rev2] homedir
	before using these procedures (or assign homedir to whatever
	directory you're working from).

	Once homedir has been properly assigned, the procedure
		$ @bcomp
	will compile all critical Basis source files.  This procedure
	currently takes somewhat in excess of 30 minutes running on
	a Microvax III with an RA80, so be prepared for your terminal
	to be unavailable during that time (a batch version of bcomp.com
	could easily be constructed to avoid tying up a terminal).

	After all necessary compilations are completed, the following
	four procedures link the critical Basis images:
		$ @blink	! links the Basis workstation process basis.exe
		$ @slink	! links the Basis server bserver.exe
		$ @dlink	! links bdumper.exe (spawned by bserver)
		$ @clink	! links basis_comm.exe (to control bserver)

	All noncritical Basis programs are compiled and linked by the
	single command procedure
		$ @ucomp
	Note that the logical toollib is assigned to a Vax .olb file
	containing the object library for the Chase toolbox.  You may
	need to alter this assignment if that file is no longer there.
	Jay Denkberg should be able to locate the toolbox object library
	for you.  The toolbox .olb is required by tbtest, termset, and
	xlate.  Only termset is actually used operationally, and here only
	by [basis]login.com to clear/reset the terminal.  If there's some
	problem linking termset, just remove the reference to it from
	login.com.


   II.5	DIRECTORY MAINTENANCE

	The directories [basis.transfer], [basis.out], and [basis.data]
	will accumulate various files during the normal course of
	Basis operations.  These should be periodically purged as
	necessary.  Note that [basis.out]bdumper.out, bcloser.out, and
	breports.out are continually appended to.  Therefore, they have
	to be periodically deleted when the Server isn't running.
	Similarly for [basis]login.txt.  These files will be automatically
	re-created as necessary, so they can just be deleted and forgotten.
	The files in [basis.data] are normally automatically purged
	with /keep=4 by the Dumper process, so they can usually be left
	to themselves, although you may want to periodically back them
	up (particularly the .prf and .prv files).  Finally, the files
	in [basis.transfer] also need manual attention to prevent them
	from accumulating indefinitely.  Just keep several days worth of
	quote file data online, deleting anything older.  Since these
	files are presumably archived on the Prime, anything necessary
	should be recoverable from there.


   II.6	QUOTE FILE REFRESH

	Basis is automatically brought down by the batch job qrefresh.com
	every morning at 4:30am.  This job then retrieves the latest
	quote files from [basis.transfer], renaming and copying them
	to [basis.data].  Finally, the Server is re-started, and the
	batch job re-submits itself for the next morning.

	Two other batch jobs, autoclose.com, are also normally on the
	batch queue.  They archive 3pm and 5pm closing prices, and send
	them back to the Prime (see ftpxfr.com).

	Whenever Basis comes down you should
		$ delete/queue/entry=(a,b,c) sys$batch
	(where a,b,c are the entry numbers for these three batch jobs
	determined by $show/queue).  To re-submit these batch jobs
	enter
		$ @bstartup q
	Don't forget the parameter q on the command line.  Without it
	bstartup will also bring down the Basis Server and then bring
	it back up (this is done within qrefresh, but you won't normally
	want to do it manually).

	If anything goes wrong on the Prime side of the transfer,
	you'll have to discuss the situation with either Andrew Freeman
	or Farid Tamaddon, and have them adjust the Prime cpl procedure.
	For instance, if you change the account name or password of the
	Vax account to which that cpl logs on, a corresponding change to
	the cpl will be necessary.
#EJECT
                    ---------------------------------------
                      SECTION III: OPERATIONAL PROCEDURES
                    ---------------------------------------


  III.1	DIRECTORIES AND LOGICALS

	As discussed above, Basis runs from four directories referenced
	by the following (group) logicals:

	    Logical Name	Purpose of Directory
	    ------------	--------------------
	    BRUN:		Contains all .EXE images and all .COM command
				procedures, i.e., all runtime programs.
				Note that BRUN: also contains a copy of all
				"C" source and object files (and procedures
				to compile and link them) for convenience.

	    BDAT:		Contains all Q?.PRM quote files, the BASIS.PRV
				privilege file maintained by the administrator
				and read by Basis during initialization, all
				trader.PRF profile files, and MESSAGE.TXT if
				it exists.  Note that BDAT: also contains the
				Q?.3PM and Q?.5PM files when the Dumper process
				creates them.

	    BOUT:		This directory is used as the target for
				sys$output files produced by various detached
				processes, log files produced by various
				submitted jobs, etc.  Note that some jobs
				seem to require being submitted with a
				hard-coded logfile switch (see BSTARTUP.COM
				and AUTOCLOSE.COM) for reasons not yet
				determined.  Any change to BOUT: must be
				accompanied by a corresponding change to
				the hard-coded paths in these procedures.

	    BXFR:		This directory is the target of the procedure
				on the Prime for the 4:30am quote file
				refresh.  Any change to it must be
				coordinated with a corresponding change to
				the Prime procedure (see Andrew Freeman).
				See BASIS$TRANSFER immediately below.

	    BASIS$TRANSFER	This logical must be in the system name
				table, and therefore should be defined
				in systartup.com so that it's redefined
				whenever a reboot occurs.  It's purpose
				is to provide the Prime-resident cpl
				that performs 4:30am quote file refreshes
				with a target directory for those files.
				Unfortunately, the Excelan ftp server
				seems unable to translate group logicals,
				therefore requiring a systemwide one.
				Note that BASIS$TRANSFER and BXFR should
				always point to the same directory.

      o	These directories should all permit groupwide rwe access,
	otherwise various Basis functions, like rewriting the trader profile
	files, may not be permitted by VMS.

      o	Ongoing program development should probably occur elsewheres;
	however, it's recommended that a complete set of source files
	corresponding to the running production system always be kept
	in BRUN: along with the necessary executable images.


	Several other (group) logicals are also assigned and translated
	by various Basis processes and procedures in order to permit
	"portability":

	    Logical Name	Purpose of Logical
	    ------------	------------------
	    BUIC		Is assigned a string of the form, e.g.,
				"[200,210]" containing the uic from
				which all Basis processes are run.
				(Of course, since the logical is currently
				groupwide, you must have already logged
				on to an account in the proper group to
				translate it.)

	    BJOB		This logical is assigned and maintained
				internally.  Various processes name
				themselves and concatanate BJOB in order
				to guarantee unique names.

	    &trader		As each trader logs on to Basis, his process
				creates a logical that translates to the
				date/time he logged on.  The translation
				isn't critical, but the existence of the
				logical is used to prevent two users from
				logging in as the same trader (or the same
				trader from logging in twice).

	    B$DUMP		Various procedures pass parameters among
	    B$CLOSE		themselves by creating groupwide logicals
	    B$WAIT		to which the corresponding parameter values
				are assigned.  All such logical names
				start with B$, which convention should
				be maintained (unless some reason to
				violate it arises).

	The command procedure BASS.COM (in the BRUN: directory) assigns
	and deassigns all the above logicals (except the B$ and & ones)
	when the Server is brought up and down, respectively.  It also
	increments BJOB and performs several other tasks, depending on
	the P1 and P2 parameters passed to it.  Any "reorganization" of
	Basis directories, etc., should be able to be transparently
	accommodated by changes to BASS.COM, without affecting any other
	command procedures (except the hard-coded logfile names mentioned
	above, and the Prime-resident procedure in case BXFR: changes).


  III.2	ACCOUNTS AND PRIVILEGES

	The Exos Reference Manual, page 5-51, briefly discusses some of
	privileges necessary for processes that run Excelan-based
	software.  Experience, however, dictates a more liberal allotment
	of privileges as outlined below.  This discrepancy is probably
	partially due to additional Basis-specific requirements
	beyond the "standalone" TCP/IP routines supplied by Excelan.

	There are two "classes" of Basis accounts.  One for traders who
	only need to run the Basis Trader Workstation process,
	and the other for the Basis System Manager when he brings up
	the system by detaching the Server.  All these accounts should
	belong to the same VMS group, which should agree with the BUIC
	logical discussed above.

	Traders using Basis must log on to accounts with, minimally,
	    the following default privileges:
		PRMMBX,TMPMBX,NETMBX,SYSLCK,
	    and authorized privileges:
		DETACH,SYSNAM,GRPNAM (plus the above).
	Quotas for Trader accounts should provide the following resources:
	    /BYTLM	256000			/WSDEF		500
	    /FILLM	20			/WSQUO		1000
	    /ASTLM	32			/WSEXTENT	1000
	    /TQELM	16			/PGFLQUO	10000
	    /ENQLM	32			/PRCLM		8
	    /BIOLM	24			/MAXJOBS	4
	    /DIOLM	24			/MAXDETACH	4
	    /JTQUOTA	1024			/MAXACCTJOBS	4

	The /LGICMD=filespec switch for Trader accounts should point to
	BRUN:LOGIN.COM (though you may have to explicitly spell out BRUN:
	for account information).  For convenience, their default
	/DIRECTORY=dirname switch should also point wherever BRUN: does.

	The Server account requires even more resources.  Thus far, the
	minimum necessary set of privileges is not clear, and /PRIV=ALL
	has been used for simplicity.  Note that even if the Server
	appears to run properly with fewer privileges, it can fail later
	when spawned, submitted, or detached processes that it creates
	are run.

	Quotas for the Server account should provide the following resources:
	    /BYTLM	2048000			/WSDEF		500
	    /FILLM	20			/WSQUO		2500
	    /ASTLM	32			/WSEXTENT	8000
	    /TQELM	32			/PGFLQUO	25000
	    /ENQLM	64			/PRCLM		32
	    /BIOLM	24			/MAXJOBS	32
	    /DIOLM	24			/MAXDETACH	32
	    /JTQUOTA	1024			/MAXACCTJOBS	32

	Note that all the above information is probably more "liberal"
	than actually required (i.e., it appears to be sufficient but
	may not all be necessary).  A more careful "tuning" is probably
	a good idea before the trader load becomes excessive.


  III.3	SYSTEM STARTUP

	The startup procedure for Basis consists of detaching the Server
	and submitting the batch jobs for 3pm and 5pm closings and for
	the 4:30am quote file refresh.  This is done by the following
	steps:

	      o	Set default to the Basis production directory (usually
		referenced by the logical BRUN).
	      o	Enter "@BSERVER" at the vms $ prompt.  This will detach
		a command procedure to run the Server.  The detached process
		renames itself as BASIS_SERVER.  Make sure that such a
		process doesn't already exist before detaching (another) one.
	      o	Enter "@BSTARTUP Q" at the vms $ prompt.  This will submit
		the necessary batch jobs.  Similarly, issue a $show queue
		to make sure that batch jobs QREFRESH and AUTOCLOSE
		haven't already been submitted before submitting (another)
		set.

	Note that no traders should be allowed to log on to Basis until
	the Server is running.  If they do, the Server will be unaware
	of their existence because no TCP/IP datagram socket between
	that trader and the Server will have been created.


  III.4	3PM AND 5PM CLOSINGS

	These procedures are usually handled automatically by the batch jobs
	submitted above.  To induce a closing procedure manually follow
	these steps:
	      o	Set default to the Basis production directory (usually
		referenced by the logical BRUN).
	      o Enter "bc -ddir:close=0" at the vms $ prompt, where bc is
		the foreign command bc:==$BRUN:basis_comm.exe (automatically
		set by @bass.com).  This will initiate either the 3pm or 5pm
		closing.
	      o	Enter "bc -ddir:close=1" to finish the 3pm closing, or
		"bc -ddir:close=2" to finish the 5pm closing.  Note: make
		sure that close=0 is submitted before close=1,2 since
		various parameters may be undefined otherwise.

	The close=0 Server directive initiates closing procedures by
	making a copy of the current universe to a separate global section
	and then prompting traders to begin sending closing prices.
	A menu item from the Trader Screen allows them to do this, and
	when they, prices for all issues they're trading are saved in this
	separate section.  When the Server receives a close=1 (or 2)
	directive, closing prices from any traders who haven't already sent
	them are automatically downloaded.  Then the Dumper process is
	spawned by the Server to dump the appropriate global section.
	If close=1 the extension of all dumped files is .3PM, and if close=2
	it's .5PM.  Finally, FTPXFR.COM is invoked to transfer the closing
	files to the Prime (possibly for quote sheet generation).


  III.5	SYSTEM SHUTDOWN

	Basis "shutdown" means terminating the Server process (and rewriting
	the quote files if necessary).  Note that when the Server is
	terminated "neatly" (i.e., by this procedure), it automatically
	logs off any Basis traders who are currently logged on to it.

	To terminate the Server, follow these steps:
	      o	Set default to the Basis production directory (usually
		referenced by the logical BRUN).
	      o	Enter "bc -ddir:abort=all" at the vms $ prompt.
		This will automatically log off any users and rewrite
		their profile files.  Wait a minute until "$show users"
		verifies that no traders remain logged on to Basis.
	      o Enter "bc -ddir:exit" at the vms $ prompt.
		This again causes the Server to log off any current users.
		It then rewrites the quote files if necessary, and exits.
	      o	You may also want to delete any Basis batch jobs currently
		queued.  To do this, first enter "show queue sys$batch"
		to determine the entry numbers of the jobs to be deleted.
		Then enter "delete/entry=(123[,456,789]) sys$batch" where
		"123,456,789" are the entry numbers to be deleted.


  III.6	4:30AM QUOTE FILE REFRESH

	Quote files are downloaded from the Prime to the VAX every morning
	at about 4:15am by a cpl procedure on the Prime (see Andrew Freeman
	for more details).  The target filenames produced are of the form
	q?mmddyy, where ?=B,N,A,Z,F for the file type and mmddyy is the
	settlement date.  The target directory is determined by the Prime
	procedure, and is referenced by the VAX logical BXFR.

	The purpose of the VAX refresh procedure is to move the most recently
	downloaded files from BXFR to BDAT, renaming them from q?mmddyy to
	q?.prm in the process.  This is usually accomplished every morning
	by QREFRESH.COM (initially submitted by BSTARTUP.COM), which also
	brings down the Server before the refresh and brings it back up
	afterwards.  However, this procedure should not normally be used
	"manually" because it re-submits itself (for the next day).

	To manually refresh the quote files, follow these steps:
	      o	Set default to the Basis production directory (usually
		referenced by the logical BRUN).
	      o Shut down the Server by entering "bc -ddir:exit" as discussed
		below.
	      o	Enter "@BASS A" at the vms $ prompt to re-establish all
		necessary logicals and symbols.
	      o Enter "@QUPDATE" at the vms $ prompt, which will perform
		all the necessary manipulations.
	      o	Enter "@BSERVER" at the vms $ prompt, to bring the Server
		back up as discussed above.


  III.7	CHECKING BASIS EACH MORNING

	Traders begin using Basis around 7:30am on business days.
	Three hours earlier, at 4:15am, the Prime cpl should have
	copied the most recent quote files to BXFR: using ftp.
	Then, at 4:30am, the batch job QREFRESH.COM should have
	brought down the Server, renamed and moved these file to BDAT:,
	and restarted the Server.  It's advisable to verify that all
	these procedures executed properly before any traders begin
	using Basis.

	If you arrive at 7:00am, first $show system to make sure that
	a process BASIS_SERVER is running.  Then $show logical/group
	and check that BJOB is approximately "9" (it started as "0"
	at 4:30am and was incremented every 15 minutes since then).
	Also check $dir/since/date=created bxfr: to make sure that
	the Prime cpl sent over today's quote files.

	Finally, you should log on to Basis and make sure that everything
	is really all right.  To do this $set default brun:.  Then make
	sure you have a symbol bs:==$brun:basis.exe, and enter
	$bs -tsales -m7 which should bring up the Basis Salesperson screen.
	Make sure you have the proper settlement date in the upper left
	corner of the screen.  Also check the "Change" column which
	should contain all zeros (as long as you're the first one to log on).
	Then change a few numbers and request a refresh from the Server
	(from the setup menu).  If the Server restores the original numbers,
	you can be almost positive that everything is all right.

	If anything has gone wrong, you'll have to bring down the Server
	(assuming it was up) following the procedures discussed above.
	Before restarting it, the proper quote files must be moved to
	BDAT: and named properly.  If these files are in BXFR:, then
	just run qupdate as discussed above, and restart the Server.
	Chances are, however, that the files were never transferred from
	the Prime.  And the most likely reason for this failure is
	that ftp wasn't running at 4:30am when the cpl was executed.
	In any case, the necessary actions are (a)bring down the Server,
	(b)get the current quote files, and (c)restart the Server.
	Any steps you take to accomplish this, as dictated by the
	circumstances, are adequate.  Two possible scenarios are
	outlined below.

	If ftp is currently up, then $set default BXFR:, and $ftp polaris
	and login.  Then cd transfer>shlomo which is the directory
	containing the quote files.  From there get qnmmddyy (no dots or
	extension), and similarly for all necessary quote files, where
	mmddyy is the appropriate settlement date.  If this runs properly,
	then quit ftp, and run qupdate and restart the Server.

	Most likely, however, ftp won't be available.  In this case,
	Erin Resh's PC probably contains the necessary quote files.
	You'll have to copy them onto floppies and Kermit them to BXFR: on
	the Vax from a PC with a Decserver connection (e.g., Regina's).
	Then run qupdate and restart the Server.
#EJECT
              -----------------------------------------------------
                      IV: DIALOG OF OPERATIONAL PROCEDURES
              -----------------------------------------------------

	A cookbook of operational procedures is collected below to
	conveniently help operators with the normal maintenance
	of Basis.  Note that extraordinary circumstances can neither
	be anticipated nor (therefore) covered by this documentation.

	In general, computer-generated prompts are in uppercase,
	and operator-entered information is lowercase.  If the
	operator-entered information is variable, it's enclosed within
	angle brackets, e.g., < password >.  Comments are preceded by a !
	(though that's not particularly critical here).  Terminating
	carriage returns are not explicitly shown.


   IV.1	MANUALLY START UP BASIS AND BATCH QUEUE

	! Step (1) Log on to the Basis administrator account on the host vax
	$ set host < basis >            ! get to the Username prompt on host
	USERNAME: basis                 ! there should be an account BASIS
	PASSWORD: < password >

	! Step (2) Navigate to the Basis runtime directory.
	$ set default brun:		! make sure you're in main basis dir

	! Step (3) Make sure Basis is not running.
	$ @exproc basis			! lists all running basis processes
		! Note: if any basis processes are running, they will be listed
		! and you must bring them down before attempting to continue
		! with this procedure.  If you simply get back a $ prompt, then
		! everything is all right and you may continue.

	! Step (4) Make sure there are no Basis jobs on the batch queue.
	$ show queue/all sys$batch	! checks the batch queue for Basis jobs
		! Note: if jobs named QREFRESH or AUTOCLOSE are waiting on
		! the queue, they must be deleted before proceeding.
		! Note their entry numbers and enter
		!	$ delete/entry=(x,y,z) sys$batch
		! where x,y,z are the entry numbers you noted.
		! Then re-issue the show queue command.

	! Step (5) Start the Basis Server process, and then make sure it
	!     initializes properly.
	$ @bserver			! detaches the basis server
		! repeat the next step until the process named BASIS_SERVER
		! goes into a final LEF state (approximately one minute)
	$ show system

	! Step (6) Submit the Basis batch jobs.
	$ @bstartup q			! re-submits QREFRESH and AUTOCLOSE
		! Note: make sure not to forget the q parameter.  Otherwise,
		! much more will happen than you want to.
	$ show queue/all sys$batch	! checks the jobs just submitted
		! you should see QREFRESH submitted once and AUTOCLOSE twice.

	! Step (7) Check the running Basis system.
		! You must logoff and log back on as a Basis salesperson.
		! Then change one or two prices or yields, and request a
		! refresh from the Server.  If you get it, Basis is running.


   IV.2	MANUALLY SHUT DOWN BASIS
#EJECT
            ------------------------------------------------------
                PART TWO, SECTION V: FUNCTIONAL SPECIFICATIONS
            ------------------------------------------------------

    The information in this section is not meant to be completely
    self-contained.  That is, it doesn't constitute a "Concepts and
    Facilities" introduction to the underlying purpose behind Basis
    or its current implementation.  For that information the reader
    is referred to the two functional requirements documents cited
    in Section I.3.  Alternatively, a discussion with Don Roth, Ron
    Chapman, or one of the traders mentioned in Section I.4 is
    recommended.

    The purpose of this section is to directly address the
    original functional documents, indicating how the current
    implementation of Basis satisfies their specified requirements,
    and what additional features have been added as a result of our
    experience during development and acceptance testing.


    V.1	AS COMPARED WITH ORIGINAL FUNCTIONAL REQUIREMENTS

	Below is a brief description of current Basis functionality,
	as compared with the requirements specified in the original
	functional requirements documents (see Section I.3).

	o Allows government traders to price securities in their sectors:
	      Basis can read, interpret, and rewrite archival quote files
	  containing treasury bills, notes and bonds, agencies, zeros,
	  and futures, all formatted according the the specifications
	  provided by the Product Analysis and Development group
	  (see Jay Denkberg or Erin Resh).
	      These issues are displayed and can be manipulated online via a
	  scrollable windowing system built on top of the Chase toolbox
	  (see Jay Denkberg).
	      Various interactive navigation and data entry facilities are
	  provided, permitting traders to enter prices or yields and
	  to have the corresponding yields or prices computed
	  and redisplayed automatically.
	      Actual calculations are performed by interfaces to the
	  "poy calculators" written by Product Analysis and
	  Development (see Erin Resh).
	      Error detection and correction of inappropriate input is
	  provided, e.g., if an input price results in a calculated
	  negative yield, then an error message is displayed and the
	  original price (and yield) is restored.

	o Allow each security can be linked to one, or a maximum of two,
	  other "base" securities, either through stated yield, true yield,
	  price, or future basis (delivery factor).  Whenever a "base"
	  security changes, all securities indexed to it change automatically.
	      Each security can link to one, but not to two, other
	  "base" securities.  Only "true" yield presently implemented
	  (though hooks in place for other yield calculations).

	o As soon as a price or yield for a security change,
	  all calculated parameters must be recomputed, both for it and for
	  any securities indexed from it, and must reappear within two seconds.
	  (Calculated parameters include price, yield(s), duration,
	  value of an 01 and 32, convexity.)
	      All requested functionality provided (except convexity
	  not displayed). Several additional "parameters" also recomputed.

	o Allows a correspondence between issues and the trader in that
	  security:
	      An administrative function in Basis supports the maintenance
	  of a security file that lists each "primary" trader
	  and all the issues he is authorized to trade.
	      Various commands permit marking a block of issues and assigning
	  them all to a specified trader, substituting all occurrences
	  of one trader for another (e.g., when someone leaves), etc.
	      In cases, for instance, when an assigned trader is sick, another
	  user can simultaneously log on to Basis as multiple traders.
	  He is then given several trader screens, one for each
	  trader, and can toggle among them with a single keystroke.
	  This provides a simpler mechanism for temporary changes
	  than modifying the security file (and later restoring it
	  again), although that option is still available.
	      When new issues are assigned to a trader by the administrator,
	  they automatically appear on the trader's screen the next
	  time he logs on to Basis, even if they are not in his profile.

	o Allows traders to add, delete, and change securities on their
	  screens:
	      Each time a trader logs off Basis, his "state" is saved in a
	  profile file.  This file records the issues on his trader
	  screen, all his relations and spreads (see below), various
	  computational options (rounding, adjustment for odd maturity
	  dates, etc), and various additional initialization options,
	  display options, etc.
	      The next time the trader logs on Basis, this file is reread and
	  his state is restored, so that the same issues reappear
	  in the same order on his screen, with the same basis
	  relationships, etc.
	      To add new issues to his screen, a single keystroke takes the
	  trader to a profile screen that displays the entire universe.
	  He can choose one issue from this screen or mark an entire
	  block of issues, and transfer them back to his trader screen.
	      Issues to be deleted are marked, and a deletion request removes
	  them from the screen.
	      A marked block of issues can also be moved from its current
	  position on the screen to any other location.
	      Several sort options allow all displayed issues to be rearranged
	  according to one of several selected orderings (usually
	  by maturity date and by coupon within maturity date).

	o Allow others to monitor individual trader pricing screens.
	  About 25 will require almost continuous monitoring.
	      All requested functionality provided, except that a
	  single Microvax III with 32Mb memory can support approximately 20
	  traders and/or salespeople.  Note that, at the request of several
	  traders, an option exists whereby their "base" issues are
	  maintained entirely locally.  In these cases a salesperson can see
	  the price/yields, but can't see the spread in the linkage equation
	  because the base issue is hidden.

	o Allow salespeople to create composite screens from
	  multiple traders.
	      All requested functionality provided.  A salesperson
	  can pull any issues in the universe onto his screen.

	o Generate end-of-day (or more frequent) marks to market
	  and feed them to the Prime system.
	      All requested functionality provided.  Three- and Five-PM
	  closings are automatically posted to the Prime in "quote-file
	  format".

	o Ability to enter "what-if" prices/yields for local
	  computations, but not shared with other stations.
	      All requested functionality provided.  Various "freeze"
	  options allow traders (or salespeople)  (a)to stop incoming data
	  (so that their what-if games aren't interrupted by reality),
	  (b)to stop outgoing data (as requested), (c)to request a refresh of
	  current market prices (so that an unsuccessful experiment can
	  be "erased"), or (d)to unfreeze (so that a successful experiment can
	  be shared with others once the trader is satisfied with it).

	o Permit the display of individual bond characteristics, e.g.,
	  issue date and size, accrued interest, etc.
	      All requested functionality provided.  Not all this data
	  fits on a single screen, and traders/salespeople can toggle among
	  several different screens to view various different characteristics.

	o Ability to network trader pricing among nodes in real time.
	  Only one center at any given time will be allowed to change system
	  prices.
	      All requested functionality provided.  Client/Server
	  design using Excelan TCP/IP for interprocess communication
	  should automatically provide this functionality, although actual
	  tests have so far involved only a single node hosting both the
	  Server and all Client processes.  (The one-center concept in the
	  second sentence is not quite correct.  As specified above,
	  the assigned trader changes prices system-wide, regardless of the
	  node/center where he's located.)

	o  Allow an open-ended interface to other systems, e.g.,
	  Chase proprietary analytics.
	      Any process that sends appropriately formatted messages
	  to the Server (or receives them from it) can interface with Basis.
	  A library of reasonably high-level TCP/IP routines, and several
	  "stub shells" that interface with the Server through it have been
	  written to simplify the development of additional interfaces.

	o Allow for interface to digital feeds from information
	  providers such as Knight-Ridder.
	      Accommodated by previous requirement.

	o Ability to generate a real-time Chase ticker of indicative
	  quotes.
	      Accommodated by previous requirement.

	o Ability for traders to enter trades into a blotter.
	      An additional data-entry screen would be required,
	  but there seems to be no substantial problem with this enhancement.


   V.2	ADDITIONAL FEATURES

	During its initial implementation, and after Basis was installed on
	the trading floor for user acceptance testing, it became apparent
	that a variety of additional features, not initially called for by
	the functional requirements, would be desirable.  A brief "survey"
	of these features is outlined below.


	(A) Initialization Features
		At the beginning of the trading day (i.e., the first time a
	    trader logs in to Basis on any given calendar day) the price-yield
	    relationships have changed slightly (especially for issues close
	    to maturity) simply because the settlement date has changed.
	    Since the quote sheet data which drives Basis doesn't account for
	    these "computational dynamics", several options were programmed
	    into Basis to provide traders with a more accurate representation
	    of their positions.  Note that no definitive analysis
	    justifies the "adjusted spread option" procedure discussed below,
	    and some alternative may ultimately prove preferable.  In any case,
	    each trader may choose among one of three initialization options:

	      o	Quote Sheet Option
		    The simplest option takes data directly from the quote
		sheet files without any adjustment whatsoever, i.e., all
		price and yield numbers on the screen will match those on the
		quote sheet (except for any optional rounding selected by
		the trader).  In this case, if the trader has spread
		several issues from a basis issue, his previous spreads
		(read from last night's profile) are discarded, and new
		spreads are calculated consistent with the yields from
		the quote sheet.  Traders whose issues mature more
		than several years out can safely use this option,
		since a few days difference in settlement date will be
		unnoticeable (at least to an eighth of a thirty-second
		accuracy).

	      o	Constant Spread Option
		    In this case the spreads connecting related issues are
		preserved from one day to the next via the trader's
		profile file.  To accomplish this, data for a basis issue
		is read from the quote file.  Then the yield of any
		issue spread from this basis is calculated using the
		basis issue yield plus the spread from the trader's profile.
		Finally, the corresponding price is recalculated from
		that new yield.  Traders who consistently enter all
		their closing prices on Basis should presumably choose this
		option.  That is, the spreads saved in the trader's profile
		must all be accurate for this option to be effective.

	      o	Adjusted Spread Option
		    The most complicated situation arises for traders who
		haven't yet fully migrated their closing procedures to Basis,
		but who want to use the system anyway.  In this case
		Basis must try to estimate the effect of settlement date
		change.  The system does this as follows.  First, the
		quote sheet closing prices are read. Then the settlement
		date (read from the quote file) is "decremented" to
		the previous business day (i.e., to the date when the
		trader presumably entered these closing prices).
		Finally the yields are calculated for this settlement date
		and the spread is determined from those yields.  Next,
		Basis applies these spreads to the yields currently posted
		for the basis issue, and recalculates the prices.  This
		procedure presumbaly preserves the yield curve from one
		day to the next, except that it's shifted corresponding to
		the change in settlement date (e.g., prices approach par).

	      o	"First Logon" Correction
		    Traders selecting the above adjustment option create
		an even more complicated situation for Basis than
		already suggested.  First, suppose they log on to Basis
		after their basis issues have already been traded
		by some other trader (i.e., the current price is no longer
		the previous day's closing price).  Basis must get
		the old closing prices and calculate the spreads from them,
		but must then apply those spreads to the current basis
		issue yields.  Since the quote files don't contain
		a closing price field, an adjustment to the file format
		was necessary. Second, suppose a trader logs on,
		is initialized as discussed above, but then logs off
		(say for lunch) and logs back on later.  If he has
		already traded some of his issues, then any re-initialization
		(following the same procedure) would lose those changes.
		Consequently, Basis keeps track of each trader's most
		recent logon.  If a trader using the "adjustment" option
		logs on a second time during a single day, he's initialized
		according to the "constant spread" procedure regardless
		of his profile options.


	(B) Additional Profile Features
		Various additional options, not initially discussed in the
	    functional specifications, are also supported by switches
	    in each trader's profile file.

	      o	Basis "Coupling"
		    Some traders are spread from basis issues for which the
		actual trader isn't yet using Basis.  Therefore, each profile
		has a switch indicating whether that trader is automatically
		allowed to trade his basis issues.  When this is so, there
		may be several traders trading the same issue.  In such cases,
		the last person to enter a price or yield establishes the
		current price.
		    Several traders wish to "trade" their own basis issues,
		regardless of the actual market position set by the trader
		actually trading them.  To accommodate this, the profile
		can contain "local" data for any subset of the universe
		used as basis issues.  Another profile switch usually
		automatically "freezes" all incoming prices for the basis
		issues of this trader (but not non-basis issues), so that
		his local prices aren't disturbed.  When he exits Basis,
		these prices are rewritten to his profile.  Note that one
		problem with this option is that no one else can "see"
		exactly what such a trader is doing.  Salespeople can
		examine his prices, but not the spreads on which they're based.


	(C) Price Rounding Features
		Basis normally displays prices to the nearest eighth of a
	    thirty-second.  However, since some traders don't make markets
	    on eighths of thirty-seconds, their profile contains an optional
	    parameter indicating the number of thirty-seconds to which prices
	    should be rounded.  Using this option creates a potential
	    inconsistency problem as follows.  If any issue is spread on yield
	    from another, and its price is subsequently rounded, then the
	    displayed yield will not necessarily correspond to the displayed price.
	    That is, we have
	      yield(basis)+spread --> yield(issue) --> price --> rounded price.
	    So the displayed yield corresponds to the price before rounding,
	    and is inconsistent to the after-rounding price.  To avoid this,
	    Basis recalculates the yield after the price has been rounded.  Now
	    note that this recalculation potentially corrupts the spread formula
	    since the difference in yield between basis and issue no longer
	    equals the desired spread.  This inconsistency is preserved so that
	    the spread is unaffected by price rounding manipulations.


	(D) Multiple-Trader Feature
	        To accommodate a trader who's out (e.g., sick), a single
	    Basis user can log on as himself and, optionally, as up to
	    three additional traders.  In this case he has multiple trader
	    screens, which he toggles between by pressing the "T" key.
	    The administrator can still log on to Basis and modify the
	    trader privilege file as described in the functional requirements,
	    but this procedure was deemed too complicated for normal
	    operations when someone is simply out sick.
	        Note that in this case initialization of all "aliased" traders
	    is governed by the primary trader's options, which may or may not
	    prove adequate.  However, the complexity of a more generalized
	    implementation seems prohibitive unless it actually proves
	    necessary.
	         Also, in the unlikely event that several of these traders
	    have different relations for the same issue, then the primary
	    trader has precedence (followed by the order in which
	    additional traders are specified).


	(E) "Static" and "Auto-Ranging" Viewport
	        Room for any number of issues at the top of the trader
	    screen can be declared "static".  If, say, three issues are
	    declared static, this means that they'll never scroll off the
	    screen.  This feature is usually used to keep a trader's
	    basis issues constantly in view regardless of any other
	    navigation.
	        Once a static area is declared, a trader may optionally request
	    "auto-ranging" within it.  This means that as he navigates, the
	    basis issues for all issues currently in view are determined,
	    and automatically placed in the static region.  (Note that if
	    there are more static rows than basis issues, one or more rows
	    are left blank.  If there are more basis issues than rows, then
	    those referenced by the bottom-most visible issues are left out -
	    they'll eventually be displayed as the trader scrolls them
	    towards the top.)


	(F) Other Screen Management Features
		A variety of additional options, not explicitly discussed in
	    the functional specifications, turned out to be necessary for a
	    user-friendly interface to Basis.

	      o	Mark (and Clear) a Block of Issues
		    Many features discussed below are based on the idea
		of a marked block of issues.  That is, when an operation
		is requested, it's performed on all marked issues (and
		those issues are usually unmarked automtaically afterwards).
		If no issue(s) are marked, then the requested operation
		is usually performed on the single issue located under
		the current cursor, or sometimes on the entire window
		(whichever makes more sense, e.g., a sort is performed within
		a block if marked, or on the entire window otherwise).
		    The "M" key marks the issue under the current cursor,
		placing it in reverse-video.  If you navigate and press "M"
		again, all issues between and including these two are marked.
		If you press "M" on an issue that's already marked, then
		that single issue is unmarked. Pressing "C" clears all marks.
		You may mark one block and then mark another non-continguous
		block.  A flexible "mark" functionality is important to
		Basis because so many other functions require it.

	      o	"Attention" Commands
		    Pressing "!" at any time displays the "Enter Command -->"
		attention prompt at the bottom of your screen, and waits
		for a command terminated by RETURN.  Any of the following
		commands are recognized:
		    SET=xxx, establishes a relation between the issue
		currently under your cursor and issue xxx as the basis issue.
		Note that xxx can be in any form recognized by the "Q"uery
		reply discussed below.  Also, if a block of issues is marked,
		your current cursor position is ignored and the entire block
		is spread from the specified basis.  In either case,
		the appropriate spread is calculated from the
		currently-displayed price/yield information.
		    SUBSTITUTE=xxx, replaces the basis issue in the
		relationship under your cursor by the issue indicated by xxx.
		Note that every issue spread from the same basis as the
		issue under your cursor is simultaneously affected by
		the substitution.  (Marked blocks are irrelevant here,
		and your cursor may be on any issue related to the basis
		you wish substituted.)
		    CHANGE=xxx, increments the issue under yor cursor or,
		more usually, an entire block of marked issues, by the
		specified amount.  The field to be incremented is
		determined from your current cursor column position.
		That is, if your cursor is on any issue's price field,
		then the price of all marked issues will be changed;
		or, if your cursor is on a yield then the yield of all
		marked issues will be changed.
		    MESSAGE=text, displays "text" on the bottom line of
		every trader's screen (who's currently logged on to Basis).
		To be more selective, MESSAGE=trader:text will
		send "text" only to "trader".
		    Note that any of the commands SET=, SUBSTITUTE=, etc,
		need not be repeated after the first time if the same
		command is to be executed several times consecutively.
		Basis looks for an equal sign following the command.
		If not found, it repeats the previous command with
		the new data.

	      o	Trader Menu Commands
		    One or more issues can be deleted from the Trader
		Screen by first marking the block of issues to be deleted,
		then accessing the trader screen meny by pressing "=" and
		selecting the Delete option.
		    One or more issues can be moved from its/their current
		location to another: (a)mark the block of issues to be
		moved, (b)move your cursor to the issue immediately below
		the target position, and (c)press "=" for the Trader Menu
		and select Move.
		    A static region is declared by marking a contiguous block
		at the very top of your window (i.e., any number of top issues
		issues can be declared static, but no "gaps" are allowed),
		then leaving your cursor within the marked block and selecting
		Move from the trader menu.  Since there's nowhere to move the
		block, Basis interprets it as a static request.  To de-static
		a previously declared static region, mark the same block and
		re-declare it static.

	      o	Setup Menu Commands
		    Pressing "/" from the trader screen brings up
		the first of several "Setup" menus.  You move among
		the various setup menus by selecting the "Next Menu"
		choice from the menu you're presently on.  To exit
		the setup menu system, just press "/" again.
		Pressing RETURN from any setup choice (other than "Next Menu")
		executes that option.
		    Sort Window allows your window to be sorted either by
		Type&Maturity (the most commonly used ordering) or by
		Security ID.  If a block of issues is marked when you
		execute a sort, only the issues within that (contiguous)
		block are sorted among themselves.  Otherwise, the entire
		window is sorted, except that any static objects are
		left where they are at the top of the screen.  (To include
		static objects in a sort, mark the whole window including
		them.)
		    Freeze allows a trader to inhibit incoming or outgoing
		(or both) prices, usually to play "what-if" games without
		being disturbed by "reality" and without affecting others.
		If he eventually wants to use these prices, Unfreeze sends
		them out.  If he wants to forget them and return to the
		present market positions, then Refresh gets the current
		prices of every issue in his window.

	      o	Profile Screen Options
		    Pressing "P" at any time brings up the profile screen,
		which displays various indicative data about every issue
		in the universe.
		    To add issues to your Trader Screen, first move your
		cursor (while still on the Trader Screen) to the issue
		immediately below where you want the new issues added.
		Then press "P", and mark all the issues you want to add
		above that position.  Next press "=" to bring up the
		Profile Screen Menu, and select the "Copy Issues" option.
		Note that after copying issues to your trader screen,
		you can re-sort your window.


	(G) Data Entry Features

	      o	Toggle between Insert/Edit and Read-Only Modes:
		    Pressing "I" toggles between between the normal
		"Insert/Edit" mode (in which the trader screen comes up
		by default) where data can be entered, and the protected
		"Read-Only" mode where keyboard data input is disabled.
		This prevents accidental entry of prices or yields
		should the trader (or a passerby) accidentally press
		the wrong key.  Also, in Read-Only mode, the entire row
		under the cursor is reverse-videoed, which permits easier
		reading across an issue (especially on the small screens
		on the trading floor).

	      o	"+" or "-" Keys
		    Pressing "+" or "-" while on a price field
		automatically raises or lowers that price by a thirty-second.
		On a yield field the increment/decrement is a basis point.

	      o	Ctrl-U and Ctrl-K Keys
		    Pressing Ctrl-U while in the process of entering
		a number has the normally-expected effect of erasing
		the entry and restoring the field to its original value.
		This key is normally used when you notice you've entered
		the wrong data before pressing RETURN.
		    Basis has an additional "recall" feature that remains
		effective even after RETURN is pressed, so long as
		you haven't navigated away from the current issue
		(with down- or up-arrows, etc).  Pressing Ctrl-K at any
		point will restore the current issue to its "original"
		value, i.e., to the value it had when your cursor most
		recently entered it.  This is useful not only for
		correcting errors after the fact, but also for playing
		"what-if" games (so that you can recall the original
		price/yield without remembering it).  Any related
		issues will also be automatically restored by Ctrl-K.

	      o	Ctrl-W Key
		    This key refreshes the entire screen, as normally expected.
		It's useful if a trader "MIX"-es away from Basis and returns
		to an empty screen sometime later.  It's also useful is some
		"line noise" inadvertantly displays one or more rows of garbage
		on a screen.


	(H) Navigation Features

	      o	Ctrl-D Key
		    While the DOWN key ("D") takes you down one physical
		page at a time, Ctrl-D takes you down one "sector"
		at a time, i.e., it finds the first issue spread from
		a different basis than the basis of the issue your cursor
		is presently on.  Similarly, Ctrl-E navigates upwards
		according to the same procedure.  (This isn't really a
		"sector", but there doesn't seem to be any appropriate
		terminology.)

	      o	"Q"uery Key
		    Pressing "Q" at any time brings up the query prompt
		at the bottom of your screen.  A query can take any of
		the following forms, which Basis determines automatically
		from context of your reply:
		    Page #, brings the top issue on that page to the top
		of your screen,
		    Security id # (a 4-digit number), brings the specified
		issue to the top of your screen,
		    "mm/yy" or "mm/yy xx.xxx", brings the first issue
		whose maturity date is mm/yy to the top of your screen.
		You can also specify a coupon for greater selectivity.
		Also, you can enter, say, "N mm/yy" to get only a note
		with the specified maturity (or B,A,Z,F for a bill,
		agency, etc).
		    Given any type of query, Basis searches your current
		window, starting from the top, for a matching issue,
		and rearranges your screen so that is the first visible
		issue.  Nothing changes if no query match is found.

	      o	"B"asis Key
		    If your cursor is on an issue spread from some basis
		issue, then pressing "B" will immediately move your cursor
		to that basis issue (if it's currently displayed onscreen,
		which it usually is in the static region).  At that point
		you can modify the basis issue.  Pressing "B" once more
		will return your cursor to the original issue.  Note that
		once you're on a basis issue (having pressed "B" once),
		any manual navigation away from it (e.g., pressing an
		arrow key) will reset the B-key function.

	      o	"Y" Key
		    Pressing "Y" immediately takes you to the previous screen
		you were on.  Thus, for instance, if you're constantly
		navigating between, say, the trader screen and detail screen,
		just press "Y" to save the step of bringing up a menu
		and selecting the screen from there.


	(I) Hardcopy Reports
		Several hardcopy reports were requested by the traders.
	    Pressing Ctrl-R brings up the Basis Report Menu which
	    currently contains two report format selections.  These
	    reports can be prepared "dynamically", i.e., at any time
	    during the day.  The contents of any requested report
	    contains the up-to-date information currently on the trader's
	    screen.  Once a report is selected, it is automatically
	    prepared and printed on the special Basis printer installed on
	    the trading floor.

	      o	Basis Input Sheet Report
		    This replaces the current input sheet submitted by
		the traders after close-of-business (usually about
		5:00-5:30pm).  If the trader has kept his Basis Trader
		Screen up-to-date during the day, then all his closing
		prices will presumably be printed.  This eliminates the
		handwritten entry currently required, though there's
		still a blank column to accommodate any changes that
		the trader wishes to record by hand after he prints his
		report.

	      o	"PrintScreen" Report
		    This report effectively produces a printed image of
		the trader's screen (except that all issues in his
		screen are printed, not just those currently visible).
		It's thus an expanded version of what you'd expect
		from the PrintScreen key on a PC.


	(J) Help System
	        An interactive help system can be invoked from Basis.
	    Pressing "H" at any time brings up a screen containing
	    a summary of navigation and editing keys supported by Basis.
	    Further pressing any of these keys brings up detailed help
	    describing the function of that key. This detailed help usually
	    provides further such prompts suggesting related keys
	    for which help is immediately available.  The main Help
	    menu is retrievable by again pressing "H" from anywhere within
	    the help system.  Also, pressing "N" will sequentially bring up
	    the "next" help screen (or "L" for the last/previous one).
	    Note that continually pressing "N" doesn't blindly take you
	    through every help screen, but cycles through a subset of
	    screens deemed related to the one from which you started.
#EJECT
          -----------------------------------------------------------
             SECTION VI: BASIS SCREENS, NAVIGATION, AND DATA ENTRY
          -----------------------------------------------------------


   VI.1	SUMMARY OF BASIS SCREENS

   Below is a table summarizing the Screens and Menus available from Basis,
   followed by a more detailed description of the major screens
   and their purpose.

             Summary of Selections Available from Basis Menus
   -------- All Screen Menus --------+--------- Setup Menus -----------
   Continue    No Action Desired     | Next_Setup Go to next Setup Menu
   Help        Current screen help   | (B)asis    Choose Basis issue
   e(X)it      Exit Basis            | (S)elect   Search for an issue
   (P)rofile   Go to Profile Screen  | (F)reeze   Stop/Start price updates
   (R)elation  Go to Relation Screen | (W)indow_Sort   Sorts your screen
   (T)rader    Go to Trader Screen   | Yield      Choose yield method
   Detail      Go to Detail Screen   | Settlement Change settlement date
   ----------- Trader Menu ----------+--------- Profile Menu ----------
   Delete      All marked issues     | Copy_Marks To Trader Screen
   Move        Marks above cursor    |
   Close       Send closing prices   |
   ----------------------------------+-----------------------------------


         Basis Trader Screen ("Trader" from Menu, or Keypress T)
        ---------------------------------------------------------
   The Trader Screen is your primary work area, where prices and yields
   are updated, and from which information about updated issues you are
   trading is sent to the Server for distribution.  From here you may:
      o Enter prices, yields, and spreads, either for "what-if" analysis
        or to be sent to the Server for public distribution.
      o Enter the price for your "Basis issue".
      o Go to the Detail Screen for additional information about the
        issues displayed on your Trader Screen.
      o Go to the Relation Screen to set relations for issues on your
        Trader Screen.
      o Go to the Profile Screen to add "browse" issues to your Trader
        Screen.
      o Exercise various additional options from the Setup Menus.


                  Basis Detail Screen ("Detail" from Menu)
                 ------------------------------------------
   The Detail Screen (usually) shows the same issues as the previous
   Trader Screen that you were on.  But it displays additional, detailed
   information about these issues that may be of interest if you're
   planning on a more thorough analysis.


          Basis Relation Screen ("Relation" from Menu, or Keypress R)
         -------------------------------------------------------------
   The Relation Screen allows you to set a Basis or "Bellweather" issue
   for each issue on your Trader Screen, and the spreads from that basis.
      o In the "Keyed Off" field you enter the security id of the basis
        for the issue being traded.  This may be in the explicit form
        1234 (a four-digit security id number), or, say, usz9, or the
        word base will spread off the current Basis issue.  (You may also
        SET or SUB issues as described by help for "command mode".)
      o The "Spread" field contains the spread between the issue and the
        basis you chose for it, i.e., issue = basis + "spread".
        For the time being, all spreads are expressed as decimal values,
        e.g., a price spread of 0:04 (an eighth) must be entered as 0.125,
        and a yield spread of one basis point must be entered as 0.01.
      o The "Type" field must contain either P or Y or B, depending on the
        type of relation you want to establish between the issue and basis.


           Basis Profile Screen ("Profile" from Menu, or Keypress P)
          -----------------------------------------------------------
   The profile screen allows you to "browse" through all the issues
   in the "universe of issues" that comprise the Basis quote database.
   These should be the same issues that appear on your quote sheets.

   The profile screen also allows you to select issues you aren't trading
   for viewing on your main trader screen (and detail screen) as follows:
      o Find the first issue you want to view on your trader screen.
      o While your cursor is on this issue press "M" (for "Mark").
      o If there are more issues (immediately above or below this one)
        move your cursor to the last one and press "M" again.
        Basis should "mark" the entire block between the two you marked.
      o Press "=" to get the Profile menu.
      o Select the "Copy Marks" option.
      o Basis should return to your trader menu, with the marked issues
        immediately above where you left your cursor.


                      Administrator Screen Description
                     ----------------------------------
   The Administrator Screen allows the Basis System Administrator to
   assign issues to the traders who are trading them.

   When you change a price (or yield or spread) on your Trader Screen,
   then that information is sent to the Server and to all other traders
   IF that issue has been assigned to you.  If not, the data you've
   entered remains "local", and, in fact, may be wiped out if the
   assigned trader enters data which is then sent to you.  To avoid
   this, set an "Input Freeze".



   VI.2	SUMMARY OF BASIS KEYSTROKE COMMANDS

            upper                             C-control
            case                                 key
    ----+---+---+---+---------+---+---------+---+---+---+---+---+---+----
      B | A | S | I | S     K | E | Y     T | E | M | P | L | A | T | E
    ----+---+---+---+---------+---+---------+---+---+---+---+---+---+----
                              lower
                              case
Enter
Command                                                           +1/32
-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----
  !  |  @  |  #  |  $  |  %  |  ^  |  &  |  *  |  (  |  )  |  _  |  +
  1  |  2  |  3  |  4  |  5  |  6  |  7  |  8  |  9  |  0  |  -  |  =
-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----
 <--------------------- data entry ---------------------->  -1/32  Menu

                                                       C-block
      C-Redraw     C-Report         C-Restore           +1/32
  -----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----
       |     |     |     |     |     |     |     |     |     |  {  |  }  |  |
    Q  |  W  |  E  |  R  |  T  |  Y  |  U  |  I  |  O  |  P  |  [  |  ]  |  \
  -----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----
  Query     DnArrow Reltn Trader Scrn PageUp Insert    Profile PgTop Bot Future
                     scrn  scrn toggle       toggle      scrn            toggle

                                                    C-block
              C-DnSector  C-Gateway         C-Recall -1/32
    -----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+---------
         |     |     |     |     |     |     |     |     |  :  |  "  |
      A  |  S  |  D  |  F  |  G  |  H  |  J  |  K  |  L  |  ;  |  '  | RETURN
    -----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+---------
        UpArrow PageDn             Help                                Recalc
                                   scrn
                                                First Last
                                                issue issue
      -----+-----+-----+-----+-----+-----+-----+-----+-----+-----
           |     |     |     |     |     |     |  <  |  >  |  ?
        Z  |  X  |  C  |  V  |  B  |  N  |  M  |  ,  |  .  |  /
      -----+-----+-----+-----+-----+-----+-----+-----+-----+-----
      Ditto Abort Clear       Basis        Mark            Setup Menu
            (X,X) marks       toggle   (M...M block)         toggle

 To Logoff Basis                            Other Keys
-----------------                          ------------
  o Press = for the Menu,                    o TAB      next field
  o Press E to highlight the Exit option,    o UpArrow  previous issue (also S)
  o Press RETURN to execute the option.      o DnArrow  next issue (also E)
 Note: please always use this procedure      o Keypad+  plus 1/32  (also +)
  to log off Basis at the end of the day.    o Keypad-  minus 1/32 (also -)



   The following tables provide a brief summary of Basis navigation
   and editing functions.  A more detailed description of some of
   these keys follows the two tables.

               Summary of Basis Navigation and Editing Keys
              -----------------------+----------------------
   H   request this Help screen      | XX  e"X"it program immediately
   0-9 data entry keys               | TAB go to next editable field
   +,- plus/lower current field      | Ctrl-P/L Plus/Lower marked issues
   Ctrl-U  restore field to original | Ctrl-W  refresh the entire screen
   ->  "down arrow" for next issue   | <-  "up arrow" for previous issue  
   D   to scroll Down one screen     | U   to scroll Up one screen
   ],[ go to bottom,top of screen    | >,< go to last,first issue
   /   enter/leave setup menus       | \   enter/leave basis issue editing
   I   toggle edit mode              | M/C Mark an issue/Clear all marks
   Y   returns to previous screen    | T   goes to the next Trader Screen
   P   goes to Profile Screen        | R   goes to Relation Screen
   Ctrl-R  report menu               | ??? menu for current screen
   RETURN executes current action    | !   enter "command mode"
   ----------------------------------+-----------------------------------

	Key(s)   Brief Description
	------   -----------------

	0-9 and .   Data entry in current field (if field is editable).

	+ or -	Raise or lower value by a 32nd or by a basis point
		(keypad also).

	Ctrl-U	Restore a field to its original value (before pressing RETURN).

	Ctrl-K	Restore a field to its original value (after pressing RETURN).

	Ctrl-W	Refresh the entire screen.

	RETURN	Recalculate using current data, stay in same field.

	TAB	Go to the next field (of the current issue).

	Down-Arrow or Keypad-Enter   Go to the next issue
		(i.e., "below" the current one).

	Up-Arrow   Go to the previous issue (i.e., "above" the current one).

	D or U	Scroll Down or Up one page of issues.

	Ctrl-D	Scroll down a "sector"
		(i.e., next issue spread from different a basis).

	] or [	Go to the first issue on the current window
		or to the last issue.

	> or <	Go to the very last issue or to the very first issue.

	B	If current issue has a basis go to that basis issue
		(press B again and return to original issue)

	Q,id,< CR >  Press Q, enter security id,
		press < CR > to go to that security.

	Q,#,< CR >   Go to page # entered.

	Q,maturity coupon,< CR >   Go to issue with maturity
		(and optionally coupon).

	I	Toggle between "edit" mode and "view" mode.

	M or M,...,M   Mark an issue or mark a block of issues.

	C	Clear all marks.

	!,CHANGE=xx,< CR >   Modify current issue or an entire block
		of marked issues.

	!,SET=xx,< CR >   Set a relationship (using the current spread).

	!,SUB=xx,< CR >   Substitute basis issue for all issues
		spread from current.

	!,MESSAGE=xx,< CR >   Send a message to one trader or to all traders.

	/	Toggle "Select" menus for Window Sort options, Freeze/Refresh,
		Settlement Date, Yield Method, Basis Selection, etc.

	=	Pop up menu specific to current screen.

	Ctrl-R	Report menu (to request Input Sheet or PrintScreen).

	H	Enter Help System (from which you can press a key to get help
		with that key's function).

	T	Next trader screen (or return to current trader screen).

	P	Switch from current screen to profile screen.

	R	Switch to relation screen
		(only if currently on a trader screen).

	Y	Toggle between current screen and previous screen.

	=,E,< CR >   Exit program normally.  Profile is rewritten to disk.

	X,X	Exit program immediately, without rewriting Profile file.
		(All new relations, etc are lost.  Used to "abort" session.)


               Exit Basis ("Exit" from Menu, or Keypress X X)
              ------------------------------------------------
   There are two ways to exit Basis:
      o You normally leave Basis by selecting "Exit" from the Trader Menu
        (or from any other menu with the "Exit" option).  When this method
        is used, Basis saves your current "profile", which includes
        information about any new relations you have established, any new
        issues you have copied to your trader window, etc.  In this way,
        the next time you log on to Basis, your screen will look exactly
        as you left it (except for any prices that may have changed).
      o Basis may be "aborted" by pressing the X key twice in succession.
        In this case, your profile is not saved.  This option is useful
        if you have made some mistake in your relations or windows, and
        want all changes made during the current session to be "forgotten".


                      "Refresh" the current Basis Screen
                     ------------------------------------
   Occasionally, communications between the computer and your terminal
   are corrupted by "static" that generates incorrect or unintelligible
   characters on your screen.  If you notice something that you suspect
   may be such "garbage", just:
        Press Ctrl-W to erase the current screen and redraw it.
   Note: Ctrl-W means hold down the key marked CTRL (or "Control") as
         though it were a Shift key.  While holding it down press the
         W key, and then release them both.


              Restore a Field to its Original Value while Editing
             -----------------------------------------------------
   If you're in the process of entering a number and notice you've
   made a mistake (before the computer has re-calculated anything):
        Press Ctrl-U to restore the field to its original values.
   Thus, for instance, if you're editing a price that was originally, say,
   98.23+, and you change your mind, just Press Ctrl-U.  That will
   restore the original value even if you've forgotten what it was.


                  Automatically "Raise" or "Lower" a Value
                 ------------------------------------------
   If you are editing a price which, say, happens to currently be 98.15,
   and you want to raise (or lower) it by a 32nd, just:
        Press + to automatically raise a price by a 32nd, or
        Press - to autonatically lower a price by a 32nd.
        Press RETURN after pressing + or - to recalculate the issue
        (or move to some other issue for an automatic recalculation).
   Note: Yields are automatically raised (or lowered) by a basis point.
         Generally speaking, Basis is aware of the "natural" units
         in which different kinds of data is usually expressed,
         and the + and - keys usually behave in the way you'd expect.


                         Move to the Next Field
                        ------------------------
   The TAB key moves from the current field to the adjacent field
   on its right-hand side (BACKTAB moves to the left).
   Note: If you change an issue's price and then TAB to its yield,
         Basis will not automatically do a recalculation.
         That's because your action suggests that you may want to
         edit the yield, and Basis waits to see what field you're
         in just before navigating to some other issue.
         At that point (i.e., at the moment you "leave" the issue),
         the issue is recalculated on the basis of the last field
         you were in.  To force a recalculation without leaving the
         issue, Press RETURN and the issue will be recalculated
         based on your current field.


         Move Up or Down an Issue (Keypress Up-Arrow or Down-Arrow)
        ------------------------------------------------------------
   The issue currently being edited is the one with the highlighted cursor.
   The Up- and Down- Arrow keys allow you to "navigate" to a (vertically)
   adjacent issue.
      o To move your cursor one issue closer to the top of the screen,
        press the Up-Arrow key.
      o To move one issue towards the bottom of the screen,
        press the Down-Arrow key.
   If you're already at the top (or bottom) of the screen, then
   pressing Up- (or Down-) Arrow will "scroll" the screen one issue,
   with one new issue being brought into view (and one disappearing).


              Move Up or Down One Screen (Keypress U or D)
             ----------------------------------------------
   To navigate among issues more quickly, the D and U keys move down or
   up an entire screen's worth of issues (about 20) with one keystroke.
   Note: If you're moving up or down several screens trying to find
        a particular issue, you'll probably find the "Select" option
        from the Setup Menus considerably more convenient.
        To view that help screen now, first press / to get the Setup
        Menu help screen, and then press N to get the next screen
        after it (which is the Select help screen).


           Go To the Top or Bottom of a Window (Keypress < or > )
          --------------------------------------------------------
   At any point, you may go to the the very first or to the very last
   issue on your current window.
      o To go to the very first issue, press <
      o to go to the very last  issue, press >
   Note that these keys take you to the VERY first (or last) issue,
   in contrast with [ or ] which take you to the first (or last) issue
   that's currently VISIBLE on your screen.


           Go To the Top or Bottom of a Screen (Keypress [ or ])
          -------------------------------------------------------
   At any point, you may go to the first or last issue currently
   visible on your window.
      o To go to the first visible issue, press [
      o to go to the last  visible issue, press ]
   Note that these keys take you to the first (or last) VISIBLE issue,
   in contrast with < or > which take you to the VERY first (or last)
   issue on your screen.



   VI.3	BASIS MENUS AND THEIR FUNCTIONS

   Below is a brief summary of the actions that may be taken from
   various Basis menus.


                 Summary of Attention Commands (Keypress !)
                --------------------------------------------
   Various free-form commands may be entered at the "Attention prompt"
   for special purposes as follows:
      o From the Trader Screen or Relation Screen you may Mark a block
        of issues, then press the Attention key and enter "set=1234,P"
        where 1234 is any Security ID and P means to spread on price,
        or "set=usz9,Y" (Y for yield), or "set=base,B" (B for basis).
        All the marked issues will be spread from the issue you set.
      o From the Relation Screen you may place your cursor on any issue
        for which a relation already exists, then press the Attention key
        and enter "sub=1234", etc.  Every issue spread off the issue your
        cursor is on will be substituted with the issue you entered.
      o From any screen you may enter "message=anything you want to say".
        This text will be displayed on the message line of every other
        trader currently logged on to Basis.


                Hardcopy Basis Reports (Keypress Ctrl-R)
               ------------------------------------------
   Basis is capable of producing various hardcopy reports on demand:
      o Currently, the Input Sheet Report is the only available option.
   Any selected report is generated from the immediately current data,
   i.e., from exactly the same data currently displayed on your screens.
   For instance, the Input Sheet Report does not contain yesterday's
   closing prices, but rather the prices as they currently stand.


       Select Basis Issue (Keypress /  then "Next Setup" as needed)
      --------------------------------------------------------------
   You may select a Future for the primary Basis issue from your which
   other issues are spread.  That is, when "BASE" is typed on the Relation
   Screen, the issue selected here is taken as the "Bellweather" issue.

   Note that this menu really consists of two "sub-menus".  Select a Basis
   issue as follows:
      o First press the left and right arrow keys until the selection
        you want is highlighted.
      o Then press either the up or down arrow key once.  This will
        automatically take you to the next sub-menu.
      o Now press the left and right arrow keys again.  This time the
        highlight bar will move among the contract dates on the second
        sub-menu.  When the one you want is highlighted, press Return.


        Set Freeze Options (Keypress /  then "Next Setup" as needed)
       --------------------------------------------------------------
   "Freezing" provides communication control with the Server as follows:
      o "Output" freeze prevents any changes you make from being sent to
        the Server (immediately).  Instead, they are saved for possible
        transmission to the Server when you unfreeze later.
      o "Input" freeze prevents any Server changes received from affecting
        your prices (immediately).  Instead, they are saved and will all
        take effect if you unfreeze befor logging off Basis.
      o "Both" is a simultaneous combination of "Input" and "Output".
      o "Unfreeze" releases any saved input and/or output changes.  Any
        saved input changes are immediately displayed on your trader screen,
        and any saved output changes are immediately sent to the Server.
      o "Refresh" erases any saved "Output" changes and re-establishes the
        prices before the last "Input" freeze (i.e., undoes any "what-ifs").


       Window Sorting Options (Keypress /  then "Next Setup" as needed)
      ------------------------------------------------------------------
   You may choose among one of three orders in which Basis can re-display
   the issues on your current window:
      o Security_ID sorts issues strictly on their security id number,
        which is always displayed in the first (leftmost) column
        of every Basis window.
      o Type&Maturity sorts issues first by type (Bills are first,
        followed by Notes/Bonds, Agencies, Zeroes, and Futures),
        and within each type by maturity date (and coupon).
      o Maturity&Coupon sorts issues solely by maturity date, and by
        coupon within maturity (i.e., when several issues have the
        same maturity the lowest coupon will appear first).
   If no issues are marked then all issues in the window are sorted,
   but if a block of issues is marked then only those issues are
   sorted among themselves and the "surrounding" issues don't move.


          Find an Issue (Keypress /  then "Next Setup" as needed)
         ---------------------------------------------------------
   Using this option, Basis will find an issue on your current screen
   without requiring you to "hunt" for it "manually".
   There are two kinds of searches Basis will perform:
      o Selecting "Bills", "Notes", "Agencies", "Zeroes", or "Futures"
        will automatically move your window to the first Bill
        (or Note, etc.) that's anywhere in your current screen.
      o If you select "Explicit", Basis further prompts you for the
        security id of the issue you want to find.  Enter a four-digit
        id code, and Basis will move your window so that issue is on top.
        You may also enter a maturity date as mm/yy or a maturity and
        coupon as mm/yy,6.375 or an explicit three-digit line number.
      Note: If, for instance, you select "Bills" and there are no bills
        on your screen, or if you enter an Explicit id that's not on
        your screen, Basis simply leaves your screen unchanged.


       Set Settlement Date (Keypress /  then "Next Setup" as needed)
      ---------------------------------------------------------------
   The settlement date displayed on your Basis screens usually corresponds
   to the settlement date on the quote sheets.  If you want price/yield
   calculations to be based on some other settlement date, this menu allows
   you to select it by any of the following methods:
      o Explicit will prompt you to enter a date, and further calculations
        will be based on whatever date you enter.  Note that dates are
        expected in the form mm/dd/yy, e.g., 10/11/89 is Oct 11 1989.
        Basis automatically skips over the positions containing /'s,
        so just enter 101189.
      o Government settlement dates are two business days from "today".
      o Skip Day is one business day from "today".
      o Corporate is five business days from "today".


          Set Yield Method (Keypress /  then "Next Setup" as needed)
         ------------------------------------------------------------
   Note: The yield options on this menu are not yet implemented.
         Calculations are currently based on those provided by the original
         "poy calculator", and results from Basis are merely consistent
         with poy.  This corresponds to "True" yield.
#EJECT
                 ---------------------------------------------
                    PART THREE, SECTION XI: SYSTEM OVERVIEW
                 ---------------------------------------------


   XI.1	MAJOR COMPONENTS

	Basis consists of the following major components:

	     o	BASIS is the trader workstation process,
		controlling the generation and maintenance of screens
		and all interaction with the trader.
		It can communicate with the server, and with other traders
		through the server, but not with other traders directly.
		Each trader logs into an interactive VAX process,
		and runs a separate copy of BASIS.

	     o	BSERVER is the basis server process,
		which maintains a "master" memory-resident list of issues.
		Each trader quote is sent to the server via TCP/IP datagrams.
		The server updates its master list and sends a copy of
		the datagram to all other traders.
		Every 15 minutes, the master list is dumped to disk.
		The server runs as a detached VAX process.

	     o	BDUMPER dumps the server's memory-resident lists to disk.
		If no quotes have been received since the last dump,
		then a new dump is not performed.
		BDUMPER also dumps the 3PM and 5PM closing prices to disk.
		Whenever needed, the server spawns a DCL procedure that
		detaches (another procedure which runs) BDUMPER.

	     o	BSERVER_COMM formats and sends messages to the server,
		either under interactive control or directly from
		command-line arguments ("batch" mode).
		It's primarily run by various DCL procedures which
		need to send "directive" messages to the server.

	     o	Additionally, as suggested immediately above,
		a variety of DCL procedures are used to startup
		and shutdown Basis, and to coordinate various
		daily activities (primarily the 3PM and 5PM closings,
		and the 4:30AM import of quote data files from the Prime).
#DIAGRAM
-------------------------------------------------------------------------------
                        XI.2  BASIS SYSTEM BLOCK DIAGRAM
-------------------------------------------------------------------------------

                                                             +-RESUBMIT-+
     o-------o                                               v          |
     |TRADER |                                  o-------o   +-------+   |
     | SCREEN|                                  |MANAGER|   |DCL    |---+
     o-------o                                  | SCREEN|   |   PROC|<--+
         |                                      o-------o   +-------+   |
     +-------------+                                |           |       |
     |  B A S I S  |                               +-------------+      S
     |             |                               |   C O M M   |      P
     |P R O C E S S|<---------+                +---|P R O C E S S|      A
     +-------------+          |                |   +-------------+      W
       o    |   +----------+  |                |directives              N
            +-->|UNIVERSE  |  |                |to server               |
       o        | OF ISSUES|  |                |   +-------------+      |
                +----------+  |     TCP/IP     +-->| S E R V E R |------+
       o                      +------------------->|P R O C E S S|
     o-------o                +------------------->|             |
     |TRADER |                |                    +------S------+
     | SCREEN|                |             global...  |  P  |  ...section
     o-------o                |         +----------+   |  A  |   +----------+
         |                    |         |UNIVERSE  |<--+  W  +-->|3PM/5PM   |
     +-------------+          |         | OF ISSUES|      N      |  UNIVERSE|
     |  B A S I S  |<---------+         +----------+      |      +----------+
     |             |                        ^  |          v          |
     |P R O C E S S|                        |  |   +-------------+   |
     +-------------+                        |  +-->| D U M P E R |<--+
            |   +----------+        initial-|      |P R O C E S S|
            +-->|UNIVERSE  |         ization|      +-------------+
                | OF ISSUES|<-----------+   |             |
                +----------+            |   |     refresh/|
                                        |   |      closing|
                                    +-----------+         |
                                    | Q U O T E |<--------+
                                    |  D A T A  |------> TO PRIME (3:00PM,ETC)
                                    |  B A S E  |<------ FROM PRIME (4:30AM)
                                    +-----------+
#EJECT
-------------------------------------------------------------------------------
             XI.3A:  BASIS SOURCE FILENAMES AND BRIEF DESCRIPTIONS
-------------------------------------------------------------------------------

Note: All files listed below, except the "non-critical toolbox files", are
contained in the Basis directory, usually referenced by the logical BRUN:.
This document resides in file BSTRUCT.TXT.  Also, the runtime files QA.PRM,
etc, are located in the Basis data directory, referenced by the logical BDAT:.

--- DCL PROCEDURES ---          --- BRIEF DESCRIPTION ---
AUTOCLOSE.COM                   SUBMITS JOBS TO MAINTAIN 3PM,5PM DAILY CLOSINGS
BASS.COM                        ASSIGNS GROUP LOGICALS, ETC.
BCLOSER.COM                     SPAWNED BY BSERVER TO DUMP CLOSINGS TO DISK
BCLOSER_RUN.COM                 DETACHED BY BCLOSER.COM TO RUN BDUMPER.EXE
BCOMP.COM                       BASIS COMPILE (COMPLETE COMPILE)
BDUMPER.COM                     SPAWNED BY BSERVER TO DUMP TO DISK
BDUMPER_RUN.COM                 DETACHED BY BDUMPER.COM TO RUN BDUMPER.EXE
BLINK.COM                       BASIS LINK
BSERVER.COM                     PROCEDURE TO DETACH THE SERVER
BSERVER_RUN.COM                 DETACHED BY BSERVER.COM TO RUN THE SERVER
BSHUTDOWN.COM			BRINGS DOWN SERVER AND TRADER PROCESSES
BSTARTUP.COM                    RUNS BSERVER.COM AND SUBMITS THE QUEUES
CLINK.COM                       SERVER COMMUNICATIONS LINK
DLINK.COM                       DUMPER LINK
EXOSDEFS.COM			PROVIDED BY EXCELAN (SHOULD BE IN EXOS_ETC:)
EXPROC.COM			EXAMINES/MODIFIES PARTICULAR PROCESSES
FTPXFR.COM                      USES FTP TO TRANSFER Q?.PRM FILES TO THE PRIME
JOULOG.COM			JOURNALS LOGINS TO A TEXT FILE
LOGIN.COM			RUNS BASIS IN A CAPTIVE SESSION FOR TRADERS
MAKEQGET.COM			CREATES QGET.COM TO XFER PRIME->VAX FROM VAX
PRTRPT.COM			SPAWNED BY BASIS TO PRINT BATCH REPORTS
QREFRESH.COM                    "INSTALLS" NEW Q? FILES FROM THE PRIME
QRENAMER.COM                    USED BY QUPDATE TO RENAME Q?MMDDYY TO Q?YYMMDD
QUPDATE.COM                     CALLED BY QREFRESH TO COPY Q?YYMMDD TO Q?.PRM
SLINK.COM                       SERVER LINK
GLOBAL.OPT                      LINK OPTION FILE
POY.OPT				LINK OPTION FILE
RTLSHARE.OPT                    LINK OPTION FILE
SOCKET.OPT			LINK OPTION FILE
TOOLS.OPT			LINK OPTION FILE
UCOMP.COM			COMPILES AND LINKS UN-CRITICAL BASIS PROGRAMS

--- RUNTIME FILES ---           --- BRIEF DESCRIPTION ---
BASIS.HLP                       TEXT FOR HELP SCREENS
BASIS.PRV                       LISTS OF TRADERS AND THE ISSUES THEY'RE TRADING
tradername.PRF                  CONTEXT DATA FOR EACH TRADER (.PRF=PROFILE)
DATEFILE.DAT			INPUT FILE OF HOLIDAY DATES READ BY ISBUSDAY()
MESSAGE.TXT			IF IT EXISTS, IS DISPLAYED BY LOGIN.COM
QFILES.TOC                      LIST OF DATA FILES (INPUT TO QUPDATE.COM)
TRADERS.DAT			LIST OF ALLOWED TRADERS (INPUT TO LOGIN.COM)
QA.PRM                          AGENCY DATA
QB.PRM                          BILLS DATA
QF.PRM                          FUTURE DATA
QN.PRM                          NOTES AND BONDS DATA
QZ.PRM                          ZEROS DATA

--- HEADER FILES ---            --- BRIEF DESCRIPTION ---
BASIS.H                         MAIN BASIS HEADER
BDUMP.H                         MAIN DUMPER HEADER
BGLOBALS.H                      GLOBAL INFORMATION NOT PASSED BY ARGUMENTS
BILL.H*				USED BY BILLCALC.C FOR TREASURY BILLS
BPROTO.H                        FUNCTION PROTOTYPES (NOT USED)
BSERVER.H                       MAIN SERVER HEADER
COLORS.H*			TOOLBOX HEADER (SEE TOOLBOX SECTION BELOW)
KEYS.H                          KEYSTROKE-TO-FUNCTION MAPPING
MENUS.H                         MENU CONTROL AND LAYOUT STRUCTURES
MSGQUEUE.H                      WRAPAROUND BUFFER OF INCOMING TCP/IP MESSAGES
POY.H*                          DEFINES POY CALCULATOR RESULTS[] LAYOUT
QDESCRIP.H                      LAYOUT OF Q?.PRM FILES
RECALC.H			STRUCTURE FOR TRADER RECALCULATION OPTIONS
REPORTS.H			LAYOUT OF BASIS BATCH REPORTS (INPUT SHEET)
SCREENS.H                       LAYOUT OF SCREENS
SKTMSGDEF.H                     APPLICATION-LEVEL MESSAGE FORMATS
SKT_HEADER.H                    COMMUNICATION-LEVEL MESSAGE CONTROL INFORMATION
TIMRAST.H                       QUEUE OF TIMER REQUESTS
TOOLS.H*			MAIN TOOLBOX HEADER
TRADER.H                        BASIS TRADER STRUCTURE
TTCP.H                          PROVIDED BY EXCELAN WITH EXOS SOFTWARE
UNIVERSE.H                      ISSUE DATA STRUCTURE
WINDOWS.H                       WINDOW CONTROL STRUCTURE
* ASTERISKED FILES PROVIDED WITH TOOLBOX (OR POY CALCULATOR)

--- BASIS MAIN ENTRY POINTS---  --- BRIEF DESCRIPTION ---
BASIS.CREV2                     MAIN() BASIS PROCESS (INCLUDES BLOGO())
BSERVER.C                       MAIN() SERVER PROCESS
BDUMPER.C                       MAIN() DUMPER PROCESS (SPAWNED BY SERVER)
BSERVER_COMM.C                  MAIN() SERVER COMMUNICATION PROCESS

--- BASIS SOURCE FILES ---      --- BRIEF DESCRIPTION ---
ADMIN_OBJECT.C                  FORMAT/DISPLAY/EDIT ADMINISTRATOR SCREEN OBJECTS
AUTOD.C                         CONVERTS STRING IN 32NDS/8THS FORMAT TO DOUBLE
BABORT.C                        HANDLES ABORT DIRECTIVE SENT TO SERVER
BASIS_COMM.C                    OPENS/CLOSES TCP/IP SOCKET FOR BASIS MAIN()
BASIS_INIT.C                    HANDLES MOST OTHER BASIS MAIN() INITIALIZATION
BASIS_OBJECT.C                  FORMAT/DISPLAY/EDIT BASIS IN UPPER-RIGHT CORNER
BASIS_SWITCH.C                  RUNTIME STATE MACHINE FOR BASIS MAIN()
BCLOSE.C                        HANDLES CLOSE DIRECTIVE SENT TO SERVER
BINFO.C                         HANDLES INFORMATION MESSAGES SENT TO SERVER
BLOGOFF.C                       HANDLES LOGOFF MESSAGES SENT TO SERVER
BLOGON.C                        HANDLES LOGON MESSAGES SENT TO SERVER
BPRICE.C                        HANDLES PRICE UPDATE MESSAGES SENT TO SERVER
BRECALC.C                       HANDLES SERVER RECALCULATION FOR PRICE UPDATES
BREQPRICE.C                     HANDLES PRICE REQUEST MESSAGES SENT TO SERVER
BSCLOCK.C                       MAINTAINS BASIS "HEARTBEAT" AND DISPLAYS CLOCK
CHANGE_WINDOW.C                 RESIZE/REPOSITION A WINDOW (NOT USED, NOT DONE)
CLEAR_WINDOW.C                  CLEAR THE SCREEN AREA USED BY A WINDOW
CLOSE_WINDOW.C                  CLOSE A WINDOW, RESETTING WINDOW CONTROL INFO
COPY_WINDOW.C                   COPY OBJECTS FROM ONE WINDOW TO ANOTHER
CREATE_WINDOW.C                 ALLOCATE AND INITIALIZE A WINDOW
CRELNM.C			CREATES A (GROUP) LOGICAL NAME
CRESET.C			CREATES A GROUP LOGICAL FOR SETTLEMENT DATE
CRESKT.C                        CREATE A DATAGRAM SOCKET
CRMPSC.C                        CREATE AND MAP GLOBAL SECTION
DAYTIME.C                       TIME STAMP AND TIME IN 100THS SECONDS SINCE 12AM
DELETE_MARKS.C                  DELETE MARKED OBJECTS FROM A WINDOW
DELLNM.C			DELETE A (GROUP) LOGICAL NAME
DELSKT.C                        DELETE SOCKET CREATED BY CRESKT()
DEQUEUER.C                      DEQUEUE AND PROCESS INCOMING MESSAGES FOR BASIS
DETAIL_OBJECT.C                 FORMAT/DISPLAY DETAIL SCREEN OBJECTS
DISPLAY_HEADER.C                FORMAT/DISPLAY HEADERS (FOR ALL SCREEN TYPES)
DISPLAY_HELP.C                  DISPLAY HELP SCREENS (CAN BE CONTEXT SENSITIVE)
DISPLAY_ISSUE.C                 DISPLAY ALL VISIBLE OBJECTS FOR A GIVEN ISSUE
DISPLAY_MENU.C                  DISPLAY SCREEN MENUS AND RETURN CHOICE
DISPLAY_OBJECT.C                FORMAT/DISPLAY/EDIT OBJECTS FOR ALL SCREEN TYPES
DISPLAY_SETUP.C                 DISPLAY SETUP MENUS AND RETURN CHOICE
DISPLAY_WINDOW.C                DISPLAY HEADER AND ALL VISIBLE OBJECTS OF WINDOW
DTOAU.C                         CONVERTS DOUBLE TO STRING IN 32NDS/8THS FORMAT
EDARG_SETUP.C                   SETS UP AN EDTYPE STRUCTURE FOR TOOLBOX EDIT()
EDIT_OBJECT.C                   INTERFACE TO TOOLBOX EDIT()
EDIT_SETUP.C                    TABLE-DRIVEN EDARG SETUP FOR SCREEN OBJECTS
EDIT_VERIFY.C			CHECK TRADER DATA ENTRY FOR VALIDITY
FIND_SECID.C                    FINDS A SECURITY ID IN A WINDOW
FLTHANDLER.C			FLOATING POINT FAULT HANDLER FOR POY() CALLS
FMTSKT.C                        FORMATS CONTROL INFORMATION FOR TCP/IP SOCKET
GETMSG.C                        PROMPTS TRADER AND GETS A TEXT MESSAGE STRING
GETWLIST.C                      GETS ORDERED LIST OF CURRENTLY-VISIBLE WINDOWS
GET_FACTOR.C                    CALCULATES DELIVERY FACTOR
GET_INVIEW.C                    FINDS ALL VISIBLE OBJECTS DISPLAYING AN ISSUE
INIT_RELATIONS.C		INITIALIZE TRADER/SALESPERSON RELATIONSHIPS
ISBUSDAY.C                      DETERMINES WHETHER A DATE IS A BUSINESS DAY
ISPOY.C                         DETERMINES POY FLAG BASED ON LAST EDITED FIELD
ISSUE_LOOKUP.C			FIND AN ISSUE FROM COUPON/MATURITY DESCRIPTION
ISTRADING.C                     DETERMINES IF TRADER IS TRADING A GIVEN ISSUE
LOAD_WINDOW.C                   LOAD WINDOW WITH A LIST OF OBJECTS
MOVE_MARKS.C			MOVE MARKED OBJECTS ON A WINDOW
NAVIGATE_WINDOW.C               HANDLES WINDOW SCROLLING DURING DISPLAY/EDIT
OPEN_WINDOW.C                   OPEN A WINDOW
PROFILE_OBJECT.C                FORMAT/DISPLAY/EDIT PROFILE SCREEN OBJECT
PUTPRIV.C                       REWRITE THE PRIVILEGE FILE (BASIS.PRV)
PUTPROF.C                       REWRITE A TRADER'S PROFILE FILE
QCONVERT.C                      CONVERT DATA TO/FROM STRING FORMAT
QDUMP.C                         DUMP MEMORY-RESIDENT UNIVERSE TO Q?.PRM FILES
QLOAD.C                         LOAD Q?.PRM FILES TO MEMORY-RESIDENT UNIVERSE
QREPORTS.C			GENERATORS FOR BATCH REPORTS (INPUT SHEET)
QSORT.C                         BS_QSORT (REPLACES VAX QSORT WHICH HAS A BUG)
RDTOI.C                         ROUNDS A DOUBLE TO CLOSEST INTEGER
RECALC.C                        BASIS INTERFACE TO POY
RECVSKT.C                       ASYNCHRONOUSLY BUFFERS INCOMING TCP/IP MESSAGES
RECVSKTW.C                      SYNCHRONOUSLY READS AN INCOMING TCP/IP MESSAGE
RELATION_OBJECT.C               FORMAT/DISPLAY/EDIT A RELATION SCREEN OBJECT
REQPRICE.C			REQUESTS CURRENT INFORMATION FROM SERVER
RHOST.C                         PROVIDED BY EXCELAN
SCANFILE.C                      FRONT-END PARSER FOR PROFILE AND PRIVILEGE FILES
SCREEN_HEADERS.C                CONTAINS ALL ROUTINES TO FORMAT/DISPLAY HEADERS
SCROLL_WINDOW.C                 SCROLL A WINDOW
SEND3PM.C                       DOWNLOAD CLOSING PRICES TO SERVER
SENDINFO.C                      "PHONE"-LIKE UTILITY BETWEEN TRADERS
SENDPRICE.C                     SEND PACKED PRICE MESSAGE(S) TO SERVER
SENDSKTW.C                      SYNCRONOUSLY SEND A TCP/IP DATAGRAM
SETADMIN.C                      PARSES PRIVILEGE FILE FOR THE ADMINISTRATOR
SETPRIV.C                       PARSES PRIVILEGE FILE FOR "NORMAL" TRADERS
SETPROF.C                       PARSES THE PROFILE FILE (FOR TRADERS)
SETUP_MENU.C                    FORMATS/DISPLAYS/NAVIGATES SETUP MENUS
SETWLIST.C                      PUTS A WINDOW ON TOP OF THE CURRENT STACK
SETWTOP.C                       SCROLLS A WINDOW SO A SELECTED OBJECT IS ON TOP
SET_MARKS.C			REVERSE-VIDEOS/NORMALS ALL MARKED OBJECTS
SET_RELATION.C			SETS RELATION AND SPREAD BETWEEN ISSUE, BASIS
SET_WINDOW.C			SETS ALL MARKED OBJECTS IN A WINDOW
SLEEPMS.C                       SLEEPS FOR A GIVEN NUMBER OF MILLISECONDS
SORT_BASIS.C			FINAL LAYER OF COMPARISON ROUTINE FOR QSORT.
SORT_UNIVERSE.C                 SORTS THE UNIVERSE BY SECURITY ID
SORT_WINDOW.C                   SORTS A WINDOW BY SECID OR MATURITY DATE
SPAWN.C                         SPAWNS A COMMAND STRING
STRLIB.C                        VARIOUS STRING MANIPULATION FUNCTIONS
SUBST_WINDOW.C                  MAKES A GLOBAL SUBSTITUTION TO WINDOW OBJECTS
TERMSET.C			RESETS A TERMINAL (MAIN PROGRAM)
TIMRAST.C			LIKE TIMREFN() BUT INVOKES AN AST
TIMREFN.C                       SETS AN EVENT FLAG WHEN A GIVEN INTERVAL EXPIRES
TIMSPAWN.C			LIKE TIMREFN BUT SPAWNS A COMMAND
TRADER_OBJECT.C                 FORMAT/DISPLAY/EDIT TRADER SCREEN OBJECTS
TRNLNM.C			TRANSLATES A LOGICAL NAME
ULOOKUP.C                       FIND THE UNIVERSE INDEX WITH A SPECIFIED FIELD
UPDATE_ISSUE.C                  RECALCULATES A GIVEN ISSUE IF NECESSARY
UPDATE_MARKS.C                  INCREMENT/DECREMENT/RECALCULATE MARKED OBJECTS
UPDATE_PRICE.C                  PROCESS AN INCOMING PRICE MESSAGE
UPDATE_RELATIONS.C              FIND AND UPDATE THE RELATIONS OF A GIVEN ISSUE
UTIL.C                          PROVIDED BY EXCELAN
VMSMSG.C                        STRING DESCRIPTION OF A VMS ERROR CODE
WFLOR.C                         WAIT FOR ONE OF SEVERAL EVENT FLAGS
WHEREIS.C			LOCATES AN ISSUE IN A WINDOW
#EJECT
-------------------------------------------------------------------------------
            XI.3B:  CHASE TOOLBOX FILENAMES AND BRIEF DESCRIPTIONS
-------------------------------------------------------------------------------

--- CRITICAL POY FILES ---      --- BRIEF DESCRIPTION ---
BILLCALC.C			PROVIDED WITH POY FOR TREASURY BILL CALCULATION
CALCPOY.C			INTERFACE TO BILLCALC AND TPOY ROUTINES
NFACT.C				POY-PROVIDED DELIVERY FACTOR ROUTINE
TPOY.C				RECALCULATE PRICE (OR YIELD) OF AN ISSUE

--- CRITICAL TOOLBOX FILES ---  --- BRIEF DESCRIPTION OF CHANGES ---
TOOLS.H
COLORS.H
CANTALLC.C
CLEARBOX.C*			SLIGHTLY MORE EFFICIENT (HOPE TO IMPROVE MORE).
DATE.C
DATETIME.C
DOW.C				LOCAL COPY OF TOOLBOX FILE NEEDED BY BSERVER.C
DRAWBOX.C**			SIGNIFICANTLY MORE EFFICIENT.
EDIT2.C*			ENTRY POINT RENAMED TO EDIT().
FIELD.C
GETHELP.C**			SIGNIFICANTLY MODIFIED VERSION.
GETKEY1.C**			WAITS FOR KEYBOARD, TCP/IP, OR TIMER EVENT FLAG
LIB.C				"UNOFFICIAL" TOOLBOX CONVERSIONS FROM E.RESH
MDBL2.C
MEMSCR.C
MENU.C
MISC.C				LOCAL COPY OF TOOLBOX FILE NEEDED BY BSERVER.C
MODI2.C
MODS.C*				USES AUTOD() FOR CONVERSIONS.
MTGL2.C
PAINT.C
PDATES.C			"UNOFFICIAL" TOOLBOX DATE ROUTINES FROM E.RESH
PRTS.C
SCOLOR.C
SCROWL.C***			REPLACES SCROLL (SPEEDIER VERSION FOR 80 COLS).
SFS.C*				USES DTOAU() FOR CONVERSIONS.
SNUM.C
STR.C
TRIMLR.C
UTILS.C*			DASSGN()'S CHANNEL AT END-OF-JOB.
UTILS1.C

--- NONCRITICAL TOOLBOX ---     --- BRIEF DESCRIPTION ---
PICKLIST.C
SCROLL.C***
VIEW.C

NOTES:	-----------------------------------------------------------------------
     o	"Critical" toolbox functions are referenced by Basis, others are not.
     o	Local copies of all "critical" source files are in the Basis
	directory (usually pointed to by logical BRUN:).  These files were
	taken from the "beta test version" released by Jay Denkberg during
	December, 1988.  They differ somewhat from the "official" version
	released by Regina Welkner about June 15, 1989.  For the exact nature
	of any differences, one of these two people must be consulted.
     o	Every source file has been changed so that headers are #include-ed
	as "header.h" rather than < header.h > (with C$INCLUDE defined instead).
	This guarantees that the local copy of TOOLS.H, etc., is compiled
	rather than some uncontrolled version possibly in some other directory.
	-----------------------------------------------------------------------
     *	Files followed by an asterisk have been somewhat modified comapred
	to the "native" toolbox version supplied by Jay Denkberg.
    **	These files have been significantly modified in the Basis directory.
   ***	SCROLL.C has been replaced by SCROWL.C in the Basis directory.
	-----------------------------------------------------------------------
#EJECT
-------------------------------------------------------------------------------
            XI.3C:  NON-CRITICAL BASIS TEST PROGRAMS AND UTILITIES
-------------------------------------------------------------------------------

These programs either test various Basis subsystems external to the main
application, or perform some ancillary (e.g., housekeeping) function, etc.
Note that poy2.c requires linking with the "full" toolbox (i.e., the .OLB
object library), as does tbtest.  Also, xlate.c requires linking with
a version of getkey1 where the #define-ed symbol msglevel has been bumped
to 10.

Internal documentation for these programs is usually considerably less
complete than it is for source code directly required for Basis.
Since most of this code is quite short, lack of internal documentation
is probably not frequently a problem.  However, the series of echo test
programs is not easy to follow in its present form.  Neither is
timspawn_test, but it's much shorter.

--- SOURCE FILENAME ---         --- BRIEF DESCRIPTION ---
AUTOD_TEST.C			INTERACTIVE TEST OF AUTOD() AND DTOAU()
BACKUP.COM			COPIES SOME OR ALL BASIS FILES TO BACKUP DIR
BASIS.TOC			LIST OF ALL BASIS SOURCE FILENAMES
BASIS1.TOC			FIRST FIFTH OF BASIS.TOC
BASIS2.TOC			SECOND FIFTH
BASIS3.TOC			THIRD FIFTH
BASIS4.TOC			FOURTH FIFTH
BASIS5.TOC			FIFTH FIFTH
CAT.COM				CONCATANATES FILES FROM .TOC INTO AN ARCHIVE
ECHO.C				ASYNCHRONOUS TEST OF EXCELAN ROUTINES
ECHO.COM			DCL TO SPAWN ECHO() OR ECHOW()
ECHOW.C				SYNCHRONOUS TEST OF EXCELAN ROUTINES
ELINK.COM			LINKS ECHO() OR WCHOW()
ERRCHK.C			ROUTINE REQUIRED BY POY2()
EXOSDEFS.COM			PROVIDED BY EXCELAN (SHOULD BE IN EXOS_ETC:)
FLTHANDLER_TEST.C		INTERACTIVE TEST OF FLTHANDLER()
ISBUSDAY_TEST.C			INTERACTIVE TEST OF ISBUSDAY()
PLINK.COM			LINK FILE FOR POY2
POY2.C				POY CALCULATOR TO CHECK BASIS CALCULATIONS
POY2.H				HEADER FILE FOR POY2.C
QDIFF.C				ALLOWS DIFF-ING A COLUMN RANGE IN QUOTE FILES
QMERGE.C			ALLOWS MERGING MASTER AND UPDATE QUOTE FILES
QSORT_TEST.C			TEST OF QSORT (NOTE: DEC'S HAS A BUG)
SCANFILE_TEST.C			INTERACTIVE TEST OF SCANFILE()
SLEEPMS_TEST.C			INTERACTIVE TEST OF SLEEPMS()
TBTEST.C			SIMPLE TOOLBOX TEST
TIMRAST.C			LIKE TIMREFN() BUT INVOKES AN AST
TIMRAST_TEST.C			INTERACTIVE TEST OF TIMRAST()
TIMSPAWN.C			LIKE TIMREFN BUT SPAWNS A COMMAND
TIMSPAWN_RUN.COM		TEST PROCEDURE DETACHED BY TIMSPAWN_TEST.COM
TIMSPAWN_TEST.C			INTERACTIVE TEST OF TIMSPAWN()
TIMSPAWN_TEST.COM		DCL PROCEDURE SPAWNED BY TIMSPAWN_TEST.C
UNCAT.COM			DE-ARCHIVES AN ARCHIVE FILE CREATED BY CAT.COM
WFLOR_TEST.C			INTERACTIVE TEST OF WFLOR()
XLATE.C				TO SEE HOW GETKEY1() TRANSLATES KEYSTROKES
#DIAGRAM
-------------------------------------------------------------------------------
                          XI.4:  PRICE UPDATE DATA FLOW
-------------------------------------------------------------------------------

                                                             +-RESUBMIT-+
     o-------o                                               v          |
     |TRADER |(1)                               o-------o   +-------+   |
     | SCREEN|                                  |MANAGER|   |DCL    |---+
     o-------o                                  | SCREEN|   |   PROC|<--+
         |                                      o-------o   +-------+   |
     +-------------+                                |           |       |
     |  B A S I S  |                               +-------------+      S
     |             |                               |   C O M M   |      P
     |P R O C E S S|<---------+                +---|P R O C E S S|      A
     +-------------+          |(3)             |   +-------------+      W
       o    |   +----------+  |                |directives              N
            +-->|UNIVERSE  |  |                |to server               |
       o        | OF ISSUES|  |                |   +-------------+      |
                +----------+  |     TCP/IP     +-->| S E R V E R |------+
       o               (2)    +------------------->|P R O C E S S|
     o-------o                +------------------->|             |
     |TRADER |(7)             |                    +------S------+
     | SCREEN|                |             global...  |  P  |  ...section
     o-------o                |         +----------+   |  A  |   +----------+
         |                    |      (4)|UNIVERSE  |<--+  W  +-->|3PM/5PM   |
     +-------------+          |(5)      | OF ISSUES|      N      |  UNIVERSE|
     |  B A S I S  |<---------+         +----------+      |      +----------+
     |             |                        ^  |          v          |
     |P R O C E S S|                        |  |   +-------------+   |
     +-------------+   (6)                  |  +-->| D U M P E R |<--+
            |   +----------+        initial-|      |P R O C E S S|
            +-->|UNIVERSE  |         ization|      +-------------+
                | OF ISSUES|<-----------+   |             |  (8)
                +----------+            |   |     refresh/|
                                        |   |      closing|
                                    +-----------+         |
                                 (9)| Q U O T E |<--------+    (10)
                                    |  D A T A  |------> TO PRIME (3:00PM,ETC)
                                    |  B A S E  |<------ FROM PRIME (4:30AM)
                                    +-----------+

(1) Trader enters a price (or yield or spread) from his terminal.
(2) His (local) universe is updated (along with any related issues).
(3) The price and spread are sent to the Server.
(4) The Server's (global) universe is updated.
(5) The price and spread are sent to all other traders.
(6) Each trader's (local) universe is updated.
(7) If the issue is currently visible, the trader's screen is updated.
(8) Within 15 minutes, the Dumper process is spawned.
(9) The Quote Database files are rewritten.
(10) The Quote Database files are sent to the Prime for post-processing.
#DIAGRAM
          ----------------------------------------------------------
            BLOCK DIAGRAM OF MATRIX REPRICING FOR CORPORATE ISSUES
          ----------------------------------------------------------

     Below is a block diagram illustrating corporate repricing under Basis
                                      ---



                      SNA /                               SNA /          SNA /
                       /|/                                 /|/ (from IBM) /|/
                      /                                   /              /
               +----------+                        +----------+   +----------+
              / Repriced  |                       / Auxiliary |  /  Primary  |
             + issue data |                      + issue data | + issue data |
             |SECURITY.DAT|                      |SECURITY.AUX| |  SECURITY. |
             +------------+                      +------------+ +------------+
                    ^                              |                       |
                    |                              | -full or incremental- |
                    |                              |a)pre-sort using VAX   |
                    |                              |  sort for full updates|
                    |                              |b)merge using cmerge   |
                    |                              |  for incrementals     |
                    |                              V                       V
     +-----------------------------+            +-----------------------------+
     |  Reprice Secondary Issues   |            | $sort security. security.   |
     |             ---             |            | $cmerge -I -msecurity.      |
     |  $cpricer -ssecurity.       |            |            -supdatefilename |
     |           -xsecurity.aux    |            | $cmerge -X -msecurity.aux   |
     |           -rsecurity.dat    |            |            -supdatefilename |
     +-----------------------------+            +-----------------------------+
                 ^  ^  ^                           |                       |
                 |  |  |                           |        hand-enter new |
                 |  |  +---------------------------+      corporate leader |
                 |  |                                     data into qc.prm |
                 |  |                                                      |
                 |  |                       (next day)                     |
                 |  |                     +------------------+             V
                 |  |      +----------+   |                  |    +----------+
                 |  |     / repriced  |   |  +-----------+   |   /  Primary  |
                 |  |    +Primary data|   |  |  on-line  |   V  + issue data |
                 |  +----|   QC.PRM   |<-----|   BASIS   |<-----|   QC.PRM   |
                 |       +------------+      | repricing |      +------------+
                 |                           +-----------+
                 |                                 ^
                 |                                 |
          -------------------             -------------------
           |    leaders,   |               |  basis issues |  (no need for a
(maintained|    spreads    |               |   &  spreads  |   separate file
 by editor)|for secondaries|               | for primaries |   of categories
           |  LEADERS.DAT  |               |   DANNY.PRF   |   for primaries)
          -------------------             -------------------
#DIAGRAM
          ----------------------------------------------------------
                    BLOCK DIAGRAM OF QUOTE FILE DATA FLOW
          ----------------------------------------------------------

       Below is a block diagram illustrating the flow of quote file data
               (vertical layering represents different machines,
     horizontal layering represents different processes on the same machine)
                                      ---



         transfer>shlomo
         +--------------+
         |              |----------> Report Generation, Data Reader, etc.
 +------>|   Q?mmddyy   |
 |       |              |<---+
 |  +----| ? = A,B,N,Z, |    |
 |  |    |     F,I,O,3  |    |
 |  |    +--------------+    |
 |  |                        |
 |  |                        |
 |  |                (normal |
 |  |             data entry)|
 |  |                        |   +-----------+
 |  |                        +---|  PC QMAIN |
 |  |                            |           |
 |  |                        +---|data entry |
 |  |                        |   +-----------+
 |  |            (via Kermit |
 |  |          if Prime down)|
 |  |                        |           (every 15 minutes as necessary)
 |  |                        |         +----------------------------------+
 |  |                        |         |                                  |
 |  |         BXFR:          |         |                   BDAT:          |
 |  |    +--------------+    |         |              +--------------+    |
 |  |    |  from Prime  |    |   +-----------+        |  issue data  |    |
 |  +--->|   Q?yymmdd.  |    +---|   BASIS   |<---+---|    Q?.PRM    |<---+---+
 |       |              |    |   |    and    |    |   |              |        |
 |       |  data entry  |    |   |  BSERVER  |<---+   | closing data |        |
 +-------| Q?yymmdd.VAX |<---+   +-----------+        |  Q?.3PM,.5PM |<---+   |
 |       +--------------+              |              +--------------+    |   |
 |              |                      |                                  |   |
 |              |                      |    (at 3pm and 5pm closings)     |   |
 |              |                      +----------------------------------+   |
 |              |                                                             |
 |              |                (at 4:30am during refresh)                   |
 |              +-------------------------------------------------------------+
 |(to backup
 | machine)
 |            BXFR:
 |       +--------------+
 |       |              |
 |       |              |
 |       |              |
 |       | from primary |
 +------>| Q?yymmdd.VAX |
         +--------------+
#EJECT
                         B A S I S  C A L C U L A T I O N S
Legend: --------------------------------------------------------------------
	    Ind	= Indicative (input data from q?.prm)
	    Com	= Computed (output)
	    I&C	= Indicative and Computed (e.g., price and yield)
	    Bas	= Computed internally by Basis (e.g., spread=ask-bid)
	    Poy	= Currently computed by Poy (i.e., by the version I have)
	   Poy2	= Computed by Poy2 (but poy2() isn't yet in "callable" form)
	------------+----------+----------+----------+----------+----------+
                    |   BILLS  |   NOTES  | AGENCIES |   ZEROS  |  FUTURES |
	------------+----------+----------+----------+----------+----------+
                    |          |          |          |          |          |
     (Ask) "Price"  |  I&C/??? |  I&C/Poy |  I&C/Poy |  I&C/??? |  I&C/??? |
                    |          |          |          |          |          |
               Chg  |  I&C/Bas |  I&C/Bas |  I&C/Bas |  I&C/Bas |  I&C/Bas |
                    |          |          |          |          |          |
      Yield:  True  |  I&C/??? |  I&C/Poy |  I&C/Poy |  I&C/??? |   ---    |
               SIA  |    C/??? |    C/??? |    C/??? |    C/??? |          |
            Monroe  |    C/??? |    C/??? |    C/??? |    C/??? |          |
                    |          |          |          |          |          |
      (B-A) Spread  |  I&C/Bas |  I&C/Bas |    C/Bas |  I&C/Bas |  I&C/Bas |
                    |          |          |          |          |          |
       Accrued Int  |          |    C/Poy |    C/Poy |          |          |
                    |          |          |          |          |          |
      Adjusted Dur  |          |    C/Poy |    C/Poy |          |          |
                    |          |          |          |          |          |
            Val 01  |          |    C/Poy |    C/Poy |          |          |
                    |          |          |          |          |          |
            Val 32  |          |  I&C/Poy |    C/Poy |          |          |
                    |          |          |          |          |          |
         Convexity  |          |          |          |          |          |
                    |          |          |          |          |          |
	------------+----------+----------+----------+----------+----------+
                    |          |          |          |          |          |
#DIAGRAM
-------------------------------------------------------------------------------
          XI.5:  HIGH-LEVEL PROGRAM FLOW DURING INTERACTIVE DATA ENTRY
-------------------------------------------------------------------------------

                                                      +-----------------+
                        +-----------------+           |   BASIS_INIT    |
                        |      BASIS      |-----------|   BASIS_COMM    |
                 +----> +--------+--------+           |      exit       |
        (Logoff  |               |                    +-----------------+
         request)|               |
                 |               |                    +-----------------+
             +--------> +--------+--------+           | DISPLAY_WINDOW  |
             |   |      |   BASIS_SWITCH  |-----------|  DISPLAY_MENU   |
             |L  +----- +--------+--------+           |      etc        |
             |o                  |                    +-----------------+
             |o                  |
       (Other|p  +----> +--------+--------+           +-----------------+
        key) |   |      | NAVIGATE_WINDOW |-----------|  SCROLL_WINDOW  |
             +--------- +--------+--------+           +-----------------+
                 |L              |
                 |o              |                    +-----------------+
       (Down or  |o     +--------+--------+           |     RECALC      |
        Up key)  |p     | DISPLAY_OBJECT  |-----------|UPDATE_RELATIONS |
                 +----- +--------+--------+           |    SENDPRICE    |
                                 |                    +-----------------+
                                 |
               +-----------------+----------------+   +-----------------+
               |  TRADER_OBJECT    BASIS_OBJECT   |   |   EDIT_SETUP    |
               |  RELATION_OBJECT  DETAIL_OBJECT  |---|   EDARG_SETUP   |
               |  PROFILE_OBJECT   ADMIN_OBJECT   |   |                 |
               +-----------------+----------------+   +-----------------+
                                 |
                                 |
                 +----> +--------+--------+
                 |      |   EDIT_OBJECT   |
                 |L     +--------+--------+
                 |o              |
       (Tab or   |o              |
        Backtab  |p     +--------+--------+
        keypress)|      |  EDIT (toolbox) |
                 +----- +-----------------+
                                 |
                    +----------> |                    +-----------------+
                    |L  +--------+--------+           | DONE_KEYS (in   |
          (Any legal|o  | toolbox routines|-----------| EDARG_SETUP) is |
           editing  |o  +--------+--------+           | "e_keys" routine|
           keypress)|p           |                    +-----------------+
                    +------------o

     Note: Each routine processes keypresses it recognizes,
           and returns the first unrecognized keypress to its caller.
           EDIT_OBJECT processes "horizontal navigation" between
           different fields of the same object (e.g., price, yield, spread).
           NAVIGATE_WINDOW processes "vertical navigation" moving up or
           down between objects a row or a page at a time (it also
           processes "mark" and "clear" requests, and some others).
           BASIS_SWITCH processes all other keypresses (e.g., brings up
           a menu).
#EJECT
   XI.6 BREAKOUT OF PRIMARY HIGH-LEVEL INTERACTIVE FLOW

	Below are diagrams illustrating the flow from NAVIGATE_WINDOW
	through EDIT_OBJECT in somewhat greater detail than given above.
	However, it's still only the main features of each function
	that are discussed.

	Completely understanding the routines requires following
	the source code in detail.  These diagrams are only a guide
	allowing you to concentrate on the primary flow without
	getting accidentally sidetracked into functions which,
	though important, are not along the "critical path".

	Note that this flow represents, more or less, the items labelled
	(1), (2), and (3) in the Price Update Data Flow Diagram that
	comprises Section XI.4.
#DIAGRAM
-------------------------------------------------------------------------------
           HIGH-LEVEL FLOW AND STRUCTURE CHART FOR NAVIGATE_WINDOW
-------------------------------------------------------------------------------

CALLED BY:          CALLS:
    BASIS_SWITCH()      DISPLAY_OBJECT() or GETKEY1() [primary flow]
                        SCROLL_WINDOW() [as required by navigation keystrokes]
                        UPDATE_MARKS(), DISPLAY_WINDOW() [secondary]


                                +-----------------+
                                | NAVIGATE_WINDOW |
                                +--------+--------+
                                         |
    +----------------------------------> |
    |                                    |
    |                                    |
    |                       is current object protected?
    |                          <--yes    |    no-->
    |                    +---------------+---------------+
    |                    |                               |
    |               +----+----+                  +-------+--------+
    |               | GETKEY1 |                  | DISPLAY_OBJECT |
    |               +----+----+                  +-------+--------+
    |                    |                               |
    |                    |(returns a keypress either way)|
    |                    +---------------+---------------+
  (reset                                 |
   window                                |
   parameters)                           |
    |                           switch ( keypress )
    |                                    |
    |     navigation key                 |   "mark" key              other
    |          +-------------------------+-----+-----------------------+
    |          |                               |                       |
    |          |                               |                       |
    |          |                      +--------+--------+              |
    |          | (if needed)          |   (as needed)   |              |
    |  +-------+-------+      +-------+------+  +-------+--------+     |
    |  | SCROLL_WINDOW |      | UPDATE_MARKS |  | DISPLAY_WINDOW |     |
    |  +-------+-------+      +-------+------+  +-------+--------+     |
    |          |                      |                 |              |
    |          |                      |                 |              |
    +----------+-----------<----------+-------<---------+              |
                                                                       |
                                                                       |
                                                                       |
                                         +-----------------------------+
                                         |
                                         |
                  (return unrecognized keypress to BASIS_SWITCH)
                                         o
#DIAGRAM
-------------------------------------------------------------------------------
           HIGH-LEVEL FLOW AND STRUCTURE CHART FOR DISPLAY_OBJECT
-------------------------------------------------------------------------------

CALLED BY:          CALLS:
    NAVIGATE_WINDOW()   UPDATE_RELATIONS(), DISPLAY_ISSUE() [may be recursive]
    DISPLAY_WINDOW()    ISPOY(), RECALC() [setup for poy]
    DISPLAY_ISSUE()     SENDPRICE() [to server]
    SCROLL_WINDOW()     UPDATE_ISSUE(), THDRNAME(), ISTRADING() [secondary]
                        TRADER_OBJECT() or BASIS_OBJECT() [primary flow]
                        or DETAIL_OBJECT() or RELATION_OBJECT()
                        or PROFILE_OBJECT() or ADMIN_OBJECT()

                                +----------------+ (Note: despite its name,
                                | DISPLAY_OBJECT |  objects are also edited
                                +--------+-------+  below this entry point.)
                                         |
                           (make sure object is current,
                    calling ISPOY-->UPDATE_ISSUE if necessary)
                                         |
                                         | (depending on object type call one)
                       +-----------------+----------------+
                       |  TRADER_OBJECT    BASIS_OBJECT   |
                       |  RELATION_OBJECT  DETAIL_OBJECT  |
                       |  PROFILE_OBJECT   ADMIN_OBJECT   |
                       +-----------------+----------------+
                                         | (return with final keypress)
                                         |
                                was object edited?
                               <--yes    |    no-->
                      +------------------+------------------+
                      |                                     |
                      | (recalc object on price or yield)   |
            +---------+--------+                            |
            | ISPOY --> RECALC |                            |
            +---------+--------+                            |
                      |                                     |
         (check for negative yield)                         |
                      |                                     |
                      | (send price/spread to server)       |
         +------------+------------+                        |
         | ISTRADING --> SENDPRICE |                        |
         +------------+------------+                        |
                      |                                     |
                      | (update related objects)            |
            +---------+--------+                            |
            | UPDATE_RELATIONS |                            |
            +---------+--------+                            |
                      |                                     |
                      | (re-display)                        |
            +---------+--------+                            |
            |  DISPLAY_ISSUE   |                            |
            +---------+--------+                            |
                      |                                     |
                      +------------------+------------------+
                                         |
                                         |
                         (return final keypress to caller)
                                         o
#DIAGRAM
-------------------------------------------------------------------------------
           HIGH-LEVEL FLOW AND STRUCTURE CHART FOR TRADER_OBJECT
-------------------------------------------------------------------------------

CALLED BY:          CALLS:
    DISPLAY_OBJECT()    EDIT_SETUP(), EDARG_SETUP(),
                        EDIT_OBJECT() [primary flow]
                        BHDRNAME() [secondary]

                                +---------------+
                                | TRADER_OBJECT |
                                +-------+-------+
                                        |
                                        | (use tables in screens.h to drive
                                        |  construction of "vanilla" EDTYPE
                                        |  arguments for toolbox edit() call)
                                +---------------+
                                |   EDIT_SETUP  |
                                +-------+-------+
                                        |
                                        |
                      +-----------------+----------------+
                      | internal logic and edarg_setup() |
                      | calls to construct "non-vanilla" |
                      | EDTYPE fields specific to trader |
                      | window objects                   |
                      +-----------------+----------------+
                                        |
                                        | (interface to toolbox edit())
                                +---------------+
                                |  EDIT_OBJECT  |
                                +-------+-------+
                                        |
                                        |
                   (return final keypress to DISPLAY_OBJECT())
                                        o


        Note: The other ?_OBJECT() functions (specifically BASIS_OBJECT(),
        RELATION_OBJECT(), DETAIL_OBJECT(), PROFILE_OBJECT(), and
        ADMIN_OBJECT()) all involve a similar high-level conceptual design.
        DETAIL_OBJECT() and PROFILE_OBJECT() are the most trivial;
        RELATION_OBJECT() and ADMIN_OBJECT() involve considerable internal
        logic to handle user interaction; and BASIS_OBJECT() is a complete
        kludge since the "object" its dealing with is not really in a window.
#DIAGRAM
-------------------------------------------------------------------------------
             HIGH-LEVEL FLOW AND STRUCTURE CHART FOR EDIT_OBJECT
-------------------------------------------------------------------------------

CALLED BY:          CALLS:
    TRADER_OBJECT()     EDIT() [primary flow to toolbox]
    RELATION_OBJECT()
    ADMIN_OBJECT()
    PROFILE_OBJECT()
    DETAIL_OBJECT()

                              +---------------+
                              |  EDIT_OBJECT  |
                              +-------+-------+
                                      |
                                      | (first call in DISP_ONLY mode
                                      |  to display the entire object)
                              +---------------+
                              |      EDIT     |
                              +-------+-------+
                                      |            yes-->
                            is object protected? ----------------------------+
                                      |                                      |
                                      |no                                    |
                                      |                                      |
              (determine most-recently edited unprotected field)             |
                                      |                                      |
    +-------------------------------> |                                      |
    |                                 |                                      |
    |             (save current value in unprotected field)                  |
    |                                 |                                      |
    |                                 |                                      |
    |                                 | (in DISP_EDIT mode for current field)|
    |                         +---------------+                              |
    |                         |      EDIT     |                              |
    |                         +-------+-------+                              |
    |                                 | (return with final keypress)         |
    |                                 |                                      |
    |                                 |                                      |
    |           (if field changed set ichanged to field number)              |
    |                                 |                                      |
    |                                 |                                      |
    |                        switch ( keypress )                             |
    |                                 |                                      |
    |             navigation key      |          other                       |
    |                    +------<-----+----->------+                         |
    |                    |                         |              (set "final|
    |       (determine next or previous            |               keypress" |
    |            unprotected field)                |               to a null)|
    |                    |                         |                         |
    +-------------<------+                         +------>-----+-----<------+
                                                                |
                                                                |
                                              (return final keypress to caller)
                                                                o
#DIAGRAM
-------------------------------------------------------------------------------
        XI.7:  HIGH-LEVEL PROGRAM FLOW DURING TCP/IP SERVER PRICE UPDATE
-------------------------------------------------------------------------------


      +-----------------+
      |   BASIS_COMM    |
      +--------+--------+
               |(arm ast)
    (rearm ast)|
   +---------> |
   |  +--------+--------+    (set event flag)    +-----------------+
   |  |     RECVSKT     | ---------------------> |     GETKEY1     |
   |  +-----+-----+-----+                        +--------+--------+
   |        |     |                                       |
   |        |     |        o----------------o          woke up on
   +--------+     +------->|  wrap-around   |-------+  queue flag?
                           | message queue  |       |     |
                           o----------------o       |     |yes
                                                    v     |
                                                 +--------+--------+
                                                 |     DEQUEUER    |
                                                 +--------+--------+
                                                          |
                                               is this a price message?
                                                          |
                                                 <-- yes  |  no -->
                                    +---------------------+----------+
                                    |                                |
                           +--------+--------+              +--------+--------+
                           |  UPDATE_PRICE   |              |       etc       |
                           +--------+--------+              +-----------------+
                                    |
                                    |
               +--------------------+--------------------+
               |                    |                    |
      +--------+--------+           |                    |
      |      RECALC     |  +--------+--------+           |
      +-----------------+  | UPDATE_RELATIONS|  +--------+--------+
                           +-----------------+  |  DISPLAY_ISSUE  |
                                                +-----------------+
#EJECT
   XI.8 BREAKOUT OF PRIMARY HIGH-LEVEL PRICE UPDATE FLOW

	Below are diagrams illustrating the flow from RECVSKT through
	UPDATE_PRICE in somewhat greater detail than given above.
	However, it's still only the main features of each function
	that are discussed.

	Completely understanding the routines requires following
	the source code in detail.  These diagrams are only a guide
	allowing you to concentrate on the primary flow without
	getting accidentally sidetracked into functions which,
	though important, are not along the "critical path".

	Note that this flow represents, more or less, the items labelled
	(5), (6), and (7) in the Price Update Data Flow Diagram that
	comprises Section XI.4.
#DIAGRAM
-------------------------------------------------------------------------------
                HIGH-LEVEL FLOW AND STRUCTURE CHART FOR GETKEY1
-------------------------------------------------------------------------------

CALLED BY:          CALLS:
    NAVIGATE_WINDOW()	MAP_ESCAPE() [toolbox]
    toolbox routines	DEQUEUER()
			UPDATE_PRICE()
			SENDPRICE()
			BSCLOCK()

                           +-----------------+
                           |     GETKEY1     |
                           +--------+--------+
                                    |
                          (issue qio for a char,
                   setting keystroke efn when complete)
                                    |
  +-------------------------------> | <-------------------------------+
  |                                 |                                 |
  |              (wait for timer, datagram, or keystroke              |
  |                             event flag)                           |
  |                                 |                                 |
  |            +--------------------+--------------------+            |
  |            |timer               |keystroke           |datagram    |
  |   +--------+--------+           |                    |            |
  |   |     BSCLOCK     |  +--------+--------+           |            |
  |   +--------+--------+  |   MAP_ESCAPE    |  +--------+--------+   |
  |            |           +--------+--------+  |    DEQUEUER     |---+
  |   +--------+--------+           |           +-----------------+
  |   |   UPDATE_PRICE  |           |
  |   +--------+--------+           |
  |            |                    |
  |   +--------+--------+           |
  +---|    SENDPRICE    |           |
      +-----------------+           |
                                    |
                       (return keystroke to caller)
                                    o

	Note:	The timer efn is set every 2 seconds by BSCLOCK() (actually
		by TIMREFN() called from within it).  UPDATE_PRICE() then
		returns any reversed-videod lines to normal video, and
		SENDPRICE() transmits any partially-filled buffers.
#DIAGRAM
-------------------------------------------------------------------------------
               HIGH-LEVEL FLOW AND STRUCTURE CHART FOR DEQUEUER
-------------------------------------------------------------------------------

CALLED BY:          CALLS:
    GETKEY1()		UPDATE_PRICE() [primary flow]
    			SEND3PM() [for "forced" closings]


                            +-----------------+
                            |     DEQUEUER    |
                            +--------+--------+
                                     |
       +---------------------------> | <-----------------------------+
       |                             |                               |
       |                     any more messages       no-->           |
       |                   waiting to be dequeued? --------+         |
       |                             |                     |         |
       |                             |yes           return #messages |
       |                             |                  dequeued     |
       |                  switch ( message opcode )        o         |
       |                             |                               |
       |        price                |logoff            other        |
       |          +------------------+------------------+            |
       |          |                  |                  |            |
       |   +--------+--------+       |                  |            |
       +---|   UPDATE_PRICE  |   return -99             |            |
           +-----------------+       o         +--------+--------+   |
                                               |       etc       |---+
                                               +-----------------+
#DIAGRAM
-------------------------------------------------------------------------------
            HIGH-LEVEL FLOW AND STRUCTURE CHART FOR UPDATE_PRICE
-------------------------------------------------------------------------------

CALLED BY:          CALLS:
    DEQUEUER()		ULOOKUP()
			RECALC()
			UPDATE_RELATIONS()
			DISPLAY_ISSUE()


                           +-----------------+
                           |   UPDATE_PRICE  |
                           +--------+--------+
                                    |
                                check for...
               normal call          |         ...special cases
                   +----------------+----------------+
                   |                                 |
                   |                       (if input freeze is on
                   |           store incoming secids/prices/spreads internally)
                   |                                 |
                   |                (if called to "thaw" frozen messages
                   |                               do so)
                   |                                 |
                   |                               return
                   +----------------+                o
                                    |
                        (loop over all price updates
                      packed into the datagram message
                           and do the following...)
                                    |
                           +--------+--------+ (find security
                           |     ULOOKUP     |  in our universe)
                           +--------+--------+
                                    |
                           +--------+--------+ (recalculate
                           |      RECALC     |  it with poy)
                           +--------+--------+
                                    |
                           +--------+--------+ (and any issue
                           | UPDATE_RELATIONS|  related to it)
                           +--------+--------+
                                    |
                           +--------+--------+ (display all
                           |  DISPLAY_ISSUE  |  visible occurrences
                           +--------+--------+  in reverse-video)
                                    |
                          (save time of update
                     to reset normal video in 2 secs)
                                    |
                                 (return)
                                    o
#DIAGRAM
-------------------------------------------------------------------------------
       XI.9:  HIGH-LEVEL PROGRAM FLOW SHOWING POTENTIALLY RECURSIVE PATHS
-------------------------------------------------------------------------------

                              (interactive    (server
                                 updates)     updates)
                         +---------------+   +---------------+
                         |NAVIGATE_WINDOW|   |    DEQUEUER   |
                         +------------+--+   +--+------------+
                                      |         |
                                      |         |
     +-------+                        |         |
     |       |                        |         |
     |       v                        v         v
     |   +-------------------------------+   +-------------------------------+
     |   |         DISPLAY_OBJECT        |   |          UPDATE_PRICE         |
     |   +---+-----+------------------+--+   +--+------------------+-----+---+
     |       |     |                  |         |                  |     |
     |       |    +-+                 |         |                 +-+    |
     |       |    |R|     +-------+   |         |                 |R|    |
     |       |    +-+     |       |   |         |                 +-+    |
     |       |            |       v   v         v                        |
     |       |            |   +-------------------------+                |
     |       |            |   |     UPDATE_RELATIONS    |                |
     |       |            |   +---+--------+--------+---+                |
     |       |            |       |        |        |                    |
     |       |            +-------+        |       +-+                   |
     |       |                             |       |R|                   |
     |       |                             |       +-+                   |
     |       v                             v                             v
     |   +-------------------------------------------------------------------+
     |   |                            DISPLAY_ISSUE                          |
     |   +---+-----------------------------+---------------------------------+
     |       |                             |
     |       |                             v
     +-------+                       +-----------+
                                     |GET_INVIEW |
                                     +-----------+



                                     +-+
                                     |R|---+
                                     +-+   |
                                           v
                     +------------------------------------------+
                     |                  RECALC                  |
                     +---------------------+--------------------+
                                           |
                  notes/agencies           |               others
                        +------------------+-----------------+
                        |                                    |
                        v                                    v
                  +-----------+                        +-----------+
                  |    POY    |                        |    n/a    |
                  +-----------+                        +-----------+
#COMMENT End-of-File

Copyright © 1989-2000, John Forkosh Associates, Inc.   All rights reserved.
email: john@forkosh.com