Sample Software SpecificationsAugust, 2000by Uriel Wittenberg (uw@urielw.com)
I here present EA$YBOND as a rare example of a software system that was done the right way -- and that, as a result, cost 10% or less of what equivalent software costs under the conventional approach. Care was taken in producing a thorough specifications document (shown below) as step #1 of the project. Planning before building should not in principle be a radical approach -- it was preached in my first-year Computer Science classes -- but in two decades of corporate work, Ive rarely seen it happen. Specifications (also called systems analysis) is a task often done by non-technically-oriented people who feel perfectly capable of producing an English document. However, specs require precision. In the specs below, just about everything about interface and functionality was exactly specified. The specs also reflect a striving to find common underlying general rules and to simplify and conceptually streamline the information and the user interface. In addition, the specs constituted the contract between the Contractor -- myself -- and Footprint Software, the Toronto software house that engaged me for the task. My fixed fee for the subsequent software development phase was based on the specs. I spent 7 weeks developing the specs, then a further 6 months developing the software (in Foxpro v. 2.5, a programming platform for IBM PC systems). Apart from a couple of minor items, no further information beyond the specs document was needed during the programming phase of the project. After delivery of the software, on schedule, the application was marketed by Footprint to Canadian banks and trust companies, who have used it successfully to administer their annual Canada Savings Bonds campaigns. Most of the spec development effort involved clarifying and resolving many ambiguities about exactly how the system was required to function. In the process, I would pose questions and elicit information from several subject matter experts and produce a series of increasingly refined drafts for them to review. Completion of the specs phase occurred when the experts signed off on the final version given here. [Note: the specs below were converted from MS Word format.]
EA$YBOND SpecificationsApril 27, 1993by Uriel Wittenberg
Contents
IntroductionThis document represents a Contractor-approved specification of EA$YBOND which is to constitute the basis for programming the system. This document is comprehensive in that it indicates:
The Contractor is generally responsible for the accuracy of the file specifications section of this document, except that: any omissions that are inconsistent with documented system functionality are the responsibility of Uriel, not of the Contractor, and will be corrected free of charge. Note that alteration of specifications after programming begins could lead to substantial consulting fee increases.
Reference DocumentsThe spec is based on the following documents, although this document supersedes all others:
References herein are given as e.g. "PARTEX 20" (indicating a reference to page 20 of the PARTEX document).
Symbols Used In This DocumentCertain symbols preceding file field descriptions below have the following meanings:
In the context of screen input/display fields, symbols have the following meanings:
Validation checks are shown in square brackets.
Format SpecificationFormat descriptors sometimes precede the text description of the field. "A", meaning "alphanumeric", is actually restricted to the set of all printable characters in the ASCII range 0 to 127 other than "a" to "z" (lowercase letters). Examples of format descriptors are:
TerminologyProcessing Date: Effective date of all session transactions. See Login section. An order herein refers to what in PARTEX is a transaction; that is, an individual S1 or S12 form. An R-bond order is an application, while a C-bond order is an advice. Form numbers generally are numbers that are (typically) pre-printed on forms, namely the S1, S12, S23 and S11 forms. An order form number is the form number appearing on S1 and S12 forms. Order form numbers are not necessarily unique. An order ID uniquely represents an order within a given LAN. An order ID has the form <order form number>[-<clone number>] (where the bracketed portion is optional). Requisition and Central Branch Batch mean the same thing. A Central Branch Batch contains one or more Branch Batches of applications. A Branch Batch is a group of orders corresponding to one S23 form. The Sales Agent associated with an order is the entity making the sale: either a bank branch or a Broker. The Processing Agent associated with an order being processed at a particular installation of EA$YBOND is one of the branches of the bank associated with that installation. A CSB ID is a unique code assigned by the Bank of Canada to bank branches and to brokers. For branches, it consists of a 5-digit branch number followed by the 4-digit institution number. EA$YBOND uses format A9 because broker CSB ID's may not be all digits. Branch Number is a 5-digit number uniquely representing a branch within an institution. Transit Number means the same thing as "Branch Number". The latter term is used.
General NotesAll EA$YBOND files (software, import/export files, etc.) local to a particular workstation are stored in the same directory. EA$YBOND may be used on multiple LAN's within an institution. The system has no features for communication between LAN's. Each LAN in a given institution should be assigned a unique LAN ID. This is used as a prefix to generate requisition numbers that are unique within the central branch, as required by Partex (PARTEX 72), even if different LAN's produce requisitions for the same central branch. This sys has its own code for "logging on" users. There are 3 privilege levels: Userid SYS (for system personnel), Userid MGR (for site manager), and all others. SYS can do anything MGR can do, and MGR can do anything users other than SYS can do. SYS's password is the same at all sites, so maintenance personnel can readily access all functions at any site. All functions documented here can be performed by any user, unless otherwise indicated. Protection against hackers is not a requirement of this system. Branch numbers are assumed to be unique within the institution. Region codes are not assumed unique within the institution (only within the district). No pretty page breaks. (I.e. let fall where might.) When output files are created (for printing or other purposes), straightforward ASCII basically. Design aims to make screen forms similar to paper forms; where fields not needed for input, they are nevertheless presented with unmodifiable text in order to maintain similarity. Hierarchy (hi to low): S11 --> S23 --> S12 or S23 --> S1. I.e., if the orders corr to a given S23 are S12's, then the S23 is associated with exactly one S11; otherwise it is not associated with any S11. One S11 may be associated with many S23's. For a given order, the processing agent's institution is the same as that of the sales agent if and only if the latter is not a broker. S11 form numbers in EA$YBOND uniquely identify S11's. S11's are always entered online (never imported). In case duplicate form numbers arise, the user must invent a substitute number and use that number to enter the S11. Other forms (S23, S1, S12) do not have unique form numbers in EA$YBOND. For these, Form ID's (see Form ID's section) are used for a unique representation. In general, S11's, S23's, S1's and S12's entered online cannot be saved unless all validation checks are passed. In general, when S11's, S23's, S1's or S12's are being modified, the system presents previous entries as defaults. CSB ID's are always validated: If the institution number portion matches the user's institution number, then the branch number portion must be found in BRANCHES.DBF; otherwise, the CSB ID must be found in SALEAGNT.DBF. In general, items appearing in imported data are not validated unless they are needed by EA$YBOND. EA$YBOND does not have any features relating to Bond Inventory. EA$YBOND does not have separate facilities for correcting rejected batches or rejected import files. EA$YBOND does not have any features relating to "salesmen". EA$YBOND is not intended for direct use by brokers. EA$YBOND does not deal with "pre-prints". On S12's, must always enter individual employee addresses. (No option to use employer's.) Denominations not entered on S11. EA$YBOND does not deal with "M-records".
Common Field FormatsCertain formats appearing in multiple locations (either on reports, in output files, or in system databases) are given here:
File Naming Conventions
Form ID'sForm ID's are used for forms (S23, S1, S12) whose form numbers are not unique in EA$YBOND. Clone numbers for these forms are generated sequentially by EA$YBOND within any given form number in order that Form ID's be unique. Note that, in addition, there is no overlap between S1 ID's and S12 ID's. The system assigns clone numbers when a form enters the system, either via online entry or import. When a particular form number is input for the first time, it is assigned clone number 0. Each successive entry of the same form number has a clone number that is one higher. A form is represented as <form number>[-<clone number>] , where the bracketed portion is optional. Omission of the clone number (by the user, when specifying, or by the system on reports) indicates the clone number is 0. While non-0 clone numbers are not errors for orders, they do represent an error condition in the case of S23's. In general, detectable errors cannot be entered via online input; however, such erroneous S23's could enter EA$YBOND via import. In such cases, all underlying orders are also marked as having error status. The system warns whenever it generates a non-0 clone number. The warning is issued when an order form is saved, during online input, or via a report pertaining to a particular import. This enables users to handwrite the clone number on the order form, or retrieve an S23 for modification of the form number. Note that clone numbers do not appear in Partex files. Multiple orders with the same "S1 pre-printed number" in Partex files are possible. Status: An order has exactly one of the following statuses: error, cancelled, entered, confirmed, extracted, partexed. When an error order is corrected, its status becomes entered or confirmed according to the date it was originally entered.
Sorting OrdersEA$YBOND sorts orders, when extracting, printing C-bonds, or writing Partex output, using 5 sort fields. #1 and #2 are courier code (implied by order's delivery option and DELIVERY.DBF) and processing agent. #3 to #5 are specified in SYSLAN.DBF.
Extract / Partex BatchesEA$YBOND divides orders into Extract Batches, when extracting, or Partex Batches, when writing Partex output. This occurs immediately after sorting, as in the following example: Example: The sort produces a sequence of orders with the following S23 form numbers: AAACCAABBCDDE. EA$YBOND would produce a corresponding sequence of batch numbers like: AAACCXXBBYDDE. The batch number is usually identical to the S23 form number. However, different batch numbers are generated as necessary to uphold the rule that batch numbers cannot recur if they have appeared earlier in the sequence. Generated batch numbers start at 999999 each time the function is invoked, and go down one at a time (999998, 999997, etc.), except that any actual S23 numbers that appear in the batch number sequence are omitted. This ensures that batch numbers do not recur if they have appeared earlier in the sequence. The X's and Y's in the above example are generated in this way.
System Functions
Administration
Edit User InfoFor add/cancel/modify userids, names, passwords. Any userid can change its own name or password, except for SYS, which is unchangeable. In addition, SYS and MGR can both modify the list of userids other than SYS or MGR.
Other AdminUserids SYS and MGR can modify reference data in files as appropriate.
LoginIf SYSLAN.DBF's "processing date" is later than the "locked date", EA$YBOND displays this date on startup. EA$YBOND prompts for userid and password. If SYSLAN.DBF's "processing date" is not later than the "locked date", EA$YBOND prompts for it at this point. The response cannot be later than the server clock date. A correct response is written to the file. All transactions this session will be effective this date. (Audit file still gets clock's date/time.) Note that this implies that all workstations must have the same processing date; and processing for a given date cannot begin before that date.
Online Data Entry/Modification/CancellationA specification for this module of EA$YBOND is contained in the sub-document, CSBODE.DOC, timestamp 93/4/27 11:22 AM ("Online Data Entry/Modification/Cancellation"). The following is an incomplete list of subsequent spec changes agreed to by the Contractor and Uriel:
Import[For additional specifications regarding import, see sub-documents: EA$YBOND Import, and EA$YBOND Keypunch Input File Layout.] S11's are never imported. S23's, however, are contained in each of the 3 types of import file. S11's referenced by imported data must be entered online prior to the import. In the course of doing this, the user may discover duplicate S11's. To enter the S11 in this case, the user must invent a new, unique S11 form number. On import, the system prompts for any S11 form number substitutions. Note that this assumes that a given import file will not itself contain different S11's having the same form number. Note default delivery option for S1's in SYSLAN.DBF.
Import Partex FileImported Partex files contain C-bonds, and no R-bonds. File name is of form <name>.PIP (Partex Input Pending). The operator specifies this name (without extension) when selecting this function. When import is complete, EA$YBOND changes the file extension to "PID" (Partex Input Done).
Import Keypunch FileThese files typically come from keypunch service companies. File layout is specified in file KEYPUN.DOC, timestamp 93/5/10 9:42 PM. File name is of form <name>.KIP (Keypunch Input Pending). The operator specifies this name (without extension) when selecting this function. When import is complete, EA$YBOND changes the file extension to "KID" (Keypunch Input Done).
Import Payroll FileExtensions similar to above, but YIP and YID.
Extract C-Bond OrdersAll advices meeting the following conditions are candidates for extraction:
It is not required that an advice's associated S11 (if any) be balanced. Extracted advices remain ineligible for further extracts if they are modified. The first step when extracting is to select from among these candidates by specifying any of the following (none is mandatory):
All eligible orders meeting all the specified criteria are selected. (I.e., a logical AND operator is used.) EA$YBOND reports:
and prompts for a unique extract ID. If the user specifies the required ID and does not cancel, EA$YBOND sorts the selected advices (see Sort section) and assigns an Extract Batch number (see Extract / Partex Batches section) to each.
Print C-BondsOnce workstation X has invoked this function, no other workstation can invoke it until X exits the module. Eligible certs are all those that are associated with extracted orders and that are not yet successfully printed (see CERTS.DBF). Note that an order can be partially printed. For example, an order may require 5 1000's, 3 of which have been printed successfully. When "Print C-Bonds" is selected, EA$YBOND prompts for:
A function is available to edit the list of start-end pairs of spoiled cert #'s. Following entry of the above, EA$YBOND reports:
If print output is specified (as opposed to file), the system tests "printer ready" and offers to print a test cert. Every time this offer is accepted, a test cert is printed and EA$YBOND repeats the offer. EA$YBOND assumes the print head is positioned on line 1 of the bond form and that the printer is set for 6 lines per inch. When the test cert offer is declined, EA$YBOND requests go-ahead to print all the real certs. EA$YBOND does not use form feeds. If file output is specified, EA$YBOND requests go-ahead at once. On user go-ahead, EA$YBOND sorts the orders having certs yet to be printed (see Sort section) and directs to printer or to file in this sequence. Note that fewer than the "# certs of specified denomination yet to be printed" specified above are printed if not enough cert #'s have been specified. If print output, the system requests confirmation on completion. If the user does not confirm, the system presents the print restart screen (see "Printing Problems" below). If file output, success is assumed and no confirmation is requested.
Printing ProblemsIn case of printer output, the user can press a key to interrupt printing. This causes the "clear buffer" code to be sent to the printer, and produces the print restart screen. EA$YBOND prompts for the following:
EA$YBOND repeatedly offers to print test certs, as above, then resumes printing real certs.
Write Partex FileAny given Partex file has the following attributes:
When this function is selected, EA$YBOND prompts for C or R. If R, EA$YBOND selects all applications meeting the following conditions:
If C, it selects all advices:
EA$YBOND reports:
If the user does not cancel, EA$YBOND sorts the selected orders (see Sort section) and assigns the same Partex file creation #, and a Partex batch number (see Extract / Partex Batches section), to each. EA$YBOND writes the Partex batch number, in place of the true S23 form number, to the Partex outfile. Data Conversion: EA$YBOND converts postal codes as follows when writing the Partex outfile: "QC" is changed to "PQ". Note that a given Partex batch number may appear in multiple Partex outfiles.
R-Bond Partex File (Applications)Hierarchy: a tape contains one or more requisitions; a requisition contains one or more branch batches; a branch batch contains one or more applications. For any given requisition, EA$YBOND assigns the requisition number to the "S24 pre-printed #" (Partex 72). Thus, the requisition number and the S24 pre-printed number associated with any given record in R-bond Partex outfiles produced by EA$YBOND are identical. Notes:
C-Bond Partex File (Advices)Hierarchy: a tape contains one or more branch batches; a branch batch contains one or more advices. Notes:
Record Cert Numbers
C-BondsThe only required restriction on use of this function is that C-Bond cert #'s cannot be changed after Partexing. EA$YBOND prompts for Order ID and denomination. It then presents a list of corresponding cert #'s on file (CERTS.DBF). The user can modify any entry, or make insertions (up to limit implied by # pieces for specified denomination) or cancellations.
R-BondsThe system prompts for Partex file creation #, and reports # certs for each denomination. For any specific denomination, the user specifies cert #'s by specifying:
EA$YBOND requires that exactly the right # of cert #'s be specified. EA$YBOND refers to PTXOUT.DBF to link cert #'s to individual orders.
DeliveryCandidate orders are all applications that are partexed and not delivered, and all advices that are printed and not delivered. The user specifies one of: single order, C-bonds, or R-bonds. If single order, he specifies order ID. If R-bonds, the user further narrows the selection of orders by specifying:
The case of C-bonds is similar. The user further narrows the selection of orders by specifying:
The user is warned, in the case of R-bonds, if cert #'s have not been entered for any of the specified applications. Once the user's selection is confirmed, EA$YBOND sorts the specified extracts or outfiles; then within each, it sorts the orders (see Sort section). EA$YBOND then prints required documents as indicated in DELIVERY.DBF.
ReportsReports are specified by means of samples in sub-document EB-REPS8.DOC (file timestamp 93/5/17 11:01 AM) (EA$YBOND Sample Reports), and REPTECH.DOC (5/14 10:58 AM) (EA$YBOND Sample Reports - Technical Addendum) .
Real-Time ReportsReal-time reports are produced immediately upon request. They can be viewed on the screen and/or printed immediately.
End-of-Day ReportsEnd-of-Day Reports at most 132 characters wide. They are printed as part of End-of-Day Processing (see Initiate End-of-Day Processing section).
Submit RequestAny user can submit a request for an end-of-day report. He specifies which report, destination, and # copies (see REPORTS.DBF); previous entries by other users, if any, are presented as defaults.
Initiate End-of-Day ProcessingProcessing involves PREREP.BAT and POSTREP.BAT (see below). These files reside in the server's EA$YBOND directory; they may differ among LAN sites. On invocation of this function, EA$YBOND does the following:
In case of print-to-file, the file name indicates number of copies (see section on file naming conventions).
Files/Tables
System FilesSystem files are reference files containing identical data at all sites.
DELIVERYThis table includes one record with code '99' and name "Payroll", used for all S12's.
SYSUNIV (System - Universe)This table has only one record.
LAN-Specific Files (One per LAN Site)
AUDITAt least one record is appended to this file whenever a user performs one of the following actions:
The record(s) specifies:
BRANCHES
CENTREBR (Central Branches)
CERTLEFTThis table is used by EA$YBOND, for user convenience, to remember the bond cert #'s left over from the last C-bond print session.
See also CERTSPL.DBF.
CERTSCert #'s for both C-bonds and (optionally) R-bonds recorded here. For C-bonds, info only entered here after confirmation by user of successful print.
CERTSPL (Spoiled Certs)This pertains to info in CERTLEFT.DBF. This data too is the record of the most recent user specification.
CLONECNT
COURIER
DISTRICTS
EXTRACT
ORDERSee Online Data Entry/Modification/Cancellation.
PTXOUTDescribes Partex outfiles.
REGIONS
REPORTSAll (and only) end-of-day reports are represented here.
RSPREGN (RSP Registrations)
S11See Online Data Entry/Modification/Cancellation.
S23See Online Data Entry/Modification/Cancellation.
SALEAGNT (Sales Agents)
SRCFUNDS (Source of Funds)
SYSLAN (System - LAN)
USERS
Workstation-Specific Files (One per Workstn)
SYSWSTN (System - Workstation)
Outstanding QuestionsAt time of printing this document, the following remain to be resolved:
To Be Confirmed (Yes/No)
Confirmed
Home > Uriel's Consulting Service |