home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / bbsdoor / wampansi.zip / WAMP45R.EXE / lha / WAMPANSI / WAMPUM.DOC < prev    next >
Text File  |  1993-02-23  |  272KB  |  5,502 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.                     
  13.                               
  14.                                
  15.                                      WAMPUM  tm
  16.                  
  17.  
  18.                            A dBASE-Compatible, Menu-Driven
  19.  
  20.                              Data Base Management System
  21.  
  22.              
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.            NOTE: Print the README.DOC file for late-breaking enhancements!
  37.                  It includes ALL new feature documentation for version 4.
  38.  
  39.                  If you already are familiar with version 3.3 of WAMPUM,
  40.                  then you should first read the README.DOC file. 
  41.  
  42.                  If you are new to WAMPUM, then read this documentation    
  43.                  before reading the README.DOC file.
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.                         Copyright (c) Ward Mundy, 1985-1993.
  55.  
  56.                Ward Mundy Software, P.O. Box 1169, Atlanta, GA 30301
  57.                    
  58. Ph:404/237-9420 AT&T:10288-0-700-WARD-MUNDY  Fax:404/237-1167 BBS:706/746-5109
  59.                         
  60.                         Second Edition.  All Rights Reserved.
  61.  
  62.             WARD MUNDY SOFTWARE, P.O. Box 1169, ATLANTA, GA 30301
  63. Ph:404/237-9420 AT&T:10288-0-700-WARD-MUNDY Fax:404/237-1167 BBS:706/746-5109
  64.  
  65.                     C U S T O M E R    I N V O I C E
  66.  
  67.  
  68.  
  69.      +---------------------------------------------------------------+
  70.      |Customer:                          |Order Date:                |
  71.      |                                   |---------------------------|
  72.      |                                   |Shipped Dt:                |
  73.      |                                   |---------------------------|
  74.      |                                   |Invoice No:                |
  75.      |                                   |---------------------------|
  76.      |                                   |P.O. Number                |
  77.      +---------------------------------------------------------------+
  78.                                                                      
  79.      +---------------------------------------------------------------+
  80.      |QUANTITY |DESCRIPTION                   |UNIT PRICE|  AMOUNT   | 
  81.      |---------|------------------------------|----------|-----------|
  82.      |         |                              |          |           |
  83.      |         |WAMPUM Second Ed. Users Guide |  20.00   |           |
  84.      |         |                              |          |           |
  85.      |         |WAMPUM 4.5 Single User License|  50.00*  |           |
  86.      |         |                              |          |           |
  87.      |         |WAMPUM 4.5 Network License    | 195.00*  |           |
  88.      |         |                              |          |           |
  89.      |         |WAMPUM Remote 4.5 Single User |  50.00*  |           |
  90.      |         |                              |          |           |
  91.      |         |WAMPUM Remote 4.5 Network     | 195.00*  |           |
  92.      |         |                              |          |           |
  93.      |         |WAMPUM Site License (1993)    | 995.00*  |           |
  94.      |         |                              |          |           |
  95.      |         |WAMPUM Site License (later)   |1500.00   |           |
  96.      |         |                              |          |           |
  97.      |         |MenuMaker for WAMPUM/dLITE    |  20.00   |           |
  98.      |         |                              |          |           |
  99.      |         |dLITE 30-day ShareWare Lic.   |   5.00   |           |
  100.      |         |                              |          |           |
  101.      |         |dLITE Single User License     |  25.00   |           |
  102.      |         |                              |          |           |
  103.      |         |Badge-O-Magic 30-day ShareWare|   5.00   |           |
  104.      |         |                              |          |           |
  105.      |         |Badge-O-Magic License per PC  |  45.00*  |           |
  106.      |         |                              |          |           |
  107.      |         |Badge-O-Magic Deluxe          |  95.00*  |           |
  108.      |         |                              |          |           |
  109.      |---------------------------------------------------------------|
  110.      |* Specify INDEX: Clipper( )  dBASE III+(  )   3-1/2" disk?(  ) |
  111.      |---------------------------------------------------------------|
  112.      |         | Foreign Shipping Surcharge   |   5.00   |           |
  113.      |         |                              |          |           |
  114.      | Order   | Shipping & Handling Charges  |   5.00   |    5.00   |
  115.      |         |                              |----------|-----------|
  116.      |         |                              |  TOTAL   |           |
  117.      +---------------------- Thank You! -----------------------------+
  118.      NOTE: We provide 50% software discounts to all accredited schools.                                                                 
  119.      TERMS: Please make check payable to Ward Mundy, P.O. Box 1169, 
  120.      Atlanta, GA 30301.  Checks drawn on U.S. banks only! Or you may
  121.      send VISA/MasterCard card number, expiration date and signature.
  122.  
  123.  
  124.  
  125.  
  126.  
  127.             1  Overview
  128.                     
  129.             1.1  What is WAMPUM Anyway?
  130.                           
  131.                Ward's Automated Menu Package Using Microcomputers
  132.           (WAMPUM) is a full-featured, menu-driven implementation of
  133.           the dBASE III programming language. WAMPUM can wear two hats:
  134.           it is both an application development tool and an end-user
  135.           data base management system.  The software is a copyrighted
  136.           work owned by Ward Mundy which is licensed for use under
  137.           certain terms and conditions which are displayed when you run
  138.           or terminate the running of the program.  The ShareWare
  139.           versions may be used for up to 30 days to determine whether
  140.           the software meets your data base needs. Then you may either
  141.           pay the applicable license fee or discontinue using the
  142.           program.  The ShareWare version only may be redistributed so
  143.           long as it is distributed with all the files exactly as
  144.           received.  If you purchased WAMPUM from a ShareWare
  145.           distributor, the copying fee may not exceed $10 U.S.  If this
  146.           was not the case or if you received a damaged version of the
  147.           software, please do yourself and your friends a favor.  Let
  148.           us know about it, and don't use the damaged version!  
  149.             
  150.                Special thanks to Nantucket, Inc., the developer of
  151.           Clipper, the premier dBASE III compiler.  Without Clipper,
  152.           there would be no WAMPUM.  Clipper's flexibility and many
  153.           enhancements over Ashton-Tate's dBASE interpreters made
  154.           development of WAMPUM a true labor of love.  We also express
  155.           our sincere appreciation to Nantucket for authorizing the
  156.           distribution of their REPORT.EXE and LABEL.EXE programs to
  157.           end-users without additional charge.  These two programs
  158.           simulate the dBASE III commands of Create Report and Create
  159.           Label and make WAMPUM a complete stand-alone application
  160.           development system without reliance upon any dBASE
  161.           interpreter. One version of WAMPUM now relies upon the
  162.           FoxBASE+ run-time interpreter which is included with the
  163.           WAMPUM software. This version includes a report writer and
  164.           label generator without reliance upon any external program.
  165.           This version also permits the developer to write unnested,
  166.           FoxBASE-compatible programs up to 500 lines and execute them
  167.           from within WAMPUM.  We do NOT provide technical support to
  168.           those wishing to write their OWN FoxBASE-compatible programs!
  169.  
  170.             1.2  Summary of Features
  171.             
  172.                WAMPUM provides much of the functionality of the dBASE
  173.           III Plus programming language through a simple menu
  174.           interface.  Various versions of WAMPUM now support floppy-
  175.           only systems, network-based systems, and all existing dBASE
  176.           index dialects: Clipper, dBASE III Plus, and FoxBASE+.  dBASE
  177.           IV index support will be available by mid-1989.  The major
  178.           features included in WAMPUM are outlined below. 
  179.  
  180.                                           1
  181.  
  182.  
  183.           *  Creation and use of dBASE III Plus-compatible data bases
  184.           *  Multi-user network support using any dBASE III file
  185.           *  Field types include: Char, Numeric, Date, Logical, Memo
  186.           *  Creation and use of up to 7 B-Tree Indexes per .DBF file
  187.           *  Add, Edit, Delete, & Undelete Records in any .DBF file    
  188.           *  Display, List and Print Records from any .DBF file
  189.           *  10 Data Entry Screen Formats tailored to any application
  190.           *  Automatic, semi-automatic, and custom data entry screens
  191.           *  Create and use dBASE III-compatible reports & labels      
  192.           *  Create and use WAMPUM "mail merge" form letter files
  193.           *  Relation of second data base by key for any output
  194.           *  Full-featured copy utilities to import & export any data
  195.           *  Creation of printer templates to support up to 10 fonts   
  196.           *  Library of preformatted output forms with sort & select
  197.           *  Library of edit-checks tailored to any .DBF file system   
  198.           *  Library of macros tailored to any WAMPUM application 
  199.           *  Calculated fields using standard dBASE expressions   
  200.           *  Automated Selection Assist for complex Boolean searches   
  201.           *  Boolean search of MEMO field in versions except FoxBASE
  202.           *  Audit Trail / Transaction Logging for multi-user tasks    
  203.           *  NetBIOS-compatible record & file locking network support
  204.           *  Passwords and custom user configurations for networks
  205.           *  Global search & replace of 10 data elements in one pass 
  206.           *  Retrieval of 9 custom applications with a single keystroke
  207.           *  Date formats to accommodate international date formats
  208.           *  'Dot prompt' to run custom programs in FoxBASE version
  209.           *  Support for dBASE screen format files in FoxBASE version
  210.  
  211.              1.4  System Requirements
  212.             
  213.                WAMPUM may be used on IBM PC-compatible computers
  214.           running DOS 2.1 or higher.  For multi-user network
  215.           applications, DOS 3.1 or higher is required on every computer
  216.           as well as an IBM NetBIOS-compatible network.  For
  217.           performance reasons, an 80286 or 80386 processor and a hard
  218.           disk are desirable.  Minimum memory requirement is 420K above
  219.           and beyond the memory requirements of DOS and any memory-
  220.           resident programs in use.  Minimum memory is 420K (with DOS
  221.           3.1) to link to REPORT and LABEL programs from within WAMPUM. 
  222.           Without much in the way of memory-resident software, WAMPUM
  223.           typically needs 512K to operate satisfactorily after loading
  224.           DOS. WAMPUM will run on either a monochrome or color display.
  225.             
  226.                Because WAMPUM creates a number of work files from time
  227.           to time, and because WAMPUM typically works with numerous
  228.           files open at the same time, you will need to make sure that
  229.           when your computer is started, a file named CONFIG.SYS exists
  230.           in the root directory of the boot disk.  This file must
  231.           contain the following entries with the minimum values shown:
  232.             
  233.                          FILES=20
  234.                          BUFFERS=24
  235.  
  236.                                           2
  237.  
  238.  
  239.             1.5  Getting Started 
  240.             
  241.             1.5.1  Loading the Program
  242.  
  243.             1.5.1.1  Installing the Software
  244.             
  245.                WAMPUM is distributed on one or more diskettes in an
  246.           archived (compressed) format to conserve disk space.  Prior
  247.           to installing the software, you must create a directory on
  248.           your disk to house WAMPUM.  The directory must be the first
  249.           directory in your DOS PATH for performance reasons.  This
  250.           also will assure that WAMPUM can be run from any subdirectory
  251.           on your system.  If you are not familiar with the PATH
  252.           command, consult your DOS manual for more details.  Simply
  253.           stated, the PATH command tells DOS which directories (other
  254.           than the current one) should be searched whenever you ask the
  255.           computer to run a program.
  256.  
  257.                Exit to the DOS prompt and type PATH and press <ENTER>. 
  258.           For ease of presentation, we will discontinue repeating press
  259.           <ENTER> after each command.  Unless instructed otherwise,
  260.           type a command and press <ENTER>.  
  261.  
  262.                If DOS reports "no path," then you must create one
  263.           before installing or running WAMPUM.  First, create a new
  264.           directory (file drawer) by typing MD \WAMPUM.  Then, create a
  265.           path by typing PATH=C:\WAMPUM.  If your default drive is not
  266.           C:, then substitute the appropriate drive letter for C:
  267.           above.  
  268.  
  269.                NOTE:  The PATH command is only preserved until you turn
  270.           your computer off.  You must reenter the PATH command each
  271.           time you turn your system on before running WAMPUM unless the
  272.           PATH command is included in your AUTOEXEC.BAT startup file. 
  273.           Consult your DOS manual for additional guidance.
  274.  
  275.                If DOS reports that a path exists, then you have two
  276.           choices.  Either install WAMPUM into the first existing
  277.           directory in the DOS PATH or follow the steps above and add
  278.           C:\WAMPUM as the first directory in the DOS path.  
  279.  
  280.                WAMPUM cannot be run as distributed in its archived
  281.           form.  It first must be unarchived.  Insert the distribution
  282.           diskette in Drive A of your computer and type A:INSTALL.  You
  283.           then will be instructed how to proceed.
  284.  
  285.                For the Clipper and dBASE-compatible index versions,
  286.           WAMPUM.EXE, REPORT.EXE, LABEL.EXE, and printer configuration
  287.           files with a .MEM file extension will be copied into the
  288.           directory you have identified as the first directory in your
  289.           DOS PATH. Do not rename these files. 
  290.  
  291.  
  292.                                           3
  293.  
  294.  
  295.  
  296.  
  297.             1.5.1.2  How to Run It
  298.  
  299.                WAMPUM is designed to support two, very different
  300.           audiences. The first group is end-users, and the second is
  301.           application developers.  This design is implemented by
  302.           providing different menu options for the two groups. The end-
  303.           user menu options are designed to let end-users do the normal
  304.           things that are done with a database: adding, editing, and
  305.           deleting records; running reports and labels; selecting the
  306.           primary index for input and output of data; and entering
  307.           record selection criteria to narrow down which records are
  308.           produced in listings and reports.  Provision is also made to
  309.           allow end-users to rebuild a damaged data base or index
  310.           typically occasioned by a power failure.  The end-user mode
  311.           is initiated by typing WAMPUM and pressing the <ENTER> key at
  312.           the DOS prompt.  This is true for all versions.
  313.             
  314.                WAMPUM's developer mode contains all of the options
  315.           outlined above plus a number of additional options designed
  316.           to allow a person to develop a data base application for
  317.           others to use.  You do NOT have to be a programmer to become
  318.           a good WAMPUM developer!
  319.  
  320.             The developer's mode allows the creation of new data files
  321.           and indexes as well as reports, labels, and printer formats. 
  322.           It also provides access to the data files used to develop
  323.           edit checks, data entry menus, keyboard macros, preformatted
  324.           output, and form letters. Finally it allows for customization
  325.           of applications through the storing of a configuration
  326.           identifying the files, indexes, printer, and name of each
  327.           application. The developer mode is initiated by typing WAMPUM
  328.           VOODOO at the DOS prompt.  
  329.  
  330.                If you are using WAMPUM on a compatible such as an older
  331.           COMPAQ which makes DOS think it has a color card even when
  332.           using a monochrome display, then you may want to force WAMPUM
  333.           into monochrome mode by starting it with WAMPUM MONO or
  334.           WAMPUM VOODOO MONO.  In the FoxBASE+ version, monochrome mode
  335.           can be specified in the * - Config Update option.
  336.             
  337.                Except in the FoxBASE+ versions, WAMPUM uses an external
  338.           Report Writer (Report.Exe) and a Label Generator (Label.Exe)
  339.           to create report and label templates. Depending upon the
  340.           amount of memory in your machine, these programs may or may
  341.           not be able to run from within the WAMPUM program itself. 
  342.           This User's Guide explains the procedure for running REPORT
  343.           and LABEL from within WAMPUM.  If you lack the necessary
  344.           memory to do this, you may run the report writer from the DOS
  345.           prompt by typing REPORT filename where filename is the name
  346.           of the report template you wish to create or edit.  You may
  347.  
  348.                                           4
  349.  
  350.  
  351.           run the label generator from the DOS prompt by typing LABEL
  352.           filename where filename is the name of the label template you
  353.           wish to create or edit.  
  354.             
  355.               1.5.2  Maneuvering on the Main Menu
  356.             
  357.                Once you have started WAMPUM by executing one of the
  358.           commands outlined above, you will see the WAMPUM logo and
  359.           then the Main System Menu.  Note that just below the menu is
  360.           a one-line sentence of HELP regarding the highlighted option. 
  361.           You move between the options with the UP and DOWN cursor
  362.           keys.  The HOME key will take you to the first option on the
  363.           menu, and the END key will move you to the last option.
  364.             
  365.                Execute a choice on the Main System Menu by pressing the
  366.           <ENTER> key when the choice desired is highlighted or simply
  367.           type the LETTER corresponding to the choice you wish to run. 
  368.           Using the first letter method, you do not have to press
  369.           <ENTER>. 
  370.  
  371.                Context-sensitive HELP on most features is accessed by
  372.           pressing the F1 function key on any screen.
  373.  
  374.             1.6  Quitting WAMPUM
  375.             
  376.                The <ESC> key is pressed to exit from WAMPUM to DOS from
  377.           the Main System Menu.  Then answer the prompt.
  378.  
  379.             1.7  Using the Cursor & Function Keys
  380.             
  381.                A number of keys have special functions within the
  382.           WAMPUM system.  Oftentimes, these keys are not the same as
  383.           what you may have used in previous dBASE applications. Please
  384.           scan through the summaries below before you attempt to either
  385.           use or build a WAMPUM application.  Throughout this manual,
  386.           you will see references to multiple key combinations such as
  387.           CTRL-W or ALT-F10.  Whenever you see a hyphenated key
  388.           combination such as these, it means hold down the first key,
  389.           then tap the second key, then release both keys.  
  390.  
  391.                For example, CTRL-W means hold down the CTRL key, then
  392.           tap the W key (case does not matter), then release both keys. 
  393.           We use the word "TAP" advisedly.  Most PC's have a "keyboard
  394.           buffer" which remembers keystrokes which may not yet have
  395.           been displayed.  Every key on the PC acts like a repeating
  396.           key on a selectric typewriter. Thus, TAP means touch and
  397.           release promptly!
  398.  
  399.                <ESC> is the all-purpose key which is used to get you
  400.           out of trouble.  From ANY screen, you can always press the
  401.           ESCape key to exit without preserving what you already were
  402.  
  403.  
  404.                                           5
  405.  
  406.  
  407.           doing.  From the Main Menu, pressing <ESC> will terminate
  408.           WAMPUM and return you to the DOS prompt.
  409.  
  410.                Ctrl-W is WAMPUM's SAVE key.  Pressing CTRL-W typically
  411.           tells the computer to SAVE what is displayed on the screen
  412.           and move on to the next step.  If you are a previous dBASE
  413.           III user, then CTRL-W is equivalent to dBASE III's CTRL-End
  414.           key. In FoxBASE+ versions, CTRL-End also works.
  415.  
  416.                Ctrl-Home moves the user to the first field on a data
  417.           entry screen in all versions except FoxBASE+.
  418.             
  419.                Ctrl-End moves the user to the last field on a data
  420.           entry screen except in the FoxBASE+ versions.
  421.             
  422.                <Enter> or <Down> Cursor completes an entry in a field
  423.           and moves the user to the next field, if any, on the screen. 
  424.  
  425.                <Up> Cursor moves the user to the previous field, if
  426.           any, on the screen.
  427.             
  428.                <PgDn> signifies that data entry for this screen of data
  429.           has been completed and that the user wishes to SAVE the data
  430.           and continue.
  431.             
  432.                <PgUp> signifies that data entry for this screen of data
  433.           has been completed and that the user wishes to SAVE the data
  434.           and continue backwards through the data base (except when
  435.           ADDing new records to the data base).
  436.             
  437.                Ctrl-<Left> Cursor moves the cursor to the beginning of
  438.           the current data entry field.
  439.             
  440.                Ctrl-<Right> Cursor moves the cursor to the end of the
  441.           current data entry field.
  442.  
  443.                Ctrl-Y deletes the contents of the current field from
  444.           the cursor position to the end of the field.
  445.  
  446.                <Ins> toggles the computer between insert mode and
  447.           strike-over mode.  The word <INSERT> appears at the top of
  448.           the screen when INSERT mode is active.
  449.             
  450.                <Del> deletes the character currently under the cursor. 
  451.  
  452.                F1 function key is the all-purpose HELP key.  It
  453.           retrieves a screenload of helpful hints which are keyed to
  454.           your position in the WAMPUM system.
  455.             
  456.                F2-F10 function keys are macros tailorable by the
  457.           developer to hold any character string desired.  The same is
  458.           true for SHIFT, ALT, and CONTROL key combinations except Fox.
  459.  
  460.                                           6
  461.  
  462.  
  463.             2  Developer Functions
  464.             
  465.             2.1 Creating A New Application
  466.             
  467.             2.1.1 Overview of Application Development Strategy 
  468.  
  469.                As with any application development, the best advice in
  470.           starting a new project is turn off the computer and scratch
  471.           your head for a while to figure out what you want to do. 
  472.           What data input is needed to get the output desired? 
  473.  
  474.                Once you know what you want, then some familiarity with
  475.           WAMPUM's structure and the basics of dBASE will help.  WAMPUM
  476.           is designed to be stored in a directory from which it can be
  477.           run regardless of the active default directory on your hard
  478.           disk.
  479.  
  480.                The cardinal rule in using WAMPUM is a simple one:
  481.           separate applications must be created in separate sub-
  482.           directories which are NOT in your DOS PATH.  There are two
  483.           reasons for this. First, WAMPUM creates a number of
  484.           supporting files for each application. If you create more
  485.           than one application in a given subdirectory then these
  486.           supporting files will not be available for use in both
  487.           applications.  Second, because WAMPUM accesses files on the
  488.           disk using the same PATH command that DOS uses, if you build
  489.           an application in a directory which is part of the PATH, then
  490.           WAMPUM's supporting files may unintentionally spill over into
  491.           other WAMPUM applications as you begin building them.
  492.  
  493.                  Each WAMPUM application typically will include a main
  494.           file, perhaps a related file, several indexes, and numerous
  495.           reports, labels, and forms.  In addition, each time you run
  496.           WAMPUM in a new directory, it automatically builds some
  497.           supporting files for that application.  These include
  498.           EDIT.DBF (which is used to store the edit checks for a
  499.           particular application), KEYS.DBF (which is used to store any
  500.           keyboard macros for a particular application), MENUS.DBF
  501.           (which is used to store up to 9 data entry screen formats)
  502.           and, if requested, WAMPUM.DBF (which is used to build a
  503.           library of preformatted reports, labels, and form letters
  504.           which can be run without users having to master Boolean logic
  505.           and sorting rules).  Finally, WAMPUM stores a configuration
  506.           for each application in a file named WAMPUM.MEM.  For the
  507.           reasons stressed above, you should not run WAMPUM in a
  508.           directory which is part of the DOS PATH since it would create
  509.           these supplemental files.  They then would inadvertently be
  510.           accessed whenever you tried to use other applications on your
  511.           disk! 
  512.  
  513.                For those unfamiliar with dBASE and its spin-offs, a
  514.           quick thumbnail sketch of its design may help you get
  515.  
  516.                                           7
  517.  
  518.  
  519.           started.  dBASE stores data base information in sequential
  520.           files with a file extension of .DBF.  The first part of each
  521.           .DBF file defines the "structure" of the data base, i.e. the
  522.           unique names of the different pieces of information (fields)
  523.           to be stored as well as each field's type and length.  As you
  524.           add new data to the file (records), it is tacked onto the end
  525.           of the existing file.  Thus, a file consisting of three
  526.           records would, in fact, have a file structure followed by
  527.           records 1, 2, and 3 in sequential order.  
  528.  
  529.                For small data bases, sequential data bases work well;
  530.           however, it means that a search for any given record must
  531.           proceed by examining each record in the data base until the
  532.           proper record is found.  Since WAMPUM supports files with
  533.           literally millions records, the time for sequential searching
  534.           obviously would become unbearable quickly.
  535.  
  536.                dBASE indexes solve this dilemma by providing separate
  537.           files which in reality are nothing more than alphabetized
  538.           lists telling dBASE how to find a given "key" within a large
  539.           data base quickly.  The beauty of indexes is that, once
  540.           created, they are constantly updated as the information in
  541.           the main data base changes.  An index file may contain keys
  542.           for just one field in the data base (such as zip code) or it
  543.           may contain very sophisticated keys for a group of fields
  544.           based upon some developer-specified algorithm.  For example,
  545.           in indexing the names of college alumni, one might wish to
  546.           index males and unmarried females by zip code, then last
  547.           name, and then first name.  For married females, the index
  548.           should be by zip code, maiden name, and then first name. 
  549.           This would enable quick retrieval of alumni by the names
  550.           actually used while in college. 
  551.  
  552.                In data processing terms, an index performs the same
  553.           function as a sort except that an index is always sorted.  In
  554.           other words, it provides an instant sort.  And, you can have
  555.           up to seven different indexes in use with every individual
  556.           data base.  To change the sort order, all one does is change
  557.           the lead (first) index.  But, all seven indexes remain sorted
  558.           and current.  This saves an enormous amount of time when the
  559.           time comes to run a report since no intermediate sorting step
  560.           is ever required.  All one does is choose the lead index
  561.           which instantly "sorts" the report in lead index order.
  562.  
  563.                dBASE reports (.FRM files) and labels (.LBL files) are
  564.           actually formatting templates which tell the system how to
  565.           display information from a given data base.  In short, you
  566.           "pour" your data base through the template to get a formatted
  567.           report.  Unlike some data base systems, no data is actually
  568.           stored in the dBASE report.  And report or label templates do
  569.           not tell the system which records to actually print or in
  570.           what order.  A template only specifies which fields to print
  571.  
  572.                                           8
  573.  
  574.  
  575.           and what headings to put on the paper.  Choosing the order of
  576.           records to print is done by selecting the lead index. 
  577.           Picking records for a report is done using a filter which is
  578.           nothing more than record selection using Boolean logic. 
  579.           WAMPUM eases the pain of this process by providing a menu-
  580.           driven, "Plain English" assistant to guide you through the
  581.           record selection process.
  582.  
  583.                What follows in the subsequent sections of this chapter
  584.           is a step-by-step tutorial for building a sample WAMPUM
  585.           application.  Before you do anything else, do yourself a
  586.           favor and complete this tutorial.  It will take less than two
  587.           hours!
  588.  
  589.                In order to simplify the presentation, let's create a
  590.           sample application which is as generic as possible.  We will
  591.           assume that the application is based upon the data base
  592.           outlined below.  The structure of the primary file follows: 
  593.  
  594.  
  595.           FIELD NAME  TYPE        LENGTH DEC 
  596.  
  597.            LASTNAME    C            20    0
  598.            FIRSTMI     C            20    0
  599.            ADDRESS     C            40    0
  600.            CITY        C            20    0
  601.            STATE       C            2     0
  602.            ZIP         C            10    0
  603.            PURCHAMT    N            7     2
  604.            PURCHDT     D            8     0
  605.            MARRIED     L            1     0
  606.            COMMENTS    M            10    0
  607.  
  608.  
  609.             2.1.2 Create A New SubDirectory
  610.             
  611.                The first step in building a new WAMPUM application is
  612.           to create a new subdirectory on the disk to house the
  613.           information. You must be at the DOS prompt to perform these
  614.           steps.
  615.  
  616.                We recommend you name the subdirectory using a single
  617.           word of up to 8 characters in length with no embedded spaces
  618.           or punctuation.  To keep things simple, let's name it
  619.           CUSTOMER here. If you want to follow along, type the
  620.           following commands.
  621.  
  622.                       PROMPT $P$G
  623.                       MD \CUSTOMER
  624.                       CD \CUSTOMER
  625.             
  626.  
  627.  
  628.                                           9
  629.  
  630.  
  631.                The commands above (1) change the DOS prompt to assure
  632.           that you'll know the subdirectory in which you are working,
  633.           (2) make a new directory named "CUSTOMER" below the root
  634.           directory, and (3) move you to the new CUSTOMER directory. 
  635.           If you are working on the C: drive, the prompt on your screen
  636.           after issuing the above commands should be C:\CUSTOMER>. 
  637.  
  638.                You now are ready to start up WAMPUM.  Since you are
  639.           building a new application, you will want to use Developer
  640.           Mode.  This means you need to include the developer password
  641.           as shown below.  Unless you need to force WAMPUM into mono
  642.           mode, type WAMPUM VOODOO.
  643.             
  644.                If you have a Compaq or some other clone that reports a
  645.           color card when you are using a monochrome display, then
  646.           type:
  647.           WAMPUM VOODOO MONO.
  648.  
  649.                For users of the FoxBASE+ versions, type WAMPUM.
  650.  
  651.  
  652.             2.1.3 Building a New File
  653.             
  654.                The first piece of the new application to build is the
  655.           main data file.  This may contain up to 400 fields depending
  656.           upon the amount of free memory in your computer. Be aware
  657.           that you will forfeit dBASE III Plus compatibility when you
  658.           create more than 128 fields. 
  659.  
  660.                Select the B - Build New File option from the Main
  661.           System Menu by typing a B or highlight the option and press
  662.           <ENTER>. You then will be prompted to enter a file name for
  663.           your new data base file.  The file name must comply with DOS
  664.           requirements for file names, i.e. up to 8 characters, no
  665.           spaces, and preferably no punctuation. Think of a file name
  666.           that bears some relationship to the application.  It makes
  667.           things easier.  For our sample, let's use CUSTOMER.  Type in
  668.           the file name and press <ENTER>.  Note that you do NOT enter
  669.           the file extension which WAMPUM assigns as .DBF. 
  670.  
  671.                You then will be prompted to enter four pieces of
  672.           information for each new field in your data base: a field
  673.           name, a field type, a field length, and field decimals (for
  674.           numeric fields only).
  675.            
  676.                In determining the order of the fields in the data base
  677.           being created, keep in mind that BROWSE mode, which is
  678.           discussed under the Select Utilities option, displays a
  679.           single line of fields for 20 records at a time.  If your
  680.           users will be using BROWSE mode, then you should select the
  681.           most important fields in the data base as the first fields in
  682.           the file.  This will assure that they are displayed when the
  683.  
  684.                                          10
  685.  
  686.  
  687.           user sets BROWSE mode ON.  The actual number of fields which
  688.           will fit on a single line of the screen is determined by two
  689.           factors: (1) the length of the field names used, and (2) the
  690.           maximum length of the field data.  Adding the greater of
  691.           these lengths for each field plus a space between each field,
  692.           WAMPUM will display as many fields as will fit within 79
  693.           characters in BROWSE mode.  The first character position of
  694.           the line is reserved to display whether a record has been
  695.           marked DELETED.
  696.             
  697.                Field names should bear some resemblance to the piece of
  698.           data which will be stored in the field.  dBASE III supports
  699.           10 character field names, and WAMPUM can use them, too. 
  700.           However, applications are much more straight-forward if field
  701.           names are limited to 8 characters or less since this length
  702.           matches the DOS filename length restriction.  Field names
  703.           must begin with a letter of the alphabet.  Subsequent
  704.           characters in the field names may be characters, numbers, or
  705.           the underscore character.
  706.             
  707.                Field types and lengths supported by WAMPUM include: 
  708.  
  709.  
  710.           Field Type     Abbrev    Min.      Max.      Comments 
  711.                                    Len.      Len.
  712.  
  713.           Character      C         1         254       Any text string 
  714.           Numeric        N         1         15        Numeric for math
  715.           Date           D         8         8         Any date info
  716.           Logical        L         1         1         True/False info
  717.           Memo           M         10        10        Free-form WP
  718.           text 
  719.  
  720.  
  721.                Field decimals will always be 0 except for numeric
  722.           fields in which you want to use real numbers, i.e. those with
  723.           decimals.  Remember that with such fields, the TOTAL length
  724.           is the maximum number of integer positions, plus 1 for the
  725.           decimal, plus the number of decimal positions.  Thus, if the
  726.           largest value to be entered in a numeric field is 9999.99,
  727.           the field length is 7 and decimals is 2.
  728.             
  729.                Enter the information for the fields outlined in our
  730.           sample data base. After entering all of the fields, a new
  731.           blank record will appear.  Press the <ESC>ape key to indicate
  732.           that you are finished except in the FoxBASE+ versions. In the
  733.           FoxBASE+ versions, press CTRL-End.
  734.  
  735.  
  736.  
  737.  
  738.             
  739.  
  740.                                          11
  741.  
  742.  
  743.             2.1.4 Selecting the New File
  744.             
  745.                Once the data base structure has been created, you are
  746.           ready to tell WAMPUM which file you will be working with. 
  747.           From the Main System Menu select the F - File Select option
  748.           to place the file in use.
  749.  
  750.                In all versions of WAMPUM, a window displaying all files
  751.           in the default directory will appear.  Highlight the file
  752.           desired using the cursor keys, and press <ENTER>.
  753.  
  754.                The bottom of the Main System Menu now should show the
  755.           file in use with a notation: FILE: CUSTOMER.
  756.             
  757.             
  758.             2.1.5 Revising the Existing File Structure 
  759.  
  760.                Beginning with version 3.1, WAMPUM provides a simple
  761.           facility to revise the structure of an existing data base.
  762.           This often becomes necessary when you design an initial data
  763.           base without spending some time thinking about what you need.
  764.             
  765.                To revise the structure of an existing data base, you
  766.           first must select that file for use with the F - File Select
  767.           option. Once the file is in use, select the B - Build New
  768.           File.  The prompt will advise you to insert an asterisk (*)
  769.           for the file name if you desire to revise the existing data
  770.           base structure. Type an asterisk and press <ENTER>.  WAMPUM
  771.           will ask whether you really want to revise the structure of
  772.           the data base. Type Y. 
  773.  
  774.                For all versions except FoxBASE+, WAMPUM will display up
  775.           to two columns of fields from your data base.  For each
  776.           field, you may change the field name, field type, field
  777.           length, and field decimals.  You also may delete a field from
  778.           the structure by marking the DELETE? option True.  If you
  779.           change the name or field type of an existing field, ALL DATA
  780.           which exists in that field throughout your data base will be
  781.           destroyed!  Never change a field type without also changing
  782.           the field name or an error will result.  If you need to
  783.           change a field type only, you will need to use the COPY
  784.           UTILITIES option to copy the data to an SDF file, then copy
  785.           it back into a new data base structure.  If there are more
  786.           than 40 fields in your data base structure, you can move
  787.           through them using the <PgDn> and <PgUp> keys.  Once you have
  788.           made all the changes to existing fields desired, press the
  789.           <ESC> key to proceed or CTRL-End in FoxBASE+.
  790.             
  791.                WAMPUM then will ask whether you wish to ADD new fields
  792.           to the existing data base.  If you need additional fields,
  793.           type Y and you will be prompted for a field name, type,
  794.           length, and decimals entry for each new field.  You also can
  795.  
  796.                                          12
  797.  
  798.  
  799.           use <PgUp> and <PgDn> to move through the existing fields. 
  800.           You may also press <CTRL-N> to insert a new field at any
  801.           place in the file structure.  <CTRL-U> will delete or
  802.           undelete any existing field.  Once you have added all new
  803.           fields desired, press <ESC> to proceed except Fox+. 
  804.  
  805.                Once the data base has been revised, always reindex
  806.           using the X - Rebuild/FileFix option.  If you are using edit
  807.           checks, data entry menus, or keyboard macros which were keyed
  808.           to the old file structure, make certain that these are
  809.           revised to reflect the new data base structure before adding
  810.           or editing data in the data base.  This is explained in more
  811.           detail below.
  812.  
  813.  
  814.  
  815.  
  816.  
  817.             2.1.6 Indexing the New File
  818.             
  819.             2.1.6.1  Overview
  820.             
  821.                WAMPUM indexes serve two functions in run-time appli-
  822.           cations.  First, they provide a quick means of retrieving
  823.           records for edit, display, or printing.  Typical retrieval
  824.           times even with large data bases are less than one second. 
  825.           Indexes also serve as the sorting tool for all output:
  826.           reports, labels, and form letters. 
  827.  
  828.                Thus, in building a new application, you need to take
  829.           these considerations into account.  You will need indexes to
  830.           retrieve your data quickly for updating.  And you may need
  831.           other indexes to assure that reports, labels, and form
  832.           letters are produced in the proper sorted order.
  833.             
  834.                As indicated previously, the primary advantage in using
  835.           indexes rather than a sort for output is that no physical
  836.           sorting of the data base ever takes place since the indexes
  837.           are constantly updated as new records are added and old ones
  838.           are modified.  This saves an enormous amount of time in
  839.           producing reports. 
  840.  
  841.                WAMPUM supports up to SEVEN indexes for any application.
  842.           It should be noted that while these indexes function much
  843.           like the indexes in dBASE III Plus, they are not necessarily
  844.           compatible.  dBASE III Plus, FoxBASE+, and Clipper all
  845.           provide functionally equivalent indexes; however, each vendor
  846.           thinks their product's indexing algorithm is better.  Thus,
  847.           if you are moving dBASE III Plus data bases over to use with
  848.           WAMPUM, the data base, reports, and labels are compatible,
  849.           but the indexes may need to be rebuilt unless you have
  850.  
  851.  
  852.                                          13
  853.  
  854.  
  855.           purchased WAMPUM with dBASE-compatible indexes.  In any
  856.           event, indexes can be rebuilt easily.  
  857.  
  858.                Select the I - Index Select/Create option from the Main
  859.           System Menu.  This option provides a developer with the means
  860.           to create new indexes and to use existing ones.  Both avenues
  861.           are addressed in the following sections of this Guide.   
  862.  
  863.             2.1.6.2  Creating New Indexes
  864.             
  865.                New indexes can be created in one of two ways depending
  866.           upon the type of index desired and the version of WAMPUM you
  867.           selected. WAMPUM can create an index of any character,
  868.           numeric, or date field as it exists in the data base.  In our
  869.           sample data base, let's assume we want a zip code index.  In
  870.           addition, you can create a special index made up of a com-
  871.           bination of fields in the data base using dBASE string mani-
  872.           pulation functions.  For example, in our sample data base, we
  873.           might want a single index which sorted the data base on last
  874.           name and then first name within last name.
  875.             
  876.                The simple index is a single field index. In the floppy
  877.           version of WAMPUM, choosing the I-Index Select/Create option
  878.           will display a window with several options.  Highlight the
  879.           Create New Index File option and press <ENTER>.  Then
  880.           highlight the field you want to index and press <ENTER>.
  881.  
  882.                In our example, you probably would want a simple index
  883.           on the ZIP field.  Create the index following the steps
  884.           outlined above.
  885.  
  886.                In some circumstances, a more complex index may be
  887.           desired. If you know what you are doing (i.e. you really are
  888.           a dBASE III programmer), you can build any type of index to
  889.           achieve any type of sorting desired.  In floppy versions of
  890.           WAMPUM, choose the Create New Index File option, then press
  891.           <End> to move to the option labeled ** Special Index** and
  892.           press <ENTER>.  
  893.  
  894.                In all versions, you then will be prompted to name the
  895.           new index file and then to enter the index expression.  This
  896.           expression can be ANY legal dBASE III string expression. 
  897.           Note that index expressions always must equate to a fixed
  898.           length.  Thus, if spaces are trimmed off the end of a field,
  899.           they must be added as real spaces at the end to assure a
  900.           fixed length index.  An example may help clear the fog.
  901.  
  902.  
  903.                For example, if we wanted to index on last name then
  904.           comma space then first name, enter FULLNAME for the name of
  905.           the index file.  Then for the index expression, type:
  906.  
  907.  
  908.                                          14
  909.  
  910.  
  911.           SUBSTR(TRIM(Lastname) +", "+ FirstMi + SPACE(20),1,42)
  912.  
  913.                The SPACE(20) expression assures that every full name
  914.           index entry will be at least 42 characters long regardless of
  915.           the actual length of the trimmed LASTNAME.  SUBSTR() is a
  916.           dBASE function which extracts a substring from a string.  Its
  917.           syntax is SUBSTR(char_expr,starting position,string length).
  918.           Finally, note you can only concatenate strings if each
  919.           evaluates to a character expression.  This is satisfied if a
  920.           field is a Character type, or if text is surrounded in
  921.           quotes, or if a dBASE function evaluates to a character
  922.           expression.
  923.  
  924.  
  925.             2.1.6.3  Selecting Indexes
  926.             
  927.                Once you have built new indexes, they automatically are
  928.           selected for use in the same order they were built.  You can
  929.           change both the LEAD INDEX and the active indexes at any time
  930.           by picking the I - Index select/create option.  In the
  931.           FoxBASE+ versions of WAMPUM,  enter the number of the lead
  932.           index or the names of desired indexes.  In other versions of
  933.           WAMPUM, choose Select Indexes to Use or Pick Lead Index, and
  934.           highlight your desired choices.  You also may press <ALT-I>
  935.           from the Main System Menu to change the lead index in all
  936.           WAMPUM versions except FoxBASE+.
  937.  
  938.                One caution is in order.  Remember that indexes are only
  939.           UPDATED with ADD or EDIT if those indexes are in use at the
  940.           time the file is changed!  You can ascertain which indexes
  941.           are in use by looking at the INDX listing which appears below
  942.           the Main System Menu.  If you built the indexes recommended
  943.           in the last section, the last line of your screen should read
  944.           as follows: 
  945.  
  946.                     FILE: CUSTOMER   INDX: ZIP,FULLNAME 
  947.  
  948.  
  949.  
  950.  
  951.  
  952.             2.1.7 Printer Configuration (.MEM files)
  953.             
  954.             2.1.7.1  Overview
  955.             
  956.                In order to create high-quality output in reports,
  957.           labels, and form letters, you will need to configure an
  958.           application for a specific printer.  WAMPUM is packaged with
  959.           several printer configuration tables which already have been
  960.           built to support a number of popular printers.  If you're a
  961.           lucky person, your work has already been done.  If not, read
  962.           the section on constructing a new printer table below.
  963.  
  964.                                          15
  965.  
  966.  
  967.  
  968.                WAMPUM is designed to allow a developer to imbed printer
  969.           codes in reports, labels, and form letters to control the
  970.           actual printing of text.  In addition, the end-user can
  971.           specify the starting printer font to be used to output any
  972.           report, label, or form letter.  Finally, WAMPUM preformatted
  973.           output includes the option of specifying the initialization
  974.           printer string.  
  975.  
  976.                What is a WAMPUM printer table?  It is a standard dBASE
  977.           III memory variable file (.MEM file extension) with special
  978.           codes that tell your printer to print in a certain mode.  The
  979.           following field names are reserved by WAMPUM and should not
  980.           be used as field names in your data bases.  These fields can
  981.           be used in creating report forms, labels, and form letters to
  982.           vary the type styles within those output documents.  This may
  983.           include turning underscore on and off.
  984.             
  985.                FONTINIT       FONT1     FONT4     FONT7
  986.                FONTRESET      FONT2     FONT5     FONT8
  987.                FONT0          FONT3     FONT6     FONT9 
  988.  
  989.                Note that the FONTINIT string always gets sent to the
  990.           printer before anything is printed.  The FONTRESET string
  991.           always gets sent after anything is printed.  If these fields
  992.           are empty, then obviously nothing gets sent.
  993.  
  994.                The default font for all output is FONT0.  This always
  995.           gets sent after the FONTINIT sequence unless you specify some
  996.           other number when the output is generated.
  997.             
  998.                Listed below is the definition logic used to develop the
  999.           font codes for the HP LaserJet printers.  It is similar to
  1000.           what was used for the Epson printers, except all output is in
  1001.           portrait mode with Epson dot matrix printers.  In general
  1002.           terms, FONT9 is reserved for very small print to accommodate
  1003.           reports of 132 columns. FONT8 is reserved to accommodate
  1004.           reports from 81 to 110 columns wide. FONT7 is used with the
  1005.           lasers to get mailing labels to line up. 
  1006.  
  1007.                FONT0     10 pitch Courier, portrait mode
  1008.                FONT1     10 pitch standard, portrait mode
  1009.                FONT2     10 pitch bold, portrait mode
  1010.                FONT3     10 pitch italics, portrait mode
  1011.                FONT4     Proportional, big bold, portrait mode
  1012.                FONT5     Proportional, baby print, portrait mode
  1013.                FONT6     Standard, baby print, portrait mode
  1014.                FONT7     10 pitch with codes suitable for LABELS
  1015.                FONT8     10 pitch, standard, landscape mode
  1016.                FONT9     Standard, baby print, landscape mode 
  1017.  
  1018.  
  1019.  
  1020.                                          16
  1021.  
  1022.  
  1023.                Obviously, use of these font codes can be adjusted as
  1024.           your application demands.  There may be instances in which
  1025.           you need underscoring.  This can be accomplished using one
  1026.           font to turn on automatic underscore and another to turn it
  1027.           off if your printer supports it.
  1028.             
  1029.             
  1030.             2.1.7.2  Selecting an Existing Printer Table 
  1031.  
  1032.                To select an existing printer table for use, choose the
  1033.           option labeled # - PRINTER Config on the Main System Menu.  A
  1034.           listing of all .MEM files in the current directory will be
  1035.           displayed.  In floppy versions, enter the name of the printer
  1036.           table you wish to use without the .MEM file extension.  In
  1037.           other versions, highlight the desired font file and press
  1038.           <ENTER>.  Note that you may use a table which is stored in
  1039.           another directory so long as that directory is part of DOS's
  1040.           PATH command if you know the file's name. 
  1041.  
  1042.                Once you have selected a printer, the Main System Menu
  1043.           will reappear and the last line on the screen should now show
  1044.           the printer and FONT in use.  Assuming you selected the
  1045.           HPLASERA font, the last line of your screen should look like
  1046.           this: 
  1047.  
  1048.           File: Customer  Indx: Zip,FullName  Prt: HpLaserA/0 
  1049.  
  1050.  
  1051.  
  1052.             2.1.7.3  Creating a New Printer Table
  1053.             
  1054.                If there is no printer table already available for your
  1055.           printer, then you will need to build one.  It's easy!  First,
  1056.           select the # - PRINTER config option on the Main Menu. 
  1057.  
  1058.                In the floppy versions, when WAMPUM prompts for the name
  1059.           of the printer table to use, type an asterisk (*) and press
  1060.           <ENTER>.  In other versions, highlight the Create New File
  1061.           option and press <ENTER>.  After entering a file name for
  1062.           your new printer template, you then will get a data entry
  1063.           screen in which to type the special codes for your printer. 
  1064.           Your printer manual is necessary to find the codes.
  1065.  
  1066.  
  1067.                First, decide what you want each of the printer fonts to
  1068.           do.  You also must determine what sort of initialization
  1069.           sequence, if any, you want to send whenever anything is
  1070.           printed.  And, you will want to decide whether to reset your
  1071.           printer after the printing is completed.  Almost every
  1072.           printer has some code sequence which resets the printer to
  1073.           its default settings just as if the printer had been switched
  1074.           off and on.  This is a good idea!  It always assures that
  1075.  
  1076.                                          17
  1077.  
  1078.  
  1079.           your printer is configured in a standard way for the next
  1080.           job.  It's an equally good idea to execute this reset as part
  1081.           of the printer initialization sequence for the same reason.
  1082.             
  1083.                Most printer codes start with an <ESC>ape code which has
  1084.           the ASCII value of 27.  In a lot of printer manuals, it is
  1085.           referred to as CHR$(27) which is the way <ESC> is written in
  1086.           BASIC.  Any time you see a code written as above which cannot
  1087.           be typed using the standard typewriter keyboard, you can
  1088.           enter it in WAMPUM just as you would in LOTUS 1-2-3 or
  1089.           Symphony, i.e. \027 (a backslash followed by a three-digit
  1090.           number representing the ASCII code of the character desired:
  1091.           zero, two, seven).  For example, if your printer manual says
  1092.           that ESCAPE E or CHR$(27)+E is the escape sequence to reset
  1093.           your printer, then enter the following: \027E.      
  1094.  
  1095.                Particularly with laser printers, it may be desirable in
  1096.           some situations to force some carriage returns at the
  1097.           beginning of a job.  This is especially true to line up
  1098.           mailing labels.  To accommodate this, WAMPUM permits the
  1099.           developer to insert carriage return codes in the font setups
  1100.           using the tilde (~).  One tilde means one return.  Two tildes
  1101.           means two returns, etc.  Make certain that ALL tildes follow
  1102.           the complete escape sequence you desire to generate for each
  1103.           font code since characters following tildes are ignored. Do
  1104.           NOT use tildes in the FONTINIT, FONTRESET, FONT0, or FONT2
  1105.           codes since these have special uses in WAMPUM. 
  1106.  
  1107.                Use this process to build the printer table for your
  1108.           printer, and you're all set.  Press the <PgDn> key when you
  1109.           have entered all of the codes desired.
  1110.             
  1111.                Note that you also can edit an existing printer table by
  1112.           entering an * as if you were creating a new printer table. 
  1113.           When WAMPUM prompts for the name of the new printer table,
  1114.           simply enter the name of the old table.  When the data entry
  1115.           screen appears, you will see that codes such as \027 have
  1116.           been converted by WAMPUM into the actual ASCII character.  In
  1117.           the case of the <ESC> code, this is an arrow pointing left.
  1118.           These codes can be edited as desired.
  1119.             
  1120.                A final word of warning.  Do NOT press the <ESC> key to
  1121.           enter an escape code!  This key allows you to ABORT updating
  1122.           a printer table.  To enter an escape code as part of a
  1123.           printer string, you must type \027.
  1124.             
  1125.             2.1.8 Relating a Secondary File
  1126.  
  1127.                  For purposes of report, label, and form letter output,
  1128.           you may relate or link a secondary data base to an identical
  1129.           field in the primary data base if two conditions are met.
  1130.  
  1131.  
  1132.                                          18
  1133.  
  1134.  
  1135.                (1) The secondary data base must be in the default
  1136.           directory or in the path specified by the DOS PATH. 
  1137.  
  1138.                (2) The secondary data base must be indexed on a field
  1139.           identical in size, type, and field name with a field in the
  1140.           primary data base.  Note that the matching field in the
  1141.           primary data base need not be indexed.  
  1142.             
  1143.                Whenever a report, label, or form letter is run while a
  1144.           related file and index are set, the developer may access data
  1145.           in any of the fields of the matching related file record by
  1146.           specifying the field names with the following syntax: 
  1147.  
  1148.                          ALIAS->fieldname 
  1149.  
  1150.           where ALIAS is the name of the related file and FIELDNAME is
  1151.           the name of the field to be output from the related file.
  1152.             
  1153.                A secondary file may be related in one of two ways. The
  1154.           first is to select the Z - Zoom/Relate File option on the
  1155.           Main System Menu and enter the name of the file and index to
  1156.           be related.  This relation stays in effect until changed
  1157.           provided you save it as part of the configuration.  Once a
  1158.           file has been related successfully, the file name display on
  1159.           the last line of the Main System Menu screen should look like
  1160.           the following: 
  1161.  
  1162.                               FILE: ACCOUNTS/R
  1163.             
  1164.                Any reports, labels, or form letters produced after
  1165.           relating the secondary file may access the fields in the
  1166.           related file also. 
  1167.  
  1168.                The second method of relating a file and index is as
  1169.           part of developing the WAMPUM PreFormatted Output file.  This
  1170.           is discussed in a subsequent section of the User's Guide.  It
  1171.           provides additional flexibility since it permits the
  1172.           developer to relate different secondary files and indexes to
  1173.           different reports, labels, and form letters.  WAMPUM
  1174.           Preformatted Output does not rely upon the relation
  1175.           established using the Z - Zoom/Relate File option. 
  1176.  
  1177.             2.1.9 Storing A New Configuration (Wampum.Mem) 
  1178.  
  1179.                The configuration of a given application is stored in a
  1180.           configuration file called WAMPUM.MEM.  You can change the
  1181.           default configuration by picking the configuration option
  1182.           from the Main System Menu.  Select * - CONFIG Update.  For
  1183.           each application you build, you may store certain information
  1184.           as a configuration: 
  1185.  
  1186.  
  1187.  
  1188.                                          19
  1189.  
  1190.  
  1191.                (1)  HEADING is the name to be assigned to a given
  1192.                     application.  It appears above the Main Menu and
  1193.                     also appears at the top of reports.  Press CTRL-Y
  1194.                     to clear the default WAMPUM masthead. 
  1195.  
  1196.                (2)  MAIN FILE DRIVE, RELATED DRIVE and DEFAULT
  1197.                     DIRECTORY.  Use these if your data bases are not
  1198.                     stored in the default directory. If you will be
  1199.                     accessing multiple applications with a single
  1200.                     keystroke, make certain to specify only a DEFAULT
  1201.                     drive for every application.  This should be the
  1202.                     DRIVE:\PATH name where each application is stored.
  1203.  
  1204.                (3)  MENU #'s.  This is a listing of all menu choices  
  1205.                     available to end users.  The choices on the Main
  1206.                     System Menu are numbered 1 to 21 beginning in the
  1207.                     upper left corner, reading down, then right. Make
  1208.                     certain that at least one space precedes each
  1209.                     available menu number.  Delete numbers that
  1210.                     correspond to menu choices you wish to disable.
  1211.  
  1212.                (4)  FORM LETTER MARGINS.  Specify the default left and
  1213.                     right margins for form letters.
  1214.  
  1215.                (5)  PRINTER OUTPUT.  This may be the name of a network
  1216.                     printer device for those using networks, or it may
  1217.                     be a legal DOS file name if you wish to redirect
  1218.                     printer output to a file.
  1219.  
  1220.                (6)  AUDIT TRAIL FILE.  Marking this option True enables
  1221.                     WAMPUM's audit trail.
  1222.  
  1223.                (7)  CONFIRM FIELD ENTRIES.  Marking this option True
  1224.                     means a user must press <ENTER> to confirm each
  1225.                     field entry before the cursor will move to the next
  1226.                     field.
  1227.  
  1228.                (8)  NETWORK.  Marking this option True enables
  1229.                     automatic record locking for those who have
  1230.                     purchased network versions of WAMPUM.  Otherwise,
  1231.                     WAMPUM imposes a file lock when any data base is
  1232.                     accessed.
  1233.  
  1234.                (9)  COUNTRY.  The country code number entered
  1235.                     determines the formatting of dates with WAMPUM. The
  1236.                     following formats are supported:
  1237.  
  1238.  
  1239.                          1    American            MO/DA/YR
  1240.                          2    ANSI                YR.MO.DA
  1241.                          3    British/French      DA/MO/YR
  1242.                          4    Italian             DA-MO-YR
  1243.  
  1244.                                          20
  1245.  
  1246.  
  1247.  
  1248.                (10) MEMO WIDTH.  In FoxBASE+ versions, you may specify
  1249.                     the default MEMO field width for output in lists
  1250.                     and reports.  The default is 50.
  1251.  
  1252.                (11) UPDATE MEMORY VARIABLES.  In FoxBASE+ versions, you
  1253.                     may specify up to 9 memory variables by marking
  1254.                     this field True.  These variables can be used in
  1255.                     reports, labels, and form letters as well as in
  1256.                     edit checking routines that require a simple table
  1257.                     of values.
  1258.  
  1259.                In addition to the above, saving a WAMPUM configuration
  1260.           also saves the following information:
  1261.  
  1262.                     (1)  Name of File and Related File In Use
  1263.  
  1264.                     (2)  Name of Indexes In Use
  1265.  
  1266.                     (3)  Name of Default Printer Template
  1267.  
  1268.                     (4)  Range of Available Data Entry Menus
  1269.  
  1270.                     (5)  BROWSE Mode Default Setting (On or Off)
  1271.  
  1272.                Once an application is configured, then WAMPUM remembers
  1273.           the above settings the next time WAMPUM is run whether in
  1274.           Developer or End-User mode.  This permits a developer to
  1275.           completely customize a WAMPUM application and then turn it
  1276.           over to end-users without the end-user having to master all
  1277.           of the concepts involved in building an application from the
  1278.           ground up. 
  1279.  
  1280.                Beginning with version 3.2, WAMPUM allows nine different
  1281.           configurations to be saved using file names of WAMPUM.1
  1282.           through WAMPUM.9.  To create these files, simply copy
  1283.           WAMPUM.MEM to the new file name.  Then run WAMPUM again, save
  1284.           a new configuration, and copy it to one of the other reserved
  1285.           file names.  
  1286.  
  1287.                These nine configurations can be retrieved with one or
  1288.           two keystrokes.  Press ALT-1 through ALT-9, or press ALT-0 to
  1289.           retrieve WAMPUM.MEM defaults.  Make certain that all config
  1290.           files WAMPUM.1 through WAMPUM.9 are copied to every directory
  1291.           in which you wish to access the other configurations.
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.                                          21
  1301.  
  1302.  
  1303.  
  1304.             2.1.10  Building Reports, Labels, and Form Letters 
  1305.  
  1306.             2.1.10.1  REPORTS
  1307.             
  1308.             2.1.10.1.1  Overview
  1309.             
  1310.                Except for FoxBASE+ versions, WAMPUM Reports are
  1311.           designed using the Clipper REPORT Generator, which Nantucket
  1312.           generously has allowed us to distribute without charge. 
  1313.           Before you can create new report forms or revise old ones,
  1314.           you need to make sure the program REPORT.EXE is located in a
  1315.           directory supported by your DOS PATH command.  This will
  1316.           assure that WAMPUM can access the report generator whenever
  1317.           you want to design or redesign a report form.  Users of
  1318.           FoxBASE+ versions can ignore this.
  1319.  
  1320.             As indicated previously, WAMPUM requires a minimum of 420K
  1321.           memory to access the report writer from within WAMPUM with
  1322.           DOS 3.1.  If you are short on memory, you can run REPORT.EXE
  1323.           from the DOS prompt by typing REPORT filename where filename
  1324.           is the name of the report you wish to create or revise. 
  1325.           Note:  Some versions of WAMPUM later than 3.1 may provide the
  1326.           flexibility to create reports without reliance upon
  1327.           REPORT.EXE.  Consult the README.DOC file for the latest
  1328.           information.
  1329.             
  1330.                Before designing a report, you will always want to print
  1331.           out a listing of the file structure with which you will be
  1332.           working.  Pick the S - Select Utilities option and specify T
  1333.           or Y for the List File Structure option.  Then type Y when
  1334.           asked whether to print the structure listing.
  1335.             
  1336.                Both the Clipper and FoxBASE+ Report Generators are
  1337.           quite similar to dBASE III's report writer which is accessed
  1338.           in dBASE with the command CREATE REPORT filename or MODIFY
  1339.           REPORT filename.  Thus, anyone who is generally familiar with
  1340.           the dBASE III method of designing report forms will have no
  1341.           problem doing the same with WAMPUM.  
  1342.  
  1343.                A report form is a file which contains a template
  1344.           telling WAMPUM which pieces of information you want to
  1345.           extract from a data base.  Note that we said "which pieces of
  1346.           information" meaning which fields rather than which records. 
  1347.           This is an important distinction since neither WAMPUM reports
  1348.           nor dBASE reports control which records print on a report.
  1349.           That is controlled with record selection using the S- Select
  1350.           Utilities option in WAMPUM.  You might more accurately refer
  1351.           to report forms as a formatting mold through which you "pour"
  1352.           information from a data base.  
  1353.             
  1354.  
  1355.  
  1356.                                          22
  1357.  
  1358.  
  1359.                All WAMPUM reports must have a DOS-standard file name
  1360.           with no file extension.  As is true with dBASE, WAMPUM
  1361.           supplies the file extension of .FRM with reports. 
  1362.  
  1363.                The R - REPORTS Menu option on the WAMPUM Main System
  1364.           Menu provides three capabilities to the user.  
  1365.  
  1366.                (1) You can run any existing report form whether created
  1367.           with any dBASE III Plus-compatible report writer.
  1368.  
  1369.                (2) You can create new report forms using the Clipper
  1370.           Report Generator or the FoxBASE+ Report Generator.  
  1371.                (3) You can revise existing report forms using either
  1372.           Report Generator.  The reports need not have been created
  1373.           originally with any particular report writer.
  1374.  
  1375.                How to run reports is explained in the end-user section
  1376.           of this User's Guide.  The following two sections address how
  1377.           to create new report forms and revise old ones. 
  1378.  
  1379.  
  1380.             2.1.10.1.2  Creating A New Report Format
  1381.  
  1382.                After printing a listing of the file structure with
  1383.           which you will be working, the next step in creating a new
  1384.           report form is to select the R - Reports Menu option from the
  1385.           WAMPUM Main System Menu.  In all versions, highlight Create
  1386.           New Report and press <ENTER>. Then enter the name you wish to
  1387.           assign to this new report form.  Do not enter a file
  1388.           extension since WAMPUM automatically assigns .FRM as the file
  1389.           extension in keeping with the dBASE naming convention. 
  1390.           WAMPUM then will run the Report Generator assuming you have
  1391.           sufficient memory to support it.   
  1392.  
  1393.                As is true with the dBASE III report writer, WAMPUM
  1394.           Report Generators divides a report into three parts: 
  1395.             
  1396.                1.  Page Heading & Format Settings 
  1397.  
  1398.                2.  Break Level Controls
  1399.             
  1400.                3.  Report Column Contents & Headings 
  1401.  
  1402.                The Page Heading & Format Settings screen allows you to
  1403.           specify the title of your report as well as the dimensions of
  1404.           the paper on which the report will be printed or displayed. 
  1405.           You also indicate whether the report should be single or
  1406.           double-spaced and whether form feeds should be generated
  1407.           before and after a report is produced.  Unlike dBASE III,
  1408.           WAMPUM always generates a form feed at the end of a report
  1409.           whether requested or not.  This assures your printer always
  1410.           is at TOP OF FORM for the next job.  For the Page Heading,
  1411.  
  1412.                                          23
  1413.  
  1414.  
  1415.           type in whatever title you want to appear at the top of your
  1416.           report when it prints out.  Do NOT center the title since
  1417.           WAMPUM will do this for you automatically. If you want a
  1418.           multi-line heading, just type it the way it should appear at
  1419.           the top of each report page. 
  1420.  
  1421.                Once you have entered a Page Heading, press the <ENTER>
  1422.           key to move to the Format Settings fields.  There are eight
  1423.           options: 
  1424.  
  1425.                1.   Enter page width  . . . . . . 80
  1426.                2.   Enter left margin . . . . . .  8
  1427.                3.   Enter right margin  . . . . .  0
  1428.                4.   Enter no. lines per page  . . 58
  1429.                5.   Double spaced report? . . . .  N
  1430.                6.   Page eject before printing? .  Y
  1431.                7.   Page eject after printing?  .  N
  1432.                8.   Plain page  . . . . . . . . .  N
  1433.  
  1434.                Shown beside each of the above entries is the default
  1435.           value which will be used unless you change them.  The Plain
  1436.           Page option controls whether a report heading with date
  1437.           prints at the top of each page of your report.
  1438.             
  1439.                For normal printers, the default settings usually are
  1440.           fine except you may wish to narrow the left margin to about 2
  1441.           just to provide more report space for information. In
  1442.           addition, you may wish to change the page eject before
  1443.           printing option to N.  
  1444.  
  1445.                For those using a laser printer, you will need to adjust
  1446.           the settings or your reports will run off the bottom of the
  1447.           page since most lasers force a 1/2 inch margin at the top and
  1448.           bottom of a page.  With standard 10 pitch, portrait mode
  1449.           reports, the appropriate settings are 80, 2, 0, 56, and N or
  1450.           Y depending upon whether you want the report single or
  1451.           double-spaced.  If you are printing sideways (landscape mode)
  1452.           with FONT8 (10 pitch) or with FONT9  (16 pitch), then the
  1453.           settings should be as follows: 
  1454.  
  1455.                     FONT8:  105, 2, 0, 40, and N or Y 
  1456.  
  1457.                     FONT9:  140, 2, 0, 40, and N or Y 
  1458.             
  1459.                Once you have entered the Page Heading and report
  1460.           settings, press the <PgDn> key to display the second screen
  1461.           of the report generator.  This screen is used principally to
  1462.           break reports into sections based upon a change in the value
  1463.           of some key field in the data base.  For beginners, just
  1464.           press <PgDn> to skip this screen.  
  1465.             
  1466.  
  1467.  
  1468.                                          24
  1469.  
  1470.  
  1471.                For experts, you should recall that your report will not
  1472.           break properly on the field specified in Group/Subtotal on
  1473.           unless that same field is the primary index in use when the
  1474.           report is run.  Similarly, if you specify a subgroup field
  1475.           name, this must be a subfield in the primary index as well.
  1476.           An example may clear the air a little.
  1477.  
  1478.                Suppose we are producing a report of customers and we
  1479.           want the report paginated by zip code.  Since we already have
  1480.           a ZIP index, the only trick is to assure that ZIP is the lead
  1481.           index when the report is run.  To create the template, enter
  1482.           the following:
  1483.  
  1484.                Group/subtotal on: ZIP
  1485.                Summary report only? N
  1486.                Eject after subtotal? Y
  1487.                Group/subtotal heading: Zip Code:
  1488.                Subgroup/subsubtotal on 
  1489.                Subgroup heading:
  1490.             
  1491.                What happens if you forget to set the primary index to
  1492.           ZIP?  When the report is run, WAMPUM assumes you know what
  1493.           you are doing.  So, as the report sifts through your data
  1494.           base, it will do just what you told it.  Whenever, the zip
  1495.           code of customers changes, the report will issue a page break
  1496.           and print a new subheading of Zip Code: 30013 for the next
  1497.           zip code encountered.  However, since you forgot to put the
  1498.           proper index in effect, the actual records in the data base
  1499.           will not be in zip code order.  Thus, you may get a page with
  1500.           one customer from zip 98199, then a page with one from 30013,
  1501.           then another page with one from 98199, etc.  In short, you
  1502.           probably will get about a 200 page report rather than the
  1503.           five page report you expected.  As noted earlier, if you are
  1504.           a beginning report developer, skip this screen until you have
  1505.           an ample paper supply.
  1506.  
  1507.                The meat of the coconut in creating report forms is the
  1508.           Field Contents screen.  This is the screen on which you tell
  1509.           the report generator which piece of information you want
  1510.           printed on the actual report.  For example, let's assume we
  1511.           want our final report to be laid out as follows:
  1512.  
  1513.           Customer Name   Purch Amt  Purch Dt   Married     Comments 
  1514.  
  1515.                For each column of information, you must specify a
  1516.           separate Field Contents screen.  When you finish specifying
  1517.           one column of information, simply <PgDn> to get another
  1518.           screen.  This process continues until you have specified all
  1519.           of the pieces of information to be printed in the various
  1520.           columns of your report. Note that each screen asks for five
  1521.           items of information: 
  1522.  
  1523.  
  1524.                                          25
  1525.  
  1526.  
  1527.                1.  CONTENTS
  1528.                2.  # decimal places  0
  1529.                3.  Totals?  N
  1530.                4.  HEADER
  1531.                5.  WIDTH
  1532.             
  1533.                CONTENTS is asking for the data base field name of the
  1534.           field to print in the current column of the report. The
  1535.           CONTENTS field may contain any valid dBASE expression. In
  1536.           addition, you can force WAMPUM to create multi-line reports
  1537.           by specifying more than one field name for the contents
  1538.           field.  Columns of a report are built from left to right
  1539.           across the screen or page when a report is produced.  
  1540.  
  1541.                Since we want the customer's full name in the first
  1542.           column, we need to get a little fancy.  If we only wanted the
  1543.           last name in this column, you would just enter LASTNAME since
  1544.           that is a field name in the data base.  However, FULLNAME is
  1545.           not a field name in the data base.  It has to be constructed
  1546.           by joining the last and first name fields together with a
  1547.           comma and space between them.  We also want to strip the
  1548.           trailing spaces off the last names so we don't get a printout
  1549.           such as Smith      , John.  The correct syntax to extract
  1550.           full names is the following:
  1551.  
  1552.                TRIM(LASTNAME) + ", " + FIRSTMI
  1553.  
  1554.                Now press <DN> cursor key or <ENTER> to move down to the
  1555.           # decimal places field; however, the <DN> cursor is safer
  1556.           since a little Clipper anomaly sometimes assumes you're
  1557.           finished building your report when you press <ENTER>.  This
  1558.           is not true in the FoxBASE+ versions.
  1559.             
  1560.                Unless you have specified a numeric expression  for the
  1561.           CONTENTS, both the # decimal places field and the Totals?
  1562.           field should be left alone.  If you are outputting numeric
  1563.           data, then the # decimal places field allows you to specify
  1564.           how many decimal positions should be printed for this column
  1565.           of the report.  Simply enter a number and press the DOWN
  1566.           CURSOR.  Totals? allows you to specify whether you want the
  1567.           numeric expression totaled (and subtotaled) at breaks in the
  1568.           report and at the end of the report.  Note again that you
  1569.           cannot TOTAL anything except a numeric expression.  If you
  1570.           just want a COUNT of records, this is covered below
  1571.           separately.  Then, DOWN CURSOR to the HEADER field. 
  1572.  
  1573.                HEADER is asking for the column heading to display for
  1574.           this column of the report.  This is free-form text of your
  1575.           choosing.  It should convey to the reader of the report what
  1576.           the contents of this column of the report actually are.  The
  1577.           only precaution here is that the header typically should not
  1578.           be much wider in length than the maximum field width being
  1579.  
  1580.                                          26
  1581.  
  1582.  
  1583.           displayed in this column.  Otherwise, you are just wasting
  1584.           space across the report since the WIDTH must be the wider of
  1585.           the field maximum width and the header width.  In the example
  1586.           above, type Customer Name on the first header line, then
  1587.           press the DOWN CURSOR and type 42 hyphens on the next line to
  1588.           simulate an underscore.  Use the DOWN CURSOR to move down to
  1589.           the WIDTH field.
  1590.             
  1591.                WIDTH is asking for the column width of this column of
  1592.           the report.  As noted above, this width should be the greater
  1593.           of the field maximum width or the longest line of the column
  1594.           headers.  For our full name, the width would be the sum of
  1595.           the widths of the LASTNAME field + FIRSTMI field + 2 (for the
  1596.           comma and space) = 42.  Once you have entered the width
  1597.           desired, press <PgDn> or <ENTER> and a second Field Contents
  1598.           Screen will appear. 
  1599.             
  1600.                For the next column of your report, the Field Contents
  1601.           would be PURCHAMT, the Number of Decimals would be 2, the
  1602.           Totals would be Y, the Header would be Purch Amt then 9
  1603.           hyphens, and the Width would be 9.  The only gotcha here is
  1604.           making sure the total column width can hold the totals
  1605.           calculation for the entire report.  We will assume 9 will
  1606.           suffice.  When the report is run, if you get a total with all
  1607.           asterisks, simply increase the column width to accommodate
  1608.           the total.
  1609.  
  1610.                For the third column, the Field Contents would be
  1611.           PURCHDT, the Number of Decimals would be 0, the Totals would
  1612.           be N, the Header would be Purch Dt then 8 hyphens, and the
  1613.           Width would be 8.  Note that in reports you can perform
  1614.           calculations with date fields.  For example, if an invoice
  1615.           always was due 30 days after the purchase date, we could
  1616.           change the Field Contents to PURCHDT+30 and change the Header
  1617.           to INVOICE DUE.  When the report was run, the invoice due
  1618.           dates automatically would be calculated. 
  1619.  
  1620.                For the fourth column, the Field Contents would be
  1621.           MARRIED, the Number of Decimals would be 0, the Totals would
  1622.           be N, the Header would be Married then 7 hyphens, and the
  1623.           Width would be 7.  Notice that a logical field yields a
  1624.           result of .T. for true or .F. for false, 3 characters wide. 
  1625.           But, the header is wider so the column width must be adjusted
  1626.           to accommodate the wider 7 character heading.  Here you might
  1627.           prefer to print the word "Yes" or "No" rather than .T. or .F. 
  1628.           WAMPUM supports this using the immediate IF function.  The
  1629.           syntax for immediate IF is IIF(condition,true result, false
  1630.           result).  In English, the immediate IF function first
  1631.           requires a Boolean logic condition.  The second argument is
  1632.           what to do if the condition is true.  The third argument is
  1633.           what to do if the condition is false.   Thus, to test a
  1634.           logical field, the syntax is IIF(MARRIED,"Yes","No").
  1635.  
  1636.                                          27
  1637.  
  1638.  
  1639.  
  1640.                     For the fifth column, the Field Contents would be
  1641.           COMMENTS, the Number of Decimals would be 0, the Totals would
  1642.           be N, the Header would be Comments then 20 hyphens, and the
  1643.           Width would be 20.  Since COMMENTS is a memo field, the
  1644.           column width can be adjusted as required to meet your needs. 
  1645.           WAMPUM automatically will provide word wrap
  1646.           as necessary to make the COMMENTS field fit in the column
  1647.           width specified.
  1648.  
  1649.                With the Clipper Report Writer, you MUST ALWAYS move to
  1650.           a blank Field Contents screen before electing to SAVE your
  1651.           report template. If you violate this rule, you probably will
  1652.           lose the last column of your report. Press the <ESC> key to
  1653.           tell the report writer you are finished.     You will be
  1654.           asked whether you are finished.  Typing a Y saves the report
  1655.           template to disk.  Typing an N returns you to the top of the
  1656.           current Field Contents Screen.  Pressing <ESC> aborts the
  1657.           report creation process and does NOT save the report. 
  1658.  
  1659.                What happens if you want to change something before you
  1660.           have first saved the report?  With either report writer,
  1661.           simply press <PgUp> to move back through the screens you have
  1662.           already entered.  Remember, however, that with the Clipper
  1663.           Report Writer, you must <PgDn> to return to a blank Field
  1664.           Contents Screen before SAVING the report.  You probably will
  1665.           have to use the <ENTER> key to move through the last
  1666.           completed Field Contents Screen to get to a blank screen.  Be
  1667.           aware that leaving an actual blank Field Contents Screen in
  1668.           the report template will cause a run-time error when the
  1669.           report is executed. 
  1670.  
  1671.  
  1672.                Suppose you want to count the number of records output
  1673.           in the report.  This is perhaps the weakest link in both the
  1674.           dBASE report writer and all the clones.  The easiest method
  1675.           for doing this is to include a final Field Contents Screen
  1676.           with the following specifications.  For the CONTENTS, type
  1677.           the number 1.  For DECIMALS, leave it at 0.  For TOTALS, type
  1678.           Y.  For the HEADER, type TOTAL and a second row of -----. 
  1679.           For width, type 5.  This will tell WAMPUM to count the
  1680.           records as the report is produced and print a total at the
  1681.           bottom.  It will also uglify your report by producing a
  1682.           column of 1's along the right margin of your report.
  1683.             
  1684.                Suppose you want a multi-line report with a name and
  1685.           address in a single column followed by several other pieces
  1686.           of data in separate columns.  For the contents field, you may
  1687.           specify more than one field for output in the column so long
  1688.           as all the fields evaluate to character strings.  To force
  1689.           multiple lines within a column, you simply reduce the column
  1690.           width to account for the amount of data which should display
  1691.  
  1692.                                          28
  1693.  
  1694.  
  1695.           on each line plus one space. Then adjust your various lines
  1696.           of data to match the column width. A simple example may help. 
  1697.           Using our sample data base, the syntax for the Field Contents
  1698.           is SUBSTR(TRIM(LASTNAME)+", " + FIRSTMI + SPACE(20),1,41) +
  1699.           ADDRESS.  The Column Width would be set to 41.  This forces
  1700.           "word wrap" after 41 characters which will be where the full
  1701.           name ends and the address begins.  
  1702.  
  1703.                The final thing to be careful of in creating reports is
  1704.           to make sure the total field widths specified for your report
  1705.           do not exceed the PAGE WIDTH specified when you set up the
  1706.           report.  A little math in advance will solve this problem. 
  1707.           WAMPUM always leaves a single space between columns of the
  1708.           report. This is in addition to the field widths specified! 
  1709.  
  1710.             
  1711.             2.1.10.1.3  Modifying Existing Report Formats 
  1712.  
  1713.                To modify an existing report, select the R - Report Menu
  1714.           option from the Main System Menu.  Look at the listing of
  1715.           reports which displays and write down the name of the one to
  1716.           be modified.  With all versions, choose the Modify Report
  1717.           option and highlight the report you want to change. 
  1718.  
  1719.                The discussion above with respect to creating a new
  1720.           report applies as well to modifying an existing one.  As
  1721.           noted, be careful to check the defaults and make certain with
  1722.           the Clipper Report Generator that you have moved to the end
  1723.           of your existing report template and then to a BLANK CONTENTS
  1724.           field before saving the report template.
  1725.  
  1726.  
  1727.             2.1.10.1.4  Outputting MEMO fields in Reports 
  1728.  
  1729.                MEMO fields may be formatted as columns in a report just
  1730.           like a character string.  The syntax of the CONTENTS
  1731.           expression is simply the name of the MEMO field.  The field
  1732.           width may be adjusted to meet your requirements. Word wrap is
  1733.           automatic.
  1734.             
  1735.  
  1736.             2.1.10.2  LABELS
  1737.  
  1738.             2.1.10.2.1  Overview
  1739.             
  1740.                WAMPUM Label Templates are designed using either the
  1741.           Clipper LABEL Generator, which Nantucket generously has
  1742.           allowed us to distribute without charge, or the FoxBASE+
  1743.           LABEL Generator which is part of the FoxBASE+ run-time
  1744.           module.  WAMPUM requires 420K to access the Clipper label
  1745.           generator program from the Main System Menu. If you are short
  1746.           on memory, you may run the label program from the DOS prompt
  1747.  
  1748.                                          29
  1749.  
  1750.  
  1751.           using the following syntax: LABEL filename where filename is
  1752.           the name of the label template to be created or revised. 
  1753.           This does not apply with FoxBASE+.
  1754.  
  1755.                Before you can create new label templates or revise old
  1756.           ones except with FoxBASE+ versions, you need to make sure the
  1757.           program LABEL.EXE is located in a directory supported by your
  1758.           DOS PATH command. This will assure that WAMPUM can access the
  1759.           label generator whenever you want to design or redesign a
  1760.           label form.  
  1761.             
  1762.                You should also be aware that beginning with DOS 3.0, a
  1763.           DOS program named LABEL.COM is provided to rename volume
  1764.           labels.  Make certain that your DOS PATH checks the
  1765.           subdirectory containing Clipper's LABEL.EXE program before
  1766.           checking the DOS subdirectory containing LABEL.COM. 
  1767.           Otherwise, WAMPUM will execute the wrong program when you
  1768.           attempt to create or revise label forms.  Another approach is
  1769.           to rename LABEL.COM to some other file name such as
  1770.           NEWLABEL.COM.  This will avoid conflict.      
  1771.  
  1772.                Before designing labels, you will always want to print
  1773.           out a listing of the file structure with which you will be
  1774.           working.  Pick the S - Select Utilities option and specify T
  1775.           or Y for the List File Structure option.  Then type Y when
  1776.           asked whether to print the structure listing.
  1777.             
  1778.                Just as was true with reports, a label form is a file
  1779.           which contains instructions telling WAMPUM which pieces of
  1780.           information you want to extract from a data base and place on
  1781.           labels.  
  1782.  
  1783.                All WAMPUM labels must have a DOS-standard file name
  1784.           with no file extension.  As is true with dBASE, WAMPUM
  1785.           supplies a file extension of .LBL with label forms.
  1786.             
  1787.                The L - LABELS for Mail option on the WAMPUM Main System
  1788.           Menu provides three capabilities to the user.  
  1789.  
  1790.                (1) You can run any existing label form created with any
  1791.           dBASE III-compatible Label Generator.
  1792.  
  1793.                (2) You can create new label forms using either the
  1794.           Clipper or FoxBASE+ Label Generator.  
  1795.  
  1796.                (3) You can revise existing label forms using the
  1797.           Clipper or FoxBASE+ Label Generator.  
  1798.  
  1799.                How to produce mailing labels is explained in the end-
  1800.           user section of this User's Guide.  The following two
  1801.           sections address how to create new label forms and revise old
  1802.           ones. 
  1803.  
  1804.                                          30
  1805.  
  1806.  
  1807.            
  1808.             2.1.10.2.2  Creating A New Label Format
  1809.             
  1810.                After printing a listing of the file structure with
  1811.           which you will be working, the next step in creating a new
  1812.           label form is to select the L - Labels for Mail option from
  1813.           the WAMPUM Main System Menu.  In all versions, pick Create
  1814.           New Labels and press <ENTER>.  Then enter the name you wish
  1815.           to assign to this new label form.  Do not enter a file
  1816.           extension since WAMPUM automatically assigns .LBL as the
  1817.           extension in keeping with the dBASE III Plus.  
  1818.  
  1819.                WAMPUM then will run the Label Generator assuming you
  1820.           have sufficient memory to support it and (except for FoxBASE+
  1821.           versions) assuming WAMPUM can find Label.Exe in the DOS PATH
  1822.           before finding DOS's LABEL.COM program. 
  1823.                As is true with the dBASE III label writer, the WAMPUM
  1824.           divides a label form into two parts: 
  1825.  
  1826.                          1.  Label Settings
  1827.             
  1828.                          2.  Label Contents 
  1829.             
  1830.                There are six items of information which can be set to
  1831.           specify how the labels should be formatted.  These include:  
  1832.  
  1833.  
  1834.                          1.   Width of Label           35
  1835.                          2.   Height of Label           5
  1836.                          3.   Left Margin               0
  1837.                          4.   Lines Between Labels      1
  1838.                          5.   Spaces Between Labels     0
  1839.                          6.   No. of Labels Across      1 
  1840.  
  1841.                Width of Label refers to the maximum width of any text
  1842.           entry on any label produced.  Height of Label means the
  1843.           maximum number of lines per label.  Left Margin is the
  1844.           starting column position for the left-most label.  Lines
  1845.           Between Labels specifies the number of blank lines between
  1846.           each completed label. Spaces Between Labels is the number of
  1847.           blank columns horizontally between labels when two or more
  1848.           are produced across the page.  Number of Labels Across allows
  1849.           you to specify how many columns of labels will be printed
  1850.           across the page (up to 5). 
  1851.  
  1852.                The main consideration to keep in mind in producing
  1853.           labels is that there is no pagination control for labels. All
  1854.           label forms assume an unending supply of continuous-form
  1855.           label stock in your printer.  If you are using a laser
  1856.           printer, then printer codes will have to be used to set top
  1857.           of form and page length to match the label format desired
  1858.           with one exception.  WAMPUM knows the format for 33-UP LABELS
  1859.  
  1860.                                          31
  1861.  
  1862.  
  1863.           (11 labels per page with 3 across) if you use the following
  1864.           settings for the label form and specify FONT7 with the
  1865.           HPLASERA printer table: 
  1866.  
  1867.                          1.   Width of Label           24
  1868.                          2.   Height of Label           4
  1869.                          3.   Left Margin               0
  1870.                          4.   Lines Between Labels      2
  1871.                          5.   Spaces Between Labels     4
  1872.                          6.   No. of Labels Across      3 
  1873.  
  1874.                Once you have entered the label settings desired, press
  1875.           <PgDn> to move to the Label Contents Screen.  In this screen,
  1876.           you enter field names to be produced on the labels much as
  1877.           was done on the Field Contents Screen with Report Forms. 
  1878.           Then, except with FoxBASE+ versions,  press <ESC> when you
  1879.           have completed filling out the field expressions which should
  1880.           appear on each line of the label.  You will be prompted to
  1881.           answer whether to save the new label format.  
  1882.  
  1883.                A typical example of field expressions for mailing
  1884.           labels follows. All of the names in BOLD are the actual field
  1885.           names from our sample data base: 
  1886.  
  1887.                1    TRIM(FIRSTMI) + " " + TRIM(LASTNAME)
  1888.                2    ADDRESS
  1889.                3    TRIM(CITY) + ", " + TRIM(STATE) + " " + ZIP
  1890.  
  1891.             
  1892.             2.1.10.2.3  Modifying An Existing Label Format
  1893.  
  1894.                 To modify an existing label format, select the L -
  1895.           Labels for Mail option from the Main System Menu.  Look at
  1896.           the listing of labels which displays and write down the name
  1897.           of the one to be modified.  In all versions, choose Modify
  1898.           Label, then pick the label template to be modified.  The
  1899.           discussion above with respect to creating a new label applies
  1900.           as well to modifying an existing one.  You then SAVE or ABORT
  1901.           saving the revised label form just as was done in creating a
  1902.           new one above.  
  1903.  
  1904.  
  1905.             2.1.10.3  FORM LETTERS
  1906.             
  1907.             2.1.10.3.1  Overview
  1908.             
  1909.                One of the most critical limitations of dBASE III has
  1910.           been its lack of a convenient "mail merge" interface which
  1911.           would allow selected data to be extracted from a data base
  1912.           and inserted into form letters.  WAMPUM provides this link
  1913.           through its built-in Form Letter generator.
  1914.             
  1915.  
  1916.                                                       32
  1917.  
  1918.  
  1919.                In FoxBASE+ versions, a WAMPUM form letter is nothing
  1920.           more than a standard dBASE III data base with a single field
  1921.           designated as LINE1.  In other versions, the form letter file is
  1922.           a standard ASCII file which can be created using any editor or
  1923.           WAMPUM's built-in editor. 
  1924.  
  1925.                When a form letter merge is executed through either the
  1926.           T - Form Letter option or via W - Wampum Preformatted
  1927.           Output, WAMPUM simply extracts data from your data base
  1928.           and merges it with the text contained in the form letter file
  1929.           you specify.  WAMPUM automatically handles word wrapping
  1930.           as part of the merge process.  In addition, the Form Letter
  1931.           Generator includes powerful programming functions which
  1932.           allow you to test the contents of fields in a data base and
  1933.           branch to various paragraphs of the form letter depending
  1934.           upon the contents of the data base.  The default page size for
  1935.           form letters is 8-1/2 x 11 using 10 pitch type.  You may
  1936.           adjust the left and right margin settings in either the
  1937.           WAMPUM Configuration Screen or within the form itself.  You
  1938.           also may turn off form feeds at the end of each document if
  1939.           desired.
  1940.  
  1941.                Up to five related data bases can be manipulated within
  1942.           any form letter file.  You also may now rely upon indexed key
  1943.           retrieval to generate single form letters from any active data
  1944.           base.  This avoids having to make a full pass through very
  1945.           large data bases to generate only a few form letters. 
  1946.  
  1947.                The following sections describe how to create form
  1948.           letters.  The end-user section of this Guide describes the
  1949.           process of actually merging data with a form letter file. 
  1950.  
  1951.  
  1952.             2.1.10.3.2  Creating a New Form Letter File 
  1953.  
  1954.                To create a new form letter, select T - Form Letter
  1955.           Menu from the Main System Menu.  In FoxBASE+ versions,
  1956.           when prompted for the name of the form letter to run, type
  1957.           an asterisk (*) and press <PgDn>.  In other versions, choose
  1958.           Create/Edit Form.  You then will be prompted to name the
  1959.           new form letter.  In FoxBASE+ versions, this name must start
  1960.           with T- and then up to a 6 character name.  WAMPUM will
  1961.           add the .DBF file extension and build the form letter file.  In
  1962.           other versions, the ASCII file name may be any DOS file name
  1963.           up to 8 characters.  WAMPUM will add the .TXT file
  1964.           extension and run WAMPUM's built-in editor.
  1965.  
  1966.             
  1967.             2.1.10.3.3  Building Data in Form Letter Files 
  1968.  
  1969.                To actually build the form letter in FoxBASE+ versions,
  1970.           use F - File Select to select the form letter file created
  1971.  
  1972.                                                       33
  1973.  
  1974.  
  1975.           above just as you would select any other data base to use. In
  1976.           other versions, the form letter editor is activated when you
  1977.           create or edit any form letter file.
  1978.  
  1979.                Before actually entering data for the form letter, some
  1980.           explanation of how form letters are constructed and how they
  1981.           are output will assist in your design.
  1982.  
  1983.                When WAMPUM generates form letters, it reads the form
  1984.           letter file to get the text for the form letter.  In FoxBASE+
  1985.           versions, all leading and trailing spaces in each record are
  1986.           stripped off when WAMPUM builds the text to print. 
  1987.           WAMPUM then reads the next record in the form letter file
  1988.           and appends it with a single leading space to what was in the
  1989.           previous record.  For example, each field in a FoxBASE+ form
  1990.           letter record may contain up to 136 characters.  Suppose the
  1991.           following two records were in the file: 
  1992.  
  1993.                      Hello there,
  1994.                          Cutie!
  1995.             
  1996.                When this form letter was printed, the text would read: 
  1997.           Hello there, Cutie!
  1998.             
  1999.                Note that there would be no indentation from the left
  2000.           margin, and all other spaces would be trimmed except the one
  2001.           space added between the two records.  
  2002.             
  2003.                When you really want spaces in FoxBASE+ version form
  2004.           letters, insert CHR(255) on the left margin of a record.  Then
  2005.           it can be followed by as many spaces as desired.  To insert
  2006.           this character, hold down the ALT key and type 255 with the
  2007.           numeric keypad.
  2008.  
  2009.                Clipper and dBASE-compatible index versions of
  2010.           WAMPUM use standard ASCII documents which, when merged,
  2011.           are printed exactly as they are created except merge text is
  2012.           inserted into the form letters as coded.
  2013.  
  2014.                All WAMPUM Form Letters may contain special markers
  2015.           (field data expressions) which tell WAMPUM to extract or
  2016.           evaluate information in the primary data base when the form
  2017.           letter is merged.  In FoxBASE+ versions of WAMPUM, you
  2018.           may have only one field data expression in each record of the
  2019.           form letter file.  In other versions, there are no limitations on
  2020.           number or spacing of field data expressions.
  2021.             
  2022.                A FIELD DATA EXPRESSION always begins and ends
  2023.           with //.  In its simplest form, an expression such as
  2024.           //LASTNAME// would tell WAMPUM to extract the contents
  2025.           of the LASTNAME field in the current record and insert it
  2026.  
  2027.  
  2028.                                                       34
  2029.  
  2030.  
  2031.           into the form letter at this place.  The beginning and ending
  2032.           //'s must be part of the same record in FoxBASE+ versions. 
  2033.  
  2034.                In FoxBASE+ versions only, you may block off a section
  2035.           of text in the form letter which will be affected by the
  2036.           evaluation of the expression itself.  For instance, if a
  2037.           particular field is blank in the data base, the form letter may
  2038.           contain a special code telling WAMPUM to omit all of the text
  2039.           which has been blocked off.  TEXT MARKERS consist of @@ at
  2040.           the beginning and ending of the affected text.  Note that these
  2041.           markers may not extend beyond a single record.  Thus, you
  2042.           cannot have one pair of @'s in record 5 and the other pair in
  2043.           record 6.  An equivalent functionality is available in other
  2044.           versions using the immediate IF function specifying the text to
  2045.           be printed if the condition is true or false.
  2046.  
  2047.             An example of the FoxBASE+ syntax would be the following. 
  2048.           Suppose you want to thank people for contributing to your
  2049.           reelection campaign.  In your data base is a field CONTRIBDT
  2050.           which will be empty if no contribution has been received.  The
  2051.           record entry in the form letter might say:
  2052.           @@Thanks for being a supporter!//*CONTRIBDT//@@ 
  2053.  
  2054.                This entry means if CONTRIBDT is not blank, then print
  2055.           the text: Thanks for being a supporter!  Otherwise, leave this
  2056.           sentence out of the form letter entirely.  In other versions, an
  2057.           equivalent entry would be the following:
  2058.  
  2059.           //=IIF(.NOT. EMPTY(ContribDt),"Thanks supporter!","")//
  2060.  
  2061.                The following section describes all FIELD DATA
  2062.           EXPRESSIONS implemented to date. See the README.DOC file
  2063.           for any additional enhancements.
  2064.             
  2065.                Another difference in FoxBASE+ Form Letters and other
  2066.           version form letter text is that the FoxBASE+ version needs to
  2067.           know when you really do want to end a paragraph.  This is
  2068.           referred to as a hard carriage return with many word
  2069.           processing packages. WAMPUM FoxBASE+ versions interpret a
  2070.           blank record in the form letter file or a record beginning
  2071.           with a tilde (~) as a hard carriage return.  Note that if you
  2072.           want a hard return in a form letter and a blank line between
  2073.           paragraphs, you will need to insert two blank records in the
  2074.           form letter file or two records beginning with a tilde.  All
  2075.           text following a tilde is ignored if the tilde is the first
  2076.           character on the line. 
  2077.  
  2078.                Finally, remember that WAMPUM form letters are built
  2079.           on the fly when you actually run the form letter program. 
  2080.           Make certain that you end all form letter files with at least
  2081.           one blank line or record and preferably two.  This will assure
  2082.  
  2083.  
  2084.                                                       35
  2085.  
  2086.  
  2087.           that the form letter buffer is purged before the next form
  2088.           letter is produced. 
  2089.  
  2090.             
  2091.             2.1.10.3.4  WAMPUM Field Data Expressions
  2092.             
  2093.                What follows is a listing of the syntax for various FIELD
  2094.           DATA EXPRESSIONS together with an example of each
  2095.           expression.  The best way to get a feel for using WAMPUM
  2096.           Form Letters is to build a few.  It provides more power and
  2097.           flexibility in this area than any commercial product on the
  2098.           market.  Like any powerful programming tool, however, it takes
  2099.           a little getting used to. 
  2100.  
  2101.  
  2102.           //LASTNAME//
  2103.  
  2104.           Allows imbedding a character, numeric, or date field within a
  2105.           form letter record.  It would output Jones if Jones were in
  2106.           the LASTNAME field. Note: if a date field, it outputs the date
  2107.           in the format May 21, 1986 if entry is 05/21/86. 
  2108.  
  2109.  
  2110.           @@Thanks //LASTNAME//.@@  (FoxBASE+ versions only)
  2111.  
  2112.           Allows imbedding a CHARACTER FIELD with a string of text
  2113.           which will print only if the field is not blank.  It would
  2114.           output Thanks Jones. if Jones were in the LASTNAME field. 
  2115.  
  2116.  
  2117.           @@Filed.//*FILINGDT//@@  (FoxBASE+ versions only)
  2118.  
  2119.           Tests whether a particular character, numeric, or date field is
  2120.           not blank or whether a logical field is True.  In either case, if
  2121.           True the output would be Filed. Otherwise, nothing would be
  2122.           printed.
  2123.  
  2124.             
  2125.           @@Not filed.//#FILINGDT//@@  (FoxBASE+ versions only)
  2126.  
  2127.           Just the opposite of the above. If the character, numeric, or
  2128.           date field is empty or if the logical field is False, the
  2129.           expression is printed. Otherwise, nothing would be printed. 
  2130.  
  2131.  
  2132.           @@A new baby!//?PREGNANT//@@  (FoxBASE+ only)
  2133.  
  2134.           Similar to above.  Used only with a logical field.  If logical
  2135.           field is True, the expression is printed.
  2136.  
  2137.  
  2138.  
  2139.  
  2140.                                                       36
  2141.  
  2142.  
  2143.           @@So you're 30.//!AGE=30//@@  (FoxBASE+ only)
  2144.  
  2145.           Allows any dBASE III expression as the test for whether the
  2146.           text should be printed. If the test is True, the text is printed. 
  2147.           Make certain that both sides of the expression are of  the
  2148.           same data type.  This example would print So you're 30! if the
  2149.           AGE numeric field = 30. 
  2150.  
  2151.  
  2152.           // AGE=30//  (FoxBASE+ versions only)
  2153.  
  2154.           This is the syntax for a GOTO using the WAMPUM form
  2155.           letter generator.  Note the SPACE at the beginning of the
  2156.           expression which means, IF the expression is True, SKIP to
  2157.           the next record beginning with a SPACE character.  If you
  2158.           want to  skip past a required carriage return record, make
  2159.           certain that the record begins with a tilde and not with a
  2160.           SPACE since blank records are assumed to be those containing
  2161.           all spaces. 
  2162.  
  2163.  
  2164.           //+SAMPLE.DOC// 
  2165.  
  2166.           With lengthy pieces of text with no embedded data, it is often
  2167.           easier to type them into a plain ASCII document using a text
  2168.           editor.  You then can merge them into a WAMPUM form letter
  2169.           with the syntax shown which says read in the SAMPLE.DOC
  2170.           text file at this point in the form letter.  Note that this
  2171.           command should appear in a record by itself with no other
  2172.           text.
  2173.  
  2174.             
  2175.           //=DTOC(DATE())// 
  2176.  
  2177.           There may be times when you just want to reformat some
  2178.           data directly out of the data base. The = operand allows this
  2179.           to be done with any dBASE expression so long as it evaluates
  2180.           to a STRING EXPRESSION when it is processed. 
  2181.  
  2182.  
  2183.           //<#,filename,indexname//
  2184.  
  2185.           Using the < command allows you to open up to 5 related data
  2186.           bases from within a form letter file.  Replace the pound sign
  2187.           (#) with a number from 5 through 9. Note that 5 corresponds
  2188.           to the number of the related data base opened with the
  2189.           Zoom/Relate File option.  It need not be reopened.  Paths may
  2190.           be included in identifying both the filename and the indexname.
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.                                                       37
  2197.  
  2198.  
  2199.           //>#,string expression//
  2200.  
  2201.           Using the > command permits you to do an indexed SEEK by
  2202.           key value to any record in the file identified by the number
  2203.           replacing #.  This numbered file and a corresponding index
  2204.           must already have been opened using the < command. The
  2205.           string expression may be the contents of a field  in the
  2206.           primary data base or any dBASE string expression.  If the
  2207.           name of a field in the primary data base is used, be sure to
  2208.           precede it with the ALIAS for the file using the following
  2209.           syntax: ALIAS->fieldname where ALIAS is the actual file name
  2210.           of the primary data base and fieldname is the legal field name
  2211.           of a field in the primary file. Once the SEEK has been
  2212.           accomplished, any data in the secondary data base may be
  2213.           extracted using the = field data expression outlined above and
  2214.           the ALIAS->fieldname syntax where ALIAS is the name of the
  2215.           secondary data base file and fieldname is the name of a field
  2216.           in that file. 
  2217.  
  2218.  
  2219.           //FF// 
  2220.  
  2221.           The FF command allows the user to generate a form feed or
  2222.           page eject from within a form letter file. 
  2223.  
  2224.  
  2225.           //NOFF//
  2226.  
  2227.           The NOFF command turns off automatic form feeds which
  2228.           normally are generated after each record is processed.
  2229.  
  2230.  
  2231.           //@LMargin,RMargin//
  2232.  
  2233.           Permits the resetting of the default left and right margin
  2234.           within a form letter.  It can only be reset once, and it
  2235.           applies to the entire form.  For example, //@15,70// would
  2236.           reset the left margin to 15 and the right margin to 70. 
  2237.  
  2238.  
  2239.           //}LABEL,Logical Expression//  (Clipper/dBASE versions)
  2240.  
  2241.           Provides a functionality equivalent to BASIC's IF .. THEN ..
  2242.           GOTO.  LABEL is the name of the WAMPUM LABEL to jump
  2243.           to when the specified Logical Expression evaluates True.
  2244.  
  2245.           The syntax for the GOTO LABEL is //{LABEL}//. For example,
  2246.           //}CHEAPSKATE,PurchAmt=0// would instruct a form letter to
  2247.           jump to //{CHEAPSKATE}// if the value of the PURCHAMT
  2248.           field equates to 0.
  2249.  
  2250.  
  2251.  
  2252.                                                       38
  2253.  
  2254.  
  2255.             2.1.11  Building Function Key Macros (KEYS.DBF) 
  2256.  
  2257.                As an aid in data entry intensive applications, WAMPUM
  2258.           provides the capability to define up to 39 keyboard macros (9
  2259.           in FoxBASE+ versions) which may be invoked by the end-user
  2260.           simply by pressing a function key.  As is true with WAMPUM
  2261.           applications in general, these keyboard macros are application
  2262.           specific.  This means that a set of keyboard macros may be
  2263.           defined for every application in each new directory created on
  2264.           your disk.
  2265.             
  2266.                The name of the file which stores the macros is
  2267.           KEYS.DBF which is a standard dBASE III data base file.  It is
  2268.           created automatically whenever WAMPUM is first run in a new
  2269.           subdirectory. To build the table of macro definitions, follow
  2270.           the steps below.  
  2271.  
  2272.                First, select the KEYS.DBF file as the file with which
  2273.           you want to work by picking the F - File Select option on the
  2274.           Main Menu. Enter the file name KEYS when prompted to do so. 
  2275.           When the Main Menu reappears, the bottom line of the screen
  2276.           should say: 
  2277.  
  2278.                               FILE: KEYS
  2279.             
  2280.                Next, you will want to figure out what keystrokes you
  2281.           want to store under which function keys.  The following
  2282.           function keys are available for use:
  2283.             
  2284.                F2 - F10
  2285.                Shift F1 - Shift F10     (except FoxBASE+ versions)
  2286.                Ctrl F1 - Ctrl F10       (except FoxBASE+ versions)
  2287.                Alt F1 - Alt F10         (except FoxBASE+ versions)
  2288.  
  2289.                Function key F1 is reserved by WAMPUM for HELP. 
  2290.  
  2291.                Record numbers in the KEYS file match the function keys
  2292.           by key number.  See the table below:
  2293.  
  2294.  
  2295.                Function Keys            Record Numbers
  2296.  
  2297.                F2 - F10                 Rec #  2 - 10
  2298.                Shift F1 - F10           Rec # 11 - 20
  2299.                Ctrl F1 - F10            Rec # 21 - 30
  2300.                Alt F1 - F10             Rec # 31 - 40
  2301.  
  2302.                 Thus, whatever keystrokes are entered in record 5 of
  2303.           the KEYS file will automatically be assigned to function key
  2304.           F5.  Those in record 40 will be assigned to function key ALT-
  2305.           F10.  Any record in the KEYS.DBF file which is blank will be
  2306.           ignored. 
  2307.  
  2308.                                                       39
  2309.  
  2310.  
  2311.  
  2312.                There are two rules to remember in entering data in the
  2313.           records of the KEYS file.  
  2314.  
  2315.                (1) Record 1 of the KEYS file is always ignored since it
  2316.                corresponds to the HELP function key, F1. 
  2317.  
  2318.                (2)  Every entry in the KEYS file must equate to a
  2319.                CHARACTER STRING when evaluated by WAMPUM.
  2320.             
  2321.                The first rule is only logical.  Since F1 is reserved for
  2322.           HELP, the corresponding record in the KEYS file is ignored. 
  2323.           Note that you will have to ADD a first record which automa-
  2324.           tically will be record 1.  Simply press <ENTER> to save it and
  2325.           create record 2 which can be used for function key F2.
  2326.             
  2327.                The second rule is critical because if it is violated you
  2328.           will get run-time errors the next time WAMPUM is started. 
  2329.           If this happens, simply ignore each error (which means that
  2330.           function key will not be set), then edit the records causing
  2331.           the problems following the steps outlined above. 
  2332.  
  2333.                Translated into dBASE III lingo, each record in the KEYS
  2334.           file must be a character string.  If it is simply character data,
  2335.           you meet this requirement by enclosing the data in double or
  2336.           single quotes.  If you have single quotes in the string, then
  2337.           enclose the string in double quotes and vice versa. 
  2338.  
  2339.                You can also use dBASE III functions and special
  2340.           WAMPUM functions to create macros so long as the expression
  2341.           evaluates to a string.  Here are examples to get you started: 
  2342.  
  2343.                DTOC(DATE()) would convert today's date to a character
  2344.                string and store it as a macro in the following format:
  2345.                10/10/86.
  2346.  
  2347.                FULLDATE(DATE()) would store today's date as a macro
  2348.                in the following format: October 10, 1986.
  2349.             
  2350.                DTOC(DATE()+30) would store today's date + 30 days. 
  2351.  
  2352.                CDOW(DATE()) would store the day of the week for today
  2353.                in a macro in the following format: Tuesday.
  2354.             
  2355.                STR(YEAR(DATE()),4) would store this year as a string in
  2356.                the following format: 1988.
  2357.             
  2358.                DTOC(WeekDay(DATE()+30)) would store the date 30 days
  2359.                from today rolled over to Monday if it hits on weekend
  2360.                in the following date format: 10/10/86.  To convert the
  2361.                WEEKDAY expression to a date required that it be
  2362.                preceded by DTOC().
  2363.  
  2364.                                                       40
  2365.  
  2366.  
  2367.  
  2368.                Again, the important thing to remember is that character
  2369.           text must be enclosed in quotes, and data other than
  2370.           character data must be converted into a character string using
  2371.           a dBASE III or WAMPUM conversion functions.
  2372.             
  2373.                Note that keyboard macros do not take effect until the
  2374.           next time WAMPUM is started from DOS.  They will be loaded
  2375.           on each subsequent running of the program unless changed.
  2376.           Developers should be careful not to store a file named
  2377.           KEYS.DBF in the DOS PATH unless you intend to invoke the
  2378.           macros contained therein whenever an application starts and a
  2379.           file named KEYS.DBF cannot be found in the default directory.
  2380.             
  2381.             2.1.12  Building Edit Checks (EDIT.DBF)
  2382.             
  2383.                As an aid in data entry accuracy, WAMPUM provides the
  2384.           capacity to design custom edit checks for each WAMPUM
  2385.           application.  As was true with keyboard macros, a set of edit
  2386.           checks may be defined for each application in each new
  2387.           directory created on your disk.
  2388.             
  2389.                The name of the file which stores the edit checks is
  2390.           EDIT.DBF which is a standard dBASE III data base file.  It is
  2391.           created automatically whenever WAMPUM is first run in a new
  2392.           subdirectory. To build the table of edit checks, follow the
  2393.           steps below. 
  2394.             
  2395.                First, select the EDIT.DBF file as the file with which
  2396.           you want to work by picking the F - File Select option on the
  2397.           Main Menu.  Enter the file name EDIT when prompted to do
  2398.           so.  When the Main Menu reappears, the bottom line of the
  2399.           screen should say: 
  2400.  
  2401.                            FILE: EDIT
  2402.             
  2403.                Next, figure out what edit checks need to be developed
  2404.           for the particular application.  For some applications, you may
  2405.           want to assure that a data entry field is never left blank.  For
  2406.           others, you may want to assure that a duplicate key is never
  2407.           entered.  Finally, you may want to assure that any field entry
  2408.           is contained in a table of valid entries.  None of these checks
  2409.           are possible in dBASE III without substantial custom
  2410.           programming.  WAMPUM provides this capability with a couple
  2411.           minutes work. 
  2412.  
  2413.                The EDIT file structure consists of two fields: EDITTEST
  2414.           and ERRMSG.  The theory behind WAMPUM edit checks is a
  2415.           simple one.  Once you "turn on" the edit checks for use
  2416.           against a particular file, WAMPUM automatically tests newly
  2417.           added records as well as updated existing records to make
  2418.           certain that they do NOT violate any of the error conditions
  2419.  
  2420.                                                       41
  2421.  
  2422.  
  2423.           (EDITTESTs) you have specified in the EDIT file. The checks
  2424.           are only run when new records are added to a data base or
  2425.           existing records are changed.  For each error condition
  2426.           identified, WAMPUM will display an error message (ERRMSG)
  2427.           and then permit the end-user to fix the problems.  The end-
  2428.           user cannot SAVE the record with errors without correcting
  2429.           them.  The end-user may <ESC>ape from a data entry screen
  2430.           without invoking WAMPUM's edit checking. In the FoxBASE+
  2431.           versions only, edit checks are not invoked when a user enters
  2432.           data while in full browse mode.
  2433.             
  2434.                Since developers typically work with several files in
  2435.           creating a new application, there are some instances in which
  2436.           you would not want the edit checks to execute.  Most impor-
  2437.           tantly, when the primary data base is not being used, you
  2438.           would not want to invoke a series of edit checks designed to
  2439.           check primary data base information.  This is handled in a
  2440.           simple way. WAMPUM always reads the EDITTEST field entry
  2441.           in the first record of the EDIT.DBF to ascertain the name of
  2442.           the file to be checked.  If this entry does not match in UPPER
  2443.           CASE the name of the current file in use, the edit checks are
  2444.           turned off.  Stated somewhat differently, the EDITTEST field
  2445.           of Record 1 of EDIT.DBF is reserved to hold the UPPER CASE
  2446.           name of the data base to be edit checked.  Thus, in the case
  2447.           of our example, the entry in Record 1 of EDIT.DBF should say
  2448.           CUSTOMER.  If you forget to enter the name of the data base
  2449.           file to be checked in record 1, then obviously the edit checks
  2450.           specified will never be invoked! 
  2451.  
  2452.                There also may be occasions where you want to specify
  2453.           the actual fields to be displayed with BROWSE MODE ON
  2454.           rather than accepting WAMPUM's default which is the first few
  2455.           fields in the actual data base structure.  If you want to specify
  2456.           your own fields, insert the following in the ERRMSG field of
  2457.           Record 1. The first character must be an asterisk (*).  It is
  2458.           followed by the field numbers (from your file structure listing)
  2459.           of the fields you want displayed.  All numbers must be three
  2460.           characters wide and should be padded to the left with spaces. 
  2461.           Three digit numbers should be preceded by a single space. For
  2462.           example, if you want the fields LASTNAME, FIRSTMI, and
  2463.           ADDRESS to display in BROWSE mode and these are fields 1,
  2464.           2, and 3 in your data base, the correct syntax would be:
  2465.  
  2466.           *  1  2  3.
  2467.             
  2468.  
  2469.                There are three things to keep in mind in developing
  2470.           your edit checks.  
  2471.  
  2472.                (1) Edit checks must be dBASE III or WAMPUM
  2473.                expressions which can be evaluated as True or False.  
  2474.  
  2475.  
  2476.                                                       42
  2477.  
  2478.  
  2479.                (2) If the expression in EDITTEST is true, the error
  2480.                message in ERRMSG is triggered.  In other words, you are
  2481.                building expressions which identify when an error
  2482.                condition occurs rather than the other way around.  
  2483.  
  2484.                (3) And most importantly, if you wish to evaluate data
  2485.                entered in a particular field, you do NOT use the
  2486.                fieldname to test for an error.  Instead you use the
  2487.                field's sequential number in the data base in conjunction
  2488.                with an array named FLDDATA() for FoxBASE+ versions
  2489.                or FLDDATA[] for other versions.
  2490.  
  2491.                This paragraph will clear up any confusion you are
  2492.           momentarily experiencing.  Since you need to know a field's
  2493.           position in the file structure in order to develop edit checks,
  2494.           your first step should be to print out the file structure of the
  2495.           file which will be checked.  Pick the S - Select Utilities option
  2496.           after making certain that the correct file is in use.  Change
  2497.           the List File Structure option to T or Y, then answer Y when
  2498.           prompted for whether to print the structure. 
  2499.  
  2500.                This will give you the list of fields in the data base. 
  2501.           Note that the left column shows the field's NUMBER in the
  2502.           structure.  Let us assume that the LASTNAME field is field
  2503.           number 1.  
  2504.  
  2505.                An appropriate edit check to assure the LASTNAME field
  2506.           was not left blank would read as follows:
  2507.  
  2508.                FLDDATA(1)=SPACE(20)  in FoxBASE+ versions, or
  2509.                FLDDATA[1]=SPACE(20)  in other versions.
  2510.  
  2511.                One of the above entries should be entered as the
  2512.           EDITTEST entry in the EDIT file.  The ERRMSG field entry
  2513.           might say something like this: The LASTNAME field cannot be
  2514.           left BLANK.  Whenever the EDITTEST record evaluates to
  2515.           TRUE, meaning the LASTNAME field is all spaces, then the
  2516.           ERRMSG would be displayed.  The important thing to remember
  2517.           is to use the appropriate array name and not LASTNAME in
  2518.           identifying the field to be checked!  
  2519.  
  2520.                Note that you also can check one field against another
  2521.           in the same data entry screen.  For example, assume there
  2522.           were two fields in the data base as follows:
  2523.  
  2524.                1    TRANSCODE      Character      8
  2525.                2    TRANSDATE      Date           8 
  2526.  
  2527.                Let's assume that the format of the TRANSCODE entries
  2528.           is of the form: 88-12345 where 88 identifies the year of the
  2529.           transaction. One edit check you probably would want to
  2530.           perform in a situation such as this is to make sure the first
  2531.  
  2532.                                                       43
  2533.  
  2534.  
  2535.           two digits of the TRANSCODE matched the year in the
  2536.           TRANSDATE field.  Here is one possible way to handle this:
  2537.  
  2538.           Substr(FldData[1],1,2)<>Substr(DTOC(FldData[2]),7,2) 
  2539.  
  2540.                Note in the example that the relationship must be coded
  2541.           so that when it is TRUE, the error message displays.  Thus,
  2542.           we want to code it in such a way that when the first two
  2543.           characters of the TRANSCODE do not match the year in the
  2544.           TRANSDATE, the expression is True and hence the error
  2545.           message is given.  Note also that the expressions on both sides
  2546.           of the relational operator must be of the same type.  In this
  2547.           case, both are character strings.  The DTOC() function
  2548.           converts a date expression to a character string.
  2549.  
  2550.                Finally, it should be noted that these EDIT CHECKS will
  2551.           not take effect until the next time WAMPUM is run with the
  2552.           appropriate file in use.  They will be loaded on each
  2553.           subsequent running of the program unless changed. 
  2554.             
  2555.                                    Creating Calculated Fields 
  2556.  
  2557.                To automatically calculate the value for a field, that
  2558.           field must be one of the fields in the active data base. 
  2559.           Typically, you would NOT want it to display on a data entry
  2560.           screen since its value will be changed automatically regardless
  2561.           of what the user enters.  This calculation capacity may be used
  2562.           to compute both dates and numeric values and if necessary can
  2563.           also be used to compute values for character and logical fields. 
  2564.           To automatically calculate the value for a field, follow these
  2565.           steps: 
  2566.  
  2567.                (1)  In the EDITTEST field, the first character must be
  2568.                the equals sign (=).  This is followed by whatever
  2569.                selection criteria will be used to determine when the
  2570.                calculation IS performed.  If you want it done whenever
  2571.                a record is added or changed, then the EDITTEST field
  2572.                should look like the following: =.T.
  2573.             
  2574.                Note: WAMPUM keeps track of what mode it is in by
  2575.                setting a variable HELPCODE to the number corresponding
  2576.                to the option picked from the Main System Menu, e.g. A -
  2577.                 Add is 1, E - Edit is 2, etc. 
  2578.  
  2579.                You may find it helpful to be able to perform calculated
  2580.                field transactions only when the user is in Edit mode or
  2581.                Add mode.  If you only wanted a field calculated when a
  2582.                new record was added, use the following syntax in the
  2583.                EDITTEST field: =HELPCODE=1
  2584.  
  2585.                (2)  In the ERRMSG field, two codes must be inserted and
  2586.                they are separated by a comma.  The first is the field
  2587.  
  2588.                                                       44
  2589.  
  2590.  
  2591.                number corresponding to the field to be calculated.  Now
  2592.                type a comma. Then enter any valid dBASE expression to
  2593.                handle the calculation desired.  A simple example may
  2594.                help. 
  2595.  
  2596.  
  2597.                Assume that a data base contains a FILINGDT field as #1,
  2598.           a DAYSPEND field as #14, and a CLOSEDT field as #20.  Until
  2599.           a closing date entry has been made, we want the computer to
  2600.           recompute the days pending from the filing date whenever a
  2601.           new record is added or changed.  The field entries should look
  2602.           like this: 
  2603.  
  2604.                     EDITTEST: =EMPTY(FLDDATA[20])
  2605.             
  2606.                     ERRMSG: 14,DATE()-FLDDATA[1]
  2607.  
  2608.  
  2609.                          Using "Table-Lookup" for Editing 
  2610.  
  2611.                Table Lookup for Editing means the ability of a data
  2612.           base system to refer to a table of values in order to
  2613.           determine whether a value entered by a user is acceptable. 
  2614.           Within WAMPUM, table-lookup is implemented using standard
  2615.           dBASE data bases for the tables.  These data bases may be
  2616.           checked either sequentially or through an index file as the
  2617.           developer desires.  To perform "table lookup" as part of the
  2618.           edit checking process, the following rules must be met:
  2619.             
  2620.                (1)  In the EDITTEST field, the first character must be a
  2621.                question mark (?) if a non-indexed dBASE file will be
  2622.                used as the table.  Or two question marks (??) must be
  2623.                used if a dBASE file table will be checked using a
  2624.                WAMPUM index as the key.  The question mark or marks
  2625.                are followed by whatever selection criteria the developer
  2626.                wants to specify to tell WAMPUM when the table lookup
  2627.                should be performed.  See the examples. 
  2628.  
  2629.                (2)  In the ERRMSG field, three values must be inserted
  2630.                with a comma between the values.
  2631.             
  2632.                     (a)  The first code is the number of the field to be 
  2633.                     checked against the table. Then type a comma. 
  2634.  
  2635.                     (b)  The second code is the dBASE file name of the 
  2636.                     table to be checked (without the .DBF extension). 
  2637.                     Then type a comma.
  2638.  
  2639.                     (c)  The third code is one of two values.  With a
  2640.                     non-indexed table lookup (?), the third code is the
  2641.                     name of the field in the table lookup file to be
  2642.                     compared.  With an indexed table lookup (??), the
  2643.  
  2644.                                                       45
  2645.  
  2646.  
  2647.                     third code is the name of the WAMPUM index file
  2648.                     (without file extension) to use for the lookup. 
  2649.  
  2650.                An example may help remove some of the mystery. If your
  2651.           main data base has a field #5 for the user to enter the
  2652.           abbreviation of the STATE where the customer lives, we want
  2653.           to make sure this entry is, in fact, a state in the United
  2654.           States.  Using WAMPUM, you build another data base with a
  2655.           file name of STATES and an index called ABBREV which holds
  2656.           the two character abbreviation for each state in the United
  2657.           States.  Your entries would look like the following in the
  2658.           EDIT record: 
  2659.  
  2660.                       EDITTEST: ??.T.
  2661.             
  2662.                       ERRMSG: 8,STATES,ABBREV
  2663.  
  2664.  
  2665.  
  2666.                     Using "Table-Lookup" for Calculated Fields 
  2667.  
  2668.                Just as a table can be checked to verify data in your
  2669.           data bases, WAMPUM also permits table-lookup to actually
  2670.           calculate the contents of fields in your primary data base. 
  2671.           The table may be accessed either sequentially or through a
  2672.           WAMPUM-index file as the developer desires.  To calculate a
  2673.           table follow these simple steps in adding an entry to the EDIT
  2674.           file: 
  2675.  
  2676.                (1)  In the EDITTEST field, the first character must be
  2677.                an exclamation point (!) if a non-indexed dBASE file will
  2678.                be used as the table.  Or two exclamation points (!!) must
  2679.                be used if a dBASE file table will be referenced using a
  2680.                WAMPUM index as the key.  The exclamation point(s) are
  2681.                followed by whatever selection criteria the developer
  2682.                wants to specify to tell WAMPUM when the table lookup
  2683.                calculation SHOULD be performed.
  2684.  
  2685.                (2)  In the ERRMSG field, five values must be inserted
  2686.                with a comma between the values.
  2687.             
  2688.                     (a)  The first code is the number of the field in
  2689.                     the primary data base to be used to find a match in
  2690.                     the table. Then type a comma. 
  2691.             
  2692.                     (b)  The second code is the dBASE file name of the 
  2693.                     table to be checked (without the .DBF extension). 
  2694.                     Then type a comma.
  2695.             
  2696.                     (c)  The third code is one of two values.  With a
  2697.                     non-indexed table lookup (!), the third code is the
  2698.                     name of the field in the table lookup file to be
  2699.  
  2700.                                                       46
  2701.  
  2702.  
  2703.                     compared.  With an indexed table lookup (!!), the
  2704.                     third code is the name of the WAMPUM index file
  2705.                     (without file extension) to use for the lookup. Then
  2706.                     type a comma.
  2707.             
  2708.                     (d)  The fourth code is the number of the field in
  2709.                     the primary data base to be calculated from the
  2710.                     table.  Then type a comma.
  2711.             
  2712.                     (e)  The fifth code is any legal dBASE expression
  2713.                     which specifies the value to be calculated for the
  2714.                     field  referenced in (2)(d) above.  This expression
  2715.                     would include references to one or more fields in
  2716.                     the table typically.
  2717.             
  2718.                By way of example, let us assume that a company
  2719.           maintains an ORDERS file with numerous pieces of information
  2720.           being captured about new orders.  Among these are the part
  2721.           number (field #1) and the part cost (field #2).  There also is a
  2722.           table of PARTS which contains the cost of each part
  2723.           (PARTCOST) in the company's inventory.  The developer wants
  2724.           to look up the cost of the part specified in the ORDERS file
  2725.           and insert it automatically into the part cost field in the
  2726.           ORDERS file.  The syntax to do this using a PARTS file
  2727.           indexed on part number would look like this: 
  2728.  
  2729.                     EDITTEST: !!.T.
  2730.             
  2731.                     ERRMSG: 1,PARTS,PARTNO,2,PARTCOST 
  2732.  
  2733.  
  2734.  
  2735.             2.1.13  Building Data Entry Menus (MENUS.DBF) 
  2736.  
  2737.                WAMPUM supports three different types of data entry
  2738.           menus: (1) automatic; (2) semi-automatic; and (3) user-
  2739.           defined.  FoxBASE+ versions also support standard dBASE
  2740.           format files.
  2741.  
  2742.                Automatic means if the developer does not create one or
  2743.           more data entry screens, then WAMPUM will automatically
  2744.           build a data entry screen permitting data entry and retrieval
  2745.           from every field in the active data base.
  2746.  
  2747.                Semi-automatic means that the developer may specify one
  2748.           or more fields to be displayed on each of 9 data entry menus. 
  2749.           These values are stored in the MENUS.DBF file.  WAMPUM will
  2750.           read the listings of fields selected by the developer and will
  2751.           generate an appropriate data entry screen to display the
  2752.           selected fields.
  2753.  
  2754.  
  2755.  
  2756.                                                       47
  2757.  
  2758.  
  2759.                User-defined means the developer may choose to define
  2760.           all prompts and all locations for data on the data entry screen
  2761.           for up to 9 data entry menus.  WAMPUM then will build a
  2762.           screen to match exactly what was defined.  In FoxBASE+
  2763.           versions, this screen may have multiple pages if a standard
  2764.           dBASE format file is used.
  2765.  
  2766.  
  2767.  
  2768.                          Semi-Automatic Data Entry Screens
  2769.  
  2770.                Up to 9 semi-automatic data entry menus may be built for
  2771.           any given application.  These typically correspond to different
  2772.           stages in the data entry process for a given data base.  In
  2773.           addition to these 9 data entry menus, WAMPUM also provides
  2774.           the standard data entry screen which includes access to every
  2775.           field in the current data base.
  2776.             
  2777.                These data entry menus are numbered 0 to 9 with 0 being
  2778.           the default automatic menu with access to all fields.  In
  2779.           addition to specifying up to 9 custom menus, developers may
  2780.           also restrict users without the developer password to a given
  2781.           range of menu numbers.  Thus, some care must be exercised to
  2782.           group the restricted and non-restricted menus into contiguous
  2783.           numbers.  A range of 1 to 5 is permissible, but you cannot
  2784.           allow access to menu 0 as well as access to menus numbered 2
  2785.           through 6.
  2786.  
  2787.                Information pertaining to the custom menus is stored in
  2788.           a standard dBASE file named MENUS.DBF which is created in
  2789.           the current default directory whenever WAMPUM is first
  2790.           invoked.  Each record in the MENUS file corresponds to a
  2791.           custom menu with the same number.  Thus, record 1 contains
  2792.           information about menu 1, and so on.
  2793.             
  2794.                To build one or more semi-automatic menus, first start
  2795.           up WAMPUM in Developer Mode by specifying the developer
  2796.           password after the word WAMPUM.  Make certain that the File
  2797.           in Use at the bottom of the screen is the one for which you
  2798.           want to build the custom menus.  If so, choose S - Select
  2799.           Utilities and change the List File Structure field entry to T.
  2800.           Then <PgDn> and print the file structure for reference. 
  2801.                  When the Main System Menu reappears, pick F - File
  2802.           Select and enter the file name of MENUS. Press <ENTER> and
  2803.           WAMPUM will open the MENUS file.  When the Main System
  2804.           Menu reappears, make sure the bottom line of the screen shows
  2805.           the file name MENUS. 
  2806.  
  2807.                To ADD a new semi-automatic menu, pick A - Add
  2808.           Records from the Main System Menu. A blank record will
  2809.           appear with two fields: MENUNAME and FLDLIST.  As the
  2810.           name suggests, MENUNAME is whatever name you want to
  2811.  
  2812.                                                       48
  2813.  
  2814.  
  2815.           assign to this custom menu, CUSTOMER OPENING MENU.
  2816.           Enter the title desired and press <ENTER> to move to the
  2817.           FLDLIST field. 
  2818.  
  2819.                In FLDLIST, you specify the field numbers corresponding
  2820.           to the fields you want displayed on the data entry screen. 
  2821.           The sequence used to specify the numbers does not matter
  2822.           since the fields always are ordered according to their numeric
  2823.           position in the data base structure.  The format for these field
  2824.           numbers, however, is CRITICAL! 
  2825.             
  2826.                Rule 1: Each field number must be AT LEAST 3 characters
  2827.                in length with spaces to the left of the number to "pad"
  2828.                it to 3 characters. For example, field 1 would require
  2829.                that you type two spaces and then the number 1.  27
  2830.                would require one leading space and then 27. 
  2831.  
  2832.                Rule 2: Each field number must be preceded by at least
  2833.                one space. Field 106 would require space then 106. 
  2834.  
  2835.                Rule 3: As many fields may be specified as will fit within
  2836.                the FLDLIST field observing the two rules above.  For
  2837.                example, to create a data entry menu with fields 1, 7, 21,
  2838.                and 107, FLDLIST should look like the following without
  2839.                the quotation marks which have been included only to
  2840.                assist in showing the spaces: 
  2841.  
  2842.                            "  1  7 21 107"
  2843.             
  2844.                Once the FLDLIST field has been specified, press CTRL-W
  2845.           or <PgDn> to save the entry.  A new blank record will appear. 
  2846.           You may continue to add menus or <ESC> to exit to the Main
  2847.           System Menu.
  2848.  
  2849.                Once semi-automatic menus have been defined, you must
  2850.           configure them for end-user access to your application.  This
  2851.           is covered in detail following the next three sections on
  2852.           building and linking custom data entry screens.  If you are
  2853.           not creating custom data entry screens, skip to the section
  2854.           entitled Configuring Menus For End-User Access.
  2855.  
  2856.  
  2857.  
  2858.                          Building Custom Data Entry Screens
  2859.  
  2860.                WAMPUM provides the ability to fully customize data
  2861.           entry screens.  In addition, in FoxBASE+ versions, a standard
  2862.           dBASE format file may be used to develop multi-page data
  2863.           entry screens.  With custom data entry screens, the developer
  2864.           has complete control over the following functions:
  2865.  
  2866.  
  2867.  
  2868.                                                       49
  2869.  
  2870.  
  2871.                1.  Specifying & Positioning of User Prompts
  2872.  
  2873.                2.  Specifying & Positioning of Fields
  2874.  
  2875.                3.  Picture Statements for Fields
  2876.  
  2877.                4.  Read-Only Access to Fields
  2878.  
  2879.                5.  Default Values for Fields
  2880.  
  2881.                Customizing data entry screens involves two steps: (1)
  2882.           building the customized screen and (2) linking the screen to
  2883.           the desired application.
  2884.  
  2885.  
  2886.                               Building WAMPUM Customized Screens
  2887.  
  2888.                Building a WAMPUM customized screen requires the
  2889.           developer to create an empty dBASE III data base with the
  2890.           following file structure.  Use B - Build New File to create it.
  2891.  
  2892.           FIELD NAME  TYPE       LENGTH  DEC 
  2893.  
  2894.            PROMPTROW   N            2     0
  2895.            PROMPTCOL   N            2     0
  2896.            PROMPT      C            45    0
  2897.            FLDROW      N            2     0
  2898.            FLDCOL      N            2     0
  2899.            FLDDATA     N            3     0
  2900.            FLDPIX      C            73    0
  2901.            READONLY    L            1     0
  2902.            DEFAULT     C            60    0
  2903.  
  2904.                The file name for this data base depends upon which of
  2905.           the 9 available menus you are creating.  For the first menu,
  2906.           the file name must be MENU1.DBF.  For the second, it's
  2907.           MENU2.DBF.  The rest should be fairly obvious.
  2908.  
  2909.                Once the data base structure is built, use F - File Select
  2910.           to choose the data base.  Then A - Add New Records to the
  2911.           data base for each prompt and/or field to be displayed on the
  2912.           data entry screen.  For each record, you may specify either a
  2913.           prompt or a field or both to be displayed on the screen.  A
  2914.           brief description of the contents of each field follows.
  2915.  
  2916.           PROMPTROW contains the row number where the prompt
  2917.           should be displayed.  Allowable values are 1 through 24.
  2918.  
  2919.           PROMPTCOL contains the column number where the prompt
  2920.           should be displayed.  Allowable values are 0 thru 79.
  2921.  
  2922.  
  2923.  
  2924.                                                       50
  2925.  
  2926.  
  2927.           PROMPT is the actual text to be displayed on the screen. 
  2928.           Typically, it would be the name of a field.  Although, it can
  2929.           be any text desired.  If you will be using plain text, then you
  2930.           may simply type the text in this field with quotes.  
  2931.  
  2932.           FLDROW is the row on which a field should be displayed for
  2933.           data entry.  Allowable values are 1 through 24.
  2934.  
  2935.           FLDCOL is the column position for display of a field.  The
  2936.           allowable values are 0 through 79.
  2937.  
  2938.           FLDDATA is the field number of the field from the active data
  2939.           base to be displayed.  This number appears on the left column
  2940.           of the List File Structure listing.
  2941.  
  2942.           FLDPIX is a dBASE picture statement specifying how the field
  2943.           should be displayed on the screen.  Consult a dBASE reference
  2944.           for a complete listing of picture statements.  The principal
  2945.           ones include one of the following characters for each byte to
  2946.           be displayed:
  2947.  
  2948.           A - Allows only letters            9 - Allows only numbers
  2949.           X - Allows any character           Y - Allows only Y or N
  2950.           N - Allows numbers and letters     L - Allows only logicals
  2951.  
  2952.  
  2953.                Any other character in a picture statement specifies a
  2954.           constant, meaning that WAMPUM will not allow the user to
  2955.           input a value other than the one specified.  For example,
  2956.           99/99/99 would be a typical picture statement for a date.
  2957.  
  2958.           READONLY is a logical field.  If it is marked True, then the
  2959.           field specified in this record will be displayed but cannot be
  2960.           modified by the end-user.
  2961.  
  2962.           DEFAULT allows the developer to specify a default value for
  2963.           the field in add mode only.  The contents of DEFAULT must
  2964.           be a dBASE expression matching the type of the field chosen
  2965.           in this record.  For example, if the field to be displayed were
  2966.           a DATE field, then the expression must evaluate to a date. 
  2967.           DATE() would tell WAMPUM to enter today's date as the
  2968.           default for a particular date field.  NOTE:  In specifying
  2969.           character field defaults, make certain the string is in quotes
  2970.           and matches the length of the field in the data base!
  2971.  
  2972.                Much of the agony of creating customized data entry
  2973.           screens can be avoided by using MenuMaker, a screen and
  2974.           menu generator, which is available from Ward Mundy Software. 
  2975.           Simply draw the screen, and MenuMaker writes all necessary
  2976.           program code to generate the screen.
  2977.  
  2978.  
  2979.  
  2980.                                                       51
  2981.  
  2982.  
  2983.                     Linking Custom Screens to an Application
  2984.  
  2985.                Once custom data entry screens have been created, the
  2986.           developer next must link these screens to the actual data base
  2987.           application in which it will be used.  
  2988.  
  2989.                First, pick F - File Select to choose the MENUS data
  2990.           base.  Then, add or edit a record in this file corresponding to
  2991.           the menu number assigned to your custom screen.  For
  2992.           example, if the custom screen was named MENU8.DBF, then
  2993.           there must be a corresponding record number 8 in the MENUS
  2994.           data base.  If you don't have that many records added to the
  2995.           data base, then use A - Add Records to add it.
  2996.  
  2997.                Once positioned in record 8, enter a name for this
  2998.           custom menu in MENUNAME just as was done for the semi-
  2999.           automatic menus.  In the FLDLIST field, simply type a single
  3000.           asterisk (*) if you are using a WAMPUM Data Entry Screen
  3001.           data base.  Type a pound sign (#) if you are using a dBASE-
  3002.           compatible format file.  Then save the entry.  This tells
  3003.           WAMPUM to find the corresponding custom menu matching this
  3004.           record number at run time.  Continue to make entries in the
  3005.           MENUS data base for each custom menu designed.  You may
  3006.           mix both types of custom screens in FoxBASE+ versions.
  3007.  
  3008.                Next we must configure WAMPUM for end-user access to
  3009.           a range of menus.  This applies for both semi-automatic and
  3010.           custom data entry screens.  The steps are as follows:
  3011.  
  3012.  
  3013.                     Configuring Menus for End-User Access
  3014.  
  3015.                Assuming you have saved a default configuration, in
  3016.           FoxBASE+ versions, press <ESC>ape and then <ENTER> to
  3017.           reload the default configuration.  In other versions, press ALT-
  3018.           0 to reload the default configuration.  When the Main System
  3019.           Menu reappears, pick S - Select Utilities and mark the Change
  3020.           Current Menu field as True and <PgDn>. 
  3021.  
  3022.                Three fields will appear below the menu list:
  3023.  
  3024.                (1)  Number of current menu to use 
  3025.  
  3026.                (2)  Minimum menu number
  3027.             
  3028.                (3)  Maximum menu number
  3029.             
  3030.                Press <ENTER> to skip through the current menu field. 
  3031.           Then enter values for the minimum menu number and the
  3032.           maximum which correspond to the menus you have created and
  3033.           to which you want the users to have access.  Remember that if
  3034.           the minimum number is 0, users will be able to access and
  3035.  
  3036.                                                       52
  3037.  
  3038.  
  3039.           change every field in the data base!  Make certain that both
  3040.           the minimum menu number and the maximum menu number do
  3041.           NOT exceed the value of the last record in the MENUS file. 
  3042.           The minimum and maximum menu numbers may be the same so
  3043.           long as the rule above is not violated.
  3044.             
  3045.                Once you have entered these values <PgDn> if necessary
  3046.           to return to the Main System Menu.  Now access the Menu
  3047.           Selection screen again by choosing S - Select Utilities, then
  3048.           mark Change Current Menu true, then <PgDn>.  The correct
  3049.           range of menu choices should now be displayed.  Now set the
  3050.           value for the default menu desired and <PgDn> to return to
  3051.           the Main System Menu. Now SAVE this new information as part
  3052.           of your configuration by selecting the option  * - Config
  3053.           Update and pressing <ENTER>.  Then <PgDn>.
  3054.  
  3055.                You now are ready to test the application.  <ESC>ape to
  3056.           DOS and restart WAMPUM in user mode.  Select the A - Add
  3057.           Records option and make certain that the correct menu
  3058.           displays.  Press <ESC>ape.  Now choose S - Select Utilities
  3059.           and mark Change Current Menu true and <PgDn>.  The correct
  3060.           range of menus should appear, and you should only be able to
  3061.           enter a number in the range specified.  If not, restart
  3062.           WAMPUM in Developer Mode and change the ranges following
  3063.           the steps outlined above. 
  3064.  
  3065.                NOTE:  In all except the FoxBASE+ versions of WAMPUM,
  3066.           you can change menus from the Main System Menu by pressing
  3067.           the ALT-M hot key.
  3068.  
  3069.  
  3070.             2.1.14  Building an Audit Trail File (AUDIT.DBF) 
  3071.  
  3072.                For a variety of reasons, it may be desirable to create
  3073.           an audit trail of all data added or changed in a data base. 
  3074.           This can be done as a means of verifying the accuracy of data
  3075.           posted to the data base.  Or it can be done in multi-user
  3076.           environments to provide update integrity to the master data
  3077.           base while many users share access to a copy of the data base
  3078.           from the previous day.  In the latter instance, the audit trail
  3079.           serves as a transaction log of new entries to the master data
  3080.           base.  These transaction logs can be built using numerous
  3081.           workstations.  Then at the end of the day all of the new
  3082.           transactions can be posted to the master data base using
  3083.           WAMPUM's Copy Utilities.  
  3084.  
  3085.                To invoke the Audit Trail/Transaction Logging feature of
  3086.           WAMPUM, you must be using version 2.9 or later of the
  3087.           software. You must assure that some field in your data base
  3088.           has unique values and is indexed before implementing
  3089.           transaction logging. This index must be set as the PRIMARY
  3090.           INDEX before executing a configuration update.  Then select
  3091.  
  3092.                                                       53
  3093.  
  3094.  
  3095.           the * - Config Update option and change the Enable Audit
  3096.           Trail? prompt to True.  Thereafter, WAMPUM will automati-
  3097.           cally create an AUDIT.DBF file in which it will post any
  3098.           changes to the current data base using the index which was
  3099.           the current index at the time of configuration update as the
  3100.           key field in the event later transaction log posting is desired.
  3101.             
  3102.                It is the developer's responsibility to assure that the
  3103.           AUDIT.DBF file is periodically purged since it will continue to
  3104.           grow indefinitely until the Enable Audit Trail prompt is turned
  3105.           back off by setting it false.  Purging consists of deleting
  3106.           AUDIT.DBF and AUDIT.DBT from the current application
  3107.           directory with the following commands:
  3108.             
  3109.                CD \{current application directory}      
  3110.                DEL AUDIT.*
  3111.             
  3112.                Once these files are deleted, WAMPUM will recreate
  3113.           them the next time WAMPUM is run in this directory.  See
  3114.           the section of the User's Guide which addresses the COPY
  3115.           UTILITIES for information on posting transactions to the
  3116.           master data base from an audit trail file.
  3117.  
  3118.  
  3119.             2.1.15  Preformatted Output (WAMPUM.DBF)
  3120.             
  3121.             2.1.15.1  Overview
  3122.             
  3123.                WAMPUM PreFormatted Output is the feature for which
  3124.           many dBASE users have clamored for years.  It is a tool by
  3125.           which a developer can "hard-code" ALL required components to
  3126.           generate report, label, or form letter output in advance. 
  3127.           Stated differently, it frees the end-user from having to specify
  3128.           which records should be printed and in what order every time
  3129.           a report is run.  For each new application you develop,
  3130.           WAMPUM will create a separate data base file, WAMPUM.DBF,
  3131.           which stores up to 80 preformatted reports, labels, and form
  3132.           letters.  The end user then can call up a list of these
  3133.           preformatted output choices and mark the ones desired.  These
  3134.           then are produced automatically with no further user
  3135.           intervention.
  3136.  
  3137.             2.1.15.2  Building the WAMPUM.DBF File
  3138.             
  3139.                The first step in developing WAMPUM Preformatted
  3140.           Output is to create the WAMPUM.DBF file to store the
  3141.           information.  This is done by selecting W - WAMPUM
  3142.           PreFormatted Output from the Main System Menu.  When
  3143.           WAMPUM asks whether to create the WAMPUM file, respond
  3144.           with either T or Y to create the empty data base. 
  3145.  
  3146.  
  3147.  
  3148.                                                       54
  3149.  
  3150.  
  3151.             2.1.15.3  Adding To/Editing the WAMPUM File
  3152.             
  3153.                Building preformatted output is much like adding and
  3154.           editing data in any other .DBF file.  First, pick the F - File
  3155.           Select option from the Main Menu, and choose WAMPUM as
  3156.           the name of the data base to use.
  3157.             
  3158.                When the Main System Menu returns, the bottom of the
  3159.           screen should show the file in use with the message: FILE:
  3160.           WAMPUM. To create a new entry in the file, select the A -
  3161.           ADD record option.  To change an existing entry, select E -
  3162.           EDIT record. 
  3163.  
  3164.                When the data entry screen appears, you will be prompted
  3165.           for the following items of information concerning the report,
  3166.           label, or form letter you wish to preformat:
  3167.             
  3168.                DATAFILE  Enter the name of the primary data file which
  3169.           will be used in producing the output.  Do NOT include the
  3170.           .DBF file extension. 
  3171.  
  3172.                SORTINDX  If you want the output sorted in a particular
  3173.           order, then you may specify the sort index by entering the
  3174.           name of index file.  Do NOT enter the file extension.  If this
  3175.           field is left blank, the output will be produced in the actual
  3176.           order of the records in the primary data base.  
  3177.  
  3178.                RPTLBLFRM  Enter either R, L, or F to tell WAMPUM
  3179.           whether the output will be a report (.FRM file), label (.LBL
  3180.           file), or form letter (.DBF file).  For FoxBASE+ versions, you
  3181.           also may include an ampersand (&) to execute a program
  3182.           (.PRG or .FOX file).
  3183.  
  3184.                OUTFILE  Enter the name of the actual report form, label
  3185.           format, or form letter file.  Do NOT include the file
  3186.           extension.  You also may enter a program name in FoxBASE+
  3187.           versions.
  3188.  
  3189.                FONT  Enter a number between 0 and 9 to identify which
  3190.           font will be used in generating the output.  See the section
  3191.           on Printer Configurations for more information. 
  3192.  
  3193.                CRITERIA  Enter the selection criteria just as they
  3194.           would be entered in the Select Utilities option previously
  3195.           discussed.  Note that there is one enhancement.  If there is a
  3196.           particular range of dates you want to prompt for at execution
  3197.           time, then you can specify the field to which the date range
  3198.           will apply by surrounding that field with //'s.  
  3199.  
  3200.                For example, suppose you were generating a report which
  3201.           would show new job applications received for a certain period
  3202.           of time.  If the field name storing the application date was
  3203.  
  3204.                                                       55
  3205.  
  3206.  
  3207.           APPLICDT, then the following syntax in the criteria would
  3208.           allow the user to enter a date range at run time for the
  3209.           application date: //APPLICDT//.
  3210.            
  3211.                DESCRIP  Enter a brief description for the output you
  3212.           just designed.  This is what will appear on the menu when the
  3213.           user selects WAMPUM Preformatted Output. 
  3214.  
  3215.                RELFILE1  Enter the file name of the file to be related
  3216.           to the primary data base when the output is run.  See the
  3217.           section on Z - Zoom/Relate File for more information. 
  3218.  
  3219.                RELINDX1  Enter the file name of the index to be used
  3220.           in relating the secondary file to a field in the primary file. 
  3221.           See Z - Zoom/Relate File for more information. 
  3222.  
  3223.                Once all of the above entries have been made, a new
  3224.           record is stored in the WAMPUM.DBF file.  When you have
  3225.           added all of the entries desired.  Exit from  WAMPUM by
  3226.           pressing <ESC> from the Main System Menu.  Then restart
  3227.           WAMPUM and select the W - WAMPUM PreFormat option to
  3228.           try out your new output.
  3229.  
  3230.  
  3231.             2.1.16  Resetting the Developer Password
  3232.             
  3233.                WAMPUM provides the capability to reset the developer
  3234.           password from VOODOO to some other password of your
  3235.           choice. This is done using the DOS ENVIRONMENT and the
  3236.           SET command.  To reset the password, you should insert a
  3237.           line such as what appears below in the AUTOEXEC.BAT file in
  3238.           the root directory of the hard disk which will be used to boot
  3239.           the system.
  3240.             
  3241.                          SET WAMPUM=MOVOODOO
  3242.  
  3243.                The value of the WAMPUM environment variable
  3244.           beginning with the THIRD character becomes the new
  3245.           developer password when the system is restarted.  In the case
  3246.           outlined above, the password still would be VOODOO since the
  3247.           first and second characters are ignored.
  3248.             
  3249.                Note that this is anything but a secure system.  What it
  3250.           will do is keep the casual or novice user from entering
  3251.           WAMPUM in developer mode accidentally.
  3252.  
  3253.  
  3254.  
  3255.             2.1.17  Network Considerations
  3256.  
  3257.                Multi-user data base access via NETBIOS-compatible
  3258.           networks adds a whole new dimension to WAMPUM applications.
  3259.  
  3260.                                                       56
  3261.  
  3262.  
  3263.           Considerations such as security, passwords, audit trails, record
  3264.           and file locking are but a few of the new worries you will
  3265.           face. 
  3266.  
  3267.                The best advice for those just getting started with
  3268.           networks is START SMALL!  A few users sharing a simple data
  3269.           base is the best way to get a feel for networks.  WAMPUM
  3270.           provides a margin of security and reliable record and file
  3271.           locking.  Because of the nature of DOS and the computers
  3272.           which run under DOS, WAMPUM is NOT and CANNOT take the
  3273.           place of the mainframe at your local department store.
  3274.  
  3275.                For many network applications, you may not need
  3276.           WAMPUM to impose password security.  If you don't need it,
  3277.           DON'T use it.  The hard disk documentation details the process
  3278.           for creating user id's. 
  3279.  
  3280.             2.1.18  Making a Backup of the User Application 
  3281.  
  3282.                Once you have completed building a new application in
  3283.           its own subdirectory, this then can be saved using the BACKUP
  3284.           command for subsequent use by end-users.  When the
  3285.           application is completed, simply type the following command
  3286.           substituting the name of the subdirectory in which you built
  3287.           the application for the word SUBDIR below.  If you are using
  3288.           a drive other than Drive C, you would want to change the C:
  3289.           as well. 
  3290.  
  3291.                          BACKUP  C:\SUBDIR\*.*  A:
  3292.             
  3293.                This will make a backup copy of the application on a
  3294.           formatted floppy in Drive A.
  3295.             
  3296.                The end user then can take this floppy and restore it to
  3297.           the system on which it will be run with the command: 
  3298.  
  3299.                          RESTORE  A:  C:\*.*  /S
  3300.             
  3301.                The DOS Restore command automatically will construct
  3302.           the new subdirectory on their disk and then copy the appli-
  3303.           cation without any user knowledge of file copying. 
  3304.  
  3305.             2.1.19  Writing the Documentation
  3306.             
  3307.                Perhaps the most important step in building a new
  3308.           application is to write some documentation explaining what the
  3309.           system does and how to use it.  Don't distribute new
  3310.           applications without documentation!  It gives WAMPUM and
  3311.           yourself a bad name.
  3312.  
  3313.  
  3314.             
  3315.  
  3316.                                                       57
  3317.  
  3318.  
  3319.               2.2 ! - RUNning an External Program
  3320.  
  3321.                Assuming you have sufficient memory and except in the
  3322.           FoxBASE+ versions, external programs can be run from within
  3323.           WAMPUM using the ! - Run External Program option on the
  3324.           Main System Menu.  The following programs can be run:
  3325.           executable programs in either .EXE or .COM format and DOS
  3326.           batch files with .BAT file extension.  In addition, you can
  3327.           enter any DOS command and execute it with this option. You
  3328.           also can exit to the DOS level temporarily by entering
  3329.           \COMMAND.COM as the file name to run.  Note, this may only
  3330.           work with DOS 3.0 and above. 
  3331.  
  3332.                Similarly, directory paths may precede program names
  3333.           with DOS 3.0 or above.  Any program within the DOS PATH
  3334.           may be run without specifying the directory path.
  3335.  
  3336.             
  3337.             2.3  & - Run FoxBASE+ Commands/Programs
  3338.  
  3339.                In FoxBASE+ versions, a "simulated dot prompt" replaces
  3340.           the ! - Run External Program option.  You still may run any
  3341.           external program by preceding the DOS command or program
  3342.           name with an exclamation point (!).
  3343.  
  3344.                This option also permits you to execute virtually any
  3345.           dBASE III Plus-compatible command or function.  Consult any
  3346.           of the 400+ page reference books in your friendly bookstore
  3347.           or library for a summary of these commands and what they do. 
  3348.           You also may run simple, unnested programs up to
  3349.           approximately 500 lines in length depending upon the amount
  3350.           of free memory in your computer.  If you also own a FoxBASE+
  3351.           compiler, compiled programs also can be executed from within
  3352.           this option.  As a reference on programming in FoxBASE+, you
  3353.           may wish to obtain George Goley's Dynamics of FoxBASE+
  3354.           Programming, published by Dow Jones-Irwin. This book assumes
  3355.           you already know virtually all dBASE commands and functions.
  3356.  
  3357.  
  3358.             
  3359.             2.4 Z - ZOOMing or RELATing a Supplemental File 
  3360.  
  3361.                WAMPUM provides the capability to link a secondary file
  3362.           for purposes of report, label, and form letter output.  This
  3363.           can be done automatically within the WAMPUM Preformatted
  3364.           Output option, or it can be done manually using the Z -
  3365.           Zoom/Relate File option. 
  3366.  
  3367.                There are many instances in which it is helpful to have
  3368.           a secondary file to provide "table lookup" of data which
  3369.           otherwise would have to be retyped in each record of a data
  3370.           base.  For example, if each customer has an ACCOUNT
  3371.  
  3372.                                                       58
  3373.  
  3374.  
  3375.           NUMBER, it would be silly to build an orders file which
  3376.           required the entry of the customer's name, address, and phone
  3377.           number every time an order was placed.  Instead, the orders
  3378.           file could contain the customer number, and a secondary file
  3379.           could be used to "look up" the customer's name, address, and
  3380.           phone number whenever a report, label, or form letter was
  3381.           produced.
  3382.             
  3383.                There are four prerequisites for relating a secondary file
  3384.           with WAMPUM.  
  3385.  
  3386.                (1)  There must be an IDENTICAL field in both the main
  3387.                data base and the related file; 
  3388.  
  3389.                (2) the key field in the related file must be indexed on
  3390.                that key; 
  3391.  
  3392.                (3) the index file name must be identical to the name of
  3393.                the key field; and 
  3394.  
  3395.                (4) both the related file and its index must either be in
  3396.                the default directory or must be accessible via the DOS
  3397.                PATH. 
  3398.  
  3399.                To link a secondary file, pick the Z - Zoom/Relate File
  3400.           option on the Main System menu.  Then enter the name of the
  3401.           secondary file and the index.  When the Main System Menu
  3402.           reappears, the last line of the screen will show a relation is in
  3403.           effect with the following expression:
  3404.             
  3405.                          FILE: ORDERS/R
  3406.             
  3407.                Fields in the related file may then be accessed within
  3408.           report and label forms as well as within form letter files
  3409.           using the following command syntax: ALIAS->FIELDNAME
  3410.           where ALIAS is the name of the related file and FIELDNAME
  3411.           is the field name to be output. 
  3412.  
  3413.                See the example below for further clarification: 
  3414.  
  3415.  
  3416.           CUSTOMER ORDER FILE                CUSTOMER FILE 
  3417.  
  3418.           (ORDERS.DBF)                       (ACCOUNTS.DBF)  
  3419.  
  3420.                ACCTNO     RELATED FIELD --->      ACCTNO (indexed)
  3421.                ORDERDT                            CUSTNAME 
  3422.                ITEMS                              ADDRESS 
  3423.                                                   PHONE
  3424.  
  3425.                As a FIELD CONTENTS entry in the report form, you
  3426.           could then specify ACCOUNTS->CUSTNAME once the
  3427.  
  3428.                                                       59
  3429.  
  3430.  
  3431.           ACCOUNTS file was related using the ACCTNO index.  This
  3432.           would tell WAMPUM to output the actual customer name rather
  3433.           than the account number found in the orders file.
  3434.  
  3435.  
  3436.             2.5 G - Global Replacement of Data 
  3437.             
  3438.                There are occasions in which it is desirable to replace
  3439.           different pieces of data in a file for a large number of
  3440.           records in one pass rather than calling up each record
  3441.           individually.  
  3442.  
  3443.                Be aware that the potential for disaster goes up
  3444.           dramatically any time you are replacing data simultaneously
  3445.           for more than one record!  If you are new to WAMPUM and
  3446.           particularly to the power of dBASE III's REPLACE command,
  3447.           stay away from this option! This feature has been added to
  3448.           WAMPUM against my better judgment because of the pleas of
  3449.           many experienced dBASE users.  If you do not need the
  3450.           temptation of this option, delete item 18 from the Menu # list
  3451.           when you configure new WAMPUM applications! 
  3452.  
  3453.                G - Global Replace is a function closely akin to global
  3454.           search and replace on many word processing systems.  It
  3455.           involves two steps:
  3456.  
  3457.                (1) selecting a group of records to be processed and 
  3458.  
  3459.                (2) revising one or more fields of data in the records
  3460.                which meet the selection criteria.
  3461.             
  3462.                If you already have entered Selection Criteria, then
  3463.           executing G - Global Replace always works with the group of
  3464.           records meeting those search criteria.  You must have already
  3465.           entered Selection Criteria before selecting G - Global Replace. 
  3466.  
  3467.                You are well advised to run a list using the Select
  3468.           Criteria you have in mind for Global Replace to make sure the
  3469.           correct records have been selected.  Once Global Replace has
  3470.           been executed, it's too late to get them back!  See the Select
  3471.           Utilities section of the User's Guide for more details.
  3472.             
  3473.                Once record selection criteria are in effect, G - Global
  3474.           Replace will display the Global Replace Screen which permits
  3475.           you to specify up to 10 different fields which can be updated
  3476.           in one pass through the data base.  For each field, you
  3477.           specify two pieces of information: 
  3478.  
  3479.                (1) the field name and 
  3480.  
  3481.                (2) the dBASE field expression to be executed against
  3482.                that piece of data. 
  3483.  
  3484.                                                       60
  3485.  
  3486.  
  3487.  
  3488.                In its simplest form, you may wish to replace all DUE
  3489.           DATES with a new value 30 days later.
  3490.  
  3491.                Assuming you already have selected the range of records
  3492.           to be changed, the correct procedure would be to use the <Up>
  3493.           or <Down> arrow to first find the DUEDT field.  Once
  3494.           displayed, press <ENTER>.  When prompted for the field
  3495.           expression, enter the following:  DUEDT+30.  Then press
  3496.           <ENTER>.  If there is another field to be replaced, you would
  3497.           leave the LINK variable in the AND position and press
  3498.           <ENTER>.  
  3499.  
  3500.                A second line would permit you to repeat the above
  3501.           process for another piece of information.  When finished,
  3502.           simply press <PgDn> while the cursor is in the LINK field and
  3503.           the global search and replace will proceed.  If you have made
  3504.           a mistake, press <ESC> to exit without executing the global
  3505.           replace! 
  3506.  
  3507.                Another couple of examples may help.  If a group of last
  3508.           names had been entered in upper and lower case and you
  3509.           wanted to convert them to ALL upper case, you would first
  3510.           specify the group of records to be processed using SELECT
  3511.           ASSIST.  When the Global Replace Screen appears, find the
  3512.           LASTNAME field and press <ENTER>. For the field expression,
  3513.           UPPER(Lastname) should be entered. Then press the <ENTER>
  3514.           and <PgDn> to proceed.    
  3515.  
  3516.                REMEMBER:  Always RUN A LIST against your existing
  3517.           SELECTION CRITERIA to make certain that only the desired
  3518.           records will be REPLACED before executing G - Global
  3519.           Replace.  If you're new to WAMPUM and data base
  3520.           management, make a full backup of your data base application
  3521.           before using this option! 
  3522.             
  3523.  
  3524.            
  3525.             2.6 C - Copy Utilities for Importing & Exporting Data 
  3526.  
  3527.                WAMPUM's C - Copy Utilities option provides a rich
  3528.           variety of file importing and exporting tools permitting
  3529.           standard dBASE data bases to be transferred into or out of
  3530.           virtually any of the common file formats.  In addition, a data
  3531.           base structure file can be created which permits simple
  3532.           revision of a data base structure where additional fields
  3533.           become desirable after an application has been built. With the
  3534.           exception of the dBASE III structure and audit trail options,
  3535.           you can narrow down which records will be copied by first
  3536.           specifying selection criteria using the S - Select Utilities
  3537.           option. 
  3538.             
  3539.  
  3540.                                                       61
  3541.  
  3542.  
  3543.                When the C - Copy Utilities option is selected, you
  3544.           initially are prompted for three pieces of information:  
  3545.  
  3546.                (1) whether you will be COPYing data TO or FROM
  3547.                another file from the file currently in use; 
  3548.  
  3549.                (2) the file type of the other file; and 
  3550.  
  3551.                (3) the file name of the other file.
  3552.  
  3553.  
  3554.  
  3555.                               Copying TO Another File
  3556.  
  3557.                Copying TO Another File requires that the first prompt
  3558.           be answered with a T.  Then a file type is specified. And then
  3559.           the file name of the receiving file is specified.
  3560.  
  3561.                If you specify a dBASE III type data base file as the
  3562.           receiving file, then one will be created if the file name
  3563.           specified does not already exist.  If it exists, you will be
  3564.           asked whether to Quit, Overwrite, or Append to the existing
  3565.           external file.
  3566.             
  3567.                If you specify COPY TO a dBASE III Structure, WAMPUM
  3568.           will copy the structure of the current data base into a new
  3569.           .DBF file with four fields: Field_Name, Field_Type, Field_Len,
  3570.           and Field_Dec.  Each record entry in the new file will match a
  3571.           field in the structure of the current data base.  This file then
  3572.           can be added to, edited, and records can be deleted.  Once
  3573.           revised, this file then can be used as the new file structure
  3574.           template for transferring the current data base into a new file
  3575.           structure.  This is covered in detail below.
  3576.             
  3577.                If you COPY TO a Standard Data Format file, WAMPUM
  3578.           will create a new flat file consisting of all the selected data in
  3579.           the current data base in ASCII format.  Each record will
  3580.           occupy one line in the new file with a carriage return/line
  3581.           feed at the end of each line or record.
  3582.             
  3583.                COPYing TO a Delimited Format file permits the user to
  3584.           identify what character should be used to surround each
  3585.           character field in the new data base.  For example, BASIC
  3586.           expects character fields in a sequential file to be delimited
  3587.           with QUOTES. 
  3588.  
  3589.                COPYing TO an Audit Trail file is never permissible.  
  3590.  
  3591.                COPYing TO an Empty dBASE III file makes a duplicate
  3592.           empty data base file with the same file structure as the
  3593.           current file in use.
  3594.  
  3595.  
  3596.                                                       62
  3597.  
  3598.  
  3599.  
  3600.  
  3601.                          Copying FROM Another File
  3602.             
  3603.                Copying From Another File means that you will be
  3604.           IMPORTING data from another file INTO the data base file
  3605.           currently in use.  The only exception is the dBASE III
  3606.           Structure option covered below.  To COPY FROM another file,
  3607.           enter F at the To/From prompt.
  3608.  
  3609.                If you COPY FROM another dBASE III data base, then the
  3610.           information in ALL records in that data base will be appended
  3611.           to the data already in the current data base.  Only field data
  3612.           whose field names and type match exactly those of the
  3613.           current data base will be copied.  Existing records in the
  3614.           current data base will not be deleted.
  3615.             
  3616.                If you COPY FROM a Standard Data Format file, its
  3617.           records are appended to the information, if any, which already
  3618.           exists in the current data base.  Note that the current dBASE
  3619.           III file structure should be created first to match the format of
  3620.           the SDF file.  If you don't understand this, consult a good
  3621.           dBASE III Primer before attempting to use this option or the
  3622.           next one. 
  3623.  
  3624.                If you COPY FROM a Delimited file, its records are
  3625.           appended to the information, if any, which already exists in
  3626.           the current data base.  Note that the current dBASE III file
  3627.           structure should be created first to match the format of the
  3628.           delimited file. See the caveat above before attempting this.
  3629.  
  3630.  
  3631.                COPYING FROM a dBASE III Structure is one of the ways
  3632.           WAMPUM can modify the structure of the current data base
  3633.           and move the file contents to a new dBASE III file.  To modify
  3634.           a file's structure, follow the steps outlined above to create
  3635.           and revise a new dBASE III structure file.  Once completed,
  3636.           place the original dBASE III data base file back in use with F
  3637.           - File Select. Then pick the COPY FROM option and specify
  3638.           option 2, a dBASE III Structure.  Enter the name of the
  3639.           structure file as the external file.  You then will be prompted
  3640.           to enter a name for a new dBASE III data base file to be built
  3641.           using the new structure and the data from the data base file
  3642.           currently in use. Enter a name of your choice. 
  3643.                Once completed, place the new file in use and check the
  3644.           data to assure that it copied what you intended before
  3645.           deleting the old data base!  Once you are certain that it looks
  3646.           the way it should, then reindex the file following the
  3647.           instructions in the I - Index Select/Create section of this
  3648.           User's Guide.  You then may delete the original data base
  3649.           preferably after making a backup copy to a floppy. 
  3650.  
  3651.  
  3652.                                                       63
  3653.  
  3654.  
  3655.                COPYING FROM an Audit Trail file is WAMPUM's way of
  3656.           allowing posting from a transaction file.  In addition, the
  3657.           developer must have set the AUDIT TRAIL flag True for this
  3658.           application when the G - Config Update option was run. And,
  3659.           the audit flag must be set to False before posting to the
  3660.           master data base begins.  
  3661.  
  3662.                Assuming the above conditions have been met, a file will
  3663.           exist in the default directory named AUDIT.DBF.  This should
  3664.           be entered as the external file name or simply enter the drive
  3665.           designator indicating the drive location of the AUDIT files, e.g.
  3666.           C: or A: with a floppy.  For the transaction posting to work,
  3667.           the current file and lead index must match the file and lead
  3668.           index designated when the audit trail file was created. 
  3669.           Otherwise, an error message will be given indicating what the
  3670.           required file and index must be.  If no error condition is
  3671.           present, then WAMPUM will post all information in the audit
  3672.           file to the current data base and will notify the user when this
  3673.           has been completed.  Remember that the values in the lead
  3674.           index must be unique or the AUDIT file will be posted to the
  3675.           first matching key found in the index. Note also that this
  3676.           function is accessible only to users with the developer
  3677.           password.
  3678.  
  3679.  
  3680.  
  3681.             2.7 Deleting & Undeleting Groups of Records 
  3682.  
  3683.                WAMPUM provides a means of marking a group of records
  3684.           as DELETED as well as a means of restoring a group of
  3685.           records which already have been marked for deletion.  To use
  3686.           this function, you must:
  3687.  
  3688.                (1)  Start WAMPUM with the Developer Password!  
  3689.  
  3690.                (2)  Specify Record Selection Criteria, and 
  3691.  
  3692.                (3)  Assure that the primary index in use evaluates to a
  3693.                character expression.  
  3694.  
  3695.                If any of these three prerequisites is missing, WAMPUM
  3696.           ignores the attempt to delete or undelete a group of records
  3697.           just as if the function did not exist.
  3698.             
  3699.                Once the above prerequisites have been satisfied, you
  3700.           should first run a sample listing using the List File Contents
  3701.           option in the S - Select Utilities.  This will assure that you
  3702.           are working with the group of records desired. 
  3703.  
  3704.                Next, pick the function desired: either M - Mark Records
  3705.           *DEL* or U - UN*DEL* Records.  When WAMPUM prompts for
  3706.           the entry to find, type an asterisk (*) and press <ENTER>.  If
  3707.  
  3708.                                                       64
  3709.  
  3710.  
  3711.           the prerequisites in the first paragraph have been met,
  3712.           WAMPUM will ask if you really want to DELETE or RESTORE
  3713.           the selected group of records.  Type Y if you want to proceed,
  3714.           or press <ESC> to abort. 
  3715.  
  3716.                This function provides a quick way to mark a large group
  3717.           of records deleted once the same group of records has been
  3718.           archived to a different file. When the X - Rebuild / FileFix
  3719.           option is then run, the group of records is deleted
  3720.           permanently and cannot be restored with the U - UN*DEL*
  3721.           Records function. 
  3722.  
  3723.                Note that this function requires an active Record
  3724.           Selection Criteria expression to avoid the possibility of
  3725.           marking every record in a file as deleted.  If you really want
  3726.           to delete all records in a file, specify the following Record
  3727.           Selection Criteria: RECNO() >= 1. This means all records.
  3728.  
  3729.             
  3730.             2.8 Reserved Variables, FoxBASE & Clipper Functions
  3731.  
  3732.             2.8.1  Overview
  3733.             
  3734.                In addition to a number of reserved functions provided in
  3735.           the standard implementation of the dBASE III programming
  3736.           language, WAMPUM adds all Clipper enhancements (except in
  3737.           the FoxBASE+ versions) plus some new functions of its own. 
  3738.           This section is designed to bring you up to speed on these new
  3739.           functions and some of the major dBASE III commands and
  3740.           functions.  It is by no means an exhaustive treatment of all
  3741.           dBASE III Plus functions.  Consult any of the dBASE III
  3742.           reference books in your local bookstore for more information
  3743.           on dBASE III commands and functions.
  3744.  
  3745.             
  3746.  
  3747.             
  3748.             2.8.2  CHARACTER/STRING functions
  3749.             
  3750.                Character string manipulation becomes critical in
  3751.           producing meaningful reports and form letters.  WAMPUM
  3752.           provides a rich assortment of functions to assist the
  3753.           developer.  As is true of all functions, each contains a
  3754.           keyword followed by parentheses,  one or more arguments
  3755.           separated by commas, and closing parentheses.
  3756.  
  3757.                AT(exp1,exp2) allows a search of the second string
  3758.           expression for the first occurrence of the first expression. A
  3759.           numeric value is returned for the character position of the
  3760.           first match.  For example, AT("son","Thompson") would return
  3761.           6. If no match was found, a 0 would be returned.
  3762.             
  3763.  
  3764.                                                       65
  3765.  
  3766.  
  3767.                CHR(n) returns an ASCII character represented by ASCII
  3768.           code n.  For example, CHR(27) is the escape code. 
  3769.  
  3770.                SPACE(n) allows the generation of n spaces where n is a
  3771.           numeric value.  For example SPACE(5) produces 5 spaces.
  3772.  
  3773.                STR(exp1,n,dec) converts a numeric expression (exp1)into
  3774.           a string expression n characters long with dec decimals.  For
  3775.           example, STR(153.123,5,1) would yield "153.1". 
  3776.  
  3777.                SUBSTR(exp1,n,len) permits extraction of a portion of a
  3778.           string from a larger string. n is a numeric specifying the
  3779.           starting position in the exp1 string. len is a numeric
  3780.           specifying the number of characters to extract from the
  3781.           starting position. For example, SUBSTR("Thompson",3,2) would
  3782.           return "om" which is 2 characters beginning at character
  3783.           position 3. 
  3784.  
  3785.                TRIM(exp1) tells WAMPUM to trim off trailing spaces
  3786.           from a character string.  For example, if a 30 character NAME
  3787.           field contained "John Jones     " then TRIM(NAME) would
  3788.           yield "John Jones" with no trailing spaces. 
  3789.  
  3790.                UPPER(exp1) converts a string expression to all
  3791.           UPPERCASE.  LOWER(exp1) does just the opposite. 
  3792.  
  3793.                VAL(exp1) returns a numeric value for the exp1 string. 
  3794.           For example, VAL("02345") would return the integer 2345. 
  3795.             
  3796.  
  3797.             2.8.3  DATE functions
  3798.             
  3799.                WAMPUM supports the dBASE III function for today's
  3800.           date which is DATE() as well as the reserved word TODAY
  3801.           which also is today's date in date format.
  3802.             
  3803.                DTOC(DATE()) would convert today's date to a character
  3804.           string in the format 06/12/86. 
  3805.  
  3806.                The converse also works to convert a string to a date:
  3807.           CTOD("06/12/86") would convert the string to a date variable. 
  3808.                Several DAY functions are available including:
  3809.  
  3810.                CDOW() which outputs the actual day of the week such as
  3811.           Monday; 
  3812.                DAY() which produces a numeric representing the day of
  3813.           the month such as 31; 
  3814.  
  3815.                DOW() which produces a numeric representing the day of
  3816.           the week such as 5.  Note that an empty date field always
  3817.           produces DOW equal to 0.  This is a good way to test for
  3818.           blank dates. 
  3819.  
  3820.                                                       66
  3821.  
  3822.  
  3823.  
  3824.                Several MONTH functions also are available:
  3825.  
  3826.                MONTH() outputs a numeric representing the month of the
  3827.           year such as 2; 
  3828.  
  3829.                CMONTH() generates the actual name of the month such
  3830.           as February; 
  3831.  
  3832.                YEAR() outputs a 4-digit numeric value representing the
  3833.           year such as 1987. 
  3834.  
  3835.                Clipper provides a date-to-string conversion function
  3836.           with the DTOS() command.  The syntax is DTOS(FILINGDT). 
  3837.           Assuming a filing date of 10/10/85, DTOS(FILINGDT) would
  3838.           output the string  "19851010".  This function is particularly
  3839.           helpful in building indexes where a date field is converted to a
  3840.           string, but a developer wishes to preserve proper ordering of
  3841.           dates. DTOC(FILINGDT,1) is the FoxBASE+ equivalent.
  3842.  
  3843.                In producing reports and labels, you can reformat a date
  3844.           field into a standard date character string using the WAMPUM
  3845.           function FULLDATE().  FullDate(FilingDt) is the syntax
  3846.           assuming that filing date was a date field in your data base.
  3847.           If the date were 10/20/85, FULLDATE(FILINGDT) would output
  3848.           October 20, 1985. 
  3849.  
  3850.                In some applications, it may be desirable to roll a date
  3851.           over to Monday if it hits on a weekend.  WAMPUM's
  3852.           WEEKDAY() function does this.  Assuming a filing date of
  3853.           06/14/86 hits on a Saturday, WEEKDAY(FILINGDT) would return
  3854.           a date expression with a value of 06/16/86 which is the
  3855.           following Monday. Note that this function could be combined
  3856.           with a previous one to produce a standard text date:
  3857.           FULLDATE(WEEKDAY(FILINGDT)). 
  3858.             
  3859.             
  3860.             2.8.4  DUPKEY("FIELDNAME") 
  3861.  
  3862.                When building the EDIT.DBF edit checks, many appli-
  3863.           cations require the ability to test whether the key field of
  3864.           the record being added to a data base already exists and, if
  3865.           so, to return an error. This is critical if you will be using the
  3866.           AUDIT TRAIL function. The DUPKEY() function provides this
  3867.           capability.  In order to use it, the following conditions must be
  3868.           met:
  3869.  
  3870.                (1)  The key field to be checked must be indexed; 
  3871.  
  3872.                (2)  That index must be the primary (first) index in use
  3873.                when the file is ADDed to or EDITed;
  3874.  
  3875.  
  3876.                                                       67
  3877.  
  3878.  
  3879.                (3)  The name of the key field must be specified in
  3880.                parentheses and quotation marks as an edit check in the
  3881.                EDIT.DBF file.  The syntax is shown in the following
  3882.                example using PARTNO as the name of the indexed key
  3883.                field which is to be checked:  DUPKEY("PARTNO")
  3884.  
  3885.  
  3886.  
  3887.             2.8.5  EMPTY(fieldname) tests for empty fields 
  3888.  
  3889.                EMPTY(FieldName) returns a logical True if a character,
  3890.           memo, or date field is empty, or if a numeric field is 0, or if a
  3891.           logical field is False.  Otherwise, a logical False is returned.
  3892.           This function does not work reliably in FoxBASE+.
  3893.  
  3894.  
  3895.  
  3896.             2.8.6  LASTTIME field in data bases
  3897.             
  3898.                If LASTTIME is included as a Character-type field in any
  3899.           data base, WAMPUM will automatically post the current time to
  3900.           this field whenever a record is ADDed or EDITed in that data
  3901.           base.  This provides a convenient method of determining when
  3902.           records were last updated with no user control over the field
  3903.           contents.
  3904.  
  3905.  
  3906.             2.8.7  LASTUPDT field in data bases
  3907.             
  3908.                If LASTUPDT is included as a Date-type field in any data
  3909.           base, WAMPUM will automatically post the current date to this
  3910.           field whenever a record is ADDed or EDITed in that data base.
  3911.           As with LASTTIME, there is no user control over this field's
  3912.           contents. 
  3913.  
  3914.             
  3915.             2.8.8  LASTUSER field in data bases
  3916.             
  3917.                If LASTUSER is included as a Character-type field in any
  3918.           data base, WAMPUM will automatically post the current
  3919.           USERID to this field whenever a record is ADDed or EDITed in
  3920.           that data base if the SET USERID=X line has been added to
  3921.           the AUTOEXEC.BAT file for each network user.  
  3922.  
  3923.                This provides a convenient method of determining who
  3924.           fouled up what with no user control over the field contents. 
  3925.           Please note that before using the SET USERID=X command, you
  3926.           must first create a USERS data base and index with the names
  3927.           and passwords of those authorized access. 
  3928.  
  3929.  
  3930.  
  3931.  
  3932.                                                       68
  3933.  
  3934.  
  3935.             2.9 PATH Considerations 
  3936.             
  3937.                Whenever WAMPUM is started, part of its initialization
  3938.           process includes reading the DOS PATH which then becomes
  3939.           WAMPUM's PATH as well.  For this reason, developers need to
  3940.           be careful NOT to build WAMPUM applications in a directory
  3941.           which is part of the DOS PATH since all of the files in this
  3942.           directory then would be accessed by other WAMPUM
  3943.           applications.  
  3944.  
  3945.                The only exception to this guideline might be in
  3946.           situations in which a related file and its index need to be
  3947.           shared with several different applications.  In this case, just
  3948.           the related file and index should be placed in a directory
  3949.           supported by the DOS PATH command, NOT the configuration
  3950.           files for the WAMPUM application itself.  If you don't
  3951.           understand this exception, don't use it.
  3952.  
  3953.  
  3954.            
  3955.             2.10 Enabling USERID's and Passwords
  3956.             
  3957.                WAMPUM now may be configured to require those
  3958.           accessing files through WAMPUM to log in with a USERID
  3959.           and PASSWORD.  Typically this would be used for network
  3960.           applications if the network itself does not provide adequate
  3961.           protection. The USERID-PASSWORD system also may be
  3962.           invoked in single-user applications.  
  3963.  
  3964.                Step 1 to force use of the USERID-PASSWORD system is
  3965.           to create a data base which will store the user names and
  3966.           passwords of those authorized to utilize WAMPUM.  Create a
  3967.           new subdirectory on your hard disk and run WAMPUM in
  3968.           Developer Mode.  Then Build A New File and name it USERS. 
  3969.  
  3970.                Two fields must be created in this file structure. Two
  3971.           additional fields are optional.  The two mandatory fields are
  3972.           USER and PASSWORD.  Both fields must be Character-type
  3973.           fields with a field length of 8. The optional fields are
  3974.           SUPERVISOR, which must be a Logical field of length 1, and
  3975.           CONFIG, which must be a character field of length 7. 
  3976.  
  3977.                Once you have built the new data base, use F - File
  3978.           Select to place the USERS file in use.  Then use I - Index
  3979.           Select/Create to build an index on the USER field.  You then
  3980.           are ready to ADD records to the data base for each
  3981.           anticipated user.  
  3982.  
  3983.                For each user, you must include a user name and
  3984.           password.  These entries ALL must be in UPPER case letters! 
  3985.           Once you have added all the entries desired, exit to the DOS
  3986.           level and copy USERS.DBF and USER.NTX into a directory
  3987.  
  3988.                                                       69
  3989.  
  3990.  
  3991.           which is part of the DOS path.  This will enable WAMPUM to
  3992.           find the files whenever an attempt is made to run WAMPUM. 
  3993.           Assuming your \DOS subdirectory is part of the path, a simple
  3994.           command to copy the files would be as follows: 
  3995.  
  3996.                            COPY   USER*.*   \DOS
  3997.             
  3998.                Whenever you wish to add new users, move to the
  3999.           directory in which you established the original copy of the
  4000.           file (NOT the directory which is part of the DOS PATH!). 
  4001.           Add whatever new entries are desired, and then copy the files
  4002.           again to the same directory sharing the DOS PATH which was
  4003.           used previously. 
  4004.  
  4005.                If you accidentally get tangled up to the point that you
  4006.           can no longer get into WAMPUM, turn OFF the password
  4007.           feature by disabling the USERID variable in the environment. 
  4008.           To do this, exit to DOS and type the following command at
  4009.           the DOS prompt:  SET USERID=
  4010.             
  4011.                If the SUPERVISOR field is used and is marked True for
  4012.           a given user, then WAMPUM automatically will be started in
  4013.           Developer mode for that user.  This means that all 21 menu
  4014.           options will be available to this user.
  4015.  
  4016.                If the CONFIG field is used, then the developer may
  4017.           specify a configuration file for use by each user.  This
  4018.           configuration file takes the place of WAMPUM.MEM which will
  4019.           be used unless the CONFIG field is used and has an entry. The
  4020.           process for generating these individual configurations is quite
  4021.           simple.  Create a new WAMPUM configuration as you normally
  4022.           would using the * - Config Update option. Then exit to DOS
  4023.           and copy WAMPUM.MEM which was created to a new filename
  4024.           matching the CONFIG field value. Make certain that the file
  4025.           extension remains .MEM.  Then edit the USERS data base and
  4026.           add an appropriate CONFIG file name for the users desired.
  4027.  
  4028.                For example, let's assume there is a USER named Jones. 
  4029.           We want that user's CONFIG file to be named JONES.MEM. 
  4030.           Run WAMPUM in Developer Mode and configure the
  4031.           application in the normal manner. Now exit to DOS and type:
  4032.  
  4033.                      COPY WAMPUM.MEM JONES.MEM
  4034.  
  4035.                Revise Jones' entry in the USERS data base to reflect a
  4036.           CONFIG field value of JONES.  
  4037.             
  4038.  
  4039.             2.11  WAMPUM & DOS System Errors
  4040.             
  4041.                WAMPUM System Errors are error conditions caused by
  4042.           one of three conditions: 
  4043.  
  4044.                                                       70
  4045.  
  4046.  
  4047.  
  4048.                (1) a DOS-error is detected, 
  4049.  
  4050.                (2) a Clipper or FoxBASE+ error is detected, or 
  4051.  
  4052.                (3) the abort key (ALT-C) in Clipper versions is pressed
  4053.                by the user.
  4054.  
  4055.                In any of these three situations, a system error message
  4056.           appears on the top line of the screen followed by a prompt
  4057.           telling you how to proceed. What follows is a brief description
  4058.           of what to do in each of these error situations. 
  4059.  
  4060.                DOS errors typically are caused by a hardware failure
  4061.           such as a bad hard disk, a missing floppy disk in Drive A, or
  4062.           an out of memory condition.  With any DOS error, you should
  4063.           always terminate the program if given the option to do so. 
  4064.           This will gracefully close all open data bases and indexes and
  4065.           assure that no permanent damage is done to your data. 
  4066.  
  4067.                Clipper or FoxBASE+ errors typically occur when
  4068.           WAMPUM encounters an illegal dBASE expression in a report
  4069.           or label form, in macro expressions or edit checks, or in a
  4070.           record selection specification.  
  4071.  
  4072.                For example, if you entered LASTNAME=Jones as a record
  4073.           selection criteria without surrounding Jones in quotes, a
  4074.           system error would occur whenever you executed a report,
  4075.           label, form letter, or listing of the file. 
  4076.  
  4077.                Unfortunately, the current version of the Clipper
  4078.           compiler, with which WAMPUM was produced, provides no
  4079.           means for WAMPUM to test such expressions for validity
  4080.           before executing them.  The FoxBASE+ versions of WAMPUM
  4081.           will catch these errors.  However, once Clipper attempts to
  4082.           execute an invalid expression, a system error occurs. You
  4083.           typically will be returned to the Main System Menu when these
  4084.           errors occur. You then can revise the offending code and try
  4085.           again. In the case of invalid expressions, you usually can opt
  4086.           to ignore these error so long as you understand that the
  4087.           results of any output may be erroneous. 
  4088.  
  4089.                There may be occasions when you want to cancel some
  4090.           WAMPUM session usually because a report listing is not
  4091.           producing the results desired and you do not want to waste
  4092.           100 sheets of paper.  Press <ESC>ape and the output will be
  4093.           terminated when the next qualifying record is reached. Do NOT
  4094.           press CTRL-ALT-DEL to terminate WAMPUM. This may
  4095.           permanently damage any data bases in use at the time.  
  4096.  
  4097.  
  4098.  
  4099.  
  4100.                                                       71
  4101.  
  4102.  
  4103.             3  End-User Functions
  4104.             
  4105.             3.1 Overview
  4106.             
  4107.                The developer's section explained the step-by-step
  4108.           process for building a new application.  This section is
  4109.           designed to acquaint the end-user with information necessary
  4110.           to build and maintain an existing data base application as well
  4111.           as how to extract information from an existing file.
  4112.             
  4113.                End-users typically want to do two things with a data
  4114.           base. They want to add or change information in an existing
  4115.           file (INPUT functions), and they want to extract information
  4116.           from an existing file (OUTPUT functions).
  4117.             
  4118.                In WAMPUM, INPUT consists of ADDing new records,
  4119.           EDITing existing records, and DELETing or UNDELETing
  4120.           existing records. For network applications, only one person can
  4121.           edit any individual record at any given time.  Multiple people
  4122.           may be adding new records at the same time.  And multiple
  4123.           people may be editing different existing records. 
  4124.  
  4125.                In WAMPUM, OUTPUT means you just want to look at or
  4126.           print something which already exists in the file.  For network
  4127.           users, multiple people can be outputting information from the
  4128.           same file simultaneously.  ALL output falls into one of two
  4129.           categories: single record or multiple record output.
  4130.  
  4131.                Single record OUTPUT is quick because it typically
  4132.           involves retrieval of a single record by an indexed key.  This
  4133.           output may consist of either DISPLAYing an individual record
  4134.           or PRINTing an individual record.  In either case, the end-user
  4135.           is prompted for the key of the record to find, and WAMPUM
  4136.           will find it in less than a second even with extremely large
  4137.           data bases.  The record is displayed or printed in its entirety
  4138.           just as the information is stored. 
  4139.             
  4140.                Multiple record OUTPUT tends to be slower but more
  4141.           useful.  It is slower because WAMPUM must make a complete
  4142.           pass through the data base to find the records desired for
  4143.           output.  It tends to be more useful because the output
  4144.           typically is formatted in such a way that the extracted data is
  4145.           more meaningful.  Multiple record output ALWAYS involves
  4146.           three steps: (1) picking the lead index to specify the order in
  4147.           which the records will appear in the output, e.g. alphabetically,
  4148.           by date, or by part number; (2) selecting (i.e. narrowing down)
  4149.           the group of records which should be output using Boolean
  4150.           logic, e.g. find all the new accounts for January or just the
  4151.           new accounts with sales over $1,000,000; and (3) choosing the
  4152.           type of output desired: a list, report, mailing labels, or a form
  4153.           letter. Billing statements, an overdue notice, or monthly
  4154.  
  4155.  
  4156.                                                       72
  4157.  
  4158.  
  4159.           summary of accounts all are examples of multiple record output
  4160.           which easily can be produced using WAMPUM. 
  4161.  
  4162.                You must master the above concepts before use of any
  4163.           data base management system can be of much value.  If you
  4164.           don't understand the relationship between input and output and
  4165.           the various types of output, put this User's Guide aside and try
  4166.           reading this section again tomorrow.
  4167.             
  4168.  
  4169.             3.2 A - ADDing New Records
  4170.             
  4171.                To add new records to any data base, that file must first
  4172.           be selected.  Look at the bottom of the WAMPUM Main Menu
  4173.           to make sure that the file you want to use is already selected. 
  4174.           If not, it can be selected using the F - File Select option in
  4175.           developer mode only, i.e. password required.
  4176.             
  4177.                If the file you wish to work with is selected, then you
  4178.           should also consider whether there are indexes which you want
  4179.           automatically updated as you ADD new records to the file.  If
  4180.           so, then these, too, must be selected before you ADD new
  4181.           records.  You can determine which indexes are in use by
  4182.           looking at the bottom of the Main System Menu screen.  New
  4183.           indexes can be created and/or opened using the I - Index
  4184.           Sel/Create option in developer mode only.
  4185.  
  4186.                Once you are working with the correct file and indexes,
  4187.           then ADDing records is as simple as highlighting the A - Add
  4188.           a New Record option and pressing <ENTER>. Or you may simply
  4189.           type an A while the Main System Menu is displayed.
  4190.             
  4191.                The screen will clear and WAMPUM will display a data
  4192.           entry screen with all of the fields in the current file.  It will
  4193.           indicate the proposed new record number of this entry at the
  4194.           top of the form. Type in the data you wish to enter for each
  4195.           field using the UP and DOWN cursor keys to move from field
  4196.           to field.
  4197.  
  4198.                If a file has a substantial number of fields, then all of
  4199.           the fields may not fit on one data entry screen.  In this case,
  4200.           the word *MORE* will appear in the bottom right corner of
  4201.           the screen.  When you complete entry of data on the first
  4202.           screen, then a second screen with the remaining fields will
  4203.           appear. 
  4204.  
  4205.                Saving a new entry to the file can be accomplished in
  4206.           several ways.  
  4207.  
  4208.                (1) Pressing <ENTER> while the cursor is positioned in
  4209.                the last field of the last data entry screen will save the
  4210.                record.  
  4211.  
  4212.                                                       73
  4213.  
  4214.  
  4215.  
  4216.                (2) Completely filling the last field with text also will
  4217.                save the record.  
  4218.  
  4219.                (3) Pressing CTRL-W will save the new record without
  4220.                displaying the remaining data entry screens if the record
  4221.                requires more than one screen for data entry. 
  4222.  
  4223.                (4) Pressing <PgDn> in the last data entry screen of a
  4224.                record will also SAVE the record.
  4225.             
  4226.                Aborting a new entry can be accomplished by pressing the
  4227.           <ESC>ape key at any time before any of the SAVE methods
  4228.           outlined above occur.  <PgUp> also aborts data entry in ADD
  4229.           mode only. 
  4230.  
  4231.                WAMPUM supports updating of Memo fields in a slightly
  4232.           different way than dBASE III.  If you wish to display or edit
  4233.           a memo field, then first move the cursor to that field.  It will
  4234.           be displayed on the screen with the field name followed by
  4235.           *MEMO*.  Note that memo fields in WAMPUM appear to be
  4236.           logical fields which can accept True, False, Yes, or No as
  4237.           entries.  If you wish to edit the memo field, simply set the
  4238.           logical field to True or Yes by entering a T or Y.  When you
  4239.           complete entry of data for this record and execute a SAVE
  4240.           using one of the methods outlined above, the Memo editor will
  4241.           display any memo field marked True and allow you to update it
  4242.           as desired.  You then can either SAVE the updated Memo text
  4243.           by pressing Ctrl-W or ABORT the update and leave the Memo
  4244.           text as it was by pressing <ESC>ape. 
  4245.  
  4246.                After you ADD a new entry to the file, WAMPUM will
  4247.           display another blank data entry screen thereby allowing you
  4248.           to add another entry.  If you do not wish to add another
  4249.           entry, press <ESC>ape to exit to the Main System Menu. 
  4250.             
  4251.  
  4252.             3.3 E - EDITing Records
  4253.             
  4254.                To edit records in any data base, that file must first be
  4255.           selected and cannot be empty.  Look at the bottom of the
  4256.           WAMPUM Main Menu to make sure that the file you want to
  4257.           use is already selected.  If not, it can be selected using the F
  4258.           - File Select option in developer mode only.
  4259.             
  4260.                If the file you wish to work with is selected, then you
  4261.           should also consider whether there are indexes which you want
  4262.           automatically updated as you EDIT records in the file.  If so,
  4263.           then these, too, must be selected before you EDIT any
  4264.           records.  You can determine which indexes are in use by
  4265.           looking at the bottom of the Main System Menu screen.  New
  4266.  
  4267.  
  4268.                                                       74
  4269.  
  4270.  
  4271.           indexes can be created and/or opened using the I - Index
  4272.           Sel/Create option in developer mode only.
  4273.  
  4274.                Once you are working with the correct file and indexes,
  4275.           then EDITing records is as simple as highlighting the E - Edit
  4276.           Record option and pressing <ENTER>. Or you may simply type
  4277.           an E while the Main System Menu is displayed.
  4278.  
  4279.                If you are not using indexes in conjunction with the file
  4280.           being edited, then you will be prompted for the record number
  4281.           of the record you wish to edit.  Simply type in the number
  4282.           desired and press the <ENTER> key.  
  4283.             
  4284.                If you are using one or more indexes in conjunction with
  4285.           the file being edited, then the first index displayed at the
  4286.           bottom of the Main System Menu is considered the LEAD
  4287.           INDEX and will be used to retrieve records.  If this is not the
  4288.           index you wish to use for record retrieval, see the section on
  4289.           Select Utilities for information on how to change the lead
  4290.           index.  The simplest way in all versions except FoxBASE+ is
  4291.           to press ALT-I and highlight the desired index.
  4292.  
  4293.                When editing with an index, you will be prompted to
  4294.           enter a value for the field which is currently the LEAD
  4295.           INDEX.  With character fields, you may enter all or part of a
  4296.           key, and WAMPUM will search for a match on the portion of
  4297.           the key entered.  With other types of fields, you must enter
  4298.           the exact key to find. Note that capitalization is critical in
  4299.           finding matches.  If a LASTNAME field in your data base
  4300.           contains an entry of SMITH and you enter Smith as the key,
  4301.           then WAMPUM will not find SMITH.
  4302.             
  4303.                Once you have entered either a record number or the key
  4304.           of the record to find, WAMPUM will search for the first
  4305.           match.  Assuming your application allows duplicate keys, there
  4306.           may be more than one match on a particular key, e.g. there
  4307.           may be a number of Smith's in your data base.  If the first
  4308.           data entry screen displayed is not the Smith desired, then
  4309.           <PgDn> until the correct record is retrieved.  
  4310.  
  4311.                If you are using a data base with too many fields to fit
  4312.           on one screen, then you may have to <PgDn> several times just
  4313.           to move to the next record.  There currently is no key which
  4314.           can be pressed to SKIP to the next record without first
  4315.           displaying all of the edit screens for the current record. 
  4316.                If you skip past the record desired, you can also back up
  4317.           through the file in the order of the current key by pressing
  4318.           the <PgUp> key at any time.
  4319.             
  4320.                Once the record is displayed, move to the fields to be
  4321.           edited using the UP and DOWN cursor keys. You can change
  4322.           existing data for a field in several ways:
  4323.  
  4324.                                                       75
  4325.  
  4326.  
  4327.  
  4328.                (1) You may type over the existing data.  
  4329.  
  4330.                (2) Or you may delete the existing data by pressing
  4331.                CTRL-Y and then type in the new data.  
  4332.  
  4333.                (3) Or you may INSERT new data into a field by
  4334.                positioning the cursor where you want the insert to
  4335.                begin. Press the <INS>ert key and type the new text. 
  4336.  
  4337.                With multi-screen records, you can move forward to the
  4338.           next screen by pressing <PgDn>.  You cannot move backward
  4339.           within a record by pressing <PgUp>.  <PgUp> will save the
  4340.           record and move you to the previous record in the data base.
  4341.           The only exception is FoxBASE+ custom format files which are
  4342.           discussed in the Developer's Section of this Guide. 
  4343.  
  4344.                CTRL-W saves the current record and prompts you for the
  4345.           next record to find.  <PgDn> saves the current record and
  4346.           then displays the next record in the file for editing. 
  4347.  
  4348.                You can abort any EDIT by pressing <ESC>ape before any
  4349.           of the SAVE actions outlined above occur.
  4350.             
  4351.             3.4 D - DISPLAYing Records
  4352.             
  4353.                To display records in any data base, that file must first
  4354.           be selected and cannot be empty.  Look at the bottom of the
  4355.           WAMPUM Main Menu to make sure that the file you want to
  4356.           use is already selected.  If not, follow the process outlined
  4357.           under Edit Records to choose a file and any indexes.  
  4358.  
  4359.                Once you are working with the correct file and index,
  4360.           then DISPLAYing records is as simple as highlighting the D -
  4361.           Display Record option and pressing <ENTER>. Or you may
  4362.           simply type a D while the Main System Menu is displayed.
  4363.             
  4364.                If you are not using indexes in conjunction with the file
  4365.           being displayed, then you will be prompted for the record
  4366.           number of the record you wish to display.  Simply type in the
  4367.           number desired and press the <ENTER> key.     
  4368.  
  4369.                If you are using an index in conjunction with the file
  4370.           being displayed, then the first index displayed at the bottom
  4371.           of the Main System Menu is considered the LEAD INDEX and
  4372.           will be used to retrieve records.  If this is not the index you
  4373.           wish to use for record retrieval, see the section on Select
  4374.           Utilities or press ALT-I in non-FoxBASE+ versions. 
  4375.  
  4376.                When retrieving with an index, you will be prompted to
  4377.           enter a value for the field which is currently the LEAD
  4378.           INDEX.  You may enter all or part of a key, and WAMPUM
  4379.  
  4380.                                                       76
  4381.  
  4382.  
  4383.           will search for a match on the portion of the key entered. 
  4384.           Capitalization is critical in finding matches.   
  4385.  
  4386.                Once you have entered either a record number or the key
  4387.           of the record to find, WAMPUM will search for the first
  4388.           match.  Assuming your application allows duplicate keys, there
  4389.           may be more than one match on a particular key, e.g. there
  4390.           may be a number of Smith's in your data base.  If the first
  4391.           data entry screen displayed is not the Smith desired, then
  4392.           <PgDn> until the correct record is retrieved.  
  4393.  
  4394.                If you are using a data base with too many fields to fit
  4395.           on one screen, then each time you press <PgDn>, WAMPUM
  4396.           will skip to the next record.  It will NOT display the
  4397.           subsequent fields of the current record as is the case in EDIT
  4398.           mode.  If you wish to look at the subsequent fields of the
  4399.           current record, then press the <ENTER> key rather than
  4400.           <PgDn>.  In addition, if there are MEMO fields in the data
  4401.           base with which you are working, these fields will show T if
  4402.           there is data in the field except in FoxBASE+ versions which
  4403.           always show F.  Empty memo fields always display F.  To
  4404.           display the first screen of information in any MEMO field, just
  4405.           press <RETURN> rather than <PgDn> on the last screen of the
  4406.           display of the standard fields. The entire contents of a MEMO
  4407.           field can be displayed in non-FoxBASE+ versions by using the
  4408.           cursor control keys.  In FoxBASE+ versions, only the first
  4409.           screen is shown. Use Edit mode to see the rest. 
  4410.  
  4411.                If you skip past the record desired, you can also move
  4412.           backwards through the file in the order of the current key by
  4413.           pressing the <PgUp> key at any time.
  4414.  
  4415.                You can abort any DISPLAY by pressing <ESC>ape key. 
  4416.  
  4417.                If you attempt to find a record which does not exist in
  4418.           the data base, WAMPUM will beep and prompt for another
  4419.           record to find.  When you have displayed all the records
  4420.           desired, press <ESC>ape to exit to the Main System Menu.
  4421.  
  4422.             
  4423.             
  4424.             3.5 M - MARKing a Record for Deletion
  4425.  
  4426.                To mark records as deleted in any data base, that file
  4427.           must first be selected and cannot be empty.  Look at the
  4428.           bottom of the WAMPUM Main Menu to make sure that the file
  4429.           you want to use is already selected.  If not, it can be selected
  4430.           using the F - File Select option in developer mode. 
  4431.                If the file you wish to work with is selected, then you
  4432.           should also consider whether there is an index which you want
  4433.           to use for record retrieval.  If so, then this index must be
  4434.           selected as the lead index before you choose DELETE.   
  4435.  
  4436.                                                       77
  4437.  
  4438.  
  4439.  
  4440.                Once you are working with the correct file and index,
  4441.           then marking records DELETED is as simple as highlighting the
  4442.           M - Mark Record *DEL* option and pressing <ENTER>. Or you
  4443.           may simply type an M from the Main System Menu.
  4444.  
  4445.                If you are not using indexes in conjunction with the file,
  4446.           then you will be prompted for the record number of the
  4447.           record you wish to mark deleted.  Simply type in the number
  4448.           desired and press the <ENTER> key.  
  4449.             
  4450.                If you are using an index in conjunction with the file,
  4451.           then the first index displayed at the bottom of the Main
  4452.           System Menu is considered the LEAD INDEX and will be used
  4453.           to retrieve records.  If this is not the index you wish to use
  4454.           for record retrieval, change the lead index and then proceed.
  4455.  
  4456.                When using an index, you will be prompted to enter a
  4457.           value for the field which is currently the LEAD INDEX.  You
  4458.           may enter all or part of a key, and WAMPUM will search for a
  4459.           match on the portion of the key entered.  
  4460.  
  4461.                Once you have entered either a record number or the key
  4462.           of the record to find, WAMPUM will search for the first
  4463.           match.  Assuming your application allows duplicate keys, there
  4464.           may be more than one match on a particular key, e.g. there
  4465.           may be a number of Smith's in your data base.  If the first
  4466.           entry displayed is not the Smith desired, then <PgDn> through
  4467.           the records until the correct record is displayed.
  4468.  
  4469.                If you are using a data base with too many fields to fit
  4470.           on one screen, note that WAMPUM will only display the first
  4471.           screen of data for each record while in DELETE mode.
  4472.  
  4473.                If you skip past the record desired, you can back up
  4474.           through the file in the order of the current key by pressing
  4475.           the <PgUp> key at any time.
  4476.             
  4477.                Once you find the record you wish to mark DELETED,
  4478.           then answer the DELETE prompt by entering a T for True or Y
  4479.           for Yes, and the record will be marked deleted.
  4480.             
  4481.                You can abort any search by pressing <ESC>ape key. 
  4482.  
  4483.                If you attempt to find a record which does not exist in
  4484.           the data base, WAMPUM will beep and prompt for another
  4485.           record to find.  When you have deleted all the records desired,
  4486.           press <ESC>ape to exit to the Main System Menu.
  4487.             
  4488.                NOTE:  WAMPUM uses the same conventions as dBASE
  4489.           insofar as deleted records are concerned.  Deleted records are
  4490.           not really deleted.  They are simply marked with an asterisk
  4491.  
  4492.                                                       78
  4493.  
  4494.  
  4495.           (*) in the first record position which signifies that they will
  4496.           be deleted the next time the file is rebuilt using the X -
  4497.           REBUILD/FileFix option.  At any time before you rebuild the
  4498.           file, any record marked as deleted can be restored using U -
  4499.           UN*DEL* records.  The primary significance of marking records
  4500.           for deletion is that they will not ordinarily print when output
  4501.           is produced.  
  4502.             
  4503.             
  4504.             3.6 U - UNDELETing a Record
  4505.  
  4506.                To undelete records marked as deleted in any data base,
  4507.           that file must first be selected and cannot be empty.  Look at
  4508.           the bottom of the WAMPUM Main Menu to make sure that the
  4509.           file you want to use is already selected.  If not, it can be
  4510.           selected using F - File Select in developer mode only. 
  4511.  
  4512.                If the file you wish to work with is selected, then you
  4513.           should also consider whether there is an index which you want
  4514.           to use for record retrieval.  If so, then this index must be
  4515.           selected as the lead index before you attempt to UNDELETE
  4516.           any records.  
  4517.             
  4518.                Once you are working with the correct file and index,
  4519.           then marking records UNDELETED is as simple as highlighting
  4520.           the U - UN*DEL* Records option and pressing <ENTER>. Or
  4521.           you may simply type U from the Main Menu. 
  4522.  
  4523.                If you are not using indexes in conjunction with the file,
  4524.           then you will be prompted for the record number of the
  4525.           record you wish to undelete.  Simply type in the number
  4526.           desired and press the <ENTER> key.  
  4527.             
  4528.                If you are using an index in conjunction with the file,
  4529.           then the first index displayed at the bottom of the Main
  4530.           System Menu is considered the LEAD INDEX and will be used
  4531.           to retrieve records.  If this is not the index desired for
  4532.           record retrieval, change the lead index before proceeding.
  4533.  
  4534.                When using an index, you will be prompted to enter a
  4535.           value for the field which is currently the LEAD INDEX.  You
  4536.           may enter all or part of a key, and WAMPUM will search for a
  4537.           match on the portion of the key entered.  
  4538.  
  4539.                If you are using a data base with too many fields to fit
  4540.           on one screen, note that WAMPUM will only display the first
  4541.           screen of data for each record while in UNDELETE mode.
  4542.  
  4543.                If you skip past the record desired, you can also back up
  4544.           through the file in the order of the current key by pressing
  4545.           the <PgUp> key at any time.
  4546.             
  4547.  
  4548.                                                       79
  4549.  
  4550.  
  4551.                Once you find the record you wish to UNDELETE, then
  4552.           answer the restore prompt by entering a T for True or Y for
  4553.           Yes, and the record will be restored to the data base as an
  4554.           active record. 
  4555.  
  4556.                You can abort any search by pressing <ESC>ape key. 
  4557.  
  4558.                If you attempt to find a record which does not exist in
  4559.           the data base, WAMPUM will beep and prompt for another
  4560.           record to find.  When you have undeleted all the records
  4561.           desired, press <ESC>ape to exit to the Main System Menu.
  4562.  
  4563.                NOTE:  WAMPUM can only undelete records which are
  4564.           marked deleted.  It cannot recover records which have been
  4565.           permanently deleted using the X - REBUILD/FileFix option.  At
  4566.           any time before you rebuild the file, any record marked as
  4567.           deleted can be restored using U - UN*DEL* records.  The
  4568.           down side of this is that once the X option has been run on a
  4569.           file, you can no longer UNDELETE records marked for deletion
  4570.           since they have been permanently deleted from the data base.
  4571.  
  4572.             
  4573.             3.7 P - PRINTing Records
  4574.             
  4575.                To print individual records from any data base, that file
  4576.           must first be selected and cannot be empty.  Look at the
  4577.           bottom of the WAMPUM Main Menu to make sure that the file
  4578.           you want to use has already been selected.  If not, it can be
  4579.           selected using the F - File Select option in developer mode
  4580.           only.
  4581.  
  4582.                Also make certain that WAMPUM is configured to match
  4583.           the printer you currently are using.  This can be changed by
  4584.           selecting the # - PRINTER Config option in developer mode
  4585.           only. If no printer has been selected, WAMPUM will print in
  4586.           generic mode, meaning it outputs pure ASCII text.
  4587.             
  4588.                Once the file desired is selected, then you should also
  4589.           consider whether there is an index which you want to use for
  4590.           record retrieval.  If so, then this index must be selected as
  4591.           the lead index before you PRINT any records.
  4592.  
  4593.                Once you are working with the correct file and index,
  4594.           then PRINTing records is as simple as highlighting the P -
  4595.           Print Record(s) option and pressing <ENTER>. Or you may
  4596.           simply type a P while the Main System Menu is displayed.
  4597.             
  4598.                If you are not using indexes in conjunction with the file,
  4599.           then you will be prompted for the record number of the
  4600.           record you wish to retrieve.  Simply type in the number
  4601.           desired and press the <ENTER> key.  
  4602.  
  4603.  
  4604.                                                       80
  4605.  
  4606.  
  4607.                If you are using an index in conjunction with the file,
  4608.           then the first index displayed at the bottom of the Main
  4609.           System Menu is considered the LEAD INDEX and will be used
  4610.           to retrieve records.  If this is not the index you wish to use
  4611.           for record retrieval, then change the lead index and proceed.
  4612.  
  4613.                When printing records with index retrieval, you will be
  4614.           prompted to enter a value for the field which is currently the
  4615.           LEAD INDEX.  You may enter all or part of a key, and
  4616.           WAMPUM will search for a match on the portion of the key
  4617.           entered.  
  4618.             
  4619.                If you are using a data base with too many fields to fit
  4620.           on one screen, then only as many fields as will fit on a single
  4621.           screen will be displayed.  To get a print out of the entire
  4622.           record displayed plus the contents of any MEMO fields,
  4623.           answer the Print Record? prompt by typing a T or Y.  Make
  4624.           certain that your printer is turned ON and is ON LINE.
  4625.             
  4626.                If you skip past the record desired, you can also back up
  4627.           through the file in the order of the current key by pressing
  4628.           the <PgUp> key at any time.
  4629.             
  4630.                You can abort a PRINT records session by pressing the
  4631.           <ESC>ape key.
  4632.             
  4633.                If you attempt to find a record which does not exist in
  4634.           the data base, WAMPUM will beep and prompt for another
  4635.           record to find.  When you have printed all the records desired,
  4636.           press <ESC>ape to exit to the Main System Menu.
  4637.  
  4638.             
  4639.             3.8 X - REBUILD/FileFix
  4640.  
  4641.                Computers are very temperamental when it comes to
  4642.           electricity.  Power fluctuations will cause all sorts of
  4643.           undesired results when working with any data base.  In
  4644.           network environments, power is even more critical.  WAMPUM
  4645.           provides the X - REBUILD/FileFix option as a tool to assist
  4646.           in rebuilding data bases and indexes which typically have been
  4647.           corrupted by power problems.  This option obviously does not
  4648.           take the place of a reliable source of electricity.  If you are
  4649.           having to use this option frequently, then you should seriously
  4650.           consider an uninterruptible power supply if you value your
  4651.           data!  This option now provides three features to assist in file
  4652.           maintenance: 
  4653.  
  4654.                (1) data base file packing which automatically rebuilds
  4655.                active indexes as well, 
  4656.  
  4657.                (2) memo file packing which compresses free-form text
  4658.                entered into memo fields, and 
  4659.  
  4660.                                                       81
  4661.  
  4662.  
  4663.  
  4664.                (3) reindexing which rebuilds index files associated with a
  4665.                data base.
  4666.             
  4667.                The file packing option (1) rebuilds the entire data base
  4668.           file and resets the end-of-file pointer which oftentimes is
  4669.           damaged by a power outage.  If there are active indexes,
  4670.           these are reindexed as well.  Be forewarned that this option
  4671.           automatically and permanently DELETES any records marked for
  4672.           deletion.  Make certain that you have UNDELETED any records
  4673.           you wish to preserve before executing this option! 
  4674.  
  4675.                Memo file packing (2) is NOT included in the dBASE file
  4676.           packing algorithm hence packing a data base file does not
  4677.           affect the memo file at all.  For those new to the world of
  4678.           dBASE, you should be aware that any time a data base is
  4679.           created which includes one or more memo fields, a separate
  4680.           file automatically is created to store the contents of these
  4681.           fields.  It has the same file name as the main data base;
  4682.           however, the file extension is .DBT.  As you add data to memo
  4683.           fields, the actual text is stored in the .DBT file while a
  4684.           pointer (an address) is stored in the actual data base file. 
  4685.                Virtually any time a memo field is revised and expanded
  4686.           even slightly, the entire contents of that memo field is
  4687.           rewritten to the end of the .DBT file, and the pointer is
  4688.           adjusted accordingly.  Over time, the size of the .DBT file
  4689.           grows geometrically depending upon how often your memo
  4690.           fields are revised.  Previous copies of memo fields are never
  4691.           deleted from the .DBT file.  They merely occupy space.  To
  4692.           delete them, you must actually execute a dBASE COPY of the
  4693.           data base and then rename the file back to the original name. 
  4694.           WAMPUM's memo file packing option does this for you
  4695.           automatically.  Before executing this option, always make a
  4696.           backup of your original data base including the .DBT memo
  4697.           file.  Also make certain that your default drive has adequate
  4698.           space to house a temporary duplicate of both the .DBF and
  4699.           .DBT files which will be copied and then renamed!
  4700.             
  4701.                Reindexing (3) is a tool which oftentimes will cure
  4702.           damage from power problems without actually rebuilding the
  4703.           data base itself.  The principal advantage to reindexing rather
  4704.           than file packing is that it does not delete records marked for
  4705.           deletion in the main data base.  If this is a concern, you may
  4706.           wish to try this option to repair damage before choosing file
  4707.           packing.  If you do select file packing, reindexing is performed
  4708.           without selecting this option.
  4709.             
  4710.  
  4711.  
  4712.  
  4713.  
  4714.  
  4715.  
  4716.                                                       82
  4717.  
  4718.  
  4719.             3.9 S - SELECT Utilities
  4720.             
  4721.             3.9.1  Overview
  4722.             
  4723.                The S - Select Utilities option in WAMPUM provides end-
  4724.           user access to the two most critical elements in extracting
  4725.           data from a data base: record selection and sorting.  Sorting
  4726.           in WAMPUM is handled through changing the lead index. 
  4727.  
  4728.                The Select Utilities option also provides the means for
  4729.           setting the primary index for record retrieval purposes.  
  4730.             
  4731.                Four other dBASE III functions are provided through the
  4732.           Select Utilities option: 
  4733.  
  4734.                (1)  LIST FILE CONTENTS, to generate quick report
  4735.                listings with up to 9 fields; 
  4736.  
  4737.                (2)  CHANGE DATA ENTRY MENUS, which allows a user
  4738.                to select from up to 10 different data entry menus; 
  4739.            
  4740.                (3)  BROWSE MODE, to scan through a group of records;
  4741.                and 
  4742.  
  4743.                (4)  LIST STRUCTURE, which displays or prints a listing
  4744.                of a file's field structure.
  4745.             
  4746.                No User's Guide can do justice to the topic of Boolean
  4747.           logic which is the record selection step in both WAMPUM and
  4748.           dBASE III.  There are numerous books including a number of
  4749.           dBASE III primers which cover record selection in much more
  4750.           detail than what is addressed here.  Many are available
  4751.           without charge through your public library.  For anyone to
  4752.           get the most out of WAMPUM, you must master record
  4753.           selection since it is the critical element in identifying which
  4754.           records should and should not be extracted for reports, labels,
  4755.           and form letters.
  4756.  
  4757.  
  4758.             3.9.2  Record Selection Criteria
  4759.             
  4760.                Record Selection, which in dBASE is technically known as
  4761.           a filter, is the process by which you tell the computer which
  4762.           records should and should not be extracted in producing
  4763.           reports, labels, and form letters.
  4764.             
  4765.                With the exception of logical fields, the syntax for
  4766.           record selection typically is FIELDNAME relational operator
  4767.           VALUE.  The syntax for logical fields is simpler.  Assuming a
  4768.           logical field exists in your data base called MARRIED, if you
  4769.           want to find all the records in which the MARRIED field is
  4770.           True, the Boolean expression is simply the field name itself:
  4771.  
  4772.                                                       83
  4773.  
  4774.  
  4775.           MARRIED.  If you want to find all those in which the
  4776.           MARRIED field is False, the correct expression is .NOT.
  4777.           MARRIED.  Any record selection expression can be linked to
  4778.           another expression with one of two connectors: .AND. or .OR.  
  4779.                The other cardinal rule is that expressions on both sides
  4780.           of the relational operator must be of the same type.  Thus, if
  4781.           a field is a character field then the value must be a character
  4782.           string.  If the field is a date field, then the value must be a
  4783.           date.  Finally, except in FoxBASE+ versions, memo fields can
  4784.           be searched for matches using record selection and should be
  4785.           treated as if they were character fields, i.e. enclose search
  4786.           values in quotes just like a character string! 
  4787.  
  4788.                Whenever you run a report, label, or form letter,
  4789.           WAMPUM always checks to see if Record Selection Criteria are
  4790.           in effect.  The bottom line of the Main System Menu also will
  4791.           tell you whether search criteria are active by displaying *SEL*
  4792.           after the file in use.  If so, WAMPUM scans the data base for
  4793.           records whose field entries are TRUE when evaluated against
  4794.           the complete Record Selection Criteria. 
  4795.  
  4796.                WAMPUM currently supports eight relational operators: 
  4797.  
  4798.              OPERATOR         MEANING    
  4799.                =              Equals; matches; begins with.
  4800.                <>             Not equals.
  4801.                >              Greater than; more than.
  4802.                >=             Greater than or equal; at least.
  4803.                <              Less than.
  4804.                <=             Less than or equal; at most.
  4805.                $              Is contained in.
  4806.            .NOT. $            Is not contained in. 
  4807.  
  4808.                The best way to master record selection is by reviewing
  4809.           some examples and finding one that closely matches what you
  4810.           want to do.  For this purpose, let us assume that you are
  4811.           working with a data base with the following file structure: 
  4812.  
  4813.           FIELD NAME  TYPE        LENGTH DEC 
  4814.            LASTNAME    C            20    0
  4815.            ACCTNO      N            5     0
  4816.            ENTRYDT     D            8     0
  4817.            MARRIED     L            1     0
  4818.            COMMENTS    M            10    0
  4819.  
  4820.            Now let us assume that there are three records in the file
  4821.           with the following values:
  4822.  
  4823.  
  4824.  
  4825.  
  4826.  
  4827.  
  4828.                                                       84
  4829.  
  4830.  
  4831.            FIELD NAME  REC #1     REC #2      REC #3 
  4832.  
  4833.            LASTNAME    Mundy      Johns       Johnston
  4834.            ACCTNO      12345      1234        123
  4835.            ENTRYDT     10/01/85   10/31/85    11/01/85
  4836.            MARRIED     .T.        .F.         .F.
  4837.            COMMENTS    Memo       Memo        Memo 
  4838.  
  4839.                What follows are a number of examples showing the
  4840.           correct record selection syntax, what the expression means in
  4841.           plain English, and which records would be selected by the
  4842.           expression. 
  4843.  
  4844.             Criteria: LAST NAME = Johns
  4845.  
  4846.             English:  Find all entries where the last name is Johns.  
  4847.  
  4848.             Selected: No records.
  4849.  
  4850.             Comments: Not only will no records be selected but
  4851.           WAMPUM will display a System Error forcing termination of
  4852.           the   program by typing Q.  FIELD NAMES are words of art
  4853.           which must be spelled exactly as they appear in the data base
  4854.           structure.  While LAST NAME is fine for English, WAMPUM
  4855.           doesn't know LAST NAME from the MOON.  The correct field
  4856.           name is LASTNAME with no spaces!  Since LASTNAME is a
  4857.           character field, the value also must be a character string which
  4858.           means it must be enclosed in quotation marks.  Either error
  4859.           would have triggered a System Error.  Currently, there is no
  4860.           way to check for correct syntax before you actually run a
  4861.           report, label, or form letter.  Then it's too late! 
  4862.  
  4863.  
  4864.             Criteria: LASTNAME="Johns"
  4865.  
  4866.             English:  Find all LASTNAMEs of Johns. 
  4867.  
  4868.             Selected: Records 2 and 3.
  4869.  
  4870.             Comments: Note that EQUALS is not pure equivalency in
  4871.           WAMPUM, but more accurately means "begins with."  If you
  4872.           want exact equivalence, fill out the field with enough spaces to
  4873.           assure that the match will force equivalence, e.g.
  4874.           LASTNAME="Johns  " would select only Record 2. 
  4875.  
  4876.  
  4877.             Criteria: LASTNAME="Johns" .AND. ACCTNO=123 
  4878.             
  4879.             English:  Find all entries where LASTNAME begins with
  4880.           Johns AND the account number is 123.
  4881.  
  4882.             Selected: Record 3.
  4883.  
  4884.                                                       85
  4885.  
  4886.  
  4887.             Comments: For every rule, there is an exception. Equals
  4888.           means exactly equals with numeric fields.  Here the account
  4889.           number is numeric while the LASTNAME field is not. Note that
  4890.           BOTH expressions must be true for a record to qualify since
  4891.           the expressions are joined with .AND. Note also that the
  4892.           character string value must be in quotes to match the
  4893.           character field LASTNAME while the numeric value is NOT in
  4894.           quotes to match the numeric field ACCTNO.
  4895.  
  4896.  
  4897.             Criteria: LASTNAME="Mundy" .AND. LASTNAME="Johns"
  4898.  
  4899.             English:  Find all entries where LASTNAME is Mundy and
  4900.           Johns. 
  4901.  
  4902.             Selected: No records.
  4903.  
  4904.             Comments: Pure English will sometimes get you into trouble. 
  4905.           A common beginner's mistake is to mix up .AND. and .OR. 
  4906.           Remember: .AND. means BOTH expressions must be True.  .OR.
  4907.           means if EITHER is True.  Here, no one has a LASTNAME of
  4908.           Mundy AND Johns.  All entries have a LASTNAME of Mundy
  4909.           OR Johns. 
  4910.  
  4911.  
  4912.  
  4913.             Criteria: MARRIED .OR. LASTNAME="Johns  "
  4914.  
  4915.             English:  Find all entries where person is married or
  4916.           LASTNAME is equal to Johns.
  4917.  
  4918.             Selected: Records 1 and 2.
  4919.  
  4920.             Comments:  When expressions are joined by .OR. then if
  4921.           either expression is true, the record qualifies.  Thus, record 1
  4922.           qualified because the MARRIED field is True and record 2
  4923.           qualified because of the LASTNAME match. 
  4924.  
  4925.  
  4926.             Criteria: .NOT. MARRIED .AND. ENTRYDT >=
  4927.           CTOD("10/31/86")
  4928.  
  4929.             English:  Find all the unmarried people with an entry date
  4930.           of at least October 31, 1986.
  4931.  
  4932.             Selected: Records 2 and 3.
  4933.  
  4934.             Comments: The connecter is .AND. so both expressions must
  4935.           be true. Since the MARRIED field is false in both record 2
  4936.           and 3 and since the ENTRYDT is at least 10/31/86, they both
  4937.           would be output.  Note that the VALUE type must match the
  4938.           field type with the DATE field.  There is no direct way to
  4939.  
  4940.                                                       86
  4941.  
  4942.  
  4943.           enter a date in dBASE.  Thus, you must enter the character
  4944.           string "10/31/86" and then convert it to a DATE with the
  4945.           character-to-date function: CTOD().
  4946.  
  4947.  
  4948.  
  4949.             Criteria:  ENTRYDT >= CTOD("10/01/86") .AND.
  4950.                                 ENTRYDT <= CTOD("10/31/86")
  4951.  
  4952.             English:  Find all of the October, 1986 entries. 
  4953.  
  4954.             Selected: Records 1 and 2.
  4955.  
  4956.             Comments: Here we are using a range of dates to select a
  4957.           month's worth of entries.  Note that spacing between text is
  4958.           optional.  Both expressions must be true for a match.  DATE
  4959.           fields must have DATE values.  CTOD() does it. 
  4960.  
  4961.  
  4962.             Criteria: "This is a test"$COMMENTS
  4963.  
  4964.             English:  Find every record in which the text "This is a
  4965.           test" appears in the COMMENTS memo field. 
  4966.  
  4967.             Selected: Don't know.  See below.
  4968.  
  4969.             Comments: The $ operator is one of Boolean logic's most
  4970.           powerful tools since it automatically searches TEXT STRINGS
  4971.           for a match anywhere in the string.  It can be especially
  4972.           helpful for use with fields in which a word may appear at any
  4973.           place in a lengthy string of text.  For purposes of searches,
  4974.           MEMO fields are treated by WAMPUM as text  strings.  Thus,
  4975.           you can search ANY memo field with the logic outlined above
  4976.           except in FoxBASE+ versions.  To negate the expression, i.e.
  4977.           "This is a test" is NOT contained in the MEMO field, the
  4978.           correct syntax is .NOT."This is a test"$COMMENTS. In this
  4979.           case, we didn't specify the contents of the MEMO field in
  4980.           developing the example.  Thus, there is no way to tell if the
  4981.           text was found or not. 
  4982.  
  4983.  
  4984.                               WAMPUM'S SELECT ASSIST 
  4985.  
  4986.                For those experiencing problems in mastering dBASE
  4987.           Boolean syntax but who have mastered Boolean selection
  4988.           theory, WAMPUM provides a helping hand: SELECT ASSIST. 
  4989.           By entering an asterisk (*) as the first character in the Record
  4990.           Selection field or whenever you pick the LIST FILE CONTENTS
  4991.           option when no selection criteria are in effect, SELECT
  4992.           ASSIST is activated. Or press the ALT-I hot-key.
  4993.  
  4994.  
  4995.  
  4996.                                                       87
  4997.  
  4998.  
  4999.                SELECT ASSIST is a menu-driven record selection tool
  5000.           similar to that found in many data base systems such as dBASE
  5001.           III Plus.  It permits a user to enter up to 10 record selection
  5002.           criteria using a 4-step menu process.  As indicated earlier, it
  5003.           cannot replace the human brain in figuring out which records
  5004.           you want to work with, but it can help you master record
  5005.           selection syntax. 
  5006.  
  5007.  
  5008.                               FIELDNAME SELECTION 
  5009.  
  5010.                Once SELECT ASSIST is started, it will display a screen
  5011.           with the name of the first field in the active data base.  Step
  5012.           1 is to identify the field involved in making your selection of
  5013.           records.  If you don't remember the field names in the data
  5014.           base, simply press the <Dn> and <Up> cursor keys to "thumb
  5015.           through" the field names.  When you find the one you want,
  5016.           press <ENTER>.
  5017.  
  5018.                If you already know the field name and there are a lot
  5019.           of them in your database, you may find it more convenient
  5020.           just to type several of the beginning characters of the field
  5021.           name.  SELECT ASSIST will begin searching for a matching
  5022.           field name as soon as you type a letter between A and Z.  If
  5023.           it finds no match, it will beep and redisplay the first field
  5024.           name in the data base. Since several fields obviously can have
  5025.           the same beginning letters, you may have to type several
  5026.           letters of the field name for SELECT ASSIST to find the field
  5027.           you're looking for.  Once the field name appears that you
  5028.           want, press <ENTER> to continue.
  5029.  
  5030.  
  5031.  
  5032.  
  5033.                          RELATIONAL OPERATOR SELECTION 
  5034.  
  5035.                After selecting a field name, you then must choose a
  5036.           relational operator telling WAMPUM what sort of comparison
  5037.           you wish to make against this field.  The default is EQUALS. 
  5038.           You may "thumb through" the choices by pressing the <Dn> or
  5039.           <Up> cursor keys.  Depending upon the field type of the field
  5040.           name specified, the relational operator selections will vary. 
  5041.           Display the operator desired, then press <ENTER>. 
  5042.  
  5043.  
  5044.                               VALUE SPECIFICATION 
  5045.  
  5046.                Once you have specified the relational operator, you next
  5047.           must tell SELECT ASSIST what VALUE for this field you want
  5048.           to find.  Again, depending upon the field type, your options in
  5049.           specifying a value may be limited.  For example, if the field is
  5050.           a date field, the VALUE must also be a date.  With a logical
  5051.  
  5052.                                                       88
  5053.  
  5054.  
  5055.           field, there is no value specification.  Character fields require
  5056.           the entry of text without surrounding quotation marks.  Press
  5057.           the <ENTER> key once you have specified the value desired. 
  5058.             
  5059.             
  5060.                               CONNECTOR SELECTION 
  5061.  
  5062.                Connector selection allows you to indicate how this
  5063.           selection should be linked to the next selection, if any.  The
  5064.           choices are listed by using the <Dn> and <Up> cursor keys. You
  5065.           may choose AND, OR, or NO CONNECTOR.  If you choose NO
  5066.           CONNECTOR, SELECT ASSIST assumes you are finished. 
  5067.           Specifying either of the other choices by pressing <ENTER>
  5068.           takes you to the next line to enter a second selection criteria
  5069.           beginning with another field name.  
  5070.             
  5071.                Once you have entered all of the selection criteria
  5072.           desired, press the <PgDn> key in the CONNECTOR SELECTION
  5073.           field to tell SELECT ASSIST you are finished.  You may also
  5074.           specify NO CONNECTOR and press <ENTER> which has the
  5075.           same effect.  If you accidentally press <ENTER> to move to the
  5076.           next line with a connector of AND or OR, you may still end
  5077.           processing of SELECT ASSIST by pressing the <PgDn> key in
  5078.           the FIELD NAME position.  In this case, SELECT ASSIST
  5079.           assumes you wanted to use only those selection criteria on the
  5080.           lines above the current line. 
  5081.  
  5082.  
  5083.             3.9.3  Listing File Contents
  5084.             
  5085.                Many times there is a need to produce a so-called "quick
  5086.           and dirty" report which lists certain fields of information on a
  5087.           group of records in the data base.  The List File Contents
  5088.           option in conjunction with a previously specified Record
  5089.           Selection Criteria satisfies this need by simulating the dBASE
  5090.           LIST command.  
  5091.                If the List File Contents option is marked True, WAMPUM
  5092.           first will display the SELECT ASSISTANT previously described
  5093.           if no record selection criteria are in effect.  After specifying
  5094.           record selection criteria, WAMPUM then will display a screen
  5095.           asking the user to identify the fields to be listed.  The user
  5096.           should type a number between 1 and 9 beside each field which
  5097.           should be listed.  No number can be used twice!  If a MEMO
  5098.           field is to be included in the listing, it should be the field
  5099.           with either the highest or lowest number to assure that it
  5100.           prints in either the far right column or the far left column of
  5101.           the listing.  
  5102.             
  5103.                Pressing <PgDn> moves the user to a screen which
  5104.           prompts for (1) whether to print the listing, (2) whether to
  5105.           output all records (i.e., override record selection criteria then
  5106.           in effect), and (3) whether to output records marked for
  5107.  
  5108.                                                       89
  5109.  
  5110.  
  5111.           deletion.  When these prompts are answered, WAMPUM will
  5112.           produce the list with field headings either on the screen or
  5113.           on the printer.  If the total width of the fields specified for
  5114.           the listing exceeds the screen width or current printer width,
  5115.           the listing will be wrapped to the next line.  At the end of the
  5116.           listing a summary of record selection criteria displays.
  5117.  
  5118.             
  5119.             3.9.4  Changing Current Data Entry Menu
  5120.             
  5121.                In addition to its standard data entry menu, WAMPUM
  5122.           provides the capacity for creating up to 9 customized data
  5123.           entry menus to match different data entry stages for any
  5124.           given application.  The number of menus available to the end-
  5125.           user is specified by the developer.
  5126.             
  5127.                You may change data entry menus at any time by
  5128.           following these simple steps.  Access the S - Select Utilities
  5129.           screen from the Main System Menu.  Change the Change
  5130.           Current Menu field to T and press <PgDn>.  A listing of the
  5131.           available menus will be displayed.  Simply type the number
  5132.           corresponding to the menu you want to use.  You then will be
  5133.           returned to the Main System Menu.  Until you change menus
  5134.           again, this new data entry menu will appear whenever you Add,
  5135.           Edit, or Display Records.  Except in FoxBASE+ versions, you
  5136.           also may change menus from the Main Menu by pressing the
  5137.           ALT-M hot key and choosing a new menu.
  5138.  
  5139.             
  5140.             3.9.5  Picking the Lead Index
  5141.             
  5142.                Files can only be accessed and output can only be
  5143.           produced in the order of one index at a time even though
  5144.           WAMPUM automatically updates up to 7 active indexes as you
  5145.           add and modify entries in the file.      
  5146.  
  5147.                The LEAD INDEX is always the FIRST index displayed at
  5148.           the bottom of the WAMPUM Main System Menu.  If you want
  5149.           to retrieve records in some order other than what the current
  5150.           LEAD INDEX would provide, then you can change the LEAD
  5151.           INDEX. Except in FoxBASE+, press the ALT-I hot key.
  5152.  
  5153.                Similarly, all output from WAMPUM including REPORTS,
  5154.           LABELS, and FORM LETTERS is produced in the order of the
  5155.           LEAD INDEX.  If you want the output ordered differently, then
  5156.           you must change the LEAD INDEX before generating the
  5157.           report, labels, or form letters. The only exception is using the
  5158.           W - WAMPUM PreFormat option.  
  5159.  
  5160.                To change the LEAD INDEX in any version, choose the S
  5161.           - Select Utilities option from the Main System Menu by typing
  5162.           an S or highlighting the option and pressing the <ENTER> key. 
  5163.  
  5164.                                                       90
  5165.  
  5166.  
  5167.           Enter any selection criteria desired then press <ENTER> to
  5168.           move to the field which asks Change Lead Index.  Change the
  5169.           value of the field from False to True by typing either a T or
  5170.           Y.  Assuming you have more than one index in use, a list of
  5171.           available indexes then will be displayed.  Just enter the
  5172.           number of the one which you want to designate as the LEAD
  5173.           INDEX.
  5174.             
  5175.             
  5176.             3.9.6  Setting Browse Mode ON
  5177.             
  5178.                WAMPUM implements dBASE III's powerful BROWSE
  5179.           command in a slightly different way.  BROWSE Mode may be
  5180.           turned ON by specifying T or Y to the prompt in the Select
  5181.           Utilities screen.  Except in FoxBASE+ versions, you also may
  5182.           press the ALT-B hot key from the Main Menu.  In all versions, 
  5183.           WAMPUM uses a two-step process for EDITing, DISPLAYing,
  5184.           DELETing, and UNDELETing records.
  5185.             
  5186.                The user first will be prompted for the key field value
  5187.           to find.  Then, instead of the usual data entry display, the
  5188.           user first will be presented with a table of the first twenty
  5189.           records in key order beginning with the first matching key
  5190.           value.  WAMPUM displays as many fields from the data base
  5191.           for each record as will fit on a single line of the screen.
  5192.  
  5193.                  Within this display, the user can move UP and DOWN
  5194.           through the records with the UP and DOWN cursor keys.  The
  5195.           user can request the next twenty records beginning with the
  5196.           last record currently displayed by pressing the <PgDn> key. 
  5197.           Browse also permits the user to move UP a single record by
  5198.           pressing <PgUp>.  If the record is found for which you are
  5199.           searching, then simply highlight that option and press the
  5200.           <ENTER> key.  This then triggers the usual WAMPUM data
  5201.           entry screen.  If no record is found for which you desire to
  5202.           move to the full data entry screen, then two choices are
  5203.           available.  Pressing <ESC> will ABORT the BROWSE session and
  5204.           return you to the Main System Menu.  
  5205.                BROWSE mode is particularly useful in situations in
  5206.           which there may be multiple entries with a similar key value,
  5207.           i.e. a number of entries with LASTNAME of Smith. BROWSE
  5208.           permits you to examine the partial contents of 20 records at a
  5209.           time in order to identify the exact record with which to work. 
  5210.           Note that you cannot actually change any data while in this
  5211.           BROWSE mode.  You must move to the actual data entry
  5212.           screen to do this.  NOTE: FoxBASE+ version users may run the
  5213.           special BROWSER program from the & menu option for full
  5214.           BROWSE functionality by typing DO BROWSER.
  5215.  
  5216.                If a record has been marked for deletion, that entry will
  5217.           show an asterisk (*) as the first character of the line. 
  5218.           Otherwise, the first character position is always blank. 
  5219.  
  5220.                                                       91
  5221.  
  5222.  
  5223.  
  5224.                Once the full data entry mode has been triggered by
  5225.           pressing the <ENTER> key, the user still has the ability to
  5226.           move through the data base with either <PgDn> or <PgUp>.  At
  5227.           this juncture, it is necessary to return to the Main System
  5228.           Menu before the BROWSE mode is reinitiated.
  5229.  
  5230.             
  5231.             3.9.7  Listing the File Structure
  5232.             
  5233.                Particularly in developing reports, labels, form letters, and
  5234.           edit checks, it is helpful to have a listing of the structure of
  5235.           the data base file in use.  The last option on the Select
  5236.           Utilities screen permits a user to request this listing.  If the
  5237.           prompt is answered with Y or T, then WAMPUM will ask
  5238.           whether you want the listing printed as opposed to displayed. 
  5239.           Typing T or Y at the Printed? option will provide a printed
  5240.           listing.  Pressing <ESC> will abort the listing entirely. 
  5241.           Pressing <PgDn> or <ENTER> will display the file structure on
  5242.           the screen.
  5243.  
  5244.  
  5245.             3.10  R - REPORTS Generation
  5246.             
  5247.                The R - Reports option allows you to run existing dBASE
  5248.           III report formats and create new ones.  Creation of new
  5249.           reports is covered in the Developer's Section.
  5250.  
  5251.                Before selecting the Reports option, first pick the S -
  5252.           Select Utilities option to enter Record Selection Criteria and to
  5253.           specify the Lead Index for report output.  
  5254.  
  5255.                When you select the Reports option, a listing of report
  5256.           forms in the default directory will be displayed.  You then are
  5257.           prompted to enter the name of the report form you wish to
  5258.           run.  In FoxBASE+ versions, type in the file name EXACTLY as
  5259.           it appears in the directory listing.  Do NOT include the .FRM
  5260.           file extension.  In other versions, highlight the report form to
  5261.           be executed and press <ENTER>.
  5262.  
  5263.                There also is a field which allows you to specify the
  5264.           PRINTER FONT to be used if the report is to be printed.  If a
  5265.           report is to be printed on regular 8-1/2 x 11 inch paper using
  5266.           10 pitch type, then NO font number needs to be entered.  If
  5267.           your printer supports smaller fonts thereby enabling
  5268.           production of wider reports or reports turned sideways, enter
  5269.           a number corresponding to the font desired.  See the # -
  5270.           Printer Config section of the Developer's Section of this
  5271.           User's Guide for more information.
  5272.             
  5273.                Once you have entered a font or pressed the <ENTER>
  5274.           key, the Printer Selection Screen will appear.  Answer the
  5275.  
  5276.                                                       92
  5277.  
  5278.  
  5279.           prompts.  Or see the Printer Selection Screen section for
  5280.           more information.
  5281.  
  5282.               
  5283.             3.11  L - LABELS Production
  5284.             
  5285.                The L - Labels option allows you to run existing dBASE
  5286.           label formats and create new ones.  Creation of new labels is
  5287.           covered in the Developer's section of this User's Guide. 
  5288.  
  5289.                Before selecting the Labels option, first pick the Select
  5290.           Utilities option to enter Record Selection Criteria and to
  5291.           specify the Lead Index for label output.  
  5292.  
  5293.                When you select the Labels option, a listing of label
  5294.           forms in the default directory will be displayed.  In FoxBASE+
  5295.           versions, you then are prompted to enter the name of the label
  5296.           form you wish to run.  Type in the file name EXACTLY as it
  5297.           appears in the directory listing.  Do NOT include the .LBL file
  5298.           extension.  In other versions, simply highlight the label form to
  5299.           be executed and press <ENTER>.
  5300.  
  5301.                There also is a field which allows you to specify the
  5302.           PRINTER FONT to be used if the labels are to be printed.  If
  5303.           the labels are to be printed using standard 10 pitch type, then
  5304.           NO font number needs to be entered.  If you will be
  5305.           producing labels on a laser printer, then FONT7 should be
  5306.           selected.  See the # - Printer Config section of the
  5307.           Developer's Section for more information.
  5308.             
  5309.                Once you have entered a font or pressed the <ENTER>
  5310.           key, answer the prompts on the Printer Selection Screen. See
  5311.           the Printer Selection Screen section of this User's Guide for
  5312.           more information on these options. 
  5313.  
  5314.             3.12  T - FORM LETTER Generation
  5315.  
  5316.                The T - Form Letters option allows you to run existing
  5317.           WAMPUM form letters and create new ones.  Creation of new
  5318.           form letters is covered in the Developer's Section. 
  5319.             
  5320.                Before selecting the Form Letters option, first choose
  5321.           the Select Utilities option.  Enter Record Selection Criteria
  5322.           and specify the Lead Index for form letter output.  The one
  5323.           exception to this is if you wish to generate a form letter
  5324.           using an indexed key to print a form for a single record.  In
  5325.           this case, make certain that no Record Selection Criteria are
  5326.           in effect.  Then select the T - Form Letters option.  After
  5327.           selecting a form letter file as outlined below, you will be
  5328.           prompted to enter the key value to find using the primary
  5329.           index then in effect.
  5330.             
  5331.  
  5332.                                                       93
  5333.  
  5334.  
  5335.                When you select the Form Letters option, a listing of
  5336.           form letter files in the default directory will be displayed.  In
  5337.           FoxBASE+ versions, a form letter file is a standard .DBF file
  5338.           except that its file name begins with T-.  You then are
  5339.           prompted to enter the name of the form letter form you wish
  5340.           to run.  Type in the file name EXACTLY as it appears in the
  5341.           directory listing.  Do NOT include the .DBF file extension. In
  5342.           other versions, form letters are standard ASCII documents
  5343.           with a file name extension of .TXT.  Highlight the form
  5344.           desired and press <ENTER>.
  5345.  
  5346.                Answer the prompts on the Printer Selection Screen and
  5347.           <PgDn>.  Or see the Printer Selection Screen section of this
  5348.           User's Guide for more information on these options.
  5349.  
  5350.  
  5351.             
  5352.             3.13  W - WAMPUM Preformatted Output
  5353.             
  5354.                The W - WAMPUM Preformatted Output option allows you
  5355.           to run up to 80 predefined Reports, Labels, and Form Letters
  5356.           each with predefined selection criteria, sort order, and even a
  5357.           related file for table lookup if desired.  This is WAMPUM's
  5358.           most unique feature and is NOT available in other dBASE-
  5359.           compatible products.
  5360.  
  5361.                Before this option is available, the WAMPUM master file
  5362.           must be created and appropriate entries must be made for the
  5363.           pre-defined output desired.  This is covered in the Developer's
  5364.           section of this User's Guide.
  5365.             
  5366.                Then all that is necessary to run WAMPUM Preformatted
  5367.           Output is to select the W - WAMPUM PreFormat option from
  5368.           the Main System Menu.  A two-column listing of reports,
  5369.           labels, and form letters available for automatic production then
  5370.           will be displayed.  Following the description of each item will
  5371.           be a single letter (R, L, or T) indicating whether the output is
  5372.           a Report, Label, or Form Letter. In FoxBASE+ versions, there
  5373.           also is an & option signifying that the choice is a FoxBASE-
  5374.           compatible program. Mark the desired output you wish to
  5375.           produce with a T or Y in the logical field provided to indicate
  5376.           which should be run.
  5377.  
  5378.                At the bottom of the screen a range of dates is specified
  5379.           for output which requires these.  The default range of dates is
  5380.           the beginning and ending of the current month unless today's
  5381.           date is less than the 6th of the month.  In this case, the
  5382.           default is the beginning and ending dates of last month.  Most
  5383.           folks produce monthly reports for a prior month at the
  5384.           beginning of the next month so WAMPUM saves you a little
  5385.           typing.
  5386.             
  5387.  
  5388.                                                       94
  5389.  
  5390.  
  5391.                The range of dates can be changed by you to any dates
  5392.           desired although the first date should always be less than or
  5393.           equal to the second date.  The range of dates are automa-
  5394.           tically used for any preformatted reports, labels, or form
  5395.           letters in which the developer wanted the end-user to have
  5396.           the flexibility to select the time period for the report at the
  5397.           time it was produced.  
  5398.             
  5399.                Once you have entered your choices, the Printer
  5400.           Selection Screen appears.  Answer the prompts and <PgDn>. 
  5401.           See the next section for more information on these options. 
  5402.  
  5403.  
  5404.             3.14  Printer Selection Screen
  5405.             
  5406.             3.14.1  Printed Output
  5407.             
  5408.                Whenever you run a Report, Label, Form Letter, or
  5409.           WAMPUM Preformatted Output, you will see the Printer
  5410.           Selection Screen which lets you choose whether to PRINT or
  5411.           DISPLAY the information. If you want the OUTPUT printed,
  5412.           type a T or Y. 
  5413.  
  5414.  
  5415.             3.14.2  Printer Font Selection
  5416.  
  5417.                In some WAMPUM versions, font selection also is made on
  5418.           the Printer Selection Screen.  Choose the font number
  5419.           corresponding to the type style desired for the output you
  5420.           have chosen.  This will be a number between 0 and 9.  With
  5421.           preformatted output, this option does not apply.  
  5422.             
  5423.  
  5424.             3.14.3  Output All Records
  5425.             
  5426.                If record selection criteria are in effect, you also will be
  5427.           asked whether you want to override those criteria and
  5428.           OUTPUT information on ALL records in the data base. 
  5429.  
  5430.                If you DO want to OVERRIDE the record selection
  5431.           criteria in effect, then change the default entry to T or Y. 
  5432.  
  5433.  
  5434.             3.14.4  Output Records Marked for Deletion  
  5435.  
  5436.                You also will be asked whether to output information on
  5437.           records marked for DELETION.  The default is No.  If you
  5438.           want DELETED records included, change the entry to T or Y.
  5439.  
  5440.  
  5441.  
  5442.  
  5443.  
  5444.                                                       95
  5445.  
  5446.  
  5447.             3.15  On-Line HELP
  5448.             
  5449.                The best way to learn WAMPUM is to read this User's
  5450.           Guide cover to cover.  Many won't do that so WAMPUM
  5451.           provides some of what is contained in the User's Guide in
  5452.           HELP screens keyed to where you are in the program.
  5453.             
  5454.                To access the HELP screens, press the F1 function key at
  5455.           any time.  Depending upon where you are in WAMPUM, a
  5456.           screen of HELP will be displayed.  Simply press the <ENTER>
  5457.           key to return to where you were.
  5458.             
  5459.                Every choice from the WAMPUM Main System Menu has
  5460.           an intermediate screen which gives you a chance to change
  5461.           your mind.  In FoxBASE+ versions, it is on this second screen
  5462.           after picking any option that the most detailed HELP is
  5463.           available.  In other versions, simply highlight the choice on
  5464.           the Main Menu and press F1 for HELP.
  5465.  
  5466.  
  5467.  
  5468.             3.16  Credits
  5469.             
  5470.                The following are trademarks or registered trademarks of
  5471.           the respective companies:
  5472.  
  5473.                WAMPUM and MenuMaker   Ward Mundy
  5474.                Clipper   Nantucket Corporation
  5475.                FoxBASE and FoxBASE+   Fox Software, Inc.
  5476.                dBASE, dBASE III, dBASE III Plus   Ashton-Tate
  5477.                dBASE IV    Ashton-Tate
  5478.                LOTUS, 1-2-3, and Symphony  LOTUS Development Co.
  5479.                IBM, IBM PC, and IBM PC-AT  IBM Corporation 
  5480.                HP LaserJet, Plus, and LaserJet II  Hewlett-Packard
  5481.  
  5482.  
  5483.  
  5484.  
  5485.  
  5486.  
  5487.  
  5488.  
  5489.  
  5490.  
  5491.  
  5492.  
  5493.  
  5494.  
  5495.  
  5496.  
  5497.  
  5498.  
  5499.  
  5500.                                                       96
  5501.  
  5502.