home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / database / pcf70d.zip / PCF3.EXE / PCF7.MAN
Text File  |  1993-06-14  |  803KB  |  21,866 lines

  1.  
  2.  
  3.  
  4.  
  5.      PC-File Version 7 Users Guide                              1
  6.  
  7.  
  8.  
  9.  
  10.      PC-File
  11.  
  12.      User Guide
  13.  
  14.      Copyright
  15.  
  16.      Copyright 1982-1993 by Jim Button. Copyright 1984-1993 by
  17.      ButtonWare, Inc. All rights reserved.
  18.  
  19.      The software described in this manual is protected by
  20.      copyright laws.
  21.  
  22.      This manual is protected by copyright laws. No part of this
  23.      manual may be reproduced, transmitted, transcribed, stored in
  24.      a retrieval system, or translated into any language, natural
  25.      or computer, in any form or by any means, without the prior
  26.      written permission of ButtonWare, Inc.
  27.  
  28.      Information in this manual is subject to change without notice
  29.      and does not represent a commitment on the part of ButtonWare,
  30.      Inc. ButtonWare may make improvements and/or changes in this
  31.      manual or in the product(s) and/or program(s) described in
  32.      this manual at any time.
  33.  
  34.      This product could include technical inaccuracies or
  35.      typographical errors. Changes are periodically made to the
  36.      information herein; these changes may be incorporated in new
  37.      editions of this product.
  38.  
  39.      Trademarks
  40.  
  41.      ButtonWare and PC-File are registered trademarks of
  42.      ButtonWare, Inc.
  43.  
  44.      Other brand and product names are trademarks or registered
  45.      trademarks of their holders.
  46.  
  47.      Credits
  48.  
  49.      The ButtonWare team: Mary Ayres, Nancy Bedell, Jim Button,
  50.      Christiane Carder, Jim Coleman, Lynne Cooley, Chuck Cooper,
  51.      Vivanne Cornelius, Suzanne Eyring, Suzanne Faith, Steve
  52.      Hansen, David Husch, Steve Klem, Dave Knopf, Helen Knopf, John
  53.      Knopf, Stephen Knopf, Francis Langlois, Craig McDonald, Gary
  54.      Peaslee, Sue Pennock, John Reiher, Mark Roberts, David Ruf,
  55.      Kevin Smith, Steve Wilson.
  56.  
  57.   
  58.      
  59.      TABLE OF CONTENTS
  60.      
  61.      NOTES ON THE ON-DISK MANUAL .........................   2
  62.      GETTING STARTED WITH PC-FILE ........................   3
  63.      CHAPTER 1  NAVIGATING IN PC-FILE ....................  12
  64.                 Starting, Exiting, Video modes, the Mouse,
  65.                 the Keyboard, the Screen, Menus, Using Help,
  66.                 Backing up the database
  67.      CHAPTER 2  CREATING A DATABASE STRUCTURE ............  31
  68.      CHAPTER 3  MODIFYING A DATABASE STRUCTURE ...........  48
  69.      CHAPTER 4  FIELD ATTRIBUTES .........................  64
  70.                 What they are, Types (Automatic data,
  71.                 Validation, Formatting, Data restriction)
  72.      CHAPTER 5  VIEWS ....................................  79
  73.                 General, the Record View Designer, the Table
  74.                 View Designer
  75.      CHAPTER 6  ADDING DATA .............................. 101
  76.      CHAPTER 7  FINDING AND MODIFYING DATA ............... 107
  77.      CHAPTER 8  SORTING AND INDEXING DATA ................ 131
  78.      CHAPTER 9  CREATING REPORTS ......................... 149
  79.                 Page reports, Mail Label reports, Free Form,
  80.                 Language, Bar Codes
  81.      CHAPTER 10 WRITING LETTERS AND MERGING DATA ......... 201
  82.      CHAPTER 11 PRINTING REPORTS AND LETTERS ............. 213
  83.      CHAPTER 12 CREATING GRAPHS .......................... 224
  84.      CHAPTER 13 UTILITIES ................................ 239
  85.                 Exporting, Importing, Exchange, File
  86.                 management, COnfiguring, Packing, Repairing
  87.      CHAPTER 14 PRINTING LABELS WITH PC-LABEL ............ 276
  88.      CHAPTER 15 TOOLS .................................... 297
  89.                 Dropping to DOS, Phone Dialer, Snapshot
  90.                 labels, the Calculator, Spell checking
  91.      CHAPTER 16 MACROS ................................... 311
  92.      CHAPTER 17 CALCULATIONS ............................. 324
  93.                 Guidelines, Mathematical, Date, Time,
  94.                 Conditional, Random Numbers, String
  95.                 functions, Relational lookups
  96.      CHAPTER 18 BATCH POSTING ............................ 343
  97.      CHAPTER 19 MEMORY USAGE AND PERFORMANCE ............. 350
  98.      
  99.      
  100.  
  101.  
  102.  
  103.      PC-File Version 7 Users Guide                              2
  104.  
  105.  
  106.  
  107.  
  108.      NOTES ON THE ON-DISK MANUAL
  109.  
  110.      The retail (printed) manuals were written using Microsoft Word
  111.      for Windows and formatted with Ventura Publisher 4.1. Screens
  112.      were captured using HiJaak by Inset Systems. Text is in
  113.      Garamond, headings in Helvetica Condensed, and callouts in
  114.      Tekton. The manuals were printed by R.R. Donnelley & Sons
  115.      Company.
  116.  
  117.      We have tried to provide you with everything necessary to
  118.      evaluate PC-File. The program uses clear, informative menus.
  119.      Help screens are always available.  Also, the file "CARD" can
  120.      be printed to create a quick reference card with a summary of
  121.      the program commands.  The file "STARTUP" gives answers to the
  122.      most common start-up problems. This is sufficient for most
  123.      people to evaluate the program. However,  some people prefer
  124.      to have a copy of the printed manual.
  125.  
  126.      In prior shareware versions of PC-File our manual was over 500
  127.      pages long and many people complained.  Therefore this time we
  128.      have shortened the manual so as to give you complete
  129.      information about each feature but to avoid repetition and the
  130.      obvious. PLEASE NOTE  YOU CAN ALWAYS GET CONTEXT SENSITIVE
  131.      HELP BY PRESSING F1.
  132.  
  133.  
  134.      Note that there are no pretty screen pictures in the disk
  135.      manual, and the tabbing in some of the tables isn't perfect.
  136.      This is because much of the pictorial information is lost when
  137.      we translate from our typeset document to a a text file on the
  138.      disk. This isn't possible in a text file that will print on
  139.      all printers.
  140.  
  141.      To keep costs down, the on-disk documentation is not included
  142.      with purchased copies of PC-File.  Purchased copies include a
  143.      complete printed User's Manual, typeset and bound, which 
  144.      includes screen shots and more examples, a Tutorial for beginners, 
  145.      and an Index.It's 681 pages long.
  146.  
  147.      ButtonWare, Inc. 325 118th Ave. SE, Suite 200 Bellevue, WA
  148.      98005 ISBN 0-922692-38-6
  149.  
  150.  
  151.  
  152.      PC-File Version 7 Users Guide                              3
  153.  
  154.  
  155.  
  156.      GETTING STARTED WITH PC-FILE
  157.  
  158.      This section is designed to help you get up and running with
  159.      PC-File. This section contains information on your PC-File
  160.      package, PC-File requirements, and installation instructions.
  161.  
  162.  
  163.      WELCOME TO PC-FILE
  164.  
  165.      Congratulations! You've made an excellent choice for your file
  166.      management needs. PC-File is a perfect fit for everyone
  167.      needing to manage their data-beginners and advanced users-
  168.      corporate, small business, and home users.
  169.  
  170.      PC-File does just what you need a database to do-store,
  171.      organize, retrieve, manipulate, and update information.
  172.      Whether it's your mailing list or your membership list. Your
  173.      clients, your customers, or your contacts. Sales, inventory,
  174.      expenses, payables and receivables, even your hobby collection
  175.      . . . PC-File can keep a record of it.
  176.  
  177.      About the Getting Started Section
  178.  
  179.      This section is intended for all users of PC-File Version 7,
  180.      including users of previous versions of PC-File. Whether PC-
  181.      File is your first software program or you're an experienced
  182.      computer user, we highly recommend you read and follow the
  183.      instructions in this section.
  184.  
  185.      This section is intended to:
  186.  
  187.        Familiarize you with the PC-File package
  188.  
  189.        Inform you of PC-File Version 7 requirements
  190.  
  191.        Guide you in installing PC-File
  192.  
  193.        Tell you how to register your copy of PC-File
  194.  
  195.      In addition to this section, the User Guide contains the PC-
  196.      File Tutorial section and the PC-File Reference section. The
  197.      PC-File Tutorial provides hands-on exercises to help you learn
  198.      PC-File. The PC- File Reference section provides information
  199.      and instructions on using PC-File.
  200.  
  201.  
  202.      REQUESTING TECHNICAL SUPPORT
  203.  
  204.  
  205.  
  206.      PC-File Version 7 Users Guide                              4
  207.  
  208.  
  209.      The Technical Support Information card included with this
  210.      package contains up-to-date phone numbers, operating hours,
  211.      and other information to assist you in obtaining technical
  212.      support. We provide 30 days of free phone support after you
  213.      register PC-File. The 30-day free support period begins on the
  214.      date of your first call and ends 30 days following. To receive
  215.      technical support during your 30-day free support period, call
  216.      (206) 454-0479.
  217.  
  218.      Options for obtaining technical support after your 30-day free
  219.      support period ends, include:
  220.  
  221.        Pay-as-you-go Phone Support: 1-900-454-8000
  222.  
  223.        Yearly Support Plan: call (206) 454-0479 for information
  224.  
  225.        CompuServe Information Service: ButtonWare is located in
  226.        Section 1 of the PCVENA forum
  227.  
  228.        Electronic Bulletin Board Support: (206) 454-7875
  229.  
  230.      Refer to the Technical Support Information card included with
  231.      this package for further details on any of the technical
  232.      support options listed above.
  233.  
  234.  
  235.      REQUESTING CUSTOMER SERVICE
  236.  
  237.      ButtonWare's Customer Service department exists to serve you.
  238.      If you have any billing, shipping, non-technical questions or
  239.      comments about your package or registration, please contact
  240.      us. To reach our Customer Service department, call 206-454-
  241.      0479 Monday through Friday between 8:00 a.m. and 5:00 p.m.
  242.      (Pacific time). If you prefer, you can write a letter and mail
  243.      it to ButtonWare Customer Service, P.O. Box 96058, Bellevue,
  244.      WA 98009-9818 or fax it to us at 206-454-1838.
  245.  
  246.  
  247.      BEFORE YOU BEGIN
  248.  
  249.      Before you begin working with PC-File, you need to:
  250.  
  251.        Check the contents of your package
  252.  
  253.        Make sure you have the correct equipment to run PC-File
  254.  
  255.        Install PC-File
  256.  
  257.        Register your copy of PC-File (Unless you purchased this
  258.        package directly from ButtonWare, in which case you are
  259.        automatically registered.)
  260.  
  261.      This section discusses each of these procedures. After you've
  262.      completed these procedures you'll be ready to put PC-File to
  263.      work.
  264.  
  265.  
  266.  
  267.      PC-File Version 7 Users Guide                              5
  268.  
  269.  
  270.      Checking the Contents of Your Package
  271.  
  272.      Before installing PC-File, we recommend you check the contents
  273.      of your package. Your package should contain the following
  274.      materials:
  275.  
  276.        PC-File User Guide
  277.  
  278.        Technical Support Information card
  279.  
  280.        Licence Agreement envelope containing: One set of 5 1/4"
  281.        disks (Disk One, Disk Two, and Disk Three); and one set of 3
  282.        1/2" disks (Disk One and Disk Two)
  283.  
  284.      NOTE: Upgrade packages purchased from ButtonWare contain one
  285.      set of the requested disk size, unless you requested both
  286.      sizes. "Retail" upgrade packages contain one set of the size
  287.      indicated on the package, and contain a Disk Exchange Card
  288.      that you can return to ButtonWare, if you require the other
  289.      disk size.
  290.  
  291.        Registration card (Unless you purchased this package
  292.        directly from ButtonWare.)
  293.  
  294.      If any item is missing or damaged, contact your PC-File dealer
  295.      immediately. Or, if you purchased this product from
  296.      ButtonWare, call our Customer Service department at 206-454-
  297.      0479.
  298.  
  299.  
  300.      Requirements for Using PC-File 7
  301.  
  302.      PC-File is designed to work on IBM PC, XT, AT, PS/2, and 100%
  303.      compatible computers. In order to use PC-File, your computer
  304.      must have the following:
  305.  
  306.      MS-DOS or PC-DOS 3.0 or higher 450K available RAM (more is
  307.      recommended) A hard drive with a minimum of 1.5 megabytes
  308.      available disk storage.
  309.  
  310.      To determine the version of DOS installed on your computer,
  311.      use the DOS VER command. At the DOS prompt, type ver and press
  312.      ENTER. To determine how much RAM and disk storage space are
  313.      available, use the DOS CHKDSK command. At the DOS prompt, type
  314.      chkdsk and press ENTER. The last line should indicate at least
  315.      460,800 bytes free, if you have the minimum 450K available
  316.      RAM. For more information on these commands, please refer to
  317.      your DOS manual.
  318.  
  319.      Listed below are additional hardware items which are not
  320.      required to use PC-File, but are highly recommended:
  321.  
  322.        A printer (dot matrix, daisy wheel, laser, or PostScript)
  323.  
  324.        A mouse
  325.  
  326.  
  327.  
  328.      PC-File Version 7 Users Guide                              6
  329.  
  330.  
  331.        A CGA, EGA, VGA, or Hercules graphics card and compatible
  332.        monitor (only required to display graphs; EGA or VGA
  333.        required to run in graphics mode)
  334.  
  335.        A Hayes compatible modem (only required to dial phone
  336.        numbers stored in your databases)
  337.  
  338.  
  339.  
  340.      INSTALLING PC-FILE
  341.  
  342.      Before you begin using PC-File, you must install it to a hard
  343.      drive. PC-File includes an installation program designed to
  344.      make this step quick and easy. The installation process
  345.      normally takes less than 5 minutes.
  346.  
  347.      To install PC-File:
  348.  
  349.      1.Turn on your computer.
  350.  
  351.      2.Insert PC-File Disk One in drive A.
  352.  
  353.      3.At the DOS prompt, type a:install and press ENTER. If you
  354.        insert the disk into a different drive, substitute the
  355.        appropriate letter for a.  The installation program begins.
  356.        A screen appears asking you to choose whether to install in
  357.        color or in black and white.
  358.  
  359.      4.Choose C to run the install program in color, or choose B to
  360.        run the install program in black & white. Choose the option
  361.        which contains the most readable text on your screen. The
  362.        main installation menu appears.
  363.  
  364.      5.Press F10 to continue and do a complete installation. If you
  365.        do not want to install certain types of files, use the arrow
  366.        keys to move the highlight bar, and press ENTER to toggle
  367.        the checkmark on the highlighted item.  PC-File asks you to
  368.        "Enter the Source Drive". This is usually the drive you
  369.        inserted Disk One into.
  370.  
  371.      6.Press ENTER to accept the default drive letter. To choose a
  372.        different drive, press the key of the letter of that drive.
  373.        PC-File asks you to "Enter
  374.      7.the Destination Drive". This is the drive you want to
  375.        install PC-File on to.
  376.  
  377.      8.Press ENTER to accept the default answer. To choose a
  378.        different destination drive, choose the letter for the
  379.        destination drive you want to install PC-File to.
  380.  
  381.      9.PC-File asks you to "Enter the Destination Directory". This
  382.        is the directory path on the destination drive where PC-File
  383.        will be installed. The default destination directory is
  384.        \PCF7.
  385.  
  386.  
  387.  
  388.      PC-File Version 7 Users Guide                              7
  389.  
  390.  
  391.      10.  Press ENTER to accept the default answer. To install PC-
  392.        File to a differentdirectory, type in that full directory
  393.        path. If the directory you choose does not exist, PC-File
  394.        will create it. PC-File begins copying files to your hard
  395.        drive. Each file is listed as it is being installed.
  396.        Depending on the type of disks you are installing from, PC-
  397.        File may ask you to insert DISK TWO and DISK THREE. After
  398.        PC-File has installed all the files, you are asked about
  399.        changes to you CONFIG.SYS file. Your CONFIG.SYS file may
  400.        require changes so that PC-File runs properly on your
  401.        computer. You can let the installation program make the
  402.        changes for you, or you can bypass these changes.
  403.  
  404.      11.  Choose Y to let the Install program make changes to your
  405.        CONFIG.SYS file.
  406.  
  407.      12.  Choose N, to bypass making changes to your CONFIG.SYS
  408.        file.
  409.  
  410.      13.  The last step of the Installation process is reading the
  411.        READ.ME file. The READ.ME file is automatically displayed.
  412.        Use the arrow keys to scroll through the entire file. It is
  413.        important to read the READ.ME file before you begin using
  414.        PC-File. It may contain important information added after
  415.        the PC-File manuals were printed.
  416.  
  417.      14.  After you're finished reading the READ.ME file, press ESC
  418.        to quit and return to the DOS prompt.
  419.  
  420.      The Install program puts you into the directory where you
  421.      installed PC-File.
  422.  
  423.      Checking the Installation Process
  424.  
  425.      After the Installation program is finished, start PC-File to
  426.      ensure that the installation process was successful.
  427.  
  428.      To start PC-File, at the DOS prompt, type pcf and press ENTER.
  429.      The PC- File screen and logo are displayed. To exit PC-File
  430.      using a mouse, click on File to display the File menu, then
  431.      click on the Exit menu option. When the exit window displays,
  432.      click on the Exit button. To exit PC-File using the keyboard,
  433.      press ALT-F to display the File menu, then press X to select
  434.      the Exit option. When the exit window displays, press X to
  435.      select the Exit button.
  436.  
  437.      If the PC-File screen and logo are not displayed, first check
  438.      to make sure your computer has the minimum requirements to run
  439.      PC-File. Then re-install the program following the
  440.      instructions above. If after re- installing the program, you
  441.      still cannot successfully start and exit PC-File, please call
  442.      our Technical Support department at 206-454-2629.
  443.  
  444.  
  445.      INSTALLING YOUR MOUSE
  446.  
  447.  
  448.  
  449.      PC-File Version 7 Users Guide                              8
  450.  
  451.  
  452.      Although a mouse is not required to use PC-File, it allows you
  453.      to perform a variety of PC-File functions without having to
  454.      use the keyboard.
  455.  
  456.      To use your mouse with PC-File, you must install it before you
  457.      start PC-File. Refer to the manual included with your mouse
  458.      for specific instructions on installing your mouse. If a mouse
  459.      is connected to your computer and PC-File does not recognize
  460.      it, refer to the manual included with your mouse for
  461.      troubleshooting information.
  462.  
  463.  
  464.      REGISTERING YOUR COPY OF PC-FILE
  465.  
  466.      Before you start using PC-File, there is one final thing to
  467.      do-register your copy. (NOTE: You do not need to register PC-
  468.      File if you purchased this package directly from ButtonWare-
  469.      you are automatically registered at that time.) When you
  470.      register your copy of PC-File, you are placed on our mailing
  471.      list and will receive notifications of updates, new products,
  472.      and special offers available only to registered users. In
  473.      addition, when you register your copy of PC-File, you receive
  474.      30 days of free
  475.      product support.
  476.  
  477.      To register your copy of PC-File, simply fill out the
  478.      registration card included in your package and mail it to us.
  479.      Or, if you prefer, you can register by fax or phone. To
  480.      register by fax, fill out the registration card and fax it to
  481.      ButtonWare at 206-454-1838. To register by phone, call 1-800-
  482.      JBUTTON (1-800-528-8866) or 206-454-0479.
  483.  
  484.  
  485.  
  486.      UPGRADING FROM PREVIOUS VERSIONS OF PC-FILE
  487.  
  488.      What Needs To Be Updated
  489.  
  490.      Data Files
  491.  
  492.      PC-File 6.5, PC-File 6.0, PC-File 5.0, and PC-File:dB
  493.      databases are compatible with PC-File 7. No conversion is
  494.      necessary.
  495.  
  496.      PC-File+, PC-File/R, and PC-File III databases are not
  497.      directly compatible with PC-File 7. However, the data can be
  498.      easily converted to a PC-File 7 database using the conversion
  499.      program, FCONVERT, included with PC-File 7.
  500.  
  501.      Report, Letter, and Graph Files
  502.  
  503.      PC-File, 6.5, PC-File 6.0, PC-File:dB, and PC-File+ reports,
  504.      letters, and graph files are compatible with PC-File 7. No
  505.      conversion is necessary.
  506.  
  507.  
  508.  
  509.      PC-File Version 7 Users Guide                              9
  510.  
  511.  
  512.      PC-File/R and PC-File III reports and letters are not
  513.      compatible and must be redefined using PC-File 7-there is no
  514.      way to convert them.
  515.  
  516.      Macros (Smart Keys)
  517.  
  518.      Some menus have changed from PC-File 6.0 and 6.5 to PC-File 7,
  519.      which may require you to redefine or edit some macros.
  520.  
  521.      Because the menus and keystrokes have changed, macros from PC-
  522.      File 5.0 and earlier versions are not compatible with PC-File
  523.      7-you must redefine them.
  524.  
  525.      Redefining macros is an easy task using the Recording option
  526.      on the Macros menu.
  527.  
  528.      Snapshot Labels
  529.  
  530.      Snapshot labels defined with PC-File 6.0 and 6.5 are
  531.      compatible with PC-File 7.
  532.  
  533.      You must redefine snapshot labels defined with PC-File 5.0 and
  534.      previous versions. In PC-File 7, simply define a Mailing Label
  535.      using the Report menu, then "attach" the report to a snapshot
  536.      definition using the Configuration option on the Utilities
  537.      menu. See Chapter 15, "Taking Snapshot Labels" for details.
  538.  
  539.  
  540.      CONVERTING YOUR DATABASES
  541.  
  542.      FCONVERT converts existing PC-File+, PC-File/R, and PC-File
  543.      III databases to the PC-File 7 format. You DO NOT have to run
  544.      FCONVERT on PC-File 5.0, 6.0 and 6.5 databases.
  545.  
  546.      FCONVERT is easy to use. You answer a few questions, and
  547.      FCONVERT does the rest of the work. FCONVERT only converts one
  548.      database at a time, so if you have more than one database to
  549.      convert, you need to run FCONVERT on each database separately.
  550.  
  551.      FCONVERT reads the old format database and writes a new copy
  552.      in the PC-File 7 format. The original database files are not
  553.      deleted, overwritten, or altered in any way by FCONVERT. You
  554.      should back up your old database files (.HDR, .DTA, and .INX
  555.      files) either before or after running FCONVERT. After running
  556.      FCONVERT, you will probably want to delete the old database
  557.      files to free up disk space.
  558.  
  559.      Before you start FCONVERT, you must locate the database you
  560.      want to convert. If the database is in a different directory
  561.      than FCONVERT, you must use the complete path name of the
  562.      database when prompted. For example, if you are converting a
  563.      PC-File+ database called PEOPLE which is stored in the PCF
  564.      subdirectory on drive C, the database's full path name is
  565.      C:\PCF\PEOPLE.
  566.  
  567.      To run FCONVERT:
  568.  
  569.  
  570.  
  571.      PC-File Version 7 Users Guide                             10
  572.  
  573.  
  574.  
  575.      1.Change to the drive and directory containing FCONVERT (the
  576.        drive and directory where PC-File 7 is installed). You can
  577.        skip this step if this drive and directory is referenced in
  578.        your DOS PATH.
  579.  
  580.      2.Type fconvert and press ENTER.
  581.  
  582.      3.FCONVERT prompts you for the full path name of the database
  583.        you want to convert. Type it in and press ENTER. The
  584.        extension isn't required. Using the PC-File+ example above,
  585.        you would type c:\pcf\people and press ENTER.
  586.  
  587.      4.FCONVERT prompts you for the full path name of your new
  588.        database. The extension isn't required. For example, to name
  589.        your new PEOPLE database PEOPLE2 and put it into the DATA
  590.        subdirectory on the D drive, type d:\data\people2 and press
  591.        ENTER.
  592.  
  593.      5.For each numeric field (a field name ending with a # sign),
  594.        FCONVERT asks you how many decimal positions you want. The #
  595.        sign at the end of the field name is eliminated. Any # or
  596.        other "illegal" characters (punctuation characters, and
  597.        first character must be a letter) within the field name are
  598.        replaced with underscore characters. You may need to edit
  599.        reports, letters, and graph files to reflect these field
  600.        name changes.
  601.  
  602.      6.If the database contains a superfield less than 254
  603.        characters long, you must indicate whether you want the
  604.        field converted to a memo field or a scrollable character
  605.        (window) field. A superfield greater than 254 characters is
  606.        automatically converted to a memo field.
  607.  
  608.      See the Reference Section, Chapter 2, "What is a Database
  609.      Structure" for more information on memo fields. When FCONVERT
  610.      completes the conversion, your database is ready to use in PC-
  611.      File 7.
  612.  
  613.  
  614.      BACKWARD COMPATIBILITY
  615.  
  616.      Databases originally created in PC-File:dB, PC-File 5.0, PC-
  617.      File 6.0, and PC-File 6.5 can be opened by PC-File 7 without
  618.      conversion. These versions and PC-File 7 all use the dBASE
  619.      data file format (.DBF and .DBT (for memos) files). When PC-
  620.      File 7 opens databases created with these versions of PC-File,
  621.      it creates its own "header file" for the database that is
  622.      saved under the same name as the database with a .DBH
  623.      extension. For example, opening a database created under an
  624.      earlier dBASE version called ACCOUNTS with PC-File 7 creates
  625.      an ACCOUNTS.DBH file. This does not overwrite the "header
  626.      file" used by the earlier versions (.HDB files), which allows
  627.      you to continue to open the database under the earlier
  628.      versions.
  629.  
  630.  
  631.  
  632.      PC-File Version 7 Users Guide                             11
  633.  
  634.  
  635.      As long as you do not change the structure of the database
  636.      using Redefine from the File menu in PC-File 7, you can
  637.      continue to open the database using the earlier dBASE versions
  638.      of PC-File. However, PC-File 7 will not update any indexes
  639.      used by the earlier versions-you must rebuild indexes with the
  640.      earlier version to access any new information added under PC-
  641.      File 7.
  642.  
  643.      Redefining a database originally created in a earlier dBASE
  644.      version of PC-File using PC-File 7 does not update the old
  645.      .HDB file. To be able to open the database with the earlier
  646.      version, you must delete the database's .HDB file which will
  647.      allow you to "adopt" the redefined database. Any new databases
  648.      created with PC-File 7 can also be "adopted" by previous dBASE
  649.      versions of PC-File.
  650.  
  651.      To open databases from pre-dBASE versions of PC-File (PC-
  652.      File/R, PC- File III, and PC-File+) with PC-File 7, you must
  653.      convert them to the dBASE format using FCONVERT. If the
  654.      database's structure was not changed using Redefine from the
  655.      File menu in PC-File 7, you can open the database by importing
  656.      the data from the PC-File 7 database's .DBF file back into the
  657.      older version database. Any old database that has been
  658.      redefined in PC-File 7, and any new database created in PC-
  659.      File 7, can be opened using a pre-dBASE version of PC-File by
  660.      first creating a new database that matches the structure
  661.      exactly (use Database Description from the Utilities menu in
  662.      PC-File 7 to see the stucture). Then import the data from the
  663.      PC-File 7 database's .DBF file.
  664.  
  665.  
  666.      WHAT TO DO NEXT
  667.  
  668.      Congratulations! You are now ready to begin learning and using
  669.      PC-File. If you are new to PC-File, you will find the PC-File
  670.      Tutorial that follows this section very helpful. The tutorial
  671.      includes a variety of informative exercises to teach you the
  672.      basic skills for using PC-File. For detailed information and
  673.      instructions on using PC-File, refer to the PC-File Reference
  674.      Section.
  675.  
  676.  
  677.  
  678.      PC-File Version 7 Users Guide                             12
  679.  
  680.  
  681.  
  682.      CHAPTER 1 NAVIGATING IN PC-FILE
  683.  
  684.      This chapter introduces you to some of the concepts and
  685.      features of PC- File. It describes how to start and exit from
  686.      PC-File, and how to navigate through the menus and screens.
  687.      The chapter also lists the keys used in PC-File, and explains
  688.      how to back up your databases.
  689.  
  690.      Starting PC-File
  691.  
  692.      Before you can begin using PC-File, you must install it. See
  693.      the Getting Started section for information on installing PC-
  694.      File.
  695.  
  696.      To start PC-File:
  697.  
  698.      1.Change to the drive and directory containing the PC-File
  699.        program files. If you have accepted the installation
  700.        defaults, this will be the \PCFILE directory on your C
  701.        drive. If you have included that drive and directory in your
  702.        DOS PATH statement, you can skip this step.
  703.  
  704.      2.At the DOS prompt, type pcf and press ENTER. If you are
  705.        using Microsoft Windows and have added PC-File as a non-
  706.        Windows application, choose the PC-File icon.
  707.  
  708.      The PC-File menu bar displays once you start the program.
  709.  
  710.      NOTE: You can load a database automatically when starting PC-
  711.      File by following the PCF command with the database file
  712.      specification. For example, to start PC-File 7 and load the
  713.      database called CONTACTS in your \DATA directory on your D
  714.      drive, you would type:
  715.  
  716.           pcf d:\data\contacts
  717.  
  718.      and press ENTER.
  719.  
  720.      Note that you do not include an extension following the
  721.      database name.
  722.  
  723.      You can also change the parameters for the current session of
  724.      PC-File by adding switches to the start command. See Chapter
  725.      13, "Adding Commands at the DOS Prompt" for details on command
  726.      line switches.
  727.  
  728.      Exiting PC-File
  729.  
  730.      When you exit PC-File, the program displays an exit window.
  731.      The window provides brief information on the number of records
  732.      processed during the current session.
  733.  
  734.      To quit PC-File:
  735.  
  736.      1.Choose File from the menu bar.
  737.  
  738.  
  739.  
  740.      PC-File Version 7 Users Guide                             13
  741.  
  742.  
  743.  
  744.      2.Choose Exit from the File menu.
  745.  
  746.      3.Choose Exit from the exit window.  If you change your mind,
  747.        choose Resume to return to PC-File.
  748.  
  749.      Graphic and Character Modes
  750.  
  751.      PC-File operates in one of two modes:
  752.  
  753.        Graphics mode
  754.  
  755.        Character mode
  756.  
  757.      PC-File performs the same functions in both modes. Graphics
  758.      mode presents a crisper, more modern appearance than Character
  759.      mode, but Character mode offers somewhat more speed when PC-
  760.      File is writing data to the screen and uses about 10K less
  761.      memory.
  762.  
  763.      Graphics mode is designed for use with VGA, EGA, and Hercules-
  764.      compatible monochrome monitors. Even with one of these
  765.      monitors, however, you can switch to Character mode to speed
  766.      up an operation.
  767.  
  768.      On the other hand, if you have a CGA monitor (monochrome or
  769.      color), you can only use Character mode.
  770.  
  771.      PC-File defaults to operating in Graphics mode. You can switch
  772.      from Graphics to Character mode, but you can do so only by
  773.      restarting PC- File. There are two ways:
  774.  
  775.        When you start PC-File, add /CHARMODE to your starting
  776.        command to switch to Character mode for the current session.
  777.        For example, type pcf /charmode at the DOS prompt. PC-File
  778.        reverts to the default (Graphics mode) the next time you
  779.        start the program.
  780.  
  781.        Turn off Graphics mode in your configuration profile by
  782.        removing the X from the Graphics mode check box. After
  783.        saving the change, exit from PC-File and restart it. You
  784.        remain in Character mode until you change the profile again
  785.        or load another profile. See Chapter 13, "Utilities," for
  786.        information on configuration profiles.
  787.  
  788.      Using the Mouse
  789.  
  790.      If you have a mouse, you can use it throughout most of PC-File
  791.      to make your work easier and quicker. The only major area of
  792.      the program where the mouse is not functional is the PC-Label
  793.      utility.
  794.  
  795.      You must have the mouse driver that came with your mouse
  796.      installed and loaded before starting PC-File. Refer to the
  797.      documentation that came with your mouse for details on driver
  798.      installation.
  799.  
  800.  
  801.  
  802.      PC-File Version 7 Users Guide                             14
  803.  
  804.  
  805.  
  806.      Use the left button of the mouse for almost every action in
  807.      PC-File.
  808.  
  809.      The right button is only used to call up the list of macros
  810.      for invoking execution of a macro. If you have a three-button
  811.      mouse, the center button is not functional in PC-File.
  812.  
  813.      The mouse cursor changes shape in Graphics mode in PC-File,
  814.      depending on what you are pointing at:
  815.  
  816.        The basic mouse cursor is an arrow or pointer, which you can
  817.        use to choose options and buttons.
  818.  
  819.        An I-beam appears when you move the cursor into a text box,
  820.        field, or edit window, where you can enter text.
  821.  
  822.        The cursor takes the shape of a hand when you move it over
  823.        the title bar of a dialog box or Help window that can be
  824.        moved about the screen.
  825.  
  826.        An hourglass appears when PC-File is performing a task that
  827.        requires that you wait for it to finish before going on to
  828.        the next step.
  829.  
  830.      NOTE: In Character mode, the cursor appears as a rectangular
  831.      block at all times.
  832.  
  833.      You can block a section of text with the mouse in order to
  834.      delete it or move it. To block the text, place the cursor at
  835.      one end of the block and press the left mouse button. Holding
  836.      the button down, drag the cursor to the other end of the
  837.      block. Release the button. The block appears in reverse type.
  838.      Use DEL to delete the text; SHIFT-DEL to delete the text and
  839.      copy it to the buffer; CTRL-INS to copy the text to the buffer
  840.      without deleting it; and use SHIFT-INS to copy the text from
  841.      the buffer to another location on the screen. See Chapter 7,
  842.      "Finding and Modifying Data," for more information on using
  843.      the buffer.
  844.  
  845.      Using the Keyboard
  846.  
  847.      With its pull-down menus, buttons, and other features, PC-File
  848.      is designed to be used with a mouse. If you have a mouse
  849.      installed, you will undoubtedly find the mouse often makes it
  850.      easier to navigate through PC-File. But any action you take in
  851.      PC-File with a mouse can also be taken with a keystroke or
  852.      series of keystrokes.
  853.  
  854.      Sometimes, in fact, you will find the keyboard quicker than
  855.      the mouse. Some hot keys, for example, often prove to be
  856.      quicker than their menu or button equivalent.
  857.  
  858.      When recording macros, you must use the keyboard instead of
  859.      the mouse- mouse actions are not recorded.
  860.  
  861.  
  862.  
  863.      PC-File Version 7 Users Guide                             15
  864.  
  865.  
  866.      Keys specific to a particular area or operation of PC-File are
  867.      pointed out throughout this manual. However, a complete list
  868.      of the keys is given below as reference.
  869.  
  870.      Navigation Keys
  871.  
  872.      Navigation keys allow you to move around on the screen. They
  873.      normally operate in a similar fashion no matter where you are
  874.      in PC-File. If they have multiple uses, each is explained
  875.      below.
  876.  
  877.      Keys: Function
  878.  
  879.        ENTER:  Activate the current entry; move on to the next
  880.        step.
  881.  
  882.        ESC:  Cancel the current operation; move back one step.
  883.  
  884.        ALT: Switch the cursor between the menu bar and the work
  885.        area (the current record, or editing windows and dialog
  886.        boxes with menu bars). For example, when editing a record,
  887.        press ALT to move the cursor to the menu bar. Press ALT
  888.        again to move the cursor back into the record. ALT-letter
  889.        Hold down ALT and press the underlined or highlighted letter
  890.        of a menu bar option to display the pull-down menu for that
  891.        option. In dialog boxes, press ALT and the underlined or
  892.        highlighted letter to choose buttons or check boxes.
  893.  
  894.        HOME: Move the cursor to the leftmost position or choice.
  895.  
  896.        END: Move the cursor to the rightmost position or choice.
  897.  
  898.        CTRL-RIGHT ARROW: Move the cursor to the first character of
  899.        the next word.
  900.  
  901.        CTRL-LEFT ARROW: Move the cursor to the first character of
  902.        the previous word.
  903.  
  904.        CTRL-HOME: Move the cursor to the top-leftmost position in a
  905.        memo field or edit window.
  906.  
  907.        CTRL-END: Move the cursor to the bottom-rightmost position
  908.        in a memo field or edit window.
  909.  
  910.        PGUP: Scrolls one window full of information above the
  911.        currently visible window area.
  912.  
  913.        PGDN: Scrolls one window full of information below the
  914.        currently visible window area.
  915.  
  916.        CTRL-PGUP: Move the cursor to the first field on the screen,
  917.        when viewing records.
  918.  
  919.        CTRL-PGDN: Move the cursor to the last field on the screen,
  920.        when viewing records.
  921.  
  922.  
  923.  
  924.      PC-File Version 7 Users Guide                             16
  925.  
  926.  
  927.        TAB: Move the cursor to the next field, button, or option.
  928.        The cursor moves from left to right and top to bottom. At
  929.        the bottom-rightmost position, the cursor "wraps around"
  930.        back to the top-leftmost position.
  931.  
  932.        SHIFT-TAB: The opposite of TAB: move the cursor to the
  933.        previous field, button, or option. The cursor moves from
  934.        right to left and bottom to top. At the top-leftmost
  935.        position, the cursor "wraps around" back to the bottom-
  936.        rightmost position.
  937.  
  938.        CTRL-TAB: Move to the right in a Table view, Modify mode.
  939.  
  940.        CTRL-SHIFT-TAB: Move to the left in a Table view, Modify
  941.        mode.
  942.  
  943.        LEFT ARROW: Move the cursor one position or option to the
  944.        left. On menus, at the leftmost position, cursor "wraps
  945.        around" to the rightmost position.
  946.  
  947.        RIGHT ARROW: Move the cursor one position or option to the
  948.        right. On menus, at the rightmost position, the cursor
  949.        "wraps around" to the leftmost position.
  950.  
  951.        UP ARROW: Move cursor up one position, field, or option. At
  952.        the top position, the cursor "wraps around" to the bottom.
  953.  
  954.        DOWN ARROW: Move cursor down one position, field, or option.
  955.        At the bottom position, cursor "wraps around" to the top.
  956.  
  957.  
  958.      Editing Keys
  959.  
  960.      Use editing keys in edit windows and within fields and text
  961.      boxes to make changes to the text.
  962.  
  963.      To select or block a section of text using the keyboard, place
  964.      the cursor at one end of the block. Then, hold SHIFT down
  965.      while you move the cursor to the other end of the block with
  966.      the ARROW keys or other key combinations listed below. You can
  967.      then delete or move the block of text. Use DEL or BACKSPACE to
  968.      delete the text. See the section on reading to and writing
  969.      from the buffer in Chapter 7, "Finding and Modifying Data,"
  970.      for information on moving blocks of text.
  971.  
  972.      Keys: Function
  973.  
  974.        BACKSPACE: Move the cursor one position to the left,
  975.        deleting the character in that position or the selected
  976.        block
  977.  
  978.        DEL: Delete the character to the right of the cursor, or the
  979.        blocked text
  980.  
  981.        CTRL-DEL: Deletes the word the cursor is currently on.
  982.  
  983.  
  984.  
  985.      PC-File Version 7 Users Guide                             17
  986.  
  987.  
  988.        INS: Toggle between insert and replace mode; the mode is
  989.        indicated by the size of the cursor
  990.  
  991.        SHIFT-RIGHT ARROW: Start or extend the selection one
  992.        character position to the right
  993.  
  994.        SHIFT-LEFT ARROW: Start or extend the selection one
  995.        character position to the left
  996.  
  997.        SHIFT-UP ARROW: Start or extend the selection up one line
  998.  
  999.        SHIFT-DOWN ARROW: Start or extend the selection down one
  1000.        line
  1001.  
  1002.        SHIFT-END: Select all characters from the cursor to the end
  1003.        of the line
  1004.  
  1005.        SHIFT-HOME: Select all characters from the cursor to the
  1006.        beginning of the line
  1007.  
  1008.        CTRL-SHIFT-RIGHT ARROW: Start or extend the selection one
  1009.        word to the right
  1010.  
  1011.        CTRL-SHIFT-LEFT ARROW: Start or extend the selection one
  1012.        word to the left
  1013.  
  1014.  
  1015.      Hot Keys
  1016.  
  1017.      Hot keys are key combinations designed specifically for often-
  1018.      used actions in PC-File. If you don't have a mouse, you must
  1019.      use hot keys for some of the buttons on the button bar. Other
  1020.      hot keys replicate menu options. For example, you can choose
  1021.      Drop to DOS from the Tools menu, or you can press CTRL-D.
  1022.      Several of the hot keys provide editing functions.
  1023.  
  1024.      Hot key Function
  1025.  
  1026.        CTRL-A Continue search
  1027.  
  1028.        CTRL-B Blank from cursor to end of field or line
  1029.  
  1030.        CTRL-C Bring up the calculator (Tools/Calculator)
  1031.  
  1032.        CTRL-D Drop to DOS (Tools/Drop to DOS)
  1033.  
  1034.        CTRL-E Expand memo field to a window
  1035.  
  1036.        CTRL-F Duplicate field from previously-viewed record
  1037.  
  1038.        CTRL-H Forces insert mode; not a "toggle" like INS key (for
  1039.        macros)
  1040.  
  1041.        CTRL-I Switch to another index
  1042.  
  1043.        CTRL-J Dial phone number (Tools/Telephone dialer)
  1044.  
  1045.  
  1046.  
  1047.      PC-File Version 7 Users Guide                             18
  1048.  
  1049.  
  1050.  
  1051.        CTRL-L Print snapshot label (Tools/Snapshot)
  1052.  
  1053.        CTRL-M Display macro menu to invoke macro (Macro/Execute)
  1054.  
  1055.        CTRL-N Display next record (in Record view)
  1056.  
  1057.        CTRL-O Toggle between flip data and insert tilde, and flip
  1058.        data and remove tilde
  1059.  
  1060.        CTRL-P Display previous record (in Record view)
  1061.  
  1062.        CTRL-Q Spell check current selection
  1063.  
  1064.        CTRL-R Duplicate previously viewed record when adding
  1065.  
  1066.        CTRL-S Simple search
  1067.  
  1068.        CTRL-T Toggle between current and most recent view
  1069.  
  1070.        CTRL-V View memo window
  1071.  
  1072.        CTRL-W Display cursor location box (letters, Free form, and
  1073.        Language reports only)
  1074.  
  1075.        CTRL-Y Begin and end recording macro (Macro/Begin recording
  1076.        and Macro/End recording)
  1077.  
  1078.        ALT-O Choose OK in dialog boxes and windows
  1079.  
  1080.        ALT-C Choose Cancel in dialog boxes and windows
  1081.  
  1082.        ALT-F7 Use with ARROW keys to move dialog boxes and windows
  1083.  
  1084.        ALT-F8 Use with ARROW keys to resize memo window
  1085.  
  1086.        ALT-F10 Resize memo window to full screen
  1087.  
  1088.        SHIFT-DEL Delete selected text and copy to buffer
  1089.  
  1090.        CTRL-INS Copy selected text to buffer
  1091.  
  1092.        SHIFT-INS Paste selected text from buffer
  1093.  
  1094.  
  1095.  
  1096.      PC-File Version 7 Users Guide                             19
  1097.  
  1098.  
  1099.  
  1100.      Elements of the PC-File Screen
  1101.  
  1102.      PC-File features easy-to-use pull-down menus and dialog boxes
  1103.      throughout the program. This section explains the various
  1104.      features of the program and how to navigate in them, using a
  1105.      mouse or the keyboard.
  1106.  
  1107.      The Basic Screen
  1108.  
  1109.      When you open a database, PC-File displays the first record on
  1110.      the screen, based on the current index.
  1111.  
  1112.      The title bar displays the name and description (if there is
  1113.      one) of the open database. If no database is open, only the
  1114.      program name displays.
  1115.  
  1116.      The menu bar is the main menu for PC-File. Choosing any of the
  1117.      options on the menu bar displays a pull-down menu, from which
  1118.      you choose the actions you want to take. In some parts of PC-
  1119.      File, a small menu bar serves the current screen.
  1120.  
  1121.      The work area varies, depending on where you are in PC-File.
  1122.      It may be a displayed record, or an edit window for defining a
  1123.      database, report, or letter.
  1124.  
  1125.      Dialog boxes display to request information from you.
  1126.  
  1127.      Command buttons appear on the button bar for commonly used
  1128.      functions when they are appropriate. Use hot key equivalents
  1129.      if you don't have a mouse, or prefer using the keyboard.
  1130.  
  1131.      The status line displays the description of the current index
  1132.      and the number of records in the open database. This line is
  1133.      for information only and is not accessible with the cursor.
  1134.  
  1135.  
  1136.      Moving Between Elements with a Mouse
  1137.  
  1138.      If you use a mouse, you can move between the menus, work area,
  1139.      and buttons by moving the cursor to the appropriate location
  1140.      and clicking. For example, if you are modifying a record in
  1141.      the work area and want to move to the next record, you can
  1142.      click on the Next button at the bottom of the screen. If you
  1143.      want to move to the menu, click on the menu option.
  1144.  
  1145.      Moving Between Elements with the Keyboard
  1146.  
  1147.      Press ALT to toggle between the menu bar and the work area. If
  1148.      the cursor is in the work area, press ALT to move to the File
  1149.      menu. If you are on the menu, pressing ALT takes you to the
  1150.      first field in the work area.
  1151.  
  1152.  
  1153.  
  1154.      PC-File Version 7 Users Guide                             20
  1155.  
  1156.  
  1157.      Press ALT-letter, where "letter" equals the underlined or
  1158.      highlighted letter of the menu bar option, to move from the
  1159.      work area to a specific menu. For example, press ALT-S to
  1160.      display the Search menu.
  1161.  
  1162.      To access the buttons on the button bar, use the appropriate
  1163.      hot keys. For example, to display the next record, press CTRL-
  1164.      N. The hot keys are listed above and in Chapter 7, "Finding
  1165.      and Modifying Data."
  1166.  
  1167.  
  1168.      The Menu Bar
  1169.  
  1170.      Each option on the menu bar serves as the heading for the menu
  1171.      that pulls down below it. Thus, Edit is an option on the menu
  1172.      bar and is also the name of the menu that displays when you
  1173.      choose it.
  1174.  
  1175.      Some features about menu options should be pointed out:
  1176.  
  1177.      A grayed-out option is not currently active. Most options
  1178.      become active once you open a database.
  1179.  
  1180.      An ellipsis (three dots) following an option indicates that
  1181.      more information is needed before the action specified is
  1182.      taken. Normally a dialog box displays when you choose the
  1183.      option.
  1184.  
  1185.      A check-mark indicates that one of two options is chosen. For
  1186.      example, on the Edit menu, you can toggle between Modify mode
  1187.      and Read-only mode. Only one of these options can be chosen at
  1188.      a time. Choose the unchecked option to change options.
  1189.  
  1190.      Choosing Menu Options with a Mouse
  1191.  
  1192.      To display a pull-down menu, click once on the menu bar
  1193.      option. To choose an option on a pull-down menu, click once on
  1194.      that option. For example, to open a database, click on the
  1195.      word File to open the File menu, then click on Open to display
  1196.      a dialog box.
  1197.  
  1198.      Choosing Menu Options with the Keyboard
  1199.  
  1200.      Use the left and right arrows, or TAB and SHIFT-TAB, to move
  1201.      along the menu bar. Highlight an option and press ENTER or the
  1202.      DOWN ARROW to display the pull-down menu. If no menu is pulled
  1203.      down, you can also press the first letter of the menu bar
  1204.      option to highlight it and display its pull-down menu. If you
  1205.      are elsewhere on the screen, press ALT and the underlined or
  1206.      highlighted letter of the menu bar option to display the pull-
  1207.      down menu. For example, press ALT-S to display the Search
  1208.      menu.
  1209.  
  1210.  
  1211.  
  1212.      PC-File Version 7 Users Guide                             21
  1213.  
  1214.  
  1215.      Once a pull-down menu is displayed, press the underlined or
  1216.      highlighted letter of an option to choose that option. You can
  1217.      also use the UP and DOWN ARROWS to highlight an option, then
  1218.      press ENTER to choose it.
  1219.  
  1220.      Dialog Boxes
  1221.  
  1222.      PC-File uses dialog boxes to request information. You may be
  1223.      asked to choose an option from a list, menu, or group of
  1224.      buttons, or enter a name or description. Dialog boxes take on
  1225.      a wide variety of shapes and forms in PC-File, but they are
  1226.      simple to use.
  1227.  
  1228.      Moving Dialog Boxes
  1229.  
  1230.      Most dialog boxes can be moved if they cover something you
  1231.      want to see while the box is on the screen.
  1232.  
  1233.      With a mouse, point at the title bar, hold the left button
  1234.      down and drag the dialog box where you want it. The cursor
  1235.      changes to the shape of a hand (in Graphics mode only) when
  1236.      you move it onto a title bar.
  1237.  
  1238.      With the keyboard, press ALT-F7, then use the ARROW keys to
  1239.      reposition the box. Press ENTER once the box outline is
  1240.      located where you want it.
  1241.  
  1242.      Moving Within Dialog Boxes
  1243.  
  1244.      Dialog boxes normally contain one or more elements, including
  1245.      buttons, boxes, and lists. Use the following techniques to
  1246.      move within and between these elements.
  1247.  
  1248.      With a mouse, click on the element of the dialog box you want
  1249.      to move to or change. If it is a command or option button,
  1250.      clicking once activates the button.
  1251.  
  1252.      With the keyboard, use ALT-letter, where "letter" is the
  1253.      underlined or highlighted letter of the appropriate element,
  1254.      to move the cursor to that element. For option buttons and
  1255.      check boxes, ALT-letter is the only access if you don't have a
  1256.      mouse. For other elements, you can also use TAB and SHIFT-TAB
  1257.      to move within and between elements. Use TAB to move to the
  1258.      right or down, SHIFT-TAB to move up or to the left.
  1259.  
  1260.      To accept the current options, choose the OK button or press
  1261.      ALT-O.
  1262.  
  1263.      Choose the Cancel button (you can press ALT-C) or press ESC to
  1264.      cancel the operation and move back one step.
  1265.  
  1266.  
  1267.      Elements of a Dialog Box
  1268.  
  1269.      Dialog boxes can contain command and option buttons, text and
  1270.      list boxes, and check boxes.
  1271.  
  1272.  
  1273.  
  1274.      PC-File Version 7 Users Guide                             22
  1275.  
  1276.  
  1277.  
  1278.  
  1279.      Command Buttons
  1280.  
  1281.      Command buttons are the rectangular buttons used to initiate
  1282.      an action. They appear on the button bar as well as in dialog
  1283.      boxes. The OK and Cancel buttons found in most dialog boxes
  1284.      are command buttons.
  1285.  
  1286.      With a mouse, click once on a command button to initiate the
  1287.      action.
  1288.  
  1289.      With the keyboard, press the underlined or highlighted letter
  1290.      on the button to initiate the action. If the dialog box
  1291.      includes a text box, press ALT and the underlined or
  1292.      highlighted letter. For the OK and Cancel buttons, press ALT-O
  1293.      or ALT-C respectively to initiate the action. You can also
  1294.      move the cursor to the command button and press ENTER.
  1295.  
  1296.  
  1297.      Text Boxes
  1298.  
  1299.      Text boxes allow you to type in information. When you move the
  1300.      mouse cursor to a text box, the mouse cursor changes from an
  1301.      arrow to an I- beam.
  1302.  
  1303.      Type the appropriate text in the highlighted box. In some
  1304.      cases, default text may be shown, in which case you can leave
  1305.      the default or type over it.
  1306.  
  1307.      All text boxes have a limit to the number of characters you
  1308.      can enter. Some text boxes are scrollable, allowing you to
  1309.      enter more information than the displayed area indicates. In
  1310.      those cases, the text scrolls to the left. Either way, PC-File
  1311.      beeps when you reach the character limit of the box.
  1312.  
  1313.  
  1314.      List Boxes
  1315.  
  1316.      A list box provides a menu of options to choose from. Some
  1317.      list boxes permit just one choice; others, called check-off
  1318.      lists, allow for multiple selections.
  1319.  
  1320.      List boxes often include scroll bars, indicating there may be
  1321.      more options than are shown.
  1322.  
  1323.      With a mouse, click above or below the scroll box or on the
  1324.      scroll arrows to scroll up or down the list of options. You
  1325.      can also drag the scroll box. To do so, click on the scroll
  1326.      box, hold the mouse button down, and drag the box up or down
  1327.      the scroll bar. Click on an option to choose it.
  1328.  
  1329.      With the keyboard, use the UP and DOWN ARROWS to scroll. To
  1330.      choose an option, move the highlight to the desired option
  1331.      with TAB and SHIFT-TAB or UP and DOWN ARROWS and press ENTER.
  1332.  
  1333.  
  1334.  
  1335.      PC-File Version 7 Users Guide                             23
  1336.  
  1337.  
  1338.  
  1339.      When you may need to make more that one selection from a list,
  1340.      PC-File uses a field selection list box. Check-off list boxes
  1341.      display a checkmark next to each option you select. If the
  1342.      order of selection is important, a number indicating the order
  1343.      also displays.
  1344.  
  1345.      With a mouse, click on an option to select it. Repeat for each
  1346.      additional selection you want to make.
  1347.  
  1348.      With the keyboard, use the UP and DOWN ARROWS to highlight an
  1349.      option. Press ENTER to select the option. Repeat for each
  1350.      additional selection you want to make.
  1351.  
  1352.      You cannot undo individual selections. If you make a selection
  1353.      in error, you must undo all of your selections and make them
  1354.      over again. Choose the Reset button to remove all checkmarks
  1355.      and numbers.
  1356.  
  1357.      Once you have finished making all of your selections, choose
  1358.      OK to initiate the action.
  1359.  
  1360.  
  1361.      Option Buttons
  1362.  
  1363.      PC-File uses option buttons to indicate available program
  1364.      options. You can only choose one option at a time.
  1365.  
  1366.      With a mouse, click on the button to choose it.
  1367.  
  1368.      With the keyboard, press ALT-letter, where "letter" is the
  1369.      underlined or highlighted letter of the button label, to
  1370.      choose the appropriate button.
  1371.  
  1372.  
  1373.      Check Boxes
  1374.  
  1375.      Check boxes allow you to turn individual options ON and OFF.
  1376.      An X in the box indicates the option is turned ON.
  1377.  
  1378.      A check box is a toggle. Choose it once to turn the option ON;
  1379.      choose it again to turn the option OFF.
  1380.  
  1381.      With a mouse, click within the box itself to choose it. Don't
  1382.      click on the label.
  1383.  
  1384.      With the keyboard, press ALT-letter, where "letter" is the
  1385.      underlined or highlighted letter of the box label, to choose
  1386.      it.
  1387.  
  1388.  
  1389.      The Work Area
  1390.  
  1391.      The work area in PC-File is of three types:
  1392.  
  1393.        The main screen
  1394.  
  1395.  
  1396.  
  1397.      PC-File Version 7 Users Guide                             24
  1398.  
  1399.  
  1400.        The edit window
  1401.        The view designer
  1402.  
  1403.  
  1404.      The main screen is the screen you are looking at when you are
  1405.      adding, modifying, or viewing your records. When modifying or
  1406.      viewing records, you can be in either of two formats: a Record
  1407.      view or a Table view.
  1408.  
  1409.      The edit window is a specialized word processor which displays
  1410.      when you write a letter, or create a report using the Free
  1411.      form and Language formats. Within the edit window you can
  1412.      enter text
  1413.  
  1414.      The view designer is used to create and modify database views.
  1415.      The view designer lets you manipulate text and fields as
  1416.      objects you can move within a view using the mouse or
  1417.      keyboard.
  1418.  
  1419.      Editing keys used on both the main screen (in Modify mode
  1420.      only) and in the edit window are described later in this
  1421.      chapter.
  1422.  
  1423.  
  1424.      Drawing Lines and Boxes
  1425.  
  1426.      Within the edit window only, PC-File lets you draw lines and
  1427.      boxes as part of a structure. Lines and boxes can add clarity
  1428.      to the structure by enclosing and sectioning off related
  1429.      fields.
  1430.  
  1431.      You can create lines and boxes by using characters from the
  1432.      ASCII table. To use these characters, hold down ALT while
  1433.      keying in the decimal value of the character. Then release the
  1434.      ALT key. For example, to enter +, hold down ALT and key in the
  1435.      numbers 2 1 8, using the numeric keypad on the right side of
  1436.      the keyboard.
  1437.  
  1438.      The complete ASCII Table is found in Appendix D.
  1439.  
  1440.      Other ASCII characters, such as letters from other languages,
  1441.      can be entered in the same way.
  1442.  
  1443.  
  1444.      Status Windows
  1445.  
  1446.      Printing a report or checking for duplicate records in a large
  1447.      database can often take several minutes. PC-File provides a
  1448.      handy feature that lets you know how the operation is
  1449.      progressing.
  1450.  
  1451.      This feature, called a Status window, appears in the lower
  1452.      right corner of your screen. It displays during all record
  1453.      processing, except when you are printing a report, letter, or
  1454.      graph to the screen. In those cases, the window could block
  1455.      your view, so it is not displayed.
  1456.  
  1457.  
  1458.  
  1459.      PC-File Version 7 Users Guide                             25
  1460.  
  1461.  
  1462.  
  1463.      The fields and status bars in the window are described below:
  1464.  
  1465.        Records: Shows total number of records in the database,
  1466.        including any deleted records whose space has not been
  1467.        reused.
  1468.  
  1469.        Scanned: Indicates the number of records read.
  1470.  
  1471.        Selected: Indicates number of records selected.
  1472.  
  1473.        Percent selected: Indicates the percentage of records read
  1474.        that have been selected. If you choose All records, this
  1475.        always shows 100 percent. If you choose Some records, it
  1476.        indicates what percentage have been selected from those read
  1477.        so far.
  1478.  
  1479.        Percent complete: Indicates what percentage of the total
  1480.        records in the database have been read.
  1481.  
  1482.  
  1483.      Selecting Files and Fields
  1484.  
  1485.      Two operations show up repeatedly in PC-File. To ensure that
  1486.      you understand how to perform these operations, the procedures
  1487.      are detailed here in full.
  1488.  
  1489.      Selecting a File
  1490.  
  1491.      File selection dialog boxes appear when you want to open a
  1492.      database or a feature of the database, such as a report or
  1493.      letter, that PC-File maintains in a separate file. Use this
  1494.      dialog box to choose the file you want.
  1495.  
  1496.      There are two ways to select a file:
  1497.  
  1498.        Choose the path and file from the directory and file list
  1499.        boxes
  1500.  
  1501.        Enter the path and file in the text box
  1502.  
  1503.      The path is the drive and directory where the file is located.
  1504.      Directories can be nested within other directories down to
  1505.      many levels.
  1506.  
  1507.  
  1508.      To choose the file from the list boxes:
  1509.  
  1510.      1.Choose the path first, using the directory list box.
  1511.  
  1512.        Choose (..) to move up the hierarchy of directories, if
  1513.        necessary. Choose a drive letter to change drives. Choose a
  1514.        directory to list the files in that directory. The current
  1515.        path is displayed above the directory list box.
  1516.  
  1517.      2.Choose the file from the file list box.
  1518.  
  1519.  
  1520.  
  1521.      PC-File Version 7 Users Guide                             26
  1522.  
  1523.  
  1524.  
  1525.        All the files in the current directory with the file
  1526.        extension appropriate to the current file selection dialog
  1527.        box are listed. For example, if you are selecting a
  1528.        database, all files with the extension .DBF located in the
  1529.        current directory are listed.
  1530.  
  1531.  
  1532.      To enter the file in the text box:
  1533.  
  1534.      1.Place the cursor at the start of the text box.
  1535.  
  1536.      2.Type in the path and file name. The file extension is
  1537.        usually unnecessary. For example, to select the MEMBERS
  1538.        database, type c:\pcfile\sample\members
  1539.        If the drive listed is already correct, you can just enter
  1540.        the directory and filename. For example, type
  1541.        \pcfile\sample\members If the path is already correct, you
  1542.        can just enter the file name. For example, type members
  1543.  
  1544.      3.Press ENTER or choose OK.
  1545.  
  1546.      If you can't remember where your file is located, use the
  1547.      command buttons labeled "This drive" or "All drives." Choose
  1548.      "This drive" to display all the appropriate files on the
  1549.      current drive. Choose "All drives" to display the appropriate
  1550.      files in drives C through Z. PC- File searches up to 10
  1551.      subdirectories deep and displays the first 100 appropriate
  1552.      files it finds.
  1553.  
  1554.  
  1555.      Selecting a Field or Partial Field
  1556.  
  1557.      Many PC-File operations require that you choose one or more
  1558.      fields from the database. When that step arises, PC-File
  1559.      displays a field selection dialog box.
  1560.  
  1561.      In some cases, you can select just a single field. To do so,
  1562.      click on the field with the mouse or use the arrow keys to
  1563.      highlight the field and press ENTER.
  1564.  
  1565.      In other cases, you can select multiple fields. Choose the
  1566.      fields in the order of importance. A check mark and a number
  1567.      representing the order appears next to each field as you
  1568.      select it. When you have chosen all the fields you want,
  1569.      choose OK.
  1570.  
  1571.      In rare cases, you may want to choose the same field twice. If
  1572.      you choose a field a second time, only the second number
  1573.      appears next to the field. However, the field is used twice in
  1574.      the operation, in the order selected.
  1575.  
  1576.      If you make a mistake while choosing multiple fields, choose
  1577.      Reset. The check marks and numbers disappear, allowing you to
  1578.      start over.
  1579.  
  1580.  
  1581.  
  1582.      PC-File Version 7 Users Guide                             27
  1583.  
  1584.  
  1585.      You can also choose a partial field. For example, if you want
  1586.      to use the first five digits of a nine-digit zip code field,
  1587.      you can designate those character positions in the field.
  1588.  
  1589.      To select a partial field, use the text box in the field
  1590.      selection dialog box. Enter the partial field in the following
  1591.      format:
  1592.  
  1593.           Field name,starting position,number of positions
  1594.  
  1595.      The starting position is the position of the first character
  1596.      you want to choose from the field. The number of positions is
  1597.      the total number of characters in your selected partial field,
  1598.      beginning with that first character. Use commas between the
  1599.      three parts of the command. Do NOT use spaces.
  1600.  
  1601.      As an example, consider a field called Phone that contains
  1602.      numbers in the following format: 206-454-0479. To print just
  1603.      the phone number without the area code, you would designate a
  1604.      partial field of just the last eight characters. In the text
  1605.      box, you would type
  1606.  
  1607.           Phone,5,8
  1608.  
  1609.      The example shows a partial field selection starting at the
  1610.      fifth position and selecting eight characters.
  1611.  
  1612.      In the example of the nine-digit zip code field, enter the
  1613.      partial field like this:
  1614.  
  1615.           Zipcode,1,5
  1616.  
  1617.      This prints five characters of the field, starting with the
  1618.      first character.
  1619.  
  1620.      You can use the text box for entering whole fields, as well as
  1621.      partial fields. If you want to select a whole field in this
  1622.      way, you only need to enter the field name.
  1623.  
  1624.      The text box can be handy for recording macros as well. To
  1625.      choose a field while recording a macro, type the field name in
  1626.      the text box. This avoids possible problems with any changes
  1627.      in the order of the fields in the list box.
  1628.  
  1629.  
  1630.      Using Help
  1631.  
  1632.      PC-File provides an on-line Help system throughout the
  1633.      program. This Help system is context-sensitive, providing
  1634.      instant information about the current screen or dialog box.
  1635.  
  1636.      Help takes several forms in PC-File. The following chart
  1637.      illustrates the available options:
  1638.  
  1639.      Menu option: Key: Purpose
  1640.  
  1641.  
  1642.  
  1643.      PC-File Version 7 Users Guide                             28
  1644.  
  1645.  
  1646.      Help now: F1: Context-sensitive Help about current     option,
  1647.      dialog box, or screen
  1648.  
  1649.      General Help: ALT-F1: Reference help (a list of   keys,
  1650.      navigation tips, and menu information)
  1651.  
  1652.      Choose OK or press ESC to remove a Help window from the
  1653.      screen.
  1654.  
  1655.      Help windows work like dialog boxes in that you can move them
  1656.      around the screen if they are covering something you want to
  1657.      see. With a mouse, place the cursor on the title bar, press
  1658.      the left button, and drag the window. With the keyboard, press
  1659.      ALT-F7, then use the arrow keys to move the window.
  1660.  
  1661.  
  1662.      Backing Up Your Databases
  1663.  
  1664.      Back up your databases frequently. Your databases are the
  1665.      result of your time and effort and, perhaps, money. You can
  1666.      never predict when a database may be damaged. You or other
  1667.      users might erase data by mistake, your hard disk may crash,
  1668.      or the electricity may go out. If you have no backup, all
  1669.      could be lost.
  1670.  
  1671.      Keep at least two copies of each database on separate floppy
  1672.      disks in addition to the copy you use regularly. You might
  1673.      want to get into a routine of backing up one copy one day and
  1674.      the other copy the following day. Some users maintain a copy
  1675.      for each day of the week, with the day clearly marked on the
  1676.      floppy disk.
  1677.  
  1678.      Back up all the database files when you first create a
  1679.      database. Once you have done that, you only need to back up
  1680.      those files you make changes to. For example, when you add or
  1681.      modify data, back up the data file. If you create or modify a
  1682.      report, back up the report file.
  1683.  
  1684.      There are several ways to back up a database:
  1685.  
  1686.        Use the DOS BACKUP command
  1687.  
  1688.        Use a special backup program or tape software
  1689.  
  1690.        Use the DOS COPY command
  1691.  
  1692.        Use the Copy option in PC-File (choose File Management from
  1693.        the Utilities menu)
  1694.  
  1695.      Each method is explained below.
  1696.  
  1697.      NOTE: You can't back up an open database. If you use the Copy
  1698.      option in PC-File to back up a database, close the current
  1699.      database first. If you backup from the DOS prompt, exit from
  1700.      PC-File and then issue the BACKUP command.
  1701.  
  1702.  
  1703.  
  1704.      PC-File Version 7 Users Guide                             29
  1705.  
  1706.  
  1707.      Using the DOS BACKUP Command
  1708.  
  1709.      If a database is too large to fit on a single floppy disk, use
  1710.      the DOS BACKUP command. This command lets you copy the entire
  1711.      database onto several floppy disks. You must use the DOS
  1712.      RESTORE command to copy the database back onto a hard disk, if
  1713.      that need arises. See your DOS manual for more information on
  1714.      the use of these commands.
  1715.  
  1716.      To back up a database using the DOS BACKUP command:
  1717.  
  1718.      1.At the DOS prompt, enter the command to back up the
  1719.        database. For example, to back up the MEMBERS database to
  1720.        floppy disks in drive A, you would type the command
  1721.  
  1722.           backup c:\pcfile\sample\members.* a:
  1723.  
  1724.           and press ENTER.
  1725.  
  1726.      Using Special Backup Programs
  1727.  
  1728.      You can back up databases with programs specifically designed
  1729.      for that purpose. You can also use tape backups for databases.
  1730.      If you have a special backup program, see the manual that
  1731.      comes with it for instructions.
  1732.  
  1733.      Using the DOS COPY Command
  1734.  
  1735.      If your database is small enough to fit on a single disk, you
  1736.      can use the DOS COPY command. See your DOS manual for more
  1737.      details on using this command.
  1738.  
  1739.      To back up files using the DOS COPY command:
  1740.  
  1741.      1.At the DOS prompt, enter the command to copy the database.
  1742.        For example, to copy the MEMBERS database to a floppy disk
  1743.        in drive A, you would type the command
  1744.  
  1745.           copy c:\pcfile\sample\members.* a:
  1746.  
  1747.           and press ENTER.
  1748.  
  1749.      Using PC-File's Copy Option
  1750.  
  1751.      PC-File makes it easy to back up files from within the
  1752.      program. The procedure is not quite as fast as the DOS
  1753.      commands, but you don't have to exit from the program to do
  1754.      it. And PC-File groups the files in such a way that backing up
  1755.      is easier.
  1756.  
  1757.      NOTE: If copying to a floppy disk, the database files (files
  1758.      with extensions .DBF, .DBT, and .HDB) must fit on one disk. If
  1759.      your database files don't fit on a single disk, you must use
  1760.      the DOS BACKUP command or a special backup program instead.
  1761.  
  1762.  
  1763.  
  1764.      PC-File Version 7 Users Guide                             30
  1765.  
  1766.  
  1767.      To back up files using the PC-File copy option:
  1768.  
  1769.      1.Choose Utilities from the menu bar.
  1770.  
  1771.      2.Choose File management from the Utilities menu. PC-File
  1772.        prompts you to choose one of three options: Copy, Delete or
  1773.        Rename.
  1774.  
  1775.      3.Choose Copy.
  1776.  
  1777.      4.Choose the type of file to copy. Choose Database to back up
  1778.        the structure and data in a database. All database files
  1779.        with the listed file extensions will be copied. The other
  1780.        options copy files with the indicated file extensions.
  1781.  
  1782.      5.Choose or enter the drive, path, and file name you are
  1783.        copying from.
  1784.  
  1785.      6.Choose or enter the drive, path, and file name you are
  1786.        copying to. If you are copying to a floppy disk, you
  1787.        normally just need to enter the drive and file name.
  1788.  
  1789.      NOTE: For information about PC-File files and file extensions,
  1790.      see Appendix C, "Program and Database Files."
  1791.  
  1792.  
  1793.  
  1794.      PC-File Version 7 Users Guide                             31
  1795.  
  1796.  
  1797.  
  1798.  
  1799.      CHAPTER 2 CREATING A DATABASE STRUCTURE
  1800.  
  1801.      The first step in defining a database is defining the database
  1802.      structure. You "tell" PC-File what your fields will be named,
  1803.      what type of data will be stored in them, and how long each
  1804.      field will be. This chapter covers the details of this
  1805.      process, plus other database design considerations. Opening
  1806.      and closing an existing database is also described.
  1807.  
  1808.      Opening and Closing a Database
  1809.  
  1810.      Some menu options, such as Configuration, are accessible
  1811.      without an open database. However, unless you are creating a
  1812.      new database, you will generally want to open a database once
  1813.      you start PC-File. You can then begin working with the
  1814.      database. Alternatively, you can open a database when starting
  1815.      PC-File from DOS.
  1816.  
  1817.      Opening a Database
  1818.  
  1819.      To open a database:
  1820.  
  1821.      1.Choose File from the menu bar.
  1822.  
  1823.      2.Choose Open from the File menu. A file selection dialog box
  1824.        appears, with the databases in the current directory listed.
  1825.  
  1826.      3.Choose the database you want to open by clicking on it and
  1827.        choosing OK, or highlight the text box and type in the
  1828.        database name. If the database is located in another
  1829.        directory, use the Directory list box to move to that
  1830.        directory. You can open only one database at a time. If you
  1831.        open a second database, PC-File automatically closes the
  1832.        first database.
  1833.  
  1834.      NOTE: You can open any database that uses dBASE-format files.
  1835.      These are files created with a program such as dBASE or FoxPRO
  1836.      and which use the extension .DBF. PC-File creates a header
  1837.      file automatically, which allows you to use certain features
  1838.      specific to PC-File. You are also prompted to enter a database
  1839.      description. The description is optional.
  1840.  
  1841.      To load a database automatically when starting PC-File from
  1842.      DOS type pcf followed by the database file specification. You
  1843.      do not need to include the database file extension. For
  1844.      example, to start PC-File and load a database called CONTACTS
  1845.      in the \DATA directory on drive D, you would type the
  1846.      following at the DOS command prompt:
  1847.  
  1848.           pcf d:\data\contacts
  1849.  
  1850.      and press ENTER.
  1851.  
  1852.      To open a database when starting PC-File:
  1853.  
  1854.  
  1855.  
  1856.      PC-File Version 7 Users Guide                             32
  1857.  
  1858.  
  1859.  
  1860.      1.Type PCF at the DOS prompt followed by the desired
  1861.        database's file specification in the following format:
  1862.        pcf d:\subdirectory\databasename
  1863.  
  1864.      2.Press ENTER
  1865.  
  1866.      Closing a Database
  1867.  
  1868.      To close a database:
  1869.  
  1870.      1.Choose File from the menu bar.
  1871.  
  1872.      2.Choose Close from the File menu. If you are ready to quit
  1873.        PC-File, you can choose Exit instead. The program closes the
  1874.        database automatically.
  1875.  
  1876.      If you want to open another database, choose Open from the
  1877.      File menu. PC-File closes the current database before opening
  1878.      a new one.
  1879.  
  1880.  
  1881.      The Database Structure
  1882.  
  1883.      PC-File allows you to create a database easily by defining a
  1884.      basic database structure. The database structure defines what
  1885.      fields you will have for each record in your database. (See
  1886.      Lesson 1, "Understanding Databases," in the Tutorial section
  1887.      if you are not familiar with database terminology and
  1888.      concepts.)
  1889.  
  1890.      After you have created the basic database structure, you can
  1891.      add additional features if you want. You can:
  1892.  
  1893.        Change field attributes, such as calculations, special
  1894.        formatting, or data validation rules, using the Field
  1895.        Attributes option on the File menu.
  1896.  
  1897.        Create different views to change the way the data is
  1898.        displayed in the work area using the Create option on the
  1899.        Views menu.
  1900.  
  1901.        Define indexes to sort your data different ways using the
  1902.        Index Maintenance option on the File menu.
  1903.  
  1904.      This section explains how to create the basic database
  1905.      structure. See Chapter 4, "Adding and Modifying Field
  1906.      Attributes" for details on how to change field attributes. See
  1907.      Chapter 5, "Database Views" for details on how to change the
  1908.      view of the data. See Chapter 8, "Indexing Data" for details
  1909.      on how to create indexes.
  1910.  
  1911.  
  1912.      There are three ways to create a new database structure:
  1913.  
  1914.        Create a database structure from scratch
  1915.  
  1916.  
  1917.  
  1918.      PC-File Version 7 Users Guide                             33
  1919.  
  1920.  
  1921.  
  1922.        Create a database structure by patterning after an existing
  1923.        database
  1924.  
  1925.        Redefine an existing database and build a new file
  1926.  
  1927.      Patterning after a database copies only the original
  1928.      database's structure: field names, lengths, and types. If you
  1929.      also want to copy a database's field attributes and custom
  1930.      views, you must redefine an existing database. Redefining also
  1931.      gives you the option to transfer some, all, or none of the
  1932.      records to the new database.
  1933.  
  1934.      This chapter explains how to create a database structure from
  1935.      scratch or by patterning after another database. See Chapter
  1936.      3, "Modifying a Database Structure," for information on how to
  1937.      redefine an existing database.
  1938.  
  1939.      What is a Database Structure?
  1940.  
  1941.      The single most important element of a database is its
  1942.      structure. The database structure consists of the fields you
  1943.      want for each record in your database. Each field represents a
  1944.      different category within the set of pieces of information
  1945.      that make up a record.
  1946.  
  1947.      Each field has a field name that uniquely identifies it within
  1948.      the database structure. The field name appears on the entry
  1949.      screen when entering records, and is also used to access a
  1950.      field's data for many other database operations such as
  1951.      calculations, printing reports, defining indexes, relational
  1952.      operations, and exporting.
  1953.  
  1954.      Each field has a field type that is determined by the kind of
  1955.      information you will be storing in the field. A field in PC-
  1956.      File can be one of five field types: Character, Numeric, Date,
  1957.      Logical, or Memo.
  1958.  
  1959.      Lastly, each field has a field length that determines how many
  1960.      chararacters you can enter and store in the field.
  1961.  
  1962.      A simple example of a database base structure would be a
  1963.      database to store names and phone numbers. To create such a
  1964.      database, you might define a database structure with 3 fields
  1965.      named: FIRST_NAME, LAST_NAME, and PHONE.
  1966.  
  1967.      After naming the fields, you need to determine what field
  1968.      types to use. The FIRST_NAME and LAST_NAME fields will only
  1969.      contain letters and possibly punctuation, so they both would
  1970.      be designated as character type fields. The PHONE field will
  1971.      contain numbers, so you might think it should be a numeric
  1972.      field type. But a phone number field will also contain dashes
  1973.      between numbers and possibly parentheses around area codes. A
  1974.      numeric field will only store numeric values, therefore you
  1975.      must also
  1976.      designate PHONE as a character field.
  1977.  
  1978.  
  1979.  
  1980.      PC-File Version 7 Users Guide                             34
  1981.  
  1982.  
  1983.  
  1984.      You also need to determine how long to make your fields.
  1985.      Choose lengths that are appropriate for the data you will be
  1986.      working with, keeping in mind that even empty fields and
  1987.      spaces at the end of a field entry take up disk space. You
  1988.      might make FIRST_NAME 10 characters long, LAST_NAME 15
  1989.      characters long, and PHONE 14 characters long (assuming you
  1990.      are formatting your phone numbers like: (555) 555-1234).
  1991.  
  1992.      See the "Fields and Field Characteristics" section later in
  1993.      this chapter for more details on field names, types, and
  1994.      lengths.
  1995.  
  1996.  
  1997.      Maximum Record Size
  1998.  
  1999.      The overall size of each record is determined by the sum of
  2000.      the lengths of all fields, except memo fields each of which
  2001.      account for 10 characters of the record size. The maximum
  2002.      number of characters PC-File allows per record is 4,000. And,
  2003.      you can have no more than 128 fields per record.
  2004.  
  2005.      To calculate the record size of your database strucuture, add
  2006.      the lengths of each character and numeric field, plus 8 for
  2007.      each date field, 1 for each logical field, and 10 for each
  2008.      memo field. This number must total 4,000 or less.
  2009.  
  2010.      (Note: Memo field data is stored in a separate file-the number
  2011.      10 used for memo fields when calculating record size accounts
  2012.      for the information stored in the main data file that "points"
  2013.      to data stored in the memo file.)
  2014.  
  2015.      Here is an sample calculation to determine the record size for
  2016.      a simple database:
  2017.  
  2018.      FIELD          Type           Length
  2019.  
  2020.      FIRST_NAME     Character      15
  2021.      LAST_NAME      Character      15
  2022.      PHONE          Character      15
  2023.      ENROLL_DATE    Date           8
  2024.      MEMBER_YN      Logical        1
  2025.      DUES_PAID      Numeric        6
  2026.      NOTES          Memo           10
  2027.  
  2028.      Total Size 70
  2029.  
  2030.  
  2031.      Fields and Field Elements
  2032.  
  2033.      The building blocks of a database structure are the fields.
  2034.      Creating a database basically involves defining the elements
  2035.      of each field. The field elements that you can define in PC-
  2036.      File are listed below.
  2037.  
  2038.      Elements: Purpose
  2039.  
  2040.  
  2041.  
  2042.      PC-File Version 7 Users Guide                             35
  2043.  
  2044.  
  2045.  
  2046.      Field Name: Uniquely identifies a field.
  2047.  
  2048.      Field Type: Defines the kind of data a field contains. The
  2049.      field type may limit what characters are allowed, the format
  2050.      that is accepted, and how the data is handled for sorting,
  2051.      searching, or calculations.
  2052.  
  2053.      Length: Defines the number of characters allowed in a field.
  2054.      The lengths allowed vary for each field type. For character
  2055.      fields, you can select a length that exceeds 65 characters,
  2056.      but only 65 characaters will display in the work area at once.
  2057.  
  2058.      Decimals: Applies only to numeric data. This determines how
  2059.      many places to the right of the decimal to display.
  2060.      Calculations in numeric fields are rounded to this number of
  2061.      places.
  2062.  
  2063.      Physical Order: The order in which you enter the fields is the
  2064.      physical order of the data base. Fields will initially be
  2065.      accessed in this order. However, you can provide different
  2066.      access orders by defining custom views (see Chapter 5).
  2067.  
  2068.      The field name, field type and length are required elements
  2069.      for all fields. Decimals are only required for numeric fields
  2070.      and can be set to zero. At zero, any data entered on the right
  2071.      side of the decimal is rounded and is not stored in the
  2072.      database.
  2073.  
  2074.  
  2075.      Field Names
  2076.  
  2077.      Field names can be up to 10 characters long and can contain
  2078.      letters, numbers, or the underscore ( _ ) character. Field
  2079.      names must start with a letter. Spaces are not allowed.
  2080.  
  2081.      All field names in the same database must be unique. PC-File
  2082.      treats both uppercase and lowercase letters in field names the
  2083.      same. Thus, you couldn't name two separate fields PHONE and
  2084.      Phone in the same database.
  2085.  
  2086.      NOTE: By default, PC-File puts the field names on the screen
  2087.      next to the fields. This shows you which fields correspond to
  2088.      which field names. You can change this text or put additional
  2089.      text on the screen by defining a custom view. Custom views
  2090.      allow you to put nearly any text on the screen-you don't have
  2091.      to follow the rules for field names mentioned above. See
  2092.      Chapter 5, "Views" for details on how to define custom views.
  2093.  
  2094.  
  2095.      Field Types
  2096.  
  2097.      Field type determines the kind of information that can be
  2098.      entered into a field. It can also determine the length of a
  2099.      field, or a range of lengths. Field type must be defined for
  2100.      every field.
  2101.  
  2102.  
  2103.  
  2104.      PC-File Version 7 Users Guide                             36
  2105.  
  2106.  
  2107.  
  2108.      The table below lists each of the five field types supported
  2109.      by PC- File, their length or range of lengths, and their
  2110.      allowable characters. Additional information about each field
  2111.      type follows the table.
  2112.  
  2113.      Field type: Field length: Allowable characters
  2114.  
  2115.        Character: 1 to 254: All letters, numbers, and other
  2116.        characters found on a typical keyboard (all ASCII characters
  2117.        with a decimal value over 31)
  2118.  
  2119.        Numeric: 1 to 19: All numbers, and optionally: the decimal
  2120.        point (period), leading minus sign (hyphen), or leading plus
  2121.        sign
  2122.  
  2123.        Date: 8: All numbers, plus the slash, hyphen, or period
  2124.  
  2125.        Logical: 1: T or F, Y or N
  2126.  
  2127.        Memo: 5000: Same as Character fields, except for _ which is
  2128.        reserved as a control character.
  2129.  
  2130.      Character Fields
  2131.  
  2132.      Most fields you define are of this type. Character fields can
  2133.      include letters, numbers, and most other characters found on a
  2134.      typical keyboard. Additionally, you can enter extended
  2135.      characters by pressing the ALT key and entering the
  2136.      character's ASCII decimal value on the numeric keypad. You can
  2137.      also enter extended characters directly from the keyboard if
  2138.      your system is configured to use character sets for languages
  2139.      other than United States English with the DOS KEYB program-
  2140.      see your DOS manual for details.
  2141.  
  2142.      Numeric Fields
  2143.  
  2144.      Numeric fields contain arithmetic values. They are precise up
  2145.      to eight decimal positions.
  2146.  
  2147.      Just because a field contains numbers does not mean it should
  2148.      be a numeric field. As a general rule, if using the data in a
  2149.      calculation would be meaningless, define the field as a
  2150.      character field. For example, you would not use phone numbers
  2151.      in a calculation, so a phone number field should be defined as
  2152.      a character field.
  2153.  
  2154.      Additionally, PC-File discards everything to the right of the
  2155.      first non-numeric character it encounters in a numeric field.
  2156.      If you enter data that contains both numbers and other
  2157.      characters into a numeric field, some of your data will be
  2158.      lost. For example, if you enter the phone number 206-555-1212
  2159.      into a numeric field, PC-File converts and stores this as a
  2160.      value of 206. Zip codes, social security numbers, or part
  2161.      numbers are other good examples of data that contain numbers
  2162.      but should be stored
  2163.  
  2164.  
  2165.  
  2166.      PC-File Version 7 Users Guide                             37
  2167.  
  2168.  
  2169.      in character fields.
  2170.  
  2171.      Fields that you define to number records consecutively should
  2172.      be numeric fields. These fields are often used to sort records
  2173.      and defining them as character fields will result in the
  2174.      following sort: 1, 10, 101, 11, 2, 21-PC-File essentially
  2175.      "alphabetizes" numbers entered into character type fields. The
  2176.      same set of numbers entered in a numeric field would be sorted
  2177.      properly: 1, 2, 10, 11, 21, 101.
  2178.  
  2179.      Numeric fields are never displayed or stored as blank. PC-File
  2180.      displays and stores 0 in any numeric fields left blank when
  2181.      adding records.
  2182.  
  2183.      Date Fields
  2184.  
  2185.      Typical date fields are birth dates, expiration dates, and due
  2186.      dates. Unless you want to use a non-standard date format, you
  2187.      should define any field you want to enter dates into as a date
  2188.      type field. This allows PC-File to properly sort and search
  2189.      the field.
  2190.  
  2191.      Internally date fields are always stored as 8 characters of
  2192.      data in a YYYYMMDD format. When defining date type fields for
  2193.      your database structure, the only length allowed is 8.
  2194.      However, date fields can be displayed using either 8- or 10-
  2195.      character formatting (using either a 2- digit or 4-digit
  2196.      year). Date formatting is set using the Default Date Format
  2197.      options on the Configuration dialog, or by setting Date format
  2198.      as a field attribute. See Chapter 13, "Default Date Format"
  2199.      and Chapter 4 "Date
  2200.      Format" for details on how to change date display formatting.
  2201.      If you do not set date display formatting, PC-File defaults to
  2202.      displaying dates in 10-character MM/DD/YYYY format.
  2203.  
  2204.  
  2205.      NOTE: The following information assumes you are using PC-
  2206.      File's default Month/Day/Year formatting. You can reconfigure
  2207.      PC-File to use other date formats using the Configure option
  2208.      on the Utilities menu. See Chapter 13, "Default Date Format"
  2209.      for details.
  2210.  
  2211.      Date fields will only accept entries made in valid formats.
  2212.      Regardless of how dates are configured to display, PC-File
  2213.      only accepts date entries in two formats:
  2214.  
  2215.      MM/DD/YY-"March 1, 1993" would be typed in as: 03/01/93 or
  2216.      3/1/93. Internally, PC-File converts and stores this as
  2217.      19930301. PC-File assumes the date is in the 20th century and
  2218.      adds 19 at the beginning of the stored data for all dates
  2219.      entered in the MM/DD/YY format.
  2220.  
  2221.  
  2222.  
  2223.      PC-File Version 7 Users Guide                             38
  2224.  
  2225.  
  2226.      MM/DD/YYYY-"March 1, 2001" would be typed in as: 03/01/2001 or
  2227.      3/1/2001. Internally, PC-File converts and stores this as
  2228.      20010301. Because the full year is provided when entering
  2229.      dates in this format, no century is assumed. This allows you
  2230.      to enter dates from any century.
  2231.  
  2232.      PC-File will display dates entered using either format as
  2233.      MM/DD/YYYY, unless date display formatting was changed using
  2234.      Configuration or Field Attribute settings.
  2235.  
  2236.  
  2237.      NOTE: While date fields formatted to display 8-character date
  2238.      formats also accept entries in either MM/DD/YYYY format, and
  2239.      internally store the full year so entered, PC-File converts
  2240.      the dates to display in MM/DD/YY format. PC-File sorts
  2241.      properly if this field is indexed, but you cannot visually
  2242.      distinguish between dates from different centuries. For
  2243.      example, MM/DD/YYYY formatted data entered for "January 1,
  2244.      1901" and "January 1, 2001" display identically: 01/01/01.
  2245.      Therefore, you should always
  2246.      use a 10-character date display formatting for entering dates
  2247.      before 1900 or after 1999.
  2248.  
  2249.      Also, PC-File date type fields convert any year entered as
  2250.      less than 100 to a 20th century year. Therefore, PC-File date
  2251.      fields can only be used to store dates from the years 100 AD
  2252.      to 9999 AD.
  2253.  
  2254.      Logical Fields
  2255.  
  2256.      Logical fields are used for either/or situations. You can
  2257.      enter only one character: T (True), F (False), Y (Yes), or N
  2258.      (No), using either upper- or lowercase letters.
  2259.  
  2260.      Memo Fields
  2261.  
  2262.      Memo fields are a type of character field, but with a much
  2263.      longer maximum field length (5000 characters). Use them to
  2264.      store large amounts of text. Memo fields can't be indexed.
  2265.  
  2266.      Use memo fields sparingly, as memo text requires an additional
  2267.      file that can take up large amounts of disk space. Also, each
  2268.      memo field requires additional system memory. As a general
  2269.      rule, you should limit the number of memo fields in your
  2270.      database to preferably no more than 2.
  2271.  
  2272.      NOTE: However, you may not be able to use a database defined
  2273.      with the maximum of 10 memo fields. PC-File has to set aside
  2274.      memory to manage each memo field when it opens the database.
  2275.      How much memory PC-File can use may vary depending on how the
  2276.      system it is running on is configured.
  2277.  
  2278.  
  2279.  
  2280.      PC-File Version 7 Users Guide                             39
  2281.  
  2282.  
  2283.      Memo text is stored in a file called databasename.DBT, where
  2284.      "databasename" is the name of the database. Within that file,
  2285.      memo text is stored in blocks of 512 characters. In other
  2286.      words, at least 512 bytes of space are used up even if the
  2287.      field only contains a single character. On the other hand, if
  2288.      the field is left blank, no space is taken up in the memo
  2289.      file. Once the amount of data in a memo field exceeds 512
  2290.      characters, an additional 512 bytes is added to the .DBT file,
  2291.      and so on up to the 5000 character size limit. Choose the
  2292.      character field type unless: you will need more than 254
  2293.      characters for the field; if the field will be used
  2294.      infrequently; or if you don't need to worry about disk space.
  2295.  
  2296.  
  2297.  
  2298.      NOTE: When you edit a memo field, PC-File attempts to reuse
  2299.      the blocks previously used in the .DBT file. If PC-File is not
  2300.      able to reuse the blocks, they are set aside (but still remain
  2301.      as part of the .DBT) and new blocks are used. For this reason,
  2302.      if you edit your memo fields frequently, the .DBT file may
  2303.      grow larger than you expect it should be relative to the size
  2304.      of the rest of the database. Packing the database using Pack
  2305.      on the Utilities menu will remove unused information from the
  2306.      .DBT.
  2307.  
  2308.      Length
  2309.  
  2310.      The field length is the maximum number of characters available
  2311.      for data entry. Defining a field length of 15 characters for a
  2312.      LASTNAME field, for example, would allow the entry of any last
  2313.      name up to 15 characters in length.
  2314.  
  2315.      Field length is determined by field type. Some field types
  2316.      allow you to set the field length within a range, while others
  2317.      are predetermined. For example, character fields can be from 1
  2318.      to 254 characters long, but date fields must be 8 characters
  2319.      long. The field lengths allowed for each field type are
  2320.      described in the table at the beginning of the "Field Type"
  2321.      section.
  2322.  
  2323.      Decimal Places
  2324.  
  2325.      Numeric fields require that you specify the number of
  2326.      positions to the right of the decimal. PC-File provides
  2327.      precision for up to eight places to the right of the decimal.
  2328.  
  2329.      The number you enter for the field length specifies the total
  2330.      length of the numeric field. If you are defining decimal
  2331.      places, the total length includes a position for the decimal
  2332.      point plus any positions to the right of the decimal point.
  2333.      The maximum number of decimal places you can define is the
  2334.      field length minus two, keeping in mind that the decimal point
  2335.      itself is part of the total length. In other words, if you
  2336.      define a numeric field as 10 positions long, you can place up
  2337.      to eight of
  2338.  
  2339.  
  2340.  
  2341.      PC-File Version 7 Users Guide                             40
  2342.  
  2343.  
  2344.      those positions to the right of the decimal. The largest
  2345.      number you could enter into a field with a length of 10 and 8
  2346.      decimal places would be: 9.99999999.
  2347.  
  2348.      Data Length vs. Display Length
  2349.  
  2350.      PC-File distinguishes between data lengths and display
  2351.      lengths. The data length is the maximum number of characters
  2352.      the field can contain. The display length is the number of
  2353.      characters that show on the data entry screen at one time. For
  2354.      character and memo fields, the data length can exceed the
  2355.      display length. You are specifying the data length when you
  2356.      define or redefine a database structure.
  2357.  
  2358.      The maximum data length for character fields is 254
  2359.      characters. If you want to store more than 65 characters in a
  2360.      character field, you should specify that when you create the
  2361.      database. If you forget to do this or change your mind later,
  2362.      you can use the Redefine option on the File menu to change a
  2363.      field's data length.
  2364.  
  2365.      PC-File defaults to using display lengths of 65 for all memo
  2366.      fields and for character fields with data lengths longer than
  2367.      65. For character fields with data lengths 65 or less, PC-File
  2368.      defaults to using a display width that matches the data
  2369.      length. You can set the display width to be less than the data
  2370.      length for character fields and memo fields using the View
  2371.      designer as explained in Chapter 5.
  2372.  
  2373.      You can scroll within a field that has a data length larger
  2374.      than its display length. It's as if you were looking at the
  2375.      field through a window, only able to see part of the data at
  2376.      any one time. To see other portions of the field, you move the
  2377.      cursor left or right, which moves the visual window across the
  2378.      data.
  2379.  
  2380.      A memo field always has a data length larger than than its
  2381.      display length. You can scroll through the memo as described
  2382.      above, or you can pop up an editing window to view or edit the
  2383.      memo's contents. See Chapter 4, "Entering Data in a Memo
  2384.      Field" and Chapter 5, "Viewing a Memo Field" for more details.
  2385.  
  2386.      Numeric and logical type fields display lengths must be the
  2387.      same as their data lengths-you cannot change their display
  2388.      widths. Date fields' default display lengths are 10.
  2389.  
  2390.  
  2391.  
  2392.      PC-File Version 7 Users Guide                             41
  2393.  
  2394.  
  2395.  
  2396.  
  2397.      Creating a New Database Structure
  2398.  
  2399.      The process of creating a new database structure brings
  2400.      together all the elements discussed above. If you have any
  2401.      questions about specific elements while defining your new
  2402.      database structure, refer to the preceding sections for
  2403.      details on each element in the database structure: Field Name,
  2404.      Field Type, Field Length, and Decimals.
  2405.  
  2406.      Defining by Patterning After an Existing Database
  2407.  
  2408.      If you want, you can start the database definition process by
  2409.      patterning after the structure of an existing database. This
  2410.      is useful if you want to create a copy of a database, or to
  2411.      start from another database's definition.
  2412.  
  2413.      Starting by "patterning after" only copies the existing
  2414.      database's structure: the field's names, their types, and
  2415.      lengths-calculations and other field attributes are not
  2416.      copied. If you also want to copy the database's field
  2417.      attributes and custom views, you must open the database you
  2418.      want to copy and use the Redefine option on the File menu,
  2419.      choosing to build a new file. See Chapter 3 for details on
  2420.      redefining.
  2421.  
  2422.      When you choose New from the File Menu, you will be asked
  2423.  
  2424.      Pattern after Existing Database?
  2425.  
  2426.      Answering Yes to this dialog displays a file selection dialog
  2427.      box so you can choose the database structure to copy. After
  2428.      you choose the database to copy, the Define screen displays
  2429.      with the copied database's field definitions. You can then
  2430.      continue with the definition process: adding, modifying, or
  2431.      deleting fields as necessary.
  2432.  
  2433.      Answering No to this dialog proceeds to an empty Define screen
  2434.      to allow you to define a database from scratch.
  2435.  
  2436.  
  2437.      To start defining a database by patterning after an existing
  2438.      database:
  2439.  
  2440.      1.Choose New from the File menu.
  2441.  
  2442.      2.Choose Yes. The file selection dialog displays. See Chapter
  2443.        1, "Selecting a File" for more information on how to use a
  2444.        file selection dialog box.
  2445.  
  2446.      3.Choose the database to pattern after. The Define screen
  2447.        displays with the selected database's field characteristics
  2448.        filled in. Continue the definition process as described
  2449.        below.
  2450.  
  2451.  
  2452.  
  2453.      PC-File Version 7 Users Guide                             42
  2454.  
  2455.  
  2456.  
  2457.      The Define Screen
  2458.  
  2459.      After you answer the "pattern after" prompt, the Database
  2460.      Structure Screen appears.
  2461.  
  2462.      The Define screen consists of 5 columns of information: Field
  2463.      Number, Field Name, Type, Length, and Decimals. PC-File
  2464.      determines the field number and you enter the rest of the
  2465.      information for each field's definition.
  2466.  
  2467.      PC-File will start with one blank field definition line for
  2468.      you to enter information. A new field definition line is added
  2469.      whenever you advance below the last line in the Define screen,
  2470.      up to the maximum of 128 fields.
  2471.  
  2472.      The scroll bar to the right of the field definition lines is
  2473.      used to scroll the field list when defining more fields than
  2474.      will fit on the screen.
  2475.  
  2476.      The left end of the button bar of the Define screen has three
  2477.      buttons: Add, Insert, and Delete. These buttons can be used to
  2478.      edit your field list, if necessary.
  2479.  
  2480.      The OK button on the right end of the button bar lets you
  2481.      continue the definition process when you are done specifying
  2482.      all the field details on the Define Screen.
  2483.  
  2484.  
  2485.      Navigating in the Define Screen
  2486.  
  2487.      Once you start adding fields, PC-File displays as many field
  2488.      definition lines as will fit on the screen. If you define more
  2489.      fields than fit on the screen at once, you can scroll up and
  2490.      down to view additional lines.
  2491.  
  2492.      You can navigate within the field definition lines on the
  2493.      Define screen using either the keyboard or the mouse. Whenever
  2494.      you advance below the current definition line, a new line is
  2495.      created up to a maximum of 128 lines.
  2496.  
  2497.      Navigating with the Mouse in the Define Screen
  2498.  
  2499.      To move to a field element:
  2500.  
  2501.        Point to the desired field element and click the left mouse
  2502.        button. The cursor becomes active in the selected field
  2503.        element.
  2504.  
  2505.      To scroll one field line:
  2506.  
  2507.        Click on the up or down arrow on the scroll bar.
  2508.  
  2509.      To scroll one screen full of lines:
  2510.  
  2511.        Click above or below the scroll box.
  2512.  
  2513.  
  2514.  
  2515.      PC-File Version 7 Users Guide                             43
  2516.  
  2517.  
  2518.  
  2519.      Navigating with the Keyboard in the Define Screen
  2520.  
  2521.      To move to a field element:
  2522.  
  2523.        Press TAB and SHIFT-TAB or the ARROW keys to move between
  2524.        field elements.
  2525.  
  2526.      You can also advance to the next element by pressing ENTER.
  2527.      The UP and DOWN ARROWS are particularly useful when moving up
  2528.      and down in the list.
  2529.  
  2530.      To scroll one line:
  2531.  
  2532.        Press UP ARROW or DOWN ARROW.
  2533.  
  2534.      To scroll one screen full of lines:
  2535.  
  2536.        Press PAGE UP or PAGE DOWN.
  2537.  
  2538.      Entering a Field Name
  2539.  
  2540.      A field name can be no longer than 10 characters, and must
  2541.      start with a letter, and can only contain letters, digits, or
  2542.      the underscore character (_).
  2543.  
  2544.  
  2545.      To enter a field name:
  2546.  
  2547.      1.Move the cursor to the Field name column in the line you
  2548.        want to define.
  2549.  
  2550.      2.Type the field name.
  2551.  
  2552.      Choosing a Field Type
  2553.  
  2554.      To specify a field type:
  2555.  
  2556.      1.Click on Type button.
  2557.  
  2558.      2.Choose the field type.
  2559.  
  2560.      Or...
  2561.  
  2562.      1.Move the cursor to the Type column in the line you want to
  2563.        define.
  2564.  
  2565.      2.Type the letter for the field type you want to define:
  2566.        C=Character, N=Numeric, D=Date, L=Logical, and M=Memo.
  2567.  
  2568.      Defining a Field Length
  2569.  
  2570.      You can define the lengths for Character and Numeric fields
  2571.      within the limits described above under "Field Types." Other
  2572.      field types are pre- defined.
  2573.  
  2574.  
  2575.  
  2576.      PC-File Version 7 Users Guide                             44
  2577.  
  2578.  
  2579.  
  2580.      To define a field's length:
  2581.  
  2582.      1.Move the cursor to the Length column in the line you want to
  2583.        define.
  2584.  
  2585.      2.Type the number for the desired field length.
  2586.  
  2587.      Defining Decimal Places
  2588.  
  2589.      You can define the number of decimal places for numeric
  2590.      fields. The maximum number of decimal places you can define is
  2591.      two less than the total length of the field.
  2592.  
  2593.      To define the number of decimal places (for numeric fields
  2594.      only):
  2595.  
  2596.      1.Move the cursor to the Decimals column in the line you want
  2597.        to define.
  2598.  
  2599.      2.Type the number of decimal places.
  2600.  
  2601.      Inserting, Deleting, and Adding Field Lines
  2602.  
  2603.      After you have started specifying field details, you may need
  2604.      to edit your field list. The three tools buttons in the lower
  2605.      left corner of the Define screen allow you to edit your field
  2606.      definition list to insert or delete lines, and to add new
  2607.      lines at the end of the list.
  2608.  
  2609.      The Insert button allows you to insert a field definition line
  2610.      above the line the cursor is on. This allows you to add a
  2611.      field somewhere other than the end of the list, in the event
  2612.      that you forgot to define it when initially entering field
  2613.      definitions.
  2614.  
  2615.      The Delete button allows you delete the field definition line
  2616.      the cursor is currently on, if you decide that you don't need
  2617.      it or if you need to move its definition to a different
  2618.      location.
  2619.  
  2620.      The Add button allows you to add a blank field definition line
  2621.      to the end of the list. You can also add new definition lines
  2622.      by navigating with TAB or ENTER below the last definition
  2623.      line.
  2624.  
  2625.  
  2626.      To insert a new field definition line:
  2627.  
  2628.      1.Move the cursor to the line that you want to insert a field
  2629.        above.
  2630.  
  2631.      2.Choose the Insert button on the tool bar. A new field entry
  2632.        line is inserted above the cursor.
  2633.  
  2634.      To delete a field definition line:
  2635.  
  2636.  
  2637.  
  2638.      PC-File Version 7 Users Guide                             45
  2639.  
  2640.  
  2641.  
  2642.      1.Move the cursor to the field definition line you want to
  2643.        delete.
  2644.  
  2645.      2.Choose the Delete button on the tool bar.
  2646.  
  2647.      3.Choose Yes to delete the line. The current field definition
  2648.        line is deleted.
  2649.  
  2650.  
  2651.      To add a field definition line at the bottom:
  2652.  
  2653.      1.Choose the Add button on the tool bar. A new field
  2654.        definition line is added at the bottom of the define screen.
  2655.  
  2656.      Or...
  2657.  
  2658.      1.Navigate below the last line of the current definition. A
  2659.        new definition line is created for each line you advance.
  2660.  
  2661.      Moving Field Definition Lines
  2662.  
  2663.      To move a current field line to re-order fields, you must add
  2664.      or insert a new blank definition line at the location you want
  2665.      to move the field to, re-enter the definition at the new
  2666.      location, then delete the field from its old location.
  2667.  
  2668.      There is no way to cut, copy, or paste an entire field
  2669.      definition line in one operation to make this process simpler.
  2670.      However, you can cut, copy, or paste one element of a field
  2671.      definition at a time by highlighting it and then using the
  2672.      edit keys: SHIFT-DEL (to cut), CTRL- INS (to copy), or SHIFT-
  2673.      INS (to paste).
  2674.  
  2675.      NOTE: You can not copy or paste the field type letter. You
  2676.      must re- enter the field type using the Type button. Also, you
  2677.      cannot copy the Length for Date, Logical, and Memo fields,
  2678.      because their lengths are automatically supplied when you use
  2679.      the Type button.
  2680.  
  2681.      To move a field definition:
  2682.  
  2683.      1.Add or insert a blank line at the location you want to move
  2684.        the field to.
  2685.  
  2686.      2.Re-enter or copy and paste the "old" field definition to the
  2687.        new location.
  2688.  
  2689.      3.Delete the old field definition line.
  2690.  
  2691.  
  2692.      Naming the Database
  2693.  
  2694.  
  2695.  
  2696.      PC-File Version 7 Users Guide                             46
  2697.  
  2698.  
  2699.      Once you finish defining the database structure, choose OK to
  2700.      continue with the definition process. PC-File will prompt you
  2701.      to name your database. Give your database a name that
  2702.      describes its content and is easily identifiable to you and
  2703.      any other users. If you maintain several databases, it is
  2704.      helpful to use names that clearly indicate which is which.
  2705.  
  2706.      PC-File uses the database name to name several files that
  2707.      contain the data and structure of the database; therefore, you
  2708.      must follow DOS filename rules when naming the database. Use
  2709.      no more than eight characters in the name, using letters,
  2710.      numbers, and valid punctuation marks. You cannot use spaces.
  2711.      See your DOS manual for specifics. Each database within a
  2712.      directory must have a unique name.
  2713.  
  2714.  
  2715.      To name a database:
  2716.  
  2717.      1.Use the directory list box in the file selection dialog box
  2718.        to move to the drive and directory in which you want to
  2719.        locate the database. See the instructions in Chapter 1,
  2720.        "Navigating in PC-File," if you have questions about using
  2721.        the file selection dialog box.
  2722.  
  2723.      2.Enter the database name in the text box. You do not have to
  2724.        include a file extension.
  2725.  
  2726.      3.Choose OK when you finish.
  2727.  
  2728.      You can overwrite an existing database by giving a new
  2729.      database the same name. Be aware, though, that all data in the
  2730.      original database will be lost.
  2731.  
  2732.  
  2733.      Describing the Database
  2734.  
  2735.      After you finish naming your new database, PC-File will prompt
  2736.      you to enter a database description.
  2737.  
  2738.      The database description provides additional information about
  2739.      a database. It is displayed in the field selection dialog box
  2740.      when you highlight the database name, and in the title bar
  2741.      once the database is open. The description can be particularly
  2742.      useful when you have a number of databases that are similar
  2743.      and need more than the eight-character limit allowed in a
  2744.      database name to describe them clearly. However, the
  2745.      description is optional.
  2746.  
  2747.  
  2748.      To describe a database:
  2749.  
  2750.      1.Enter the description in the box when prompted by the
  2751.        program. The description can be up to 50 characters in
  2752.        length.
  2753.  
  2754.      2.Choose OK when you finish.
  2755.  
  2756.  
  2757.  
  2758.      PC-File Version 7 Users Guide                             47
  2759.  
  2760.  
  2761.  
  2762.      3.Choose OK to bypass the description if you choose not to
  2763.        enter one.
  2764.  
  2765.  
  2766.      Overview of Creating a Database Structure
  2767.  
  2768.      The following procedure provides an overview to bring together
  2769.      all of the elements of the database structure creation
  2770.      process.
  2771.  
  2772.      To create a Database Structure:
  2773.  
  2774.      1.Choose New from the File menu. The "Pattern After" dialog
  2775.        box displays.
  2776.  
  2777.      2.Choose whether to pattern after an existing database. See
  2778.        "Defining by Patterning After" for details on how to choose
  2779.        a database to pattern after. The Define Screen displays.
  2780.  
  2781.      3.Enter or edit the Field Names, Types, Lengths and Decimals
  2782.        for each field you want to define. Any field definition
  2783.        lines left blank will be ignored. Use the tool bar buttons
  2784.        to insert, delete or to add new field definition lines, if
  2785.        necessary.
  2786.  
  2787.      4.Choose OK when you have finished entering all of your field
  2788.        definitions. The file selection dialog box displays.
  2789.  
  2790.      5.Use the directory list box in the file to move to the drive
  2791.        and directory you want to save the database in.
  2792.  
  2793.      6.Type the database name in the text box. You do not have to
  2794.        include a file extension.
  2795.  
  2796.      7.Choose OK to continue. The database description dialog box
  2797.        displays.
  2798.  
  2799.      8.Type a description up to 50 characters long in the text box.
  2800.  
  2801.      9.Choose OK. An information box displays indicating additional
  2802.        database features you may want to define. See Chapter 4 for
  2803.        information on adding Field Attributes, and see Chapter 5
  2804.        for information on how to define custom Views.
  2805.  
  2806.      10.  Choose OK to clear the information box. The work area
  2807.        displays an empty record ready for you to start adding data.
  2808.  
  2809.  
  2810.  
  2811.      PC-File Version 7 Users Guide                             48
  2812.  
  2813.  
  2814.  
  2815.  
  2816.      CHAPTER 3 MODIFYING A DATABASE STRUCTURE
  2817.  
  2818.  
  2819.      This chapter explains how to redefine a database structure.
  2820.      Redefine a database to make any changes to the structure:
  2821.      adding, removing, or re- ordering fields; changing field
  2822.      types; and changing field lengths (and decimal places for
  2823.      numeric fields). You can also redefine a database to create a
  2824.      copy or a subset of the original database. Or you can redefine
  2825.      as a way of defining a new database starting from a current
  2826.      database's definition.
  2827.  
  2828.      What Does Redefine Mean?
  2829.  
  2830.      Once you have defined and used a database, you may find a need
  2831.      to change it. For example, you might decide to add a phone
  2832.      field to a database of names and addresses. Or you could
  2833.      discover that some addresses are longer than the space you
  2834.      allotted for them, and decide to lengthen the field.
  2835.  
  2836.      You can add fields and delete fields. You can add fields at
  2837.      the end of your existing fields, or you can insert them in the
  2838.      middle of your list of fields to keep your fields in a
  2839.      particular order.
  2840.  
  2841.      PC-File allows you to change each of the four elements of your
  2842.      database structure. These elements are the same as those used
  2843.      in creating a new database: field name, field type, length,
  2844.      and decimals. You can change the names of your fields with
  2845.      redefine. If it is appropriate, you can change the type of
  2846.      field you are using. You can increase or decrease the length
  2847.      of a field to accommodate your information. And you can add or
  2848.      shorten the amount of information to store after the decimal
  2849.      place for
  2850.      numeric fields.
  2851.  
  2852.      After you modify your structure, PC-File transfers all of your
  2853.      data into the new structure. Most commonly this is simply a
  2854.      matter of copying any data from "old" fields into the "new"
  2855.      fields-PC-File automatically matches the field names and
  2856.      transfers the data. However, it is also possible to split or
  2857.      join "old" fields during the transfer process using special
  2858.      procedures.
  2859.  
  2860.      You can change the database structure whether or not the
  2861.      database contains data. If there is data, you can also use
  2862.      Redefine to copy all or selected groups of records to new
  2863.      databases to produce new copies or subsets of the current
  2864.      database. You can also choose to copy none of the original
  2865.      database's records to produce an empty database.
  2866.  
  2867.  
  2868.  
  2869.      PC-File Version 7 Users Guide                             49
  2870.  
  2871.  
  2872.      NOTE: The Redefine option on the File menu ONLY changes the
  2873.      database structure, that is the specifics of the field
  2874.      definitions. To rearrange fields on the entry screen, you must
  2875.      use the Create option on the Views menu to create a custom
  2876.      view. Or, if you already have custom views, use the Modify
  2877.      option on the Views menu.
  2878.  
  2879.  
  2880.      Overview of Changes to Database Structure
  2881.  
  2882.      PC-File allows you to perform the following operations with
  2883.      Redefine:
  2884.  
  2885.        Add new fields by inserting or adding to end of list
  2886.        Delete any field from list
  2887.        Change field order (by deleting and re-inserting)
  2888.        Change field names
  2889.        Change field types
  2890.        Change field lengths (within the limitations of the field
  2891.        type)
  2892.        Change number decimal places in numeric fields
  2893.        Split or join field contents
  2894.        Create a new copy or subset of a database
  2895.  
  2896.      Each of these operations will be covered in more detail in the
  2897.      sections that follow.
  2898.  
  2899.      Internally, all these changes to the database require the
  2900.      creation of a new database data file (.DBF). However, for all
  2901.      operations except producing a subset or copy, you can retain
  2902.      the original database name when performing all redefine
  2903.      operations. You don't have to build a new database under a new
  2904.      name, delete the original, and rename the database as you did
  2905.      in previous versions of PC-File.
  2906.  
  2907.  
  2908.      Starting the Redefine Process
  2909.  
  2910.      You must open a database before you can redefine it; the
  2911.      Redefine option is grayed out otherwise. In addition, you can
  2912.      only redefine the open database. You can't make changes to one
  2913.      database from within another database.
  2914.  
  2915.      To start redefining a database:
  2916.  
  2917.      1.Open the database you want to redefine.
  2918.  
  2919.      2.Choose File from the menu bar.
  2920.  
  2921.      3.Choose Redefine from the File menu.
  2922.  
  2923.  
  2924.  
  2925.      PC-File Version 7 Users Guide                             50
  2926.  
  2927.  
  2928.      The Redefine screen functions exactly like the Define screen
  2929.      used to originally define the database structure except that
  2930.      it starts with the current database structure already
  2931.      displayed. You can easily move around the Redefine screen
  2932.      using either the mouse or the keyboard. See Chapter 2,
  2933.      "Navigating in the Define Screen"-the same procedures
  2934.      documented there work for navigating in the Redefine screen.
  2935.  
  2936.      The following sections describe the various operations you can
  2937.      perform on the Redefine screen, and how to complete the
  2938.      redefinition process.
  2939.  
  2940.  
  2941.      Changing Current Field Definitions
  2942.  
  2943.      You can change the four elements of the database structure on
  2944.      the Redefine screen:
  2945.  
  2946.        Field Name
  2947.        Type
  2948.        Length (for character and numeric fields)
  2949.        Decimals (for numeric fields)
  2950.  
  2951.      These are the same elements you define when you create a
  2952.      database structure from scratch. See Chapter 2, "Creating a
  2953.      New Database Structure" for more details on these elements. In
  2954.      particular, see the sections: "Entering a Field Name,"
  2955.      "Choosing a Field Type," "Defining a Field Length," and
  2956.      "Defining Decimal Places" for step-by-step procedures. Also
  2957.      see the sections "Maximum Record Size" and "Fields and Field
  2958.      Elements" for information about limitations on record size and
  2959.      field lengths, and for
  2960.      details on field types.
  2961.  
  2962.      Making changes to the structure is easy, just move the cursor
  2963.      to the element that you would like to change and edit or
  2964.      redefine it. For example, to change a field name from "FIRST"
  2965.      to "FIRSTNAME," simply move the cursor to the field name FIRST
  2966.      and type FIRSTNAME.
  2967.  
  2968.      To change a field element:
  2969.  
  2970.      1.Move the cursor to the element you want to change, e.g.
  2971.        field name, using the mouse or the keyboard.
  2972.  
  2973.      2.Edit or redefine the field element.
  2974.  
  2975.      NOTE: You can use the standard navigation and editing keys for
  2976.      all text boxes on the Redefine screen. See Chapter 1, "Editing
  2977.      Keys" for the specifics.
  2978.  
  2979.      3.Repeat steps 1 and 2 for all elements you want to change.
  2980.  
  2981.  
  2982.  
  2983.      PC-File Version 7 Users Guide                             51
  2984.  
  2985.  
  2986.      4.When you have completed all your changes, choose OK. Skip
  2987.        this step if you also need to insert, delete, add, or move
  2988.        fields. These procedures are described in the following
  2989.        sections.
  2990.  
  2991.      Inserting, Deleting, Adding, and Moving Fields
  2992.  
  2993.      The three tools buttons (Add, Insert, and Delete) on the left
  2994.      end of the button bar allow you to edit your field definition
  2995.      list.
  2996.  
  2997.      The Insert button allows you to insert a new field definition
  2998.      line above the line the cursor is on. This allows you to add a
  2999.      field somewhere other than the end of the list.
  3000.  
  3001.      The Delete button allows you delete the field definition line
  3002.      the cursor is currently on, to eliminate that field (or if you
  3003.      need to move its definition to a different location).
  3004.  
  3005.      The Add button allows you to add a blank field definition line
  3006.      to the end of the list. You can also add new definition lines
  3007.      by navigating below the last line with TAB, ENTER, or DOWN
  3008.      ARROW.
  3009.  
  3010.      To insert a field:
  3011.  
  3012.      1.Move the cursor to the line that you want to insert a field
  3013.        above.
  3014.  
  3015.      2.Choose the Insert button. A blank line is inserted above the
  3016.        line that was current in step 1 and the rest of the fields
  3017.        move down. The cursor is on the new blank line.
  3018.  
  3019.      3.Enter the definition for your new field.
  3020.  
  3021.      To delete a field:
  3022.  
  3023.      1.Move the cursor to the field definition line you want to
  3024.        delete.
  3025.  
  3026.      2.Choose the Delete button.
  3027.  
  3028.      3.Choose Yes. The line that was current in step 1 is removed
  3029.        and any following lines move up.
  3030.  
  3031.  
  3032.      To add a new field definition line at the bottom:
  3033.  
  3034.      1.Choose the Add button. A blank field definition is added at
  3035.        the bottom of the field list. The cursor is on the new blank
  3036.        line.
  3037.  
  3038.      2.Enter the definition for your new field.
  3039.  
  3040.      Or...
  3041.  
  3042.  
  3043.  
  3044.      PC-File Version 7 Users Guide                             52
  3045.  
  3046.  
  3047.      1.Navigate below the last line of the current definition using
  3048.        TAB, ENTER, or DOWN ARROW. A new definition line is created
  3049.        for each line you advance.
  3050.  
  3051.      2.Enter the definition for your new field.
  3052.  
  3053.      Moving Fields
  3054.  
  3055.      There are two "main" reasons you may need to change the field
  3056.      order:
  3057.  
  3058.        To improve the organization of your database
  3059.  
  3060.        All fields referenced in a field calculation must come
  3061.        before the field that contains the calculation for the
  3062.        calculation to work properly
  3063.  
  3064.      To move a current field line to re-order fields, you must add
  3065.      or insert a new blank definition line at the location you want
  3066.      to move the field to, re-enter the definition at the new
  3067.      location, then delete the field from its old location.
  3068.  
  3069.      There is no way to cut, copy, or paste an entire field
  3070.      definition line in one operation to make this process simpler.
  3071.      However, you can cut, copy, or paste one element of a field
  3072.      definition at a time by highlighting it and then using the
  3073.      edit keys: SHIFT-DEL (to cut), CTRL- INS (to copy), or SHIFT-
  3074.      INS (to paste).
  3075.  
  3076.      NOTE: You cannot copy or paste the field type letter. You must
  3077.      re-enter the field type using the Type button. Also, you
  3078.      cannot copy the Length for Date, Logical, and Memo fields,
  3079.      because their lengths are automatically supplied when you use
  3080.      the Type button.
  3081.  
  3082.      To move a field definition:
  3083.  
  3084.      1.Add or insert a blank line at the location you want to move
  3085.        the field to.
  3086.  
  3087.      2.Re-enter or copy and paste the "old" field definition to the
  3088.        new location.
  3089.  
  3090.      3.Delete the old field definition line.
  3091.  
  3092.  
  3093.      Mapping Field Data
  3094.  
  3095.      Once you finish making changes to the structure of your
  3096.      database as described above, PC-File gets ready to transfer
  3097.      the data from the original data file to a new data file. In
  3098.      doing so, PC-File must determine where the data for each field
  3099.      comes from. This process is called mapping.
  3100.  
  3101.      When you choose OK from the Redefine screen the Mapping screen
  3102.      displays.
  3103.  
  3104.  
  3105.  
  3106.      PC-File Version 7 Users Guide                             53
  3107.  
  3108.  
  3109.  
  3110.      The New Fields column shows the field names for the database
  3111.      that you have just created with the Redefine process. The
  3112.      Comes From column shows which fields from the original
  3113.      database are mapped to the fields in the New Fields column.
  3114.  
  3115.      PC-File automatically maps all field names that match. If you
  3116.      haven't changed any of your current field names, you will see
  3117.      same name in both the New Fields and the Comes From columns
  3118.      for each field. Any new fields you added in the Redefine
  3119.      process will be blank in the Comes From column. Generally, you
  3120.      don't need to map new fields because you will be entering data
  3121.      for them later. In most cases, since PC-File has done the
  3122.      mapping for you, you can simply choose OK to continue the
  3123.      redefine process.
  3124.  
  3125.      However, if you have changed a field name, PC-File will no
  3126.      longer recognize the field name and the Comes From column will
  3127.      be blank for that field-you must choose the data source for
  3128.      that field. For example, if you have changed a field name from
  3129.      FIRST to FIRSTNAME, you must tell PC-File that you want the
  3130.      information from the old FIRST field to be put into the new
  3131.      FIRSTNAME field.
  3132.  
  3133.      NOTE: If you rename many of your current fields and add
  3134.      several new fields or re-order fields, you should double-check
  3135.      to make sure that all fields are mapped properly. In this
  3136.      case, it may be less confusing to rename your current fields
  3137.      first using the Field Attributes option on the File menu. Then
  3138.      add the new fields or re-order using the Redefine option.
  3139.  
  3140.      There are two other reasons you may need to map your fields:
  3141.  
  3142.        To split portions of a current field into other fields
  3143.  
  3144.        To join two current fields into one
  3145.  
  3146.      You must type in special codes into the Comes From column to
  3147.      split or join fields.
  3148.  
  3149.      There are two ways to map your fields. You can select them by
  3150.      using the List button or by typing field names into the Comes
  3151.      From column directly.
  3152.  
  3153.      Selecting Fields Using the List Button
  3154.  
  3155.      If you changed the name of a field, you will need to map the
  3156.      old field to the new field. The List button provides a simple
  3157.      way to do this. Choosing the List button displays a list of
  3158.      the old field names on the right side of the Mapping screen.
  3159.  
  3160.  
  3161.  
  3162.      PC-File Version 7 Users Guide                             54
  3163.  
  3164.  
  3165.      The Old Field List Box shows all fields from your current
  3166.      database, including any fields that you deleted. All fields
  3167.      that have already been mapped by PC-File have a checkmark next
  3168.      to them. To map a field, put the cursor in the Comes From
  3169.      column next to the New Field you want to map. Then choose a
  3170.      field from the Old Field List. This inserts that field's name
  3171.      into the Comes From column.
  3172.  
  3173.      To map your fields with the List button:
  3174.  
  3175.      1.Highlight the box in the Comes From column next to the New
  3176.        Field name you want to map. The box should be empty.
  3177.  
  3178.      2.Choose the List button. The Old Fields List displays on the
  3179.        right-hand portion of the screen. The cursor is active in
  3180.        the list.
  3181.  
  3182.      3.Click on the field you want to map with the mouse, or
  3183.        navigate to the name of the field with the TAB key and press
  3184.        ENTER. The field name is inserted into the Comes From
  3185.        column.
  3186.  
  3187.      4.Repeat steps 1 through 3 for each field you want to map.
  3188.        When you have finished mapping your fields, choose OK to
  3189.        continue the redefine process.
  3190.  
  3191.      Selecting Fields by Typing Names
  3192.  
  3193.      Alternatively you can map fields by simply typing the name of
  3194.      the old field in the appropriate Comes From text box. This may
  3195.      be a faster method if you are only using the keyboard.
  3196.      However, you must type in the name exactly as it is saved in
  3197.      the database. You can press ALT-L to display the Old Field
  3198.      List for reference.
  3199.  
  3200.      To map your fields by typing the field names:
  3201.  
  3202.      1.Move the cursor to the box next to your new field name. The
  3203.        box should be empty.
  3204.  
  3205.      2.Type in the name of the field which will be mapped to your
  3206.        new field.
  3207.  
  3208.      3.Repeat steps 1 through 3 for each field you want to map.
  3209.        When you have finished mapping your fields, choose OK to
  3210.        continue the redefine process.
  3211.  
  3212.      Specifying a Portion of a Field
  3213.  
  3214.  
  3215.  
  3216.      PC-File Version 7 Users Guide                             55
  3217.  
  3218.  
  3219.      You can use the type in method to do more than simple mapping.
  3220.      You can use it to transfer a portion of a field using
  3221.      substring notation. Substring notation specifies the starting
  3222.      position, and length of the partial field. To use substring
  3223.      notation, type the name of the field followed by a comma, then
  3224.      type the number for the starting position, and another comma
  3225.      followed by the number of characters to transfer. For example,
  3226.      typing ZIPCODE,1,5 in the Comes From box transfers the first
  3227.      five characters of the field ZIPCODE. Likewise, typing
  3228.      ZIPCODE,7,4 transfers the last four characters starting from
  3229.      the seventh character in the field.
  3230.  
  3231.      Joining Two Fields
  3232.  
  3233.      You can also use the type in method to join two fields. To do
  3234.      so, type the field name, a semi-colon and the second field
  3235.      name. For example, type FIRSTNAME;LASTNAME to join the fields
  3236.      FIRSTNAME and LASTNAME.
  3237.  
  3238.      Saving Your Changes
  3239.  
  3240.      After you have mapped all your fields you are presented with
  3241.      the option to either update the current database or save the
  3242.      redefined database as a new file.
  3243.  
  3244.      Unless you want to make a new copy or subset of the current
  3245.      database, choose Update Current. If you choose Save As, the
  3246.      original database is not modified, and your changes will be
  3247.      saved to a new database file.
  3248.  
  3249.      Updating the Current Database
  3250.  
  3251.      If you choose Update Current at the Save Changes dialog, PC-
  3252.      File performs the update and takes you back to the menu bar.
  3253.      You are finished with the redefining operation.
  3254.  
  3255.      When updating the current database, PC-File needs to write a
  3256.      new copy of the data file. PC-File renames the original
  3257.      database file as a backup using this format:
  3258.  
  3259.           TMPnn.DBF
  3260.  
  3261.      where "nn" is a unique number. PC-File does this as a security
  3262.      measure: If you made a mistake or if something were to go
  3263.      wrong during the Redefine process, you can reclaim your
  3264.      original database by opening the TMPnn.DBF file.
  3265.  
  3266.      After PC-File creates the TMPnn backup file, it then creates
  3267.      the updated database using the original name including all
  3268.      your current records.
  3269.  
  3270.  
  3271.  
  3272.      PC-File Version 7 Users Guide                             56
  3273.  
  3274.  
  3275.      PC-File displays an information screen at the end of the
  3276.      updating process telling you what TMPnn name was used for the
  3277.      backup of the database files. You may want to write down the
  3278.      TMPnn file name at this point, in case you need it in the
  3279.      future. Once you are certain the Redefine operation was
  3280.      successful, you can delete the TMPnn file using the File
  3281.      Maintenance option on the Utilities menu.
  3282.  
  3283.      NOTE: If you want to copy only a selected group of records,
  3284.      you must use the Save As option. Use a new database name or
  3285.      use the same name making sure to write the redefined database
  3286.      to a different drive or directory than the original database.
  3287.  
  3288.      To update the current database:
  3289.  
  3290.      1.At the Save Changes dialog box, choose Update Current. A
  3291.        status window with a bar graph showing the rate of progress
  3292.        displays in the lower right corner. When all records have
  3293.        been transferred, an information box displays showing the
  3294.        TMPnn name for the backup of the original database.
  3295.  
  3296.      2.Choose OK to clear the information box. The redefine
  3297.        operation is complete and you are returned to the redefined
  3298.        database.
  3299.  
  3300.      Saving Changes as a New Database
  3301.  
  3302.      If you choose Save As at the Save Changes dialog box, PC-File
  3303.      first prompts you to to name and describe the new database
  3304.      file, then you choose which records you want to transfer. This
  3305.      will save the redefined database as a new file, leaving the
  3306.      original database the way it was when you started the
  3307.      redefinition process.
  3308.  
  3309.      PC-File may take some time to generate the new file after you
  3310.      choose which records to transfer. This will depend on the size
  3311.      of the database, how you select which records to copy, and the
  3312.      speed of your system. A status window with a bar graph shows
  3313.      the rate of progress.
  3314.  
  3315.      Naming the New Database
  3316.  
  3317.      Naming the new database is the first step in the Save As
  3318.      process. After you choose Save As, PC-File displays the file
  3319.      selection dialog box.
  3320.  
  3321.      When the file selection dialog box displays, you can either:
  3322.  
  3323.        Give the database a new name and save in the current
  3324.        directory
  3325.  
  3326.        Change the drive or directory using the Directories list
  3327.        box, and then save the new database with the original name
  3328.        or a new name
  3329.  
  3330.  
  3331.  
  3332.      PC-File Version 7 Users Guide                             57
  3333.  
  3334.  
  3335.      Enter the name of the new database in the text box of the file
  3336.      selection dialog box.
  3337.  
  3338.      Describing the New Database
  3339.  
  3340.      Once you have chosen the name and location for the new
  3341.      database, PC- File prompts you to enter a description. If the
  3342.      database being redefined had a description, it appears as the
  3343.      default. You can use the same description or enter a new one.
  3344.      The description is optional. Descriptions can be up to 50
  3345.      characters in length.
  3346.  
  3347.      Transferring Records
  3348.  
  3349.      After naming and describing the new file, PC-File asks you
  3350.      whether you want to transfer all, some, or none of the current
  3351.      records to the new file.
  3352.  
  3353.      Choose All to either transfer all the records or select which
  3354.      records to transfer one at a time.
  3355.  
  3356.      Choose Some to conduct a search to determine what records to
  3357.      transfer. (See Chapter 7, "Finding and Modifying Data," if you
  3358.      have questions about how to conduct a search.) Conducting a
  3359.      search lets you create a subset of your old database. For
  3360.      example, you could define a database containing records for
  3361.      just one year, eliminating records from previous years. Or you
  3362.      could select sales reps from just one area, setting up a
  3363.      separate database for that region.
  3364.  
  3365.      Choose None to create a new empty database-no records are
  3366.      transferred from the previous database and the redefinition
  3367.      process is finished.
  3368.  
  3369.      Approving Records
  3370.  
  3371.      After choosing All or Some, PC-File displays the first record
  3372.      to transfer overlaid with the Record approval dialog box.
  3373.  
  3374.      Choosing All clears the Record approval dialog box and
  3375.      transfers all or some records depending on the choice you made
  3376.      at the Transfer Which Records dialog box.
  3377.  
  3378.      Choosing Yes, transfers that one record and displays the next
  3379.      one with the Record approval dialog box. Choosing No skips the
  3380.      current record and displays the next one with the Record
  3381.      approval dialog box. You can continue in this fashion to
  3382.      approve records to transfer one at a time until no records
  3383.      remain to display. At any point in the record approval process
  3384.      you can choose All to stop approving records and transfer all
  3385.      remaining records. Choose Quit to stop approving records and
  3386.      complete the
  3387.      redefinition.
  3388.  
  3389.      To save the redefined database as a new file:
  3390.  
  3391.  
  3392.  
  3393.      PC-File Version 7 Users Guide                             58
  3394.  
  3395.  
  3396.      1.At the Save Changes dialog box, choose Save As. The Save As
  3397.        file selection dialog box displays.
  3398.  
  3399.      2.If you want to save the database in a new location, change
  3400.        the drive and directory with the Directories list box,
  3401.        otherwise skip this step.
  3402.  
  3403.      3.Type the new name in the text box.
  3404.  
  3405.      4.Choose OK.  The Database Description dialog box displays.
  3406.  
  3407.      5.Enter a file description up to 50 characters long.
  3408.  
  3409.      6.   Choose OK.
  3410.      The Transfer Which Records dialog box displays.
  3411.  
  3412.      7.Choose whether to transfer All, Some, or None of the current
  3413.        records. If you choose None, the new database is copied to
  3414.        the new name and the redefinition process is completed.
  3415.  
  3416.      8.If you chose Some, the Type of Search dialog displays.
  3417.        Choose the type of search and enter your search criteria.
  3418.        See Chapter 7, "Conducting a Search" for details on how to
  3419.        enter a search. Otherwise, skip this step.  The first record
  3420.        is displayed with the Record Approval dialog box.
  3421.  
  3422.      9.Choose All to transfer all records without interruption. To
  3423.        approve records one at a time: Choose Yes to accept a
  3424.        record; Choose No to skip a record; Choose Quit to stop the
  3425.        approval process.
  3426.  
  3427.      If you chose All in step 9, a status bar graph displays
  3428.      showing the rate of progress.
  3429.  
  3430.      When all records are transferred the redefinition is complete.
  3431.      If you use the Record Approval dialog to approve records one
  3432.      at a time, the redefinition process is completed when you run
  3433.      out of records to choose from, or if you choose Quit.
  3434.  
  3435.      Rebuilding Indexes
  3436.  
  3437.      If you defined any indexes for your database before beginning
  3438.      the redefine process, PC-File will ask if you want to rebuild
  3439.      the indexes after it has finished saving the data you selected
  3440.      to the new database structure. See Chapter 8, "Indexing Data"
  3441.      for more details.
  3442.  
  3443.      Choose No if you do not want the new database to have the same
  3444.      indexes as the original database.
  3445.  
  3446.      If you have a large database with several indexes, it could
  3447.      take a long time to rebuild them all, or you may not have the
  3448.      time right now to rebuild them. If you choose No, you can make
  3449.      indexes for you database at any time later.
  3450.  
  3451.  
  3452.  
  3453.      PC-File Version 7 Users Guide                             59
  3454.  
  3455.  
  3456.      Choose Yes if you want PC-File to rebuild all the indexes the
  3457.      original databases had.
  3458.  
  3459.      Rebuilding all the indexes may take a long time if you have a
  3460.      very large database and several indexes. PC-File will attempt
  3461.      to rebuild all the indexes for your database, but it may not
  3462.      be able to. If you made any changes to fields included in any
  3463.      of the index definitions, PC- File will tell you which indexes
  3464.      it was unable to rebuild.
  3465.  
  3466.  
  3467.  
  3468.      PC-File Version 7 Users Guide                             60
  3469.  
  3470.  
  3471.      Overview of Procedures for Redefining
  3472.  
  3473.      The following procedure presents an overview of the entire
  3474.      redefinition process from start to finish.
  3475.  
  3476.  
  3477.      To redefine a database:
  3478.  
  3479.      Open the database you want to redefine.
  3480.  
  3481.      1.Choose Redefine from the File menu. The Redefine screen
  3482.        displays.
  3483.  
  3484.      2.Make the desired changes to the field list. See the sections
  3485.        "Changing Current Field Definitions" and "Inserting,
  3486.        Deleting, Adding, and Moving Fields" for details.
  3487.  
  3488.      3.Choose OK when you have made all the changes you want to
  3489.        make to the field list. The Mapping screen displays.
  3490.  
  3491.      4.Map fields if necessary (see "Mapping Field Data" for
  3492.        details), otherwise choose OK to continue.
  3493.  
  3494.      5.Choose whether to Update or Save As. If you choose Update,
  3495.        the Status window displays to show the rate of progress. If
  3496.        you choose Save As, you must name and describe the new
  3497.        database, and then specify which records to transfer. See
  3498.        "Saving Changes as a New Database" for details.
  3499.  
  3500.      6.Choose Yes to rebuild indexes, or No to omit the current
  3501.        indexes.
  3502.  
  3503.      The Redefine process is finished.
  3504.  
  3505.  
  3506.      How Redefining Affects Other Database Characteristics
  3507.  
  3508.      Redefining only changes the characteristics of your data file
  3509.      (databasename.DBF), but there are many other areas of your
  3510.      database which may be affected by the changes you made. PC-
  3511.      File lets you define many additional attributes and
  3512.      characteristics about your database and fields including
  3513.  
  3514.        Field Attributes
  3515.  
  3516.        Custom Views
  3517.  
  3518.        Indexes
  3519.  
  3520.        Reports, Letters & Graphs
  3521.  
  3522.        Macro definitions
  3523.  
  3524.        Batch Posting definitions
  3525.  
  3526.  
  3527.  
  3528.      PC-File Version 7 Users Guide                             61
  3529.  
  3530.  
  3531.      These features are optional, so you might have defined only a
  3532.      few or none at all. You may not need to update any of these
  3533.      features, or you may need to update all of them-it all depends
  3534.      on the extent of the changes you made to the database
  3535.      structure. Each section below describes briefly how to know if
  3536.      you need to make additional changes.
  3537.  
  3538.      Changes to Field Attributes
  3539.  
  3540.      PC-File lets you define field attributes which control and
  3541.      automate what happens in each field. See Chapter 4, "Field
  3542.      Attributes" for more details.
  3543.  
  3544.      What to check:
  3545.  
  3546.        If you changed any field names, those field's attributes are
  3547.        retained as long as they have been properly mapped to the
  3548.        new database's field names.
  3549.  
  3550.        If you added new fields to your database structure, you may
  3551.        want to define new field attributes for them.
  3552.  
  3553.        If you deleted any fields or changed any existing field
  3554.        names when you redefined, you may also need to update
  3555.        calculation and relational lookup attributes. Additionally,
  3556.        if you have any other databases which do relational lookups
  3557.        on the database you redefined, you may need to update those
  3558.        databases' relational lookup attributes if they referenced
  3559.        any deleted field or fields whose names you changed.
  3560.  
  3561.      Changes to Custom Views
  3562.  
  3563.      PC-File lets you define additional "views" to display your
  3564.      data in different ways. See Chapter 5, "Views" for more
  3565.      details.
  3566.  
  3567.      Redefining retains any custom views you defined for the
  3568.      original database. However, because you can delete and rename
  3569.      fields when redefining, pre-existing custom views that
  3570.      contained those fields will be affected.
  3571.  
  3572.      What to check:
  3573.  
  3574.  
  3575.        Deleted fields are removed from all custom views
  3576.  
  3577.        Renamed fields will remain in the view as long as they have
  3578.        been properly mapped to the new database's field names.
  3579.  
  3580.        New fields will not appear in any of your custom views. If
  3581.        you want your new field(s) to appear in any your custom
  3582.        views you must modify the views to add the new field(s).
  3583.  
  3584.      The two Default views always reflect the current database
  3585.      structure, so they will automatically reflect any changes you
  3586.      make during when redefining.
  3587.  
  3588.  
  3589.  
  3590.      PC-File Version 7 Users Guide                             62
  3591.  
  3592.  
  3593.  
  3594.      Changes to Indexes
  3595.  
  3596.      PC-File lets you define indexes which allow you to customize
  3597.      the order your records are displayed in. See Chapter 8,
  3598.      "Indexing Data" for more details.
  3599.  
  3600.      If you defined any indexes for your database prior to
  3601.      redefining the structure, PC-File asks you if you want to
  3602.      rebuild the database's indexes. If you answer Yes, PC-File
  3603.      will attempt to rebuild all the indexes you had defined.
  3604.  
  3605.      Index definitions are dependent on field names, field types
  3606.      and field lengths. Deleting fields or changing field names,
  3607.      lengths, or types can cause indexes to become invalid.
  3608.  
  3609.      What to check:
  3610.  
  3611.        If an index contains a reference to field that has been
  3612.        deleted or modified in any way, PC-File will tell you it was
  3613.        unable to build the index. You may want to remake any
  3614.        indexes PC-File was unable to rebuild.
  3615.  
  3616.      Changes to Reports, Letters & Graphs
  3617.  
  3618.      Printing Reports, Letters and Graphs are some of PC-File's
  3619.      useful features. See Chapter 9, "Creating Reports," Chapter
  3620.      10, "Writing Letters," and Chapter 12 "Creating Graphs," for
  3621.      more details.
  3622.  
  3623.      Because any number of databases might be able to use the same
  3624.      reports, letters and graphs, PC-File will not attempt to make
  3625.      any changes to them when you redefine a database structure.
  3626.  
  3627.      What to check:
  3628.  
  3629.        If you deleted fields, or changed fields names, lengths or
  3630.        types, you must update any reports, letters and graphs used
  3631.        with that database to reflect those changes.
  3632.  
  3633.      Changes to Macro Definitions
  3634.  
  3635.      Macros allow you to simplify complicated or repetitive tasks
  3636.      by recording the keystrokes so you can play them back at any
  3637.      time. See Chapter 16, "Using Macros" for more details.
  3638.  
  3639.      Because you can record nearly any task in PC-File into a
  3640.      macro, it is almost impossible to list everything you should
  3641.      look at after having made changes to the database structure.
  3642.      Below is a list of the most common changes that will disrupt
  3643.      macros.
  3644.  
  3645.      What to check:
  3646.  
  3647.  
  3648.  
  3649.      PC-File Version 7 Users Guide                             63
  3650.  
  3651.  
  3652.        If any of your macro reference a field name and you changed
  3653.        that field's name, you will need to modify the macro to
  3654.        reflect the new name.
  3655.  
  3656.        If any of your macros are designed specifically to navigate
  3657.        to certain fields in a view and that view has changed
  3658.        because you deleted fields, you may need to modify the
  3659.        macro.
  3660.  
  3661.        If any of your macros reference a database name and you
  3662.        saved the redefined database structure to a new name, you
  3663.        will need to modify the macro to reflect the new name.
  3664.  
  3665.      Changes to Batch Posting Definitions
  3666.  
  3667.      PC-File's Batch Posting feature allows you to update
  3668.      information in other databases with information in the current
  3669.      database. See Chapter 18, "Batch Posting" for more details.
  3670.  
  3671.      What to check:
  3672.  
  3673.        If you have any databases that perform batch posting on the
  3674.        database you redefined, those databases' post definitions
  3675.        must be updated if they referenced fields you deleted or
  3676.        fields whose names you changed.
  3677.  
  3678.  
  3679.  
  3680.      PC-File Version 7 Users Guide                             64
  3681.  
  3682.  
  3683.  
  3684.  
  3685.      Chapter 4 FIELD ATTRIBUTES
  3686.  
  3687.      PC-File's field attributes let you control and automate what
  3688.      happens in each field. Field attributes can: supply automatic
  3689.      data, such as calculations; perform certain kinds of
  3690.      validation, such as defining the range of allowed values;
  3691.      control date, and character formatting; and can restrict when
  3692.      a field can be edited. Field attributes can be combined and
  3693.      applied selectively for each field. This chapter tells you how
  3694.      to define, modify, and delete field attributes.
  3695.  
  3696.      What are Field Attributes?
  3697.  
  3698.      PC-File's field attributes control what happens in a field in
  3699.      addition to the restrictions placed by a field's type. Field
  3700.      attributes fall under four basic categories based on how they
  3701.      affect the field: Automatic Data, Validation, Formatting, and
  3702.      Data Restriction.
  3703.  
  3704.      Automatic Data field attributes automatically supply data to a
  3705.      field from several different sources:
  3706.  
  3707.        Automatic Date-from the system date
  3708.  
  3709.        Automatic Time-from the system time
  3710.  
  3711.        Serial Number-supplies an automatically incrementing serial
  3712.        number
  3713.  
  3714.        Calculation-from a calculation based on other field's values
  3715.  
  3716.        Relational Lookup-retrieves data from other databases
  3717.  
  3718.        Default Text-from default text you define
  3719.  
  3720.        Automatic Dupe-by duplicating field data from the previous
  3721.        record
  3722.  
  3723.        Validation field attributes confirm that data has been
  3724.        correctly entered:
  3725.  
  3726.        Must Answer-confirms that something was entered
  3727.  
  3728.        Validate Range-confirms that the data entered falls within a
  3729.        defined range
  3730.  
  3731.      Formatting field attributes control formatting:
  3732.  
  3733.        Date Format-defines the display format for date-type fields
  3734.  
  3735.        Case Force-converts entered characters to either: upper-,
  3736.        lower-, or mixed case
  3737.  
  3738.      Data Restriction field attributes control what can be entered:
  3739.  
  3740.  
  3741.  
  3742.      PC-File Version 7 Users Guide                             65
  3743.  
  3744.  
  3745.  
  3746.        Not Editable-controls whether a field can be edited
  3747.  
  3748.        Character Restriction-controls which characters can be
  3749.        entered
  3750.  
  3751.      Each of these field attributes and how to assign them are
  3752.      discussed below.
  3753.  
  3754.      When Are Field Attributes Applied?
  3755.  
  3756.      You can control when PC-File applies Automatic Data
  3757.      attributes. For example, you can have an Automatic Date
  3758.      attribute supply the system date only when a record is first
  3759.      added. See the discussion under "When are Automatic Data
  3760.      Attributes Applied?" for more details.
  3761.  
  3762.      All other field attributes, except Not Editable, are applied
  3763.      at all times.
  3764.  
  3765.      How Many Field Attributes Per Field?
  3766.  
  3767.      To provide the greatest flexibility, PC-File lets you assign
  3768.      any number of field attributes per field. For example, for the
  3769.      same field you may assign Character Restriction to allow only
  3770.      certain characters to be entered, and assign Validate Range to
  3771.      define a range of allowed values, and assign Must Answer to
  3772.      make sure that something is always entered in the field.
  3773.  
  3774.      However, this means that it is possible to assign conflicting
  3775.      attributes to the same field. For example, PC-File will not
  3776.      prevent you from assigning both Automatic Date and Automatic
  3777.      Time attributes to the same field-the attribute assigned last
  3778.      would overwrite the other. Another example: PC-File will not
  3779.      prevent you from assigning Validate Range to limit the allowed
  3780.      range of values and then adding a Calculation that produces a
  3781.      result outside of the specified range. If you are assigning
  3782.      more
  3783.      than one attribute to a field, be careful not to assign
  3784.      attributes that will conflict with each other.
  3785.  
  3786.      Except for Calculation, Relational Lookup, and Default Data
  3787.      attributes, PC-File does prevent you from assigning more than
  3788.      one of the same attribute to a field.
  3789.  
  3790.      The Field Attribute Definition Process
  3791.  
  3792.      To start the Field Attribute definition process with the
  3793.      database you want to work with must be open. Then, choosing
  3794.      the Field Attribute option on the File menu displays a Field
  3795.      Selection dialog box.
  3796.  
  3797.      The Field Selection dialog box lets you choose which field you
  3798.      want to work with from the list. Once you choose a field, the
  3799.      Atrribute dialog box displays.
  3800.  
  3801.  
  3802.  
  3803.      PC-File Version 7 Users Guide                             66
  3804.  
  3805.  
  3806.      The Name text box at the top of the box lets you edit and
  3807.      change the field's name. The Available Attributes list on the
  3808.      left side shows all the field attributes you can work with.
  3809.      The Current Attributes list shows all attributes that are
  3810.      defined for the field. You can perform as many field attribute
  3811.      operations on the field as you want: add, delete, or modify
  3812.      one or more field attributes. Choosing OK returns you to the
  3813.      Field Attribute field selection dialog box to let you work
  3814.      with another
  3815.      field.
  3816.  
  3817.  
  3818.      To start working with field attributes:
  3819.  
  3820.      1.Open the database you want to work with.
  3821.  
  3822.      2.Choose Field Attribute from the File menu. The Field Section
  3823.        dialog box displays.
  3824.  
  3825.      3.Choose the field you want to work with. The Field Attribute
  3826.        Definition dialog box displays.
  3827.  
  3828.      4.Continue the Field Attribute definition process as described
  3829.        below.
  3830.  
  3831.      Adding a Field Attribute
  3832.  
  3833.      Once you have the Field Attribute Definition dialog box for
  3834.      the desired field displayed, you can add Field Attributes. The
  3835.      following procedure outlines the basic steps for adding an
  3836.      attribute. See the section for each attribute type later in
  3837.      this chapter for full details.
  3838.  
  3839.  
  3840.      To add a field attribute:
  3841.  
  3842.      1.Select the attribute you want to assign from the Available
  3843.        Attributes list.
  3844.  
  3845.      2.Choose the Add button. The dialog for the selected attribute
  3846.        displays. See the appropriate section later in this chapter
  3847.        for full details on each attribute.
  3848.  
  3849.      3.Choose OK when you are finished defining the attribute. You
  3850.        are returned to the Field Attribute Definition dialog box.
  3851.  
  3852.      Deleting a Field Attribute
  3853.  
  3854.      You can easily delete field attributes once you have the Field
  3855.      Attribute Definition dialog box displayed.
  3856.  
  3857.      To delete a field attribute:
  3858.  
  3859.      1.Select the attribute you want to delete from the Current
  3860.        Attributes list box.
  3861.  
  3862.  
  3863.  
  3864.      PC-File Version 7 Users Guide                             67
  3865.  
  3866.  
  3867.      2.Choose the Delete button. A confirmation dialog box
  3868.        displays.
  3869.  
  3870.      3.Choose Yes to delete the selected attribute.
  3871.  
  3872.      Modifying a Field Attribute
  3873.  
  3874.      Once you have assigned a field attribute, you may find you
  3875.      need to modify its definition. The following procedure
  3876.      outlines the basic steps for modifying an attribute. See the
  3877.      appropriate section later in this chapter for the full details
  3878.      on each attribute type.
  3879.  
  3880.      To modify a field attribute:
  3881.  
  3882.      1.Select the attribute you want to modify from the Current
  3883.        Attributes list box.
  3884.  
  3885.      2.Choose the Modify button. The appropriate dialog box for the
  3886.        selected field attribute displays. See the appropriate
  3887.        section later in this chapter for full details on the
  3888.        attribute you are working with.
  3889.  
  3890.      3.Choose OK when you are finished modifying the attribute.
  3891.  
  3892.      Completing the Field Attribute Definition Process
  3893.  
  3894.      You can perform any number of field attribute operations using
  3895.      the Field Attribute Definition dialog box. Once you are
  3896.      finished working with the field, choosing OK on the Field
  3897.      Attribute Definition dialog box returns you to the Field
  3898.      Section dialog box. You can choose to work with another field
  3899.      or choose OK on the Field Selection dialog box to return to
  3900.      the work area.
  3901.  
  3902.      Details on how to define each field attribute are covered in
  3903.      the following sections.
  3904.  
  3905.      Defining Automatic Data Attributes
  3906.  
  3907.      PC-File allows you to set up seven different types of
  3908.      automatic data attributes:
  3909.  
  3910.        Automatic Date
  3911.        Automatic Time
  3912.        Automatic Duplication
  3913.        Calculations
  3914.        Default Text
  3915.        Relational Lookups
  3916.        Serial Numbers
  3917.  
  3918.      Each of these options is described in detail later in this
  3919.      section.
  3920.  
  3921.      When are Automatic Data Attributes Applied?
  3922.  
  3923.  
  3924.  
  3925.      PC-File Version 7 Users Guide                             68
  3926.  
  3927.  
  3928.      Automatic Data attributes generate their data at a time that
  3929.      you specify. PC-File controls when an Automatic Data attribute
  3930.      generates its output three ways.
  3931.  
  3932.      You can determine if the attribute is applied:
  3933.  
  3934.        When adding records, when modifying records, or both
  3935.  
  3936.        When you begin editing the record, or when you exit the
  3937.        record
  3938.  
  3939.        Only when the field is empty, not empty, or at all times
  3940.  
  3941.      When you add or modify an Automatic Data attribute, a dialog
  3942.      box is displayed.
  3943.  
  3944.      There may be differences in the dialog box depending on what
  3945.      kind of Automatic Data attribute you are defining, but all
  3946.      dialog boxes have these three sets of options. In most cases,
  3947.      you can choose the default choices that PC-File provides.
  3948.      However, you may want to modify the options for different
  3949.      purposes. How each group of options affects Automatic Data
  3950.      attributes is described below.
  3951.  
  3952.      During Which Operations
  3953.  
  3954.      The When Adding Records and When Modifying Records check boxes
  3955.      determine whether the attribute is applied only when you add
  3956.      records, only when you modify records, or both.
  3957.  
  3958.      For example, you might want to assign an Automatic Date
  3959.      attribute to the ENTER_DATE field in an invoicing database.
  3960.      Turn on the When Adding Records check box to specify that the
  3961.      Automatic Date is only supplied when adding a record. Also,
  3962.      make sure that the When Modifying Records check box is turned
  3963.      off. Then each time you add a new record (invoice), PC-File
  3964.      automatically puts today's date in ENTER_DATE for you.
  3965.  
  3966.      Similarly, you might put an Automatic Date attribute in a
  3967.      MODIFYDATE field to track when a record was last modified.
  3968.      Turn on the When Modifying Records check box and make sure the
  3969.      When Adding Records check box is turned off to apply the
  3970.      attribute only when the record is modified.
  3971.  
  3972.      You can turn on both check boxes to apply an attribute when
  3973.      both adding and modifying records. Also, if you want to
  3974.      temporarily disable an attribute without having to delete and
  3975.      re-enter it, you can turn off both When Adding and When
  3976.      Modifying check boxes.
  3977.  
  3978.      At What Time During the Operation
  3979.  
  3980.      The When You Begin Editing and When You Exit The Record option
  3981.      buttons control at what time the attribute is applied while
  3982.      you are editing a record.
  3983.  
  3984.  
  3985.  
  3986.      PC-File Version 7 Users Guide                             69
  3987.  
  3988.  
  3989.      The When You Begin Editing option behaves slightly differently
  3990.      depending on whether the attribute is being applied when
  3991.      adding or modifying a record. When adding, this option causes
  3992.      the automatic data to be supplied as soon as you start adding
  3993.      a record-the output of this attribute will be visible as soon
  3994.      as you choose to add a record. When modifying, this option
  3995.      causes the automatic data to be supplied as soon as you access
  3996.      any field in a record and start typing.
  3997.  
  3998.      Typically, the When You Begin Editing option is used for
  3999.      information you want to show at the start of an editing
  4000.      session. Automatic Date, Automatic Time, Automatic
  4001.      Duplication, Default Text, and Serial Number would typically
  4002.      be set with the When You Begin Editing option.
  4003.  
  4004.      The When You Exit The Record option causes the automatic data
  4005.      to be supplied as soon as you are finished working with a
  4006.      record. This is typically used for the two Automatic Data
  4007.      attributes that depend on information from other fields:
  4008.      Calculations and Relational Lookups.
  4009.  
  4010.      Apply When Empty or Not Empty
  4011.  
  4012.      The Empty and Always option buttons control whether you can
  4013.      override an Automatic Data attribute when entering data.
  4014.  
  4015.      For example, if you choose the Always option button and both
  4016.      When Adding and When Modifying from the During Which
  4017.      Operations options, you cannot ever enter your own data into
  4018.      the field-the automatic data will replace anything you enter.
  4019.      However, when the attribute is set to perform only if the
  4020.      field is empty, if you type something to replace the automatic
  4021.      data, PC-File will not replace your entry.
  4022.  
  4023.      The Not Empty option button causes the Automatic Data
  4024.      attribute to perform only when there is something in the
  4025.      field. You can use this option to trigger the Automatic Data
  4026.      attribute whenever you enter something into the field.
  4027.  
  4028.      Automatic Date
  4029.  
  4030.      PC-File allows you to add a field attribute that automatically
  4031.      puts today's date in the field. PC-File gets this date from
  4032.      your computer's system date. You can use this attribute in
  4033.      Date, Character, and Memo type fields. Use the When to Apply
  4034.      options to determine when to generate the date.
  4035.  
  4036.      To add an automatic date attribute:
  4037.  
  4038.      1.With a database open, choose Field Attributes from the File
  4039.        menu. The Field selection dialog box displays.
  4040.  
  4041.      2.Choose the field to add the automatic date attribute to. The
  4042.        Field Attributes dialog box displays.
  4043.  
  4044.      3.Select Automatic Date from the Available Attributes list.
  4045.  
  4046.  
  4047.  
  4048.      PC-File Version 7 Users Guide                             70
  4049.  
  4050.  
  4051.  
  4052.      4.Choose Add to add the attribute. The Automatic Date dialog
  4053.        box displays with When to Apply options.
  4054.  
  4055.      5.Select when to apply the automatic date.
  4056.  
  4057.      NOTE: Selecting when to apply an automatic field attribute can
  4058.      be daunting. See the section, "When are Automatic Field
  4059.      Attributes Applied," for a detailed explanation. For example,
  4060.      you may want to have the date supplied automatically only when
  4061.      you add a record. Optionally, you may want to apply the date
  4062.      when you modify a record to see when you last updated it.
  4063.  
  4064.      6.Choose OK to apply this attribute to the field.
  4065.  
  4066.      Automatic Duplication
  4067.  
  4068.      Automatic Duplication is similar to adding Default Text to a
  4069.      field. However, while Default Text always inserts the same
  4070.      data in a field, Automatic Duplication inserts whatever data
  4071.      appeared in the same field in the previously viewed record. In
  4072.      either case, you can type over the current information. This
  4073.      attribute makes entering a series of records with the same
  4074.      data simpler. For example, you could use a duplication mask
  4075.      for a STATE field in which you entered all the WA addresses
  4076.      first, then
  4077.      moved on to the OR addresses, and from there to the CA
  4078.      addresses and so on.
  4079.  
  4080.      To add an automatic duplication attribute:
  4081.  
  4082.      1.With a database open, choose Field Attributes from the File
  4083.        menu. The Field Selection dialog box displays.
  4084.  
  4085.      2.Choose the field for Automatic Duplication. The Field
  4086.        Attributes dialog box displays.
  4087.  
  4088.      3.Select Automatic Dupe from the Available Attributes list
  4089.        box.
  4090.  
  4091.      4.Choose Add. The Automatic Duplication dialog box with When
  4092.        to Apply options displays.
  4093.  
  4094.      5.Select when to apply.
  4095.  
  4096.      6.Choose OK to apply this attribute to the field.
  4097.  
  4098.      Automatic Time
  4099.  
  4100.      PC-File allows you to add a field attribute that automatically
  4101.      generates the time from you computer's system time. Like the
  4102.      automatic date, you can generate the time when you add a new
  4103.      record or when you modify.
  4104.  
  4105.      To put in an automatic time field:
  4106.  
  4107.  
  4108.  
  4109.      PC-File Version 7 Users Guide                             71
  4110.  
  4111.  
  4112.      1.With a database open, choose Field Attributes from the File
  4113.        menu. The Field selection dialog box displays.
  4114.  
  4115.      2.Choose the field to add the Automatic time attribute to. The
  4116.        Field Attributes dialog box displays.
  4117.  
  4118.      3.Select Automatic Time from the Available Attributes list
  4119.        box.
  4120.  
  4121.      4.Choose Add. The Automatic Time dialog box with When to Apply
  4122.        options displays.
  4123.  
  4124.      5.Select when to apply the Automatic time attribute.
  4125.  
  4126.      6.Choose OK to apply this attribute to the field.
  4127.  
  4128.      Calculations
  4129.  
  4130.      Using the Calculation field attribute you can create a field
  4131.      that generates its own data through a calculation. For each
  4132.      record, PC-File performs the calculation at the time you
  4133.      specify and enters the results in the field.
  4134.  
  4135.      You can use any of the calculations described in Chapter 17,
  4136.      "Calculations." This includes mathematical, date, and string
  4137.      calculations as well as relational lookups. In most cases, you
  4138.      will want to define a relational lookup using the dialog boxes
  4139.      displayed when choosing the Relational Lookup field attribute
  4140.      as explained later in this chapter in the "Relational Lookup,"
  4141.      section.
  4142.  
  4143.      The outermost set of parentheses around a calculation is
  4144.      optional, as PC-File adds them automatically. Field
  4145.      calculations can include other field names, numeric constants,
  4146.      and functions. See Chapter 17, "Calculations," for information
  4147.      on using calculations in PC-File.
  4148.  
  4149.      Here are some examples of calculations:
  4150.  
  4151.           FIRST_NAME;" ";LAST_NAME
  4152.  
  4153.           ((TODAY#) - (BUY_DATE ( @DAY#,mdy)))
  4154.  
  4155.           TOTAL_AMT *1.0825
  4156.  
  4157.      To add a calculation:
  4158.  
  4159.      1.With a database open, choose Field Attributes from the File
  4160.        menu. The Field Selection dialog box displays.
  4161.  
  4162.      2.Choose the field to add the calculation to. The Field
  4163.        Attributes dialog box displays.
  4164.  
  4165.      3.Select Calculation from the Available Attributes list.
  4166.  
  4167.  
  4168.  
  4169.      PC-File Version 7 Users Guide                             72
  4170.  
  4171.  
  4172.      4.Choose Add. The Calculation dialog box with a text box for
  4173.        entering the calculation and the When to Apply options
  4174.        displays.
  4175.  
  4176.      5.Type the calculation in the Calculation text box.
  4177.  
  4178.      6.Select when to apply the calculation using the options below
  4179.        the Calculation text box.
  4180.  
  4181.      7.Choose OK to apply this attribute to the field.
  4182.  
  4183.      Default Text
  4184.  
  4185.      If you want the same data to appear in a field in most records
  4186.      or in every record, add a Default Text attribute to that
  4187.      field. For example, suppose that most of the addresses in a
  4188.      database are from Walla Walla. To save you from having to type
  4189.      WALLA WALLA every time a new record is added, you can insert
  4190.      WALLA WALLA as default text in the city field. You can then
  4191.      skip over that field most of the time. When a different city
  4192.      is needed, type it right over the default text.
  4193.  
  4194.      Here are some examples of default data:
  4195.  
  4196.           WALLA WALLA CA 01/22/93
  4197.  
  4198.      To add a Default Text attribute:
  4199.  
  4200.      1.With a database open, choose Field Attributes from the File
  4201.        menu. The Field Selection dialog box displays.
  4202.  
  4203.      2.Choose the field to add the Default Text attribute to. The
  4204.        Field Attributes dialog box displays.
  4205.  
  4206.      3.Select Default Data from the Available Attributes list.
  4207.  
  4208.      4.Choose Add. The Default Text dialog box with a text box for
  4209.        entering the default data displays.
  4210.  
  4211.      5.Type the text to be used as Default Text in the text box.
  4212.  
  4213.      6.Select when to apply using the When to Apply options.
  4214.  
  4215.      7.Choose OK to apply this attribute to the field.
  4216.  
  4217.      Serial Number
  4218.  
  4219.      The Serial Number attribute lets you define a field that
  4220.      contains an incrementing number for each record. Typically
  4221.      this feature is used to automatically enter a number in a
  4222.      field each time you add a record. This is useful if you need a
  4223.      unique identifier for each record, or if you need to know the
  4224.      order each record was added to the database. Sorting the
  4225.      database does not change these numbers, and numbers are never
  4226.      reused, even if a record is deleted.
  4227.  
  4228.  
  4229.  
  4230.      PC-File Version 7 Users Guide                             73
  4231.  
  4232.  
  4233.      You can define which number will be used as the starting
  4234.      number and what number will be used to increment by. By
  4235.      default the serial number will start at 1 and increment by 1
  4236.      so the first record added will be number 1, the second record
  4237.      number 2, and so on in a series. However, you can choose any
  4238.      starting number or interval by typing the desired values in
  4239.      the text boxes on the Serial Number dialog box.
  4240.  
  4241.      NOTE: In previous versions of PC-File, serial numbers were
  4242.      called unique numbers. Previous versions include PC-File 6.5,
  4243.      6.0, 5.01, 5.0, PC-File:dB and others.
  4244.  
  4245.      To add a Serial Number attribute:
  4246.  
  4247.      1.With a database open, choose Field Attributes from the File
  4248.        menu. The Field Selection dialog box displays.
  4249.  
  4250.      2.Choose the field to add the Serial Number attribute to. The
  4251.        Field Attributes dialog box displays.
  4252.  
  4253.      3.Select Serial Number from the Available Attributes list.
  4254.  
  4255.      4.Choose Add. The Serial Number dialog box with When to Apply
  4256.        options displays.
  4257.  
  4258.      5.Type the starting number and the number to increment by, if
  4259.        desired.
  4260.  
  4261.      6.Select when to apply the serial number.
  4262.  
  4263.      7.Choose OK to add this attribute to the field.
  4264.  
  4265.      Relational Lookups
  4266.  
  4267.      Relational lookups are a special type of calculation that
  4268.      provide you with a way to "pull" information from another
  4269.      database into the present database.
  4270.  
  4271.      You can define a lookup by either entering a formula in the
  4272.      text box on Relational Lookup dialog box, or by choosing the
  4273.      Define Lookup button and PC-File will step you through the
  4274.      lookup definition process. See Chapter 17, "Relational
  4275.      Lookups" for more details on how relational lookups work and
  4276.      how to define relational lookup formulas.
  4277.  
  4278.      To add a Relational Lookup:
  4279.  
  4280.      1.With a database open, choose Field Attributes from the File
  4281.        menu. The Field Selection dialog box displays.
  4282.  
  4283.      2.Choose the field to add Relational Lookup attribute to. The
  4284.        Field Attributes dialog box displays.
  4285.  
  4286.      3.Select Relational Lookup from the Available Attributes list.
  4287.  
  4288.  
  4289.  
  4290.      PC-File Version 7 Users Guide                             74
  4291.  
  4292.  
  4293.      4.Choose Add. The Relational Lookup dialog box with When to
  4294.        Apply options displays.
  4295.  
  4296.      5.Type the relational lookup formula into the text box, or
  4297.        choose the Define Lookup button. (See Chapter 17, "Defining
  4298.        Basic Lookups" for details on how to define a relational
  4299.        lookup.)
  4300.  
  4301.      6.Select when to apply the relational lookup.
  4302.  
  4303.      7.Choose OK to add this attribute to the field.
  4304.  
  4305.  
  4306.      Defining Validation Attributes
  4307.  
  4308.      Validation attributes apply data validation rules to allow you
  4309.      to control the way a user of your database enters data. The
  4310.      defined validation rules are applied as the user exits the
  4311.      field after entering data. If the data entered does not meet
  4312.      the validation criterion, a dialog box displays to inform the
  4313.      user what must be done to continue.
  4314.  
  4315.      Use the Must Answer attribute to create fields which require
  4316.      user input. Use the Validate Range attribute to limit the
  4317.      range of permissible data entered into a field. Validation
  4318.      attributes are applied at all times, when adding and modifying
  4319.      records.
  4320.  
  4321.      Must Answer
  4322.  
  4323.      Use Must Answer to require the user to enter data into a
  4324.      field. For example, you might have a database for tracking
  4325.      customer's orders. In order to keep track of every record, you
  4326.      might want to ensure that each order entered in the database
  4327.      includes the customer's identification number. Assigning the
  4328.      Must Answer attribute to the ID_NUMBER field reminds the user
  4329.      to enter data for the field whenever a new record is added.
  4330.      PC-File will not allow the user to continue until the field is
  4331.      filled.
  4332.  
  4333.      NOTE: Adding the Must Answer attribute to a numeric type field
  4334.      requires a non-zero entry. That is, entering 0 is always
  4335.      considered to be empty. Do not use the Must Answer attribute
  4336.      on numeric fields if zero is considered a valid entry for the
  4337.      field.
  4338.  
  4339.      To add a Must Answer field attribute:
  4340.  
  4341.      1.With a database open, choose Field Attributes from the File
  4342.        menu. The Field Selection dialog box displays.
  4343.  
  4344.      2.Choose the field which you would like to be Must Answer. The
  4345.        Field Attributes dialog box displays.
  4346.  
  4347.      3.Select Must Answer from the Available Attributes list.
  4348.  
  4349.  
  4350.  
  4351.      PC-File Version 7 Users Guide                             75
  4352.  
  4353.  
  4354.      4.Choose Add. An information dialog displays to indicate Must
  4355.        Answer has been added.
  4356.  
  4357.      5.Choose OK to add this attribute to the field.
  4358.  
  4359.      Validate Range
  4360.  
  4361.      Use Validate Range to limit the range of values a user can
  4362.      enter into a field. Setting the minimum and maximum values
  4363.      defines the range that will be allowed. Whenever the range is
  4364.      exceeded, PC-File notifies the user of the defined range and
  4365.      allows the user to continue editing to enter a correct value.
  4366.      The user cannot leave a record as long as the value exceeds
  4367.      the defined range.
  4368.  
  4369.      Generally you would use this attribute to define a numeric
  4370.      range. For example, from a minimum of 1 to a maximum of 100.
  4371.      However, you can also define a range of characters. For
  4372.      example, a minimum of A and a maximum of E to include A, B, C,
  4373.      D and E.
  4374.  
  4375.      To add a Validate Range field attribute:
  4376.  
  4377.      1.With a database open, choose Field Attributes from the File
  4378.        menu. The Field Selection dialog box displays.
  4379.  
  4380.      2.Choose the field to assign Validate Range to. The Field
  4381.        Attributes dialog box displays.
  4382.  
  4383.      3.Select Validate Range from the Available Attributes list.
  4384.  
  4385.      4.Choose Add. The Validate Range dialog box displays. It
  4386.        contains two text boxes: one for the lowest allowed value
  4387.        and one for highest allowed value.
  4388.  
  4389.      5.Type the values for the lowest and highest allowed values.
  4390.  
  4391.      6.Choose OK to accept the values.
  4392.  
  4393.      7.Choose OK to add this attribute to the field.
  4394.  
  4395.      Defining Formatting Attributes
  4396.  
  4397.      Formatting attributes determine how data displays in the
  4398.      field. PC-File gives you two Formatting Attribute options:
  4399.      Force Case and Date Format.
  4400.  
  4401.      Force Case
  4402.  
  4403.      You can specify three different case combinations with the
  4404.      force case attribute. You can force the entry into all upper
  4405.      case; all lower case; or mixed case, where the first letter of
  4406.      each word is capitalized and the rest of each word is in lower
  4407.      case. The Force Case attribute is applied as soon as the user
  4408.      exits the field.
  4409.  
  4410.  
  4411.  
  4412.      PC-File Version 7 Users Guide                             76
  4413.  
  4414.  
  4415.      To add a Force Case field attribute:
  4416.  
  4417.      1.With a database open, choose Field Attributes from the File
  4418.        menu. The Field Selection dialog box displays.
  4419.  
  4420.      2.Choose the field for the Force Case attribute. The Field
  4421.        Attributes dialog box displays.
  4422.  
  4423.      3.Select Force Case from the Available Attributes list.
  4424.  
  4425.      4.Choose Add to add the attribute. The Force Case dialog box
  4426.        displays. There is a set of option buttons: one for UPPER,
  4427.        one for lower, and one for Mixed Case.
  4428.  
  4429.      5.Select the button that corresponds with the desired case
  4430.        option.
  4431.  
  4432.      6.Choose OK to accept the selection.
  4433.  
  4434.      7.Choose OK to apply Force Case to the selected field.
  4435.  
  4436.      Date Format
  4437.  
  4438.      You can apply a particular date format with the date format
  4439.      attribute. This attribute allows you to change the date
  4440.      display format from MM/DD/YY to MM/DD/YYYY for example. You
  4441.      can choose a different Month- Day-Year sequence. You can also
  4442.      change the delimiter from slash (/) to hyphen (-) or period
  4443.      (.). The Data Format field attribute only applies to the field
  4444.      you select at the beginning of the field attribute definition
  4445.      process. You can assign different date formats for different
  4446.      date fields, if
  4447.      you want.
  4448.  
  4449.      NOTE: In most cases you will want to set date formatting for
  4450.      all fields at once using the Default Date Format options on
  4451.      the Configuration dialog. The Date Format field attribute only
  4452.      applies to one date field at a time and will override
  4453.      Configuration Default Date Format settings for that field
  4454.      only.
  4455.  
  4456.      To add a Date Format field attribute:
  4457.  
  4458.      1.With a database open, choose Field Attributes from the File
  4459.        menu. The Field Selection dialog box displays.
  4460.  
  4461.      2.Choose the field to apply data formatting to. The Field
  4462.        Attributes dialog box displays.
  4463.  
  4464.      3.Select Date Format from the Available Attributes list.
  4465.  
  4466.      4.Choose Add to add the attribute. The Date Format dialog box
  4467.        displays. There are option buttons for the display order of
  4468.        day, month and year; year display, two or four digits; and
  4469.        the separator: "-", "/" or ".".
  4470.  
  4471.  
  4472.  
  4473.      PC-File Version 7 Users Guide                             77
  4474.  
  4475.  
  4476.      5.Select the desired options for the order, year display and
  4477.        separator.
  4478.  
  4479.      6.Choose OK to accept these selections.
  4480.  
  4481.      7.Choose OK to apply the Date Format.
  4482.  
  4483.      Defining Data Restriction Attributes
  4484.  
  4485.      Data Restriction field attributes are much like Validation
  4486.      attributes except they are applied immediately, not as the
  4487.      user exits the field. PC-File gives you two options: Not
  4488.      Editable and Restrict Character.
  4489.  
  4490.      Not Editable
  4491.  
  4492.      The Not Editable field attribute to prevents data from being
  4493.      altered. This attribute prevents the cursor from entering the
  4494.      fields-pressing TAB while editing will bypass the field. You
  4495.      can prevent editing only when Adding, only when Modifying, or
  4496.      both. For example, if you have a field that has a calculated
  4497.      result that you don't want altered, configure the Not Editable
  4498.      attribute to apply when both adding and modifying records.
  4499.      However, you might want to allow user input when adding the
  4500.      record, but then prevent users from changing the field
  4501.      afterwards. In this case, you would choose to apply the Not
  4502.      Editable attribute only when modifying.
  4503.  
  4504.      To add a Not Editable field attribute:
  4505.  
  4506.      1.With a database open, choose Field Attributes from the File
  4507.        menu. The Field Selection dialog box displays.
  4508.  
  4509.      2.Choose the field. The Field Attributes dialog box displays.
  4510.  
  4511.      3.Select Not Editable from the Available Attributes list .
  4512.  
  4513.      4.Choose Add. The Not Editable dialog box with When to Apply
  4514.        options display.
  4515.  
  4516.      5.Choose when to apply the Not Editable attribute.
  4517.  
  4518.      6.Choose OK to apply this attribute to the field.
  4519.  
  4520.      Restrict Characters
  4521.  
  4522.      Use the Restrict Characters field attribute to limit the
  4523.      characters the user can type in a field. You can restrict a
  4524.      field to accept only letters or only numbers for example.
  4525.      There is no way to define a range of allowed characters when
  4526.      doing this-you must type every allowed character when defining
  4527.      the Restrict Character attribute. This restriction applies
  4528.      whenever you add or modify data.
  4529.  
  4530.      To add a Restrict Character field attribute:
  4531.  
  4532.  
  4533.  
  4534.      PC-File Version 7 Users Guide                             78
  4535.  
  4536.  
  4537.      1.With a database open, choose Field Attributes from the File
  4538.        menu. The Field Selection dialog box displays.
  4539.  
  4540.      2.Choose the field. The Field Attributes dialog box displays.
  4541.  
  4542.      3.Select Restrict Characters from the Available Attributes
  4543.        list.
  4544.  
  4545.      4.Choose Add. The Restrict Characters dialog box displays.
  4546.        There is a box into which you enter the characters that you
  4547.        will allow the user to enter into the field.
  4548.  
  4549.      5.Type in each character you want to permit in the field in
  4550.        the text box.
  4551.  
  4552.      6.Choose OK to accept this selection.
  4553.  
  4554.  
  4555.      7.Choose OK to apply this attribute to the field.
  4556.  
  4557.  
  4558.  
  4559.      PC-File Version 7 Users Guide                             79
  4560.  
  4561.  
  4562.  
  4563.      CHAPTER 5 VIEWS
  4564.  
  4565.      In this chapter, you will be introduced to database views.
  4566.      Default Record and Default Table views will be introduced. How
  4567.      to navigate within views is also discussed. In addition, you
  4568.      will learn how to switch, create, modify, and delete
  4569.      customized Record and Table views.
  4570.  
  4571.      What are Views?
  4572.  
  4573.      Views are simply the different ways that you can display your
  4574.      data while working in PC-File. PC-File provides two kinds of
  4575.      views of your data:
  4576.  
  4577.        Record views
  4578.        Table views
  4579.  
  4580.  
  4581.      Record Views
  4582.  
  4583.      A Record view displays one record at a time.
  4584.  
  4585.      There are advantages to using either kind of view. Most of the
  4586.      time, you can see more of each record's data at once in a
  4587.      Record view. This gives you more information at your finger
  4588.      tips about each record.
  4589.  
  4590.  
  4591.      Table Views
  4592.  
  4593.      A Table view displays multiple records in a column format,
  4594.      much like a spreadsheet. You can page up and down to reveal
  4595.      other records, and scroll horizontally to display fields that
  4596.      don't fit on the screen.
  4597.  
  4598.      Table views show more than one record at a time and therefore
  4599.      are a better way to compare information from one record to
  4600.      another. Generally, you can't display as much of each record's
  4601.      information at once in a Table view as you can in Record view,
  4602.      but you can scroll across the table to view additional columns
  4603.      of data.
  4604.  
  4605.      Default Views
  4606.  
  4607.      Whenever you create a database, PC-File automatically creates
  4608.      two default views which are always named: Default Record View
  4609.      and Default Table View. Default views display every field in
  4610.      your database and the fields are displayed in the "physical
  4611.      order"-the order you defined the fields when creating the
  4612.      database structure.
  4613.  
  4614.      Custom Views
  4615.  
  4616.  
  4617.  
  4618.      PC-File Version 7 Users Guide                             80
  4619.  
  4620.  
  4621.      In addition to the default views, you can create custom views
  4622.      of either type. A custom view contains only the fields you
  4623.      specify in the order you determine. Using custom Record views
  4624.      you can organize the screen any way you want and include
  4625.      additional text, such as a title, headings, and data entry
  4626.      instructions. Using custom Table views you can choose which
  4627.      fields to show in the table and their order.
  4628.  
  4629.      Custom views can be particularly useful if your database has a
  4630.      large number of fields and you have more than one work group
  4631.      working with the database. You can create custom views that
  4632.      display different sets of fields for each work group. For
  4633.      example, one work group may only want to see fields containing
  4634.      name and address information for maintaining a mailing list,
  4635.      but another work group may want to view accounting fields for
  4636.      billing customers.
  4637.  
  4638.      You do not have to define custom views to use your database.
  4639.      You can access any database using just the two default views
  4640.      PC-File generates when you create the database structure.
  4641.  
  4642.  
  4643.  
  4644.      The Views Menu
  4645.  
  4646.      Choosing Views on the menu bar displays this list of options:
  4647.  
  4648.        The Switch option on the Views menu displays a list of your
  4649.        views to choose from. Pressing CTRL-T toggles between the
  4650.        last two views you've selected.
  4651.  
  4652.        The Create option lets you define custom views.
  4653.  
  4654.        The Modify option lets you change any of your custom views.
  4655.  
  4656.        The Delete option lets you delete any custom views you no
  4657.        longer need.
  4658.  
  4659.      These options have no effect on default views-the two default
  4660.      views cannot be modified or deleted.
  4661.  
  4662.      Each of these options are discussed in detail later in this
  4663.      chapter.
  4664.  
  4665.      Viewing Your Data
  4666.  
  4667.      When you open a database, PC-File displays the first record or
  4668.      group of records (based on the current index) on the screen.
  4669.      The area where the record displays is called the work area.
  4670.  
  4671.  
  4672.      NOTE: PC-File always starts up with the last view that was
  4673.      active when the database was closed.
  4674.  
  4675.      Switching Views
  4676.  
  4677.  
  4678.  
  4679.      PC-File Version 7 Users Guide                             81
  4680.  
  4681.  
  4682.      You may switch between views so that you can better see the
  4683.      data that is important for you. For example, you can browse
  4684.      through a group of records in a Table view to find a specific
  4685.      record. Once you've found the record that you want, you could
  4686.      switch to a Record view to see more of the data for that
  4687.      particular record.
  4688.  
  4689.      To switch between views:
  4690.  
  4691.      1.Choose Switch from the Views menu. The Switch View dialog
  4692.        box will display.
  4693.  
  4694.      2.Select the view that you would like to use from the list
  4695.        box.
  4696.  
  4697.      3.Choose OK. PC-File switches to the selected view.
  4698.  
  4699.      NOTE: There will always be at least two views to select when
  4700.      switching views. If you haven't created any custom views, you
  4701.      will only see the two default record and table views. See
  4702.      "Creating and Modifying Views" later in this chapter for
  4703.      information on creating custom views.
  4704.  
  4705.      Toggling Between Two Views
  4706.  
  4707.      You can move quickly between two views using CTRL-T. Pressing
  4708.      CTRL-T switches you to the view that you most recently viewed.
  4709.      Pressing CTRL-T will move you back to your original view.
  4710.  
  4711.      For example, if you are in the Default Table view and last
  4712.      used the Default Record view, you could move back to the
  4713.      Default Record view by pressing CTRL-T. To move back to the
  4714.      Default Table view, press CTRL-T again.
  4715.  
  4716.      To toggle between the two most recent views:
  4717.  
  4718.      1.Press CTRL-T to switch to the most recently used view. PC-
  4719.        File switches to the previous view.
  4720.  
  4721.      2.Press CTRL-T again. PC-File switches back to the original
  4722.        view.
  4723.  
  4724.      Navigating Within Views
  4725.  
  4726.      The following sections describe how to navigate within Record
  4727.      and Table views to display your data. See Chapter 6 for
  4728.      details on how to add records, and see Chapter 7 for details
  4729.      on how to search for and modify records.
  4730.  
  4731.      Navigating in a Record View
  4732.  
  4733.  
  4734.      The following table describes the mouse and keyboard options
  4735.      for navigating within a Record view.
  4736.  
  4737.      Function: Mouse Action: Keyboard
  4738.  
  4739.  
  4740.  
  4741.      PC-File Version 7 Users Guide                             82
  4742.  
  4743.  
  4744.  
  4745.      Display next record: Click Next button: CTRL-N
  4746.  
  4747.      Display previous record: Click Previous button: CTRL-P
  4748.  
  4749.  
  4750.      Scroll down one line: Click the down arrow on the scroll bar:
  4751.      N/A
  4752.  
  4753.      Scroll up one line: Click the up arrow on the scroll bar: N/A
  4754.  
  4755.      Scroll down a page: Click below scroll box: PGDN
  4756.  
  4757.      Scroll up a page: Click above scroll box: PGUP
  4758.  
  4759.      Jump to bottom of view: Drag scroll box to bottom of scroll
  4760.      bar: CTRL-PDN
  4761.  
  4762.      Jump to top of view: Drag scroll box to top of scroll bar:
  4763.      CTRL-PGUP
  4764.  
  4765.  
  4766.      You can edit fields in a record as long as the Read-only
  4767.      option on Edit menu is not checked. Use TAB and SHIFT-TAB to
  4768.      move between fields, or click on a field with the mouse. The
  4769.      current field is highlighted with a different color or shading
  4770.      than the other fields. The cursor displays as a flashing
  4771.      underscore.
  4772.  
  4773.      Navigating in a Table View
  4774.  
  4775.      Table views let you browse through your database many records
  4776.      at a time. Columns are distinguished by color on a color
  4777.      monitor, by shades of gray on a monochrome monitor. The width
  4778.      of each column in the Default Table view reflects the field
  4779.      length you defined when you created the database structure.
  4780.      However, you can define a custom Table view with narrower
  4781.      display widths. PC-File only displays entire columns on the
  4782.      screen, not partial columns. Thus, in some cases, empty space
  4783.      may appear on the right side of your screen.
  4784.  
  4785.  
  4786.      The records display in order based on the current index. If
  4787.      you switch indexes, the records rearrange on the screen to
  4788.      match the new index.
  4789.  
  4790.      The following table describes the mouse and keyboard options
  4791.      for moving around the screen in a Table view.
  4792.  
  4793.      Function: Mouse Action: Keyboard
  4794.  
  4795.      Scroll one column to the right: Click on right arrow on
  4796.      horizontal scroll bar: CTRL-TAB
  4797.  
  4798.      Scroll one column to the left: Click on left arrow on
  4799.      horizontal scroll bar: CTRL-SHIFT-TAB
  4800.  
  4801.  
  4802.  
  4803.      PC-File Version 7 Users Guide                             83
  4804.  
  4805.  
  4806.  
  4807.      Scroll right one screenful of columns: Click to the right of
  4808.      the scroll box on the horizontal scroll bar: N/A
  4809.  
  4810.      Scroll left one screenful of columns: Click to the left of the
  4811.      scroll box on the horizontal scroll bar: N/A
  4812.  
  4813.      Scroll to the right most column: Drag the scroll box on the
  4814.      horizontal scroll bar to the right end: N/A
  4815.  
  4816.      Scroll to the left most column: Drag the scroll box on the
  4817.      horizontal scroll bar to the left end: N/A
  4818.  
  4819.      Scroll the screen down one row: Click the up arrow on the
  4820.      vertical scroll bar: N/A
  4821.  
  4822.      Scroll the screen up one row: Click above the scroll box on
  4823.      the vertical scroll bar: N/A
  4824.  
  4825.      Page down one screenful: Click below the scroll box on the
  4826.      vertical scroll bar: PGDN
  4827.  
  4828.      Page up one screenful: Click above the scroll box on the
  4829.      vertical scroll bar: PGUP
  4830.  
  4831.      Pressing TAB moves the highlight one column to the right
  4832.      within the current screenful. Pressing SHIFT-TAB moves the
  4833.      highlight one column to the left. Once the highlight reaches
  4834.      the rightmost or leftmost column in the current screen, the
  4835.      window scrolls one column each time you press TAB or SHIFT-
  4836.      TAB. This differs from CTRL-TAB and CTRL-SHIFT-TAB in that
  4837.      they scroll the entire screen one column regardless of which
  4838.      column the highlight is on.
  4839.  
  4840.      Similarly, UP ARROW and DOWN ARROW move the highlight up and
  4841.      down one row within the current screenful. Once the highlight
  4842.      reaches the top or bottom of the current screenful, the entire
  4843.      screen will scroll. This differs from clicking the up and down
  4844.      arrows on the vertical scroll bar in that this always scrolls
  4845.      the entire screenful up or down one line.
  4846.  
  4847.      Viewing a Memo Field
  4848.  
  4849.      Memo fields, which hold up to 5000 characters of data, can be
  4850.      expanded for viewing and modification. When you expand a memo
  4851.      field, a memo window displays. This window can be resized as
  4852.      needed.
  4853.  
  4854.      You can display a memo window in either Record or Table views.
  4855.      You can also display a memo window for viewing AND
  4856.      modification, or only for viewing. Follow these guidelines to
  4857.      display a memo window:
  4858.  
  4859.        The Read-only mode on the Edit menu must be off to display a
  4860.        memo window for viewing AND modification.
  4861.  
  4862.  
  4863.  
  4864.      PC-File Version 7 Users Guide                             84
  4865.  
  4866.  
  4867.        You can display a memo window, for viewing only, when Read-
  4868.        only mode is on or off.
  4869.  
  4870.      To display a memo window for viewing and modification:
  4871.  
  4872.      1.Highlight the memo field you want to display and edit.
  4873.  
  4874.      2.Press CTRL-E. You can also click on the Up arrow button at
  4875.        the end of the field. The memo field expands to a memo
  4876.        window.
  4877.  
  4878.      3.Make any changes necessary to the memo.
  4879.  
  4880.      4.Choose OK to save your changes and close the window.
  4881.  
  4882.      Choose Cancel or press ESC to close the window without saving
  4883.      any changes.
  4884.  
  4885.      To display a memo window for viewing only:
  4886.  
  4887.      1.Display the record containing the memo you want to view.
  4888.  
  4889.      2.Press CTRL-V. The memo field expands to a memo window.
  4890.  
  4891.      3.Choose OK or press ESC when you finish viewing the data.
  4892.  
  4893.      To resize the memo window with a mouse:
  4894.  
  4895.      1.Click on the maximize button in the upper right corner to
  4896.        expand the window to full size. Click on the same button to
  4897.        return the window to its original size.
  4898.  
  4899.      As an alternative, move the cursor to one of the corners of
  4900.      the window, hold down the left mouse button, and drag the
  4901.      sides of the window. In this manner, you can expand or shrink
  4902.      the window.
  4903.  
  4904.      To resize the memo window with the keyboard:
  4905.  
  4906.      1.Press ALT-F10 to expand the window to full size. Press ALT-
  4907.        F10 again to return the window to its original size.
  4908.  
  4909.      As an alternative, press ALT-F8. Then use the arrow keys to
  4910.      expand or shrink an outline of the window. When the outline
  4911.      reflects the size you want, press ENTER.
  4912.  
  4913.      You can also move the memo window in the same manner that you
  4914.      move dialog boxes or Help windows.
  4915.  
  4916.  
  4917.  
  4918.      NOTE: Character fields can't be expanded to a window, even if
  4919.      you have defined a data length longer than the display length.
  4920.      You must scroll through the text within the defined display.
  4921.  
  4922.      Creating and Modifying Custom Views
  4923.  
  4924.  
  4925.  
  4926.      PC-File Version 7 Users Guide                             85
  4927.  
  4928.  
  4929.  
  4930.      The View Designer is where you create or modify views. There
  4931.      is a view designer for Record views and one for Table views.
  4932.      You can create views completely from scratch, or you can
  4933.      pattern one view after another. Patterning one view after
  4934.      another will save you time if the view you would like to
  4935.      create is similar to one of the existing views, especially
  4936.      with Record views.
  4937.  
  4938.      PC-File lets you create up to 10 custom views of either type.
  4939.      For example, you could have two Table views and three Record
  4940.      views. In general, only define the views you absolutely need,
  4941.      as too many views can be confusing.
  4942.  
  4943.      A view should reflect a particular need for your data. For
  4944.      example, you may have a database that is filled with address
  4945.      information about your clients, but most of the time, you only
  4946.      need their names and phone numbers. This would be a good
  4947.      reason to have a custom view that displays only the name and
  4948.      phone number information.
  4949.  
  4950.      Starting the View Designing Process
  4951.  
  4952.      You create custom views using the Record View and Table View
  4953.      Designers. Using the View Designers you specify and lay out
  4954.      the information that you want for your custom views.
  4955.  
  4956.      To create a new view from scratch
  4957.  
  4958.      1.With a database open, choose Create from the Views menu.
  4959.  
  4960.      2.Choose No when prompted to pattern after an existing view.
  4961.  
  4962.      3.Choose whether to create a Record view or a Table view. The
  4963.        Record View Designer or the Table View Designer display
  4964.        depending on the kind of view you choose in step 3.
  4965.  
  4966.      To create a new view by patterning after an existing view:
  4967.  
  4968.      1.With a database open, choose Create from the Views menu.
  4969.  
  4970.      2.Choose Yes when prompted to pattern after an existing view.
  4971.        The View selection dialog box displays.
  4972.  
  4973.      3.Choose the view you want to pattern after.
  4974.  
  4975.      4.Choose OK.
  4976.  
  4977.      The Record View Designer or the Table View Designer displays
  4978.      depending on the kind of view you chose in step 3.
  4979.  
  4980.      The details for defining each view type are covered in the
  4981.      following sections.
  4982.  
  4983.  
  4984.      The Record View Designer
  4985.  
  4986.  
  4987.  
  4988.      PC-File Version 7 Users Guide                             86
  4989.  
  4990.  
  4991.  
  4992.      You customize your Record view layouts in the Record View
  4993.      Designer. Here are the parts of the Record View Designer that
  4994.      are important to understand:
  4995.  
  4996.      The Cursor
  4997.  
  4998.      The cursor can be controlled by either the mouse or the arrow
  4999.      keys in most places throughout the View designer work area. As
  5000.      long a you have a mouse installed (if you don't, see Chapter
  5001.      1, "Installing Your Mouse" for more information), the View
  5002.      designer displays both a blinking square cursor and a mouse
  5003.      pointer. In graphics display mode, the mouse pointer displays
  5004.      as an arrow. However, in character display mode, the shape of
  5005.      the mouse pointer is identical to the square cursor, but the
  5006.      mouse pointer does not blink and it is a contrasting color.
  5007.  
  5008.        Using the keyboard, move the cursor using the ARROW keys
  5009.        anywhere in the View designer.
  5010.  
  5011.        Using a mouse, move the mouse pointer to a location and then
  5012.        click the left button to move the cursor to that location.
  5013.  
  5014.      The Button Bar
  5015.  
  5016.      The button bar is the area at the bottom of the screen just
  5017.      below the View designer work area. It contains the tools you
  5018.      will use to create views. When you first enter the View
  5019.      Designer the only buttons available are Field and Text. The
  5020.      Edit, Delete and Move buttons are greyed out-they become
  5021.      available once you place and select fields or text.
  5022.  
  5023.  
  5024.      Navigating in the Record View Designer
  5025.  
  5026.      You can navigate within the Record view designer work area
  5027.      using either the mouse or the keyboard. This section describes
  5028.      the different ways to scroll the screen. The sections
  5029.      following this, describe how to place fields and text. Then
  5030.      how to select, move, modify, and delete fields and text is
  5031.      discussed.
  5032.  
  5033.      The following table describes the mouse and keyboard options
  5034.      for scrolling the Record View Designer:
  5035.  
  5036.      Function: Mouse Action: Keyboard
  5037.  
  5038.      Scroll down one line: Click the down arrow on the scroll bar:
  5039.      N/A
  5040.  
  5041.      Scroll up one line: Click the up arrow on the scroll bar: N/A
  5042.  
  5043.      Scroll down a page: Click below scroll box PGDN
  5044.  
  5045.      Scroll up a page: Click above scroll box PGUP
  5046.  
  5047.  
  5048.  
  5049.      PC-File Version 7 Users Guide                             87
  5050.  
  5051.  
  5052.      Jump to bottom of view: Drag scroll box to bottom of scroll
  5053.      bar: CTRL-PGDN
  5054.  
  5055.      Jump to top of view: Drag scroll box to top of scroll bar:
  5056.      CTRL-PGUP
  5057.  
  5058.  
  5059.      Placing Fields
  5060.  
  5061.      You can place a field in the work area of the Record View
  5062.      designer two ways:
  5063.  
  5064.        Using Field button on the button bar
  5065.  
  5066.        Using Insert New Item dialog box
  5067.  
  5068.      Both methods afford you the use of the keyboard or the mouse.
  5069.  
  5070.      Using the Field Button
  5071.  
  5072.      Choosing the Field button displays the Field Details dialog
  5073.      box.
  5074.  
  5075.      You choose which field to place by scrolling through the Field
  5076.      list until the desired field displays.
  5077.  
  5078.      You can also use the Field Details dialog box to specify how
  5079.      much of a field will display at once by entering that value in
  5080.      the Display Width text box. For example, you may have a field
  5081.      with a data length of 65, but you only need to see 10
  5082.      characters of the data at a time. By defining the display
  5083.      width to be 10, you create a scrolling window that displays 10
  5084.      characters of the field's data at a time.
  5085.  
  5086.      A field's display width can be no longer than the data length
  5087.      (the length you specified when defining the database
  5088.      structure) up to a maximum of 65. You cannot change the
  5089.      display width for numeric fields, they always display their
  5090.      full data length. This also holds true for logical fields
  5091.      which can only be 1 character position long.
  5092.  
  5093.      You can also check the Show Field Name option to place the
  5094.      field name immediately to the left of the field. Do not check
  5095.      this option if you want to enter your own field label that
  5096.      does not use the internal "dBASE" field name. In that case,
  5097.      place text to format the field label (see "Placing Text" later
  5098.      in this chapter for details).
  5099.  
  5100.  
  5101.      Using the Insert Item Dialog Box
  5102.  
  5103.  
  5104.  
  5105.      PC-File Version 7 Users Guide                             88
  5106.  
  5107.  
  5108.      You can also display the Field Details dialog box by first
  5109.      invoking the Insert Item dialog box. To do this with the
  5110.      keyboard, move the cursor to the desired location and press
  5111.      ENTER. To do this with the mouse, you must click twice in the
  5112.      same location: Click once to move the cursor to the desired
  5113.      location, then click a second time directly on the cursor.
  5114.      This is functionally very similar to "double-clicking," but
  5115.      how fast you click is not important-you must click twice in
  5116.      the same spot to display the Insert New Item dialog box.
  5117.      Either action displays the Insert dialog box.
  5118.  
  5119.      This dialog box gives you the option to place either a field
  5120.      or text. Choosing Field displays the Field Details dialog
  5121.      described earlier.
  5122.  
  5123.      Note that most fields display with the field name enclosed in
  5124.      brackets. The area enclosed in brackets shows where the data
  5125.      will display. How much space is between the brackets is
  5126.      determined by the display width you define. If the display
  5127.      width is shorter than the number of characters in the field
  5128.      name, you will not be able to see the entire field name with
  5129.      the brackets. Also, a closing bracket will not display if the
  5130.      display width is less than the number of characters in the
  5131.      field name plus two.
  5132.  
  5133.      Once a field is placed in the view, you can move, modify, or
  5134.      delete it if necessary. See "Selecting, Moving, Modifying, and
  5135.      Deleting View Objects" later in this chapter for details.
  5136.  
  5137.      To place a field using the Field button:
  5138.  
  5139.      1.Move the cursor where you want place your field.
  5140.  
  5141.      2.Click on the Field button or press ALT-F. The Field Details
  5142.        box will display. The Field box will be empty. To choose a
  5143.        field, use one of these four methods:
  5144.  
  5145.        Type the field name in the box.
  5146.  
  5147.      Or...
  5148.  
  5149.        Use the UP and DOWN ARROW keys to move through the list of
  5150.        the fields until the desired field is highlighted;
  5151.  
  5152.      Or...
  5153.  
  5154.        Press TAB to move the highlight to the down arrow button at
  5155.        the right of the field box and press ENTER to see an entire
  5156.        list of the fields. Select a field for placement and choose
  5157.        OK;
  5158.  
  5159.      Or...
  5160.  
  5161.        Using the mouse, click on the down arrow button to see an
  5162.        entire list of the fields. Select a field for placement and
  5163.        choose OK.
  5164.  
  5165.  
  5166.  
  5167.      PC-File Version 7 Users Guide                             89
  5168.  
  5169.  
  5170.  
  5171.      3.Change the display width if you want by typing a value in
  5172.        the Display Width text box.
  5173.  
  5174.  
  5175.      NOTE: The display width cannot exceed the data width for that
  5176.      field.
  5177.  
  5178.      4.Turn on the Show Field Name option, if desired.
  5179.  
  5180.      5.Choose OK from the Field Details box.
  5181.  
  5182.      The field is placed in the work area.
  5183.  
  5184.      To place a field using the Insert New Item dialog box:
  5185.  
  5186.      1.Move the cursor where you want to place your field.
  5187.  
  5188.      2.Click the left button on the mouse twice in the same spot,
  5189.        or press ENTER. The Insert New Item dialog box displays.
  5190.  
  5191.      3.Choose Field. The Field Details dialog box displays. The
  5192.        Field text box will be empty. Choose a field using one of
  5193.        these four methods:
  5194.  
  5195.        Type the field name in the Field text box.
  5196.  
  5197.      Or...
  5198.  
  5199.        Press DOWN ARROW to move through a list of the fields until
  5200.        the desired field is displayed.
  5201.  
  5202.      Or...
  5203.  
  5204.        Press TAB to move the highlight to the down arrow button at
  5205.        the right of the Field text box and press ENTER to see an
  5206.        entire list of the fields. Select a field for placement and
  5207.        choose OK.
  5208.  
  5209.      Or...
  5210.  
  5211.        Using the mouse, click on the down arrow button at the right
  5212.        of the Field text box to see an entire list of the fields.
  5213.        Select a field for placement and choose OK.
  5214.  
  5215.      4.Change the display width if you want by typing a value in
  5216.        the Display Width text box.
  5217.  
  5218.      5.Turn on the Show Field Name option, if desired.
  5219.  
  5220.      6.Choose OK from the Field Details box. The field is placed in
  5221.        the work area.
  5222.  
  5223.      Placing Text
  5224.  
  5225.  
  5226.  
  5227.      PC-File Version 7 Users Guide                             90
  5228.  
  5229.  
  5230.      There are many reasons to place text in your view. You can
  5231.      replace the "normal" field name with a text label that is
  5232.      easier to for your database users to understand. You can place
  5233.      instructions on the screen to help the user. You could list
  5234.      the choices for a given field as text in the view. Or you can
  5235.      place lines to divide the data entry screen into groups.
  5236.  
  5237.      Placing text is similar to placing fields. You can place text
  5238.      in the work area of the view designer two ways:
  5239.  
  5240.        Using Text button on the button bar
  5241.  
  5242.        Using Insert New Item dialog box
  5243.  
  5244.      You can use either method using the mouse or the keyboard.
  5245.  
  5246.      Once text is placed in the view, you can move, modify, or
  5247.      delete it if necessary. See "Selecting, Moving, Modifying, and
  5248.      Deleting View Objects" later in this chapter for details.
  5249.  
  5250.      To place text using the Text button:
  5251.  
  5252.      1.Move the cursor to where you want your text.
  5253.  
  5254.      2.Click the Text button or press ALT-T. A dialog box will
  5255.        display, prompting you to Enter Text. The Text box will be
  5256.        empty.
  5257.  
  5258.      3.Type in your text in the Enter Text box.
  5259.  
  5260.      4.Choose OK.
  5261.  
  5262.      To place text using the Insert New Item dialog box:
  5263.  
  5264.      1.Move the cursor to where you want your text.
  5265.  
  5266.      2.Click the left button on the mouse twice in the same spot,
  5267.        or press ENTER. The Insert New Item dialog box displays.
  5268.  
  5269.      3.Choose Text. A dialog box will display, prompting you to
  5270.        Enter Text.
  5271.  
  5272.      4.Type in your text in the Enter Text box.
  5273.  
  5274.      5.Choose OK.
  5275.  
  5276.      Selecting, Moving, Modifying, and Deleting View Objects
  5277.  
  5278.      Once you have fields and text (view objects) in the View
  5279.      Designer work area, you may find you need to edit them to get
  5280.      your view "just right." These options are also useful if you
  5281.      started the view definition process by patterning after
  5282.      another view.
  5283.  
  5284.  
  5285.  
  5286.      PC-File Version 7 Users Guide                             91
  5287.  
  5288.  
  5289.      You must first select a view object before you can work with
  5290.      it. For moving and deleting view objects, PC-File lets you
  5291.      select multiple objects at once. However, you can only select
  5292.      one object at a time when modifying the definition of a view
  5293.      object.
  5294.  
  5295.      Selecting a Single View Object
  5296.  
  5297.      You must select an object before you can make any changes to
  5298.      it. You can select an object with the keyboard or the mouse.
  5299.  
  5300.      Using the keyboard to select an object:
  5301.  
  5302.      1.Use TAB and SHIFT-TAB or the ARROW KEYS to move the cursor
  5303.        to the object.
  5304.  
  5305.      2.Press SPACEBAR.
  5306.  
  5307.      The current object displays in a different color to indicate
  5308.      that it is selected.
  5309.  
  5310.      Using the mouse to select an object:
  5311.  
  5312.      1.Move the mouse cursor over the object.
  5313.  
  5314.      2.Click the left mouse button. The current object displays in
  5315.        a different color to indicate that it is selected.
  5316.  
  5317.      Selecting Multiple View Objects
  5318.  
  5319.      You can select more than one object in the View Designer. Use
  5320.      multiple selection when there is a group of more than one
  5321.      objects that you would like to move as a group to another area
  5322.      of the work area. You can also select multiple objects to
  5323.      delete them all at once.
  5324.  
  5325.      Using the keyboard to select multiple view objects:
  5326.  
  5327.      1.Use TAB and SHIFT-TAB or the ARROW KEYS to move the cursor
  5328.        to the first object that you want to select.
  5329.  
  5330.      2.Press CTRL-SPACEBAR. The object will change color,
  5331.        signifying that it is selected.
  5332.  
  5333.      3.Move the cursor to the next object that you want to select.
  5334.  
  5335.      4.Press CTRL-SPACEBAR. Both objects display in a different
  5336.        color, signifying that they are selected.
  5337.  
  5338.      5.Continue in this fashion until all the fields you want to
  5339.        work with are selected.
  5340.  
  5341.      Using the mouse to select multiple view objects:
  5342.  
  5343.      1.Move the mouse cursor to the first object that you want to
  5344.        select.
  5345.  
  5346.  
  5347.  
  5348.      PC-File Version 7 Users Guide                             92
  5349.  
  5350.  
  5351.  
  5352.      2.Hold down the CTRL key and click the left mouse button. The
  5353.        object will change color, signifying that it is selected.
  5354.  
  5355.      3.Move the mouse cursor to the next object that you want to
  5356.        select.
  5357.  
  5358.      4.Hold down the CTRL key and click the left mouse button. Both
  5359.        objects display in a different color, signifying that they
  5360.        are selected.
  5361.  
  5362.      5.Continue in this fashion until all the fields you want to
  5363.        work with are selected.
  5364.  
  5365.      Moving Selected View Objects
  5366.  
  5367.      Once you have selected one or more objects, you can move them
  5368.      to another location in the work space using either the
  5369.      keyboard or mouse.
  5370.  
  5371.      Using the keyboard to move view objects:
  5372.  
  5373.      1.Select the object or group of objects that you would like to
  5374.        move.
  5375.  
  5376.      2.Choose the Move button by pressing ALT-M.
  5377.  
  5378.      3.Using the ARROW keys, move the cursor to the new location
  5379.        for the objects.
  5380.  
  5381.      4.Press SPACEBAR to de-select and "drop" the objects in the
  5382.        new location.
  5383.  
  5384.      Using the mouse to move view objects:
  5385.  
  5386.      1.Select the objects or group of objects that you would like
  5387.        to move.
  5388.  
  5389.      2.Place the mouse cursor on any one of the selected objects,
  5390.        depress the left mouse button and hold it down.
  5391.  
  5392.      3.Drag the objects to the new location and release the left
  5393.        mouse button.
  5394.  
  5395.      4.Move the mouse cursor to an unused portion of the work area
  5396.        and press the left mouse button to de-select and "drop" the
  5397.        objects in the new location.
  5398.  
  5399.      Modifying View Objects
  5400.  
  5401.      Once you have placed view objects you may find you need to
  5402.      modify the definition of the object. You can modify the
  5403.      definition of any view object while the Record View designer
  5404.      is active. You can only modify one view object at a time.
  5405.  
  5406.      To modify a view object:
  5407.  
  5408.  
  5409.  
  5410.      PC-File Version 7 Users Guide                             93
  5411.  
  5412.  
  5413.  
  5414.      1.Select the object to modify.
  5415.  
  5416.      2.Choose Edit from the button bar.
  5417.  
  5418.      Or...
  5419.  
  5420.        Press ENTER.
  5421.  
  5422.      Or...
  5423.  
  5424.        Click the left button on the mouse twice on the desired
  5425.        object. The appropriate dialog box will display for editing
  5426.        a field object or a text object.
  5427.  
  5428.      3.Make any changes to the object.
  5429.  
  5430.      4.Choose OK.
  5431.  
  5432.      Deleting View Objects
  5433.  
  5434.      You can delete one or more view objects after selecting them.
  5435.  
  5436.      To delete view objects:
  5437.  
  5438.      1.Select the object or group of objects you want to delete.
  5439.  
  5440.      2.Choose Delete from the button bar. A dialog box displays to
  5441.        confirm that you want to delete the selected objects.
  5442.  
  5443.      3.Choose Yes to delete the selected objects.
  5444.  
  5445.      Completing the Record View Definition Process
  5446.  
  5447.      When you are happy with the design of your custom record view,
  5448.      you need to choose OK from the button bar to continue with the
  5449.      record view definition process. This displays the Access Order
  5450.      screen.
  5451.  
  5452.      The numbers next to each of the fields indicate the current
  5453.      order the fields will be accessed when entering data. By
  5454.      default, the access order is determined by the order you
  5455.      placed the fields in your view. The first field you placed is
  5456.      numbered 1; the second field you place numbered 2, and so on.
  5457.      This sequence is irrespective of where the field is placed in
  5458.      the work area. If this order is acceptable, you can choose OK
  5459.      to continue on to name your new view and conclude the
  5460.      definition process. The following section describes how to
  5461.      customize the access order.
  5462.  
  5463.      Setting Access Order
  5464.  
  5465.  
  5466.  
  5467.      PC-File Version 7 Users Guide                             94
  5468.  
  5469.  
  5470.      There are many ways to access the fields in your views. You
  5471.      may want a particular field to be accessed first in spite of
  5472.      the fact that the field is in the middle of work area. Or if
  5473.      you have more than one field per line, you may prefer either a
  5474.      left to right or a top to bottom access order.
  5475.  
  5476.      PC-File lets you change the access order easily. There are
  5477.      three access orders that can be applied automatically using
  5478.      the Sequence button. Choosing the Sequence button displays the
  5479.      Field Order dialog box.
  5480.  
  5481.      Left to Right
  5482.  
  5483.      If you have two or more fields per line, you can access all
  5484.      the fields in a row from left to right before moving to the
  5485.      next row. Choosing the Left to Right option automatically
  5486.      renumbers your fields in a left to right access order.
  5487.  
  5488.      Top to Bottom
  5489.  
  5490.      If you have two or more columns of data, you may prefer to
  5491.      access all of one column top to bottom before moving to the
  5492.      next one. Choosing the Top to Bottom option automatically
  5493.      renumbers your fields in this sequence.
  5494.  
  5495.      Physical
  5496.  
  5497.      The physical order is the order of the fields in the database
  5498.      structure. When you created the database structure, the order
  5499.      in which you entered the fields determined the physical order.
  5500.      The Default Record view reflects the physical order for your
  5501.      database. Choosing the Physical (DBF) option automatically
  5502.      renumbers your fields in this sequence.
  5503.  
  5504.      Custom Order
  5505.  
  5506.      You can also change the access order to anything you want by
  5507.      typing the desired sequence number next to each field. To do
  5508.      this, you do not choose the Sequence button, simply navigate
  5509.      to each field on the Access Order screen and type the desired
  5510.      sequence number.
  5511.  
  5512.      If you are defining a custom order for a large number of
  5513.      fields the Refresh button may come in handy. Choosing the
  5514.      Refresh button resolves any duplication in the sequence you
  5515.      are defining. For example, if the first two fields in your
  5516.      view are both numbered 1, choosing Refresh will leave the
  5517.      first field numbered 1, renumber the second field to 2, and
  5518.      renumber all following fields from 3 forward. You can also use
  5519.      the Refresh button to quickly move a field to the end of the
  5520.      access order. To do this: type a number greater than the total
  5521.      number of fields in your database in the field, then choose
  5522.      Refresh.
  5523.  
  5524.      To define the view's access order automatically:
  5525.  
  5526.  
  5527.  
  5528.      PC-File Version 7 Users Guide                             95
  5529.  
  5530.  
  5531.      Choose the Sequence button. The Field Order dialog box
  5532.      displays.
  5533.  
  5534.      1.Choose the desired option. The access order is renumbered.
  5535.  
  5536.      2.Choose OK on the button bar to continue with the view
  5537.        definition.
  5538.  
  5539.      3.To define a custom access order:
  5540.  
  5541.      1.Navigate to a text box next to a field using TAB or SHIFT-
  5542.        TAB, the ARROW keys, or by clicking in the text box.
  5543.  
  5544.      2.Type the number for the desired sequence in the access
  5545.        order.
  5546.  
  5547.      3.Repeat steps 1 and 2 until all fields are numbered. Choose
  5548.        Refresh to resolve duplication, if desired.
  5549.  
  5550.      4.Choose OK on the button bar to continue with the view
  5551.        definition.
  5552.  
  5553.      Naming the View
  5554.  
  5555.      After you have defined the access order, you must name your
  5556.      custom Record view to complete the view definition process.
  5557.      Choosing OK from the Access Order screen displays the View
  5558.      Name dialog box:
  5559.  
  5560.      A default name of "Custom Record View" displays in the box.
  5561.      You generally will want to use a more descriptive name. Each
  5562.      view must have a unique name. You can enter a name up to 30
  5563.      characters long.
  5564.  
  5565.      To name a Record view:
  5566.  
  5567.      1.Type in a name for the view.
  5568.  
  5569.      2.Choose OK.
  5570.  
  5571.      The record view definition process is complete. You are
  5572.      returned to the main PC-File work area. Your new record view
  5573.      is now active.
  5574.  
  5575.  
  5576.  
  5577.      Overview of Creating a Custom Record View
  5578.  
  5579.      This overview will take you through the basic steps for
  5580.      creating a view. You can pattern a view after one of the
  5581.      default views or any other view that has been defined. In this
  5582.      example, you will create a completely new view.
  5583.  
  5584.      To create a new Record view:
  5585.  
  5586.      1.Open a database.
  5587.  
  5588.  
  5589.  
  5590.      PC-File Version 7 Users Guide                             96
  5591.  
  5592.  
  5593.  
  5594.      2.Choose Create from the View menu. A decision box will
  5595.        display.
  5596.  
  5597.      3.Choose No. The Create View dialog box will display.
  5598.  
  5599.      4.Choose Record View. You will then move into the View
  5600.        Designer. The work area is blank.
  5601.  
  5602.      5.Place your field and text objects in the work area.
  5603.  
  5604.      6.Choose OK.
  5605.  
  5606.      7.Select the sequence for access order.
  5607.  
  5608.      8.Choose OK.
  5609.  
  5610.      9.Enter a name for the View.
  5611.  
  5612.      10.  Choose OK. The newly defined Record view is active.
  5613.  
  5614.      Modifying a Custom Record View
  5615.  
  5616.      You can modify any of the Custom Record views you have created
  5617.      using the Modify option on the Views menu. You cannot modify
  5618.      the Default Record view.
  5619.  
  5620.      Choosing Modify presents you with a list of all of your custom
  5621.      views, both record and table views. The view designer that
  5622.      displays after you choose a view to modify depends on the kind
  5623.      of view you choose from the list. For this reason, you may
  5624.      want to include the kind of view as part of each custom view's
  5625.      name when creating them so that you can easily distinguish
  5626.      them.
  5627.  
  5628.      Once you have the selected view active in the Record View
  5629.      designer, you can use any of the procedures described in the
  5630.      "Adding Fields", "Adding Text", and "Selecting, Moving,
  5631.      Modifying, and Deleting View Objects" sections to modify the
  5632.      view.
  5633.  
  5634.      To modify a Record view:
  5635.  
  5636.      1.Open a database.
  5637.  
  5638.      2.Choose Modify from the Views menu.
  5639.  
  5640.      3.Select a Record view to modify.
  5641.  
  5642.      4.Choose OK. The Record View Designer displays. The work area
  5643.        displays the objects that currently make up the view.
  5644.  
  5645.      5.Edit the field and text objects in the work area.
  5646.  
  5647.      6.Choose OK.
  5648.  
  5649.  
  5650.  
  5651.      PC-File Version 7 Users Guide                             97
  5652.  
  5653.  
  5654.      7.Select the sequence for access order.
  5655.  
  5656.      8.Choose OK.
  5657.  
  5658.      9.Enter a name for the view.
  5659.  
  5660.      10.  Choose OK. The modification process is complete.
  5661.  
  5662.      Deleting a Record View
  5663.  
  5664.      You can delete a view at anytime. If you created a view to
  5665.      more easily complete a particular task, you can delete that
  5666.      view when you have finished.
  5667.  
  5668.      To delete a Record view:
  5669.  
  5670.      1.Choose Delete from the Views menu.
  5671.  
  5672.      2.Select the view to delete.
  5673.  
  5674.      3.Choose OK.
  5675.  
  5676.  
  5677.  
  5678.      PC-File Version 7 Users Guide                             98
  5679.  
  5680.  
  5681.  
  5682.      The Table View Designer
  5683.  
  5684.      Use the Table view designer to specify which fields to put
  5685.      into a custom Table view and to determine the order they
  5686.      display in. The Table View designer is accessed from the View
  5687.      menu like the Record view designer.
  5688.  
  5689.      Just like record views, you can start the Table view
  5690.      definition process by patterning after other Table views, or
  5691.      you can create them from scratch. Unlike creating Record
  5692.      views, there are not as many differences between creating a
  5693.      Table view with a pattern or without a pattern.
  5694.  
  5695.      After you choose to define a Table view, the Table View
  5696.      designer displays.
  5697.  
  5698.      The Field Name column displays each of the field names for all
  5699.      of the fields in your database. You cannot edit the field
  5700.      names.
  5701.  
  5702.      The Column column lets you determine the order the columns in
  5703.      your custom Table view will display. For example, typing a 1
  5704.      for a field causes that field's column to display at the far
  5705.      left of the Table View work area. Similarly, typing a 3 for a
  5706.      field causes that field to display as the third column from
  5707.      the left. Any field that you do not enter a number for will
  5708.      not be included in the view.
  5709.  
  5710.      The Width column defaults to displaying the current display
  5711.      width for each field. Changing the Width number increases or
  5712.      decreases how much of the field displays at once in the
  5713.      resulting Table view-the display width of each column. You
  5714.      cannot enter a width that is larger than the field's data
  5715.      length. You cannot specify a width of zero, but you can
  5716.      exclude a field from displaying by not typing a Column number
  5717.      for that field. And you cannot change the display width for
  5718.      numeric fields- numeric
  5719.      always display their full data length.
  5720.  
  5721.      Creating a Table View
  5722.  
  5723.      To create a new Table view:
  5724.  
  5725.      1.Open a database.
  5726.  
  5727.      2.Choose Create from the View menu. A decision box will
  5728.        display.
  5729.  
  5730.      3.Choose No. The Create View box will display.
  5731.  
  5732.      4.Choose Table View. The Table View Designer displays.
  5733.  
  5734.      5.Move the highlight to the column field.
  5735.  
  5736.  
  5737.  
  5738.      PC-File Version 7 Users Guide                             99
  5739.  
  5740.  
  5741.      6.Type the number corresponding to the column where this field
  5742.        should display.
  5743.  
  5744.      7.Move the highlight to the display width.
  5745.  
  5746.      8.Type an appropriate display width.
  5747.  
  5748.      9.Repeat this procedure for each of the fields you wish to
  5749.        display.
  5750.  
  5751.      10.  Choose OK to continue the Table View definition process.
  5752.  
  5753.      Naming the View
  5754.  
  5755.      After you have determined the columns and display widths, you
  5756.      must name your custom Table view. The default name is Custom
  5757.      Table View. You generally will want to use a more descriptive
  5758.      name. It's a good idea to include the type of view (Record or
  5759.      Table) in the name.
  5760.  
  5761.      To name a Table view:
  5762.  
  5763.      After you have determined the columns and display widths, a
  5764.      dialog box will display prompting you to enter a view name:
  5765.  
  5766.      1.Type in a name for the view. You can type up to 30 alpha-
  5767.        numeric characters.
  5768.  
  5769.      2.Choose OK.
  5770.  
  5771.      Modifying Custom Table Views
  5772.  
  5773.      You can modify any of the Custom Table views you have created
  5774.      using the Modify option on the Views menu. You cannot modify
  5775.      the Default Table view.
  5776.  
  5777.      Choosing Modify presents you with a list of all of your custom
  5778.      views, both record and table views. The view designer that
  5779.      displays after you choose a view to modify depends on the kind
  5780.      of view you choose from the list. For this reason, you may
  5781.      want to include the kind of view as part of each custom view's
  5782.      name when creating them so that you can easily distinguish
  5783.      them.
  5784.  
  5785.      Once you have the selected view in the Table View designer,
  5786.      you can modify its definition.
  5787.  
  5788.      To modify a Custom Table view:
  5789.  
  5790.      1.Open a database.
  5791.  
  5792.      2.Choose Modify from the Views menu.
  5793.  
  5794.      3.Select a Table view to modify.
  5795.  
  5796.      4.Choose OK. The Table View Designer displays.
  5797.  
  5798.  
  5799.  
  5800.      PC-File Version 7 Users Guide                            100
  5801.  
  5802.  
  5803.  
  5804.      5.Edit the Table view definition
  5805.  
  5806.      6.Choose OK.
  5807.  
  5808.      7.Enter a name for the view.
  5809.  
  5810.      8.Choose OK. The modification process is complete.
  5811.  
  5812.      Deleting Table Views
  5813.  
  5814.      You can delete a Table view at anytime. If you created a view
  5815.      to more easily complete a particular task, you can delete that
  5816.      view when you have finished.
  5817.  
  5818.      To delete a Table view:
  5819.  
  5820.      1.Choose Delete from the Views menu.
  5821.  
  5822.      2.Select the view to delete.
  5823.  
  5824.      3.Choose OK.
  5825.  
  5826.  
  5827.  
  5828.      PC-File Version 7 Users Guide                            101
  5829.  
  5830.  
  5831.  
  5832.  
  5833.      CHAPTER 6 ADDING DATA
  5834.  
  5835.      Once you create a database structure, you can begin adding
  5836.      data. Data is normally added one record at a time through the
  5837.      data entry screen. This chapter explains the procedures
  5838.      involved in adding data.
  5839.  
  5840.  
  5841.      Data Entry
  5842.  
  5843.      Data is normally added to a database on the data entry screen.
  5844.      When you add records, the current record on the screen clears
  5845.      and the cursor moves to the first entry field. You can then
  5846.      begin adding records, one at a time.
  5847.  
  5848.      You can add new records in either Record or Table views by
  5849.      choosing the Add option from the Edit menu or by choosing the
  5850.      Add button on the button bar. In a Record view, an empty
  5851.      record is displayed for you to fill out. In a Table view, an
  5852.      empty row is displayed at the top of the table for you to fill
  5853.      out. The new record is saved when you finish entering the data
  5854.      and navigate to a new record or choose to add another record.
  5855.  
  5856.      During data entry, the entire menu bar is available. If you
  5857.      perform another menu operation (except Tools menu options)
  5858.      while adding a record, the new record is automatically saved
  5859.      before proceeding.
  5860.  
  5861.      NOTE: You can also add data to a database by importing a file.
  5862.      See Chapter 13, "Utilities," for information on this method of
  5863.      adding data.
  5864.  
  5865.      You can add up to 1 billion records in a database. It is more
  5866.      likely that you will run out of space on your hard disk before
  5867.      you encounter the limits of PC-File itself.
  5868.  
  5869.      Adding a Record
  5870.  
  5871.      The procedures for entering a record are the same, whether you
  5872.      are in Record view or Table view.
  5873.  
  5874.      To add a record:
  5875.  
  5876.      1.Open the database.
  5877.  
  5878.      2.Choose Add from the Edit menu, or choose the Add button on
  5879.        the button bar (press ALT-A, if using a keyboard). An empty
  5880.        record data entry screen displays if you are in a Record
  5881.        view, or an empty row displays on the top row if you are in
  5882.        a Table view.
  5883.  
  5884.      3.Enter the record. Press TAB or ENTER to move from one field
  5885.        to the next. Use SHIFT-TAB to move to the previous field to
  5886.        correct an error.
  5887.  
  5888.  
  5889.  
  5890.      PC-File Version 7 Users Guide                            102
  5891.  
  5892.  
  5893.  
  5894.      4.Repeat these steps to add additional records.
  5895.  
  5896.      See Chapter 5, "Navigating Within Views" for full details on
  5897.      how to move around within a record.
  5898.  
  5899.      Saving a Record
  5900.  
  5901.      Each new record is saved as soon as you choose to add
  5902.      additional records or when you navigate to a pre-existing
  5903.      record (using the Prev and Next buttons or CTRL-P and CTRL-N).
  5904.      Also, if you perform another menu operation (except Tools menu
  5905.      options) while adding a record, the new record is
  5906.      automatically saved.
  5907.  
  5908.      Cancelling an Added Record
  5909.  
  5910.      You can cancel adding a new record at any point before the
  5911.      record is saved by choosing the Cancel button or by pressing
  5912.      ESC. A visual cue that cancelling is possible is that the
  5913.      Cancel button is greyed-out once the record has been added.
  5914.  
  5915.      Entering Data in a Memo Field
  5916.  
  5917.      Memo fields differ from other fields in that you can expand
  5918.      the display during data entry. The field expands to a window,
  5919.      allowing you to see most or all of your entry. This makes data
  5920.      entry and formatting much easier.
  5921.  
  5922.      A memo field is identifiable by the up arrow button that
  5923.      displays at the end of the field.
  5924.  
  5925.      To expand a memo field:
  5926.  
  5927.      1.Click on the button at the end of the field. From the
  5928.        keyboard, place the cursor in the field and press CTRL-E.
  5929.        The field expands to a window.
  5930.  
  5931.      If necessary, you can resize the window.
  5932.  
  5933.      To resize the window with a mouse:
  5934.  
  5935.      1.Click on the maximize button in the upper right corner to
  5936.        expand the window to full size. Click on the same button to
  5937.        return the window to its original size.
  5938.  
  5939.        As an alternative, move the cursor to one of the corners or
  5940.        sides of the window, hold down the left mouse button, and
  5941.        drag the sides of the window. In this manner, you can expand
  5942.        or shrink the window.
  5943.  
  5944.      To resize the window with the keyboard:
  5945.  
  5946.      1.Press ALT-F10 to expand the window to full size. Press ALT-
  5947.        F10 again to return the window to its original size.
  5948.  
  5949.  
  5950.  
  5951.      PC-File Version 7 Users Guide                            103
  5952.  
  5953.  
  5954.        As an alternative, press ALT-F8. Then use the arrow keys to
  5955.        expand or shrink an outline of the window. When the outline
  5956.        reflects the size you want, press ENTER.
  5957.  
  5958.      You can also move the memo window in the same way that you
  5959.      move dialog boxes or Help windows.
  5960.  
  5961.      To close a memo window:
  5962.  
  5963.      1.Choose the OK button. This saves the memo entry and closes
  5964.        the window.
  5965.  
  5966.        If you don't want to save your entry or changes, choose
  5967.        Cancel or press ESC instead. In that case, PC-File prompts
  5968.        you to save changes before closing the window. Choose No if
  5969.        you don't want to save your changes.
  5970.  
  5971.      Once you close a memo window, only the first line of the memo
  5972.      displays in the field.
  5973.  
  5974.      You can enter up to 5000 characters in a memo field.
  5975.  
  5976.      NOTE: You can't expand character fields to a window, even if
  5977.      you have defined a data length that is longer than the display
  5978.      length. Instead, the text scrolls to the left as you enter
  5979.      data in the field.
  5980.  
  5981.      You can also spell check the contents of your memo field using
  5982.      the Spell button. See Chapter 15, "Using the Spell Checker"
  5983.      for details on how to use the spell checker dialog box.
  5984.  
  5985.  
  5986.      Do You Get a Beep?
  5987.  
  5988.      Some field types and field attributes place limitations on the
  5989.      characters that can be entered in a field. For example, you
  5990.      can't enter letters in a numeric field, and you can only enter
  5991.      the letters y, n, t, and f in logical fields. The Character
  5992.      Restriction field attribute can further limit the characters
  5993.      that can be entered.
  5994.  
  5995.      If the computer beeps at you when you are entering data, it's
  5996.      because you're trying to enter a character that isn't
  5997.      permitted in that particular field or because the field is
  5998.      full and characters are being deleted from the end.
  5999.  
  6000.      Not Editable
  6001.  
  6002.      If the cursor skips over a field, or if PC-File beeps when you
  6003.      try to click in a field, the Not Editable field attribute has
  6004.      been set for that field. As its name implies, the Not Editable
  6005.      field attribute is used to prevent the contents of a field
  6006.      from being edited. See Chapter 4 for details on the Not
  6007.      Editable field attribute.
  6008.  
  6009.      Leaving Fields Blank
  6010.  
  6011.  
  6012.  
  6013.      PC-File Version 7 Users Guide                            104
  6014.  
  6015.  
  6016.  
  6017.      The field type determines what happens to a field that you
  6018.      leave blank. If the field is numeric, PC-File places a 0 in
  6019.      the blank field. If the numeric field includes a decimal, PC-
  6020.      File includes a 0 before the decimal and a 0 for each
  6021.      character to the right of the decimal. Thus, a field with
  6022.      three characters to the right of the decimal looks like this
  6023.      when left blank: 0.000.
  6024.  
  6025.      All other field types display no characters in the field if
  6026.      left blank during data entry.
  6027.  
  6028.      Using Calculation Fields
  6029.  
  6030.      If you have defined a field with a calculation, the data in
  6031.      the field is derived from the calculation. PC-File allows you
  6032.      to access calculation fields and even enter data in them.
  6033.      However, the data displayed in the record is the data derived
  6034.      from the calculation. PC- File ignores any data you have
  6035.      entered by accident or otherwise, unless you chose the Only
  6036.      When Field is Empty option when defining the calculation.
  6037.  
  6038.      To prevent yourself or other users from entering or editing
  6039.      the result of a calculation, you can add the Not Editable
  6040.      field attribute. See Chapter 4 for details on how to do this.
  6041.  
  6042.  
  6043.      Shortcuts and Helpful Tips
  6044.  
  6045.      PC-File provides a number of hot keys and other short cuts to
  6046.      make data entry as easy as possible.
  6047.  
  6048.      Duplicating Fields and Records
  6049.  
  6050.      PC-File can automatically enter data from the previously
  6051.      viewed or added record into the current record. You can choose
  6052.      between duplicating a single field or duplicating all fields
  6053.      from the cursor position to the end of the record. Either way
  6054.      can shorten the time it takes to add data.
  6055.  
  6056.      Duplicating a field overrides any default data that you
  6057.      entered in a field when defining the database.
  6058.  
  6059.      Duplicating a Single Field
  6060.  
  6061.      Duplicate a single field when only that field repeats itself,
  6062.      but not the fields that follow. For example, if you are
  6063.      entering address information, it is likely that you could
  6064.      encounter two addresses in a row from the same state, but with
  6065.      a different zip code.
  6066.  
  6067.      To duplicate a field:
  6068.  
  6069.      1.Place the cursor in the field.
  6070.  
  6071.  
  6072.  
  6073.      PC-File Version 7 Users Guide                            105
  6074.  
  6075.  
  6076.      2.Press CTRL-F. The data from the previously-viewed or added
  6077.        record is copied into the current record.
  6078.  
  6079.      Duplicating to the End of the Record
  6080.  
  6081.      You can duplicate all data from the current field forward in
  6082.      access order to the end of the current view. For example, you
  6083.      may find in entering addresses that the city, state, and zip
  6084.      code information is the same for the current record as for the
  6085.      previously viewed or added record. It's probably quicker to
  6086.      copy the data from the previous record than to type it in
  6087.      again.
  6088.  
  6089.      To duplicate all data to the end of the record:
  6090.  
  6091.      1.Place the cursor in the appropriate field.
  6092.  
  6093.      2.Press CTRL-R. PC-File copies the data for that field and all
  6094.        subsequent fields (in access order) from the previous
  6095.        record.
  6096.  
  6097.      Once you complete the duplication, you can make changes before
  6098.      adding the record to the database.
  6099.  
  6100.      CTRL-R is most useful in either of two situations:
  6101.  
  6102.        When two records are almost exactly the same, and you just
  6103.        have to change one or two fields after making the
  6104.        duplication.
  6105.  
  6106.        When the last few fields in a record are the same. In that
  6107.        case, enter the information in the early fields, then press
  6108.        CTRL-R when you reach those fields that can be copied from
  6109.        one record to the next.
  6110.  
  6111.      NOTE: Be cautious in using CTRL-R if your database contains a
  6112.      field with the Serial Number field attribute. PC-File makes an
  6113.      exact duplicate with CTRL-R, including the Serial Number
  6114.      field. Thus, you would end up with two records with the same
  6115.      number in that particular field. You can get around this if
  6116.      the Serial Number field is the first field in the record. In
  6117.      that case, move the cursor to the second field before pressing
  6118.      CTRL-R.
  6119.  
  6120.      Memorizing Data
  6121.  
  6122.      If you want to enter the same data in a field quite often, you
  6123.      can copy the data to the buffer and paste it into a field
  6124.      whenever necessary. To do that, use the read from and write to
  6125.      hot keys. These hot keys are explained in detail in Chapter 7,
  6126.      "Finding and Modifying Data."
  6127.  
  6128.  
  6129.  
  6130.      PC-File Version 7 Users Guide                            106
  6131.  
  6132.  
  6133.      NOTE: If you find yourself using the buffer for one particular
  6134.      field a lot of the time, consider entering default data in the
  6135.      field instead. You can always overwrite the default data if
  6136.      necessary. See the section on entering default data in Chapter
  6137.      2, "Creating a Database."
  6138.  
  6139.      Using the Flip Data Character
  6140.  
  6141.      PC-File provides the tilde (~) character to flip data within a
  6142.      field. The tilde is most often used in name fields that
  6143.      include both the first and last name within a single field.
  6144.      Being able to flip the data lets you enter the last name first
  6145.      for sorting purposes, then flip the last name and first name
  6146.      to print mailing labels.
  6147.  
  6148.  
  6149.      NOTE: For most databases, it is recommended that you place
  6150.      first names and last names in separate fields. If you do that,
  6151.      you don't need the tilde.
  6152.  
  6153.      To flip data, type the tilde between the two parts of the
  6154.      field that you want to flip in every record you enter. Then,
  6155.      when you print out a report, whether on-screen or to a
  6156.      printer, the two parts of the field display in flipped order.
  6157.  
  6158.      Thus, if you enter Ratite ~Janet in the field when adding
  6159.      data, Janet Ratite appears in the report. Be sure to enter a
  6160.      space between the last name and the tilde that precedes the
  6161.      first name.
  6162.  
  6163.      NOTE: Make sure the flip data option is turned ON (checked) in
  6164.      the Print options dialog box.
  6165.  
  6166.      You can also flip data when you are adding or modifying a
  6167.      record. With the cursor in the field you want to flip, press
  6168.      CTRL-O to flip the data. This is most useful if you have
  6169.      entered dozens of names in one order, then realize you want
  6170.      them in reverse order for sorting. You can modify each record
  6171.      by placing the cursor in the proper field and pressing CTRL-O.
  6172.      This is much faster than retyping each one.
  6173.  
  6174.  
  6175.  
  6176.      PC-File Version 7 Users Guide                            107
  6177.  
  6178.  
  6179.  
  6180.      CHAPTER 7 FINDING AND MODIFYING DATA
  6181.  
  6182.      To find data, choose one of two powerful search options. To
  6183.      modify records, display a record, click in the field or press
  6184.      ALT to move the cursor into the record and then TAB to the
  6185.      field, and make your changes. These operations and more are
  6186.      covered in this chapter.
  6187.  
  6188.      The Search and Modify Options
  6189.  
  6190.      Locating data, viewing that data, and making changes to it are
  6191.      key ingredients of any database. PC-File provides a variety of
  6192.      alternatives for all three operations.
  6193.  
  6194.      For the most part, these operations are activated or performed
  6195.      from the options on the Edit and Search menus. These menus are
  6196.      illustrated below and each of the options described briefly.
  6197.      You can also locate records by simply browsing through the
  6198.      database as described in Chapter 5, "Views."
  6199.  
  6200.      The Search Menu
  6201.  
  6202.      Use the options on the Search menu to navigate through your
  6203.      records:
  6204.  
  6205.      Choose Beginning to display the first record in the database,
  6206.      based on the current index. Choose End to display the last
  6207.      record, also based on the current index. If you change
  6208.      indexes, these records are likely to change.
  6209.  
  6210.      You can also choose the Search button on the button bar to
  6211.      conduct a Simple search.
  6212.  
  6213.      The Edit Menu
  6214.  
  6215.  
  6216.      With the exception of Add, the options on the Edit menu are
  6217.      used for making changes to your data. You can make changes as
  6218.      long as the Read- only option is not checked. Checking the
  6219.      Read-only option permits you to view the data, but allows no
  6220.      access for making changes.
  6221.  
  6222.      Switching edit modes and making changes is covered in detail
  6223.      in the section "Modifying and Deleting Records," at the end of
  6224.      this chapter.
  6225.  
  6226.      The Add option is covered in Chapter 6, "Adding Data."
  6227.  
  6228.      Paging Through Records
  6229.  
  6230.  
  6231.  
  6232.      PC-File Version 7 Users Guide                            108
  6233.  
  6234.  
  6235.      For the most part, finding data means conducting a search for
  6236.      that data. You define specific criteria, then let PC-File
  6237.      search for the records that meet the criteria. However, you
  6238.      can also page through your records. PC-File lets you page
  6239.      through one record at a time in a Record view or a screen's
  6240.      worth of records in a Table view.
  6241.  
  6242.      Whether you page through one record or many records at a time
  6243.      depends on the current view. Display a Record view to page
  6244.      through one at a time. Use the Next and Prev buttons or CTRL-N
  6245.      and CTRL-P to page forward and backward in your database.
  6246.  
  6247.      Displaying a Table view lets you page through your records a
  6248.      screenful at a time. Use PGDN and PGUP to display the next
  6249.      screen or the previous screen of records. You can also use the
  6250.      UP and DOWN ARROW keys to move one record at a time.
  6251.      Alternatively, you can use the vertical scroll bar on the
  6252.      right side of a table view to page through records in a Table
  6253.      view.
  6254.  
  6255.      See Chapter 5, "Navigating Within Views" for full details on
  6256.      how to navigate within Record and Table views.
  6257.  
  6258.      You can also jump to the first or last record in your
  6259.      database, based on the current index, at any time. To display
  6260.      the first record or group of records, choose Beginning from
  6261.      the Search menu. To display the last record or group of
  6262.      records, choose End from the Search menu.
  6263.  
  6264.      Conducting a Search
  6265.  
  6266.      PC-File allows up to a billion records in a database, so fast
  6267.      and efficient methods of searching for data are an important
  6268.      feature of the program. Paging through your records, either in
  6269.      Record or Table view, can be useful, but offers little help
  6270.      when you want to find information in a large database quickly
  6271.      and easily.
  6272.  
  6273.      PC-File provides three powerful search options:
  6274.  
  6275.        Simple
  6276.  
  6277.        Formula
  6278.  
  6279.        Global
  6280.  
  6281.      A Simple search satisfies most search needs and is easy to
  6282.      learn and use. A Formula search provides more power than a
  6283.      Simple search, but requires you to enter a search command. Use
  6284.      a Global search to look in all but memo fields for specific
  6285.      text.
  6286.  
  6287.      Within Simple and Formula searches, you can look for records
  6288.      that "sound like" the search criteria, scan through a specific
  6289.      field for a word or part of a word, enter wildcard characters,
  6290.      and use comparison operators.
  6291.  
  6292.  
  6293.  
  6294.      PC-File Version 7 Users Guide                            109
  6295.  
  6296.  
  6297.  
  6298.      When you conduct a search, PC-File displays the first record
  6299.      found that satisfies the search criteria. To see the next
  6300.      record that satisfies the search criteria, click on the Again
  6301.      button or press CTRL-A.
  6302.  
  6303.      Choosing the Search Type
  6304.  
  6305.      For the most part, you will probably conduct Simple searches
  6306.      when looking for specific records. A Simple search is quicker
  6307.      and easier to conduct and powerful enough for most needs.
  6308.      However, there are some kinds of searches that can only be
  6309.      done with a Formula search. A Global search is most useful for
  6310.      searching for data when you are unsure in which field you need
  6311.      to look.
  6312.  
  6313.      Advantages of a Simple Search
  6314.  
  6315.      When you choose Simple search from the Search menu, PC-File
  6316.      displays your data entry screen and lets you enter the search
  6317.      criteria in the appropriate field(s).
  6318.  
  6319.      To search for all members in your database that live in
  6320.      Seattle, you simply type the word Seattle in the CITY field,
  6321.      as shown above.
  6322.  
  6323.      There are several advantages of a Simple search when compared
  6324.      to a Formula search. A Simple search:
  6325.  
  6326.        Is more intuitive
  6327.  
  6328.        Requires fewer keystrokes
  6329.  
  6330.        Allows less likelihood of making a typing mistake
  6331.  
  6332.        Doesn't require a knowledge of search command syntax
  6333.  
  6334.      It is likely you will conduct Simple searches in all cases
  6335.      except those that require a Formula search.
  6336.  
  6337.      Advantages of a Formula Search
  6338.  
  6339.      When you choose Formula from the Search menu, PC-File displays
  6340.      a dialog box for entering a search command.
  6341.  
  6342.      A Formula search is more powerful than a Simple search. You
  6343.      can conduct certain kinds of searches with a Formula search
  6344.      that you can't with a Simple search. Among them are searches
  6345.      that:
  6346.  
  6347.        Include more than one search criterion within a particular
  6348.        field
  6349.  
  6350.        Use OR statements
  6351.  
  6352.        Require a calculation
  6353.  
  6354.  
  6355.  
  6356.      PC-File Version 7 Users Guide                            110
  6357.  
  6358.  
  6359.  
  6360.      If you want to search for all members that live in either
  6361.      Seattle OR Portland, or you want to search for all members
  6362.      that live in Seattle OR have a last name of Jones, you must
  6363.      use a Formula search. (You could search for all members that
  6364.      live in Seattle AND have a last name of Jones using a Simple
  6365.      search, but to use OR, you must conduct a Formula search.)
  6366.  
  6367.      Advantages of a Global Search
  6368.  
  6369.      A Global search lets you scan through all the fields in your
  6370.      database, other than memo fields, for a specific bit of
  6371.      information or text. It is most useful when you have multiple
  6372.      fields that contain the same type of information. For example,
  6373.      if you have several name fields or several fields listing
  6374.      parts or parts numbers, use a Global search if you are unsure
  6375.      which field contains the data you are looking for.
  6376.  
  6377.      On the other hand, if you know which field you want to look
  6378.      in, conduct a Simple search instead, using the scan-across
  6379.      search method (described below). The Simple search is faster,
  6380.      as PC-File doesn't have to look through all the fields for the
  6381.      information. You can also use the scan- across method to
  6382.      conduct searches in memo fields, which you can't do with a
  6383.      Global search.
  6384.  
  6385.      Index Autoswitching
  6386.  
  6387.      On large databases, indexing the field you are searching on
  6388.      will speed up most Simple and Formula searches quite
  6389.      dramatically. (See Chapter 8, "Sorting and Indexing Data" for
  6390.      details on how to define indexes.) This increase in searching
  6391.      speed will only occur if the index for the field you are
  6392.      searching on is current when searching is performed. The
  6393.      current index is always indicated on the Status line on the
  6394.      bottom of the screen.
  6395.  
  6396.      By default, PC-File will automatically switch to the best
  6397.      index (if one is available) when performing a Simple or
  6398.      Formula search. This feature is called autoswitching.
  6399.  
  6400.      For example, suppose your database has an index on the ZIPCODE
  6401.      field and an index on the LASTNAME field. If the LASTNAME
  6402.      index was current when you conducted a Simple search on the
  6403.      ZIPCODE field, PC-File would autoswitch to the ZIPCODE index
  6404.      to perform the search as quickly as possible.
  6405.  
  6406.      There may be occasions where you want to prevent autoswitching
  6407.      from occuring. For example, suppose you have indexes on the
  6408.      STATE and the ZIPCODE fields. You might enter a search to find
  6409.      records for a particular state, but you want the records found
  6410.      to display in the ZIPCODE order. With autoswitching on, PC-
  6411.      File would always switch to the STATE. However, the bottom
  6412.      line of the Simple screen and Formula search dialog box has
  6413.      two option buttons to toggle autoswitching on and off.
  6414.      Choosing the No
  6415.  
  6416.  
  6417.  
  6418.      PC-File Version 7 Users Guide                            111
  6419.  
  6420.  
  6421.      button turns autoswitching off, choosing the Yes button turns
  6422.      autoswitching on.
  6423.  
  6424.      There is also an Index button in the lower left corner of the
  6425.      Simple search screen and Formula search dialog box. Choosing
  6426.      this button lets you manually switch the current index. See
  6427.      Chapter 8, "Switching Indexes" for details on how to switch
  6428.      indexes.
  6429.  
  6430.      Methods of Entering Search Criteria
  6431.  
  6432.      There are five different ways of entering search criteria in
  6433.      Simple and Formula searches. They include
  6434.  
  6435.        Generic
  6436.  
  6437.        Scan-across
  6438.  
  6439.        Sounds-like
  6440.  
  6441.        Wildcard
  6442.  
  6443.        Comparison
  6444.  
  6445.      All five methods can be used in both Simple and Formula
  6446.      searches. You can also combine the methods within one search,
  6447.      though there are some limitations that arise. For example, you
  6448.      cannot use the scan-across method in numeric fields. The
  6449.      limitations are covered in the discussion on each method
  6450.      below.
  6451.  
  6452.      NOTE: Determine case sensitivity in the Configuration option
  6453.      on the Utilities menu. If you make searches case sensitive,
  6454.      entering SEATTLE will not find Seattle or SEAttle. If you make
  6455.      searches case insensitive, then SEATTLE retrieves records for
  6456.      Seattle or SEAttle.
  6457.  
  6458.      NOTE: Search criteria in Simple and Formula searches require
  6459.      the use of specific characters. Those characters are ?, ~, and
  6460.      _. Because these characters are part of the search syntax, you
  6461.      cannot search for them using Simple or Formula searches.
  6462.      However, you can search for these characters using the Global
  6463.      search method.
  6464.  
  6465.      Generic Searches
  6466.  
  6467.      The generic search is the default method of entering search
  6468.      criteria. In a generic search, you enter the search criteria
  6469.      just as it appears in the record. For example, to retrieve
  6470.      records in which the city is listed as Seattle, type Seattle
  6471.      in the City field.
  6472.  
  6473.      You can also enter part of a word, but it must be the first
  6474.      part. For example, type le to retrieve records that start with
  6475.      LE in the field, such as LEOPARD or LEMUR. Records containing
  6476.      CATTLE or TURTLE would not be retrieved.
  6477.  
  6478.  
  6479.  
  6480.      PC-File Version 7 Users Guide                            112
  6481.  
  6482.  
  6483.  
  6484.      For the Simple search option, a generic search requires no
  6485.      special characters. Enter just the search criteria themselves.
  6486.  
  6487.      For the Formula search option, place quotation marks " "
  6488.      around the search criteria for generic searches. The quotation
  6489.      marks are part of the command syntax.
  6490.  
  6491.      If you only want to find occurrences of JOHN and not JOHNSON
  6492.      or JOHNSTON, follow the N with a space.
  6493.  
  6494.      Use only generic searches or comparison searches when
  6495.      searching for values in numeric fields. In addition, you must
  6496.      search for the actual value; you can't search for part of the
  6497.      value. For example, if you enter 1 in a numeric field search,
  6498.      PC-File only finds records where the value is 1, not 12 or
  6499.      100.
  6500.  
  6501.      Scan-across Searches
  6502.  
  6503.      Use the tilde (~) to look for an occurrence of a word or
  6504.      characters anywhere within a field. Thus, ~LE would retrieve
  6505.      records for Leopard, Lemur, Cattle, and Turtle.
  6506.  
  6507.      If you only want to find occurrences that end in LE, follow
  6508.      the LE with a space. Only Cattle and Turtle would be retrieved
  6509.      in that case.
  6510.  
  6511.      In Formula searches, place the tilde before and after the
  6512.      search criteria, like so: ~LE~ or ~PARD~.
  6513.  
  6514.      You can't use a scan-across search in a numeric field.
  6515.  
  6516.      Sounds-like Searches
  6517.  
  6518.      Use the question mark (?) to conduct a sounds-like search. A
  6519.      sounds- like search retrieves records that sound the same as
  6520.      the search information. This is used to find a name when
  6521.      you're uncertain of the spelling. For example, if you enter
  6522.      ?Rawlins, PC-File retrieves records such as Rollings, Rollins,
  6523.      Rawlings, and Rawlins.
  6524.  
  6525.      The first character of a sounds-like search must be the same.
  6526.      For example, you wouldn't be able to find Cranston if you
  6527.      asked for ?Kranston.
  6528.  
  6529.      Place a question mark before and after the search criteria in
  6530.      Formula searches, like so: ?RAWLINS? or ?SMITH?. In Simple
  6531.      searches, place the question mark in front of the search
  6532.      criteria only.
  6533.  
  6534.      Sounds-like searches can only be conducted on character
  6535.      fields.
  6536.  
  6537.      Wildcard Searches
  6538.  
  6539.  
  6540.  
  6541.      PC-File Version 7 Users Guide                            113
  6542.  
  6543.  
  6544.      Use an underscore ( _ ) to indicate wildcard characters
  6545.      appearing in fixed positions within a field. For example,
  6546.      suppose you wanted to find all members with a renewal date in
  6547.      the month of May. You could enter 05/__/____ or 05/__/1993 in
  6548.      the renewal date field to display those records. This example
  6549.      assumes you are using the default MM/DD/YYYY date display
  6550.      format. Enter wildcard searches on dates using the field's
  6551.      current display format.
  6552.  
  6553.      NOTE: When searching on a date field, you must enter the date
  6554.      in the the field's current display format. Also, if you enter
  6555.      searches on dates using the display format, you must include
  6556.      the separator characters. For example, if you are using the
  6557.      MM/DD/YYYY format, include both slashes in the search
  6558.      expression.
  6559.  
  6560.      When you enter the wildcard character as part of the search
  6561.      criteria, PC-File accepts any character found in that
  6562.      position.
  6563.  
  6564.      You cannot use wildcard characters in combination with sounds-
  6565.      like or global searches. Also, you can't use wildcards to
  6566.      search numeric fields. This is because a number in a numeric
  6567.      field is handled as a single value-PC-File does not "see" it
  6568.      as a string of separate characters. However, you can perform a
  6569.      wildcard search on a number stored in a character field.
  6570.  
  6571.      Comparison Searches
  6572.  
  6573.      Use comparison operator symbols when performing a simple
  6574.      search to search for data that is "greater than," "greater
  6575.      than or equal to," "less than," "less than or equal to," or
  6576.      "not equal to." You do this by typing the appropriate
  6577.      comparison operator followed by the search data on the Simple
  6578.      Search screen. You can use any of the following comparison
  6579.      symbols:
  6580.  
  6581.      Symbol    Comparison Operation
  6582.  
  6583.      >         Greater than
  6584.  
  6585.      <         Less than
  6586.  
  6587.      >=        Greater than or equal to
  6588.  
  6589.      <=        Less than or equal to
  6590.  
  6591.      ! or !=   Not equal to (the equals sign is not 
  6592.           required)
  6593.  
  6594.      For example, suppose you want to search for all checks with
  6595.      numbers greater than 1000 and dates on or before (less than or
  6596.      equal to) January 31, 1993. To do this you would type >1000 in
  6597.      your Check Number field and <=01/31/93 in your Check Date
  6598.      field on the Simple search screen.
  6599.  
  6600.  
  6601.  
  6602.      PC-File Version 7 Users Guide                            114
  6603.  
  6604.  
  6605.      NOTE: The number of spaces available to enter search criteria
  6606.      on the Simple search screen are limited to 2 characters
  6607.      greater than the display length of the field, except for date
  6608.      and memo fields. This provides 2 extra spaces for you to enter
  6609.      your comparison operator, if necessary. The contents of the
  6610.      search field will scroll 2 spaces if you enter a search
  6611.      criterion that is longer than the field's display width.
  6612.      Searches on dates will scroll up to 12 spaces, and searches on
  6613.      memos will scroll up to 65 spaces.
  6614.  
  6615.      You cannot include more than one comparison per field when
  6616.      conducting a Simple search. For example, you cannot enter
  6617.      >1000 & <1100 to find records greater than 1000 and less than
  6618.      1100. You must use a Formula search to do this.
  6619.  
  6620.      Also, in a Simple search, all search criteria must be met to
  6621.      find a record. The Simple search mentioned in the Check Number
  6622.      example above would be equivalent to a Formula search like
  6623.      this:
  6624.  
  6625.           CHECK_NO > 1000 & CHK_DATE <= "01/31/92"
  6626.  
  6627.      A simple search is always equivalent to a Formula search using
  6628.      "and" operations: "find records where both x and y are true."
  6629.      Any search that requires "or" operations must be entered as a
  6630.      Formula search.
  6631.  
  6632.      See "Conducting a Formula Search" for details on how to use
  6633.      comparison operators in Formula searches.
  6634.  
  6635.      Conducting a Simple Search
  6636.  
  6637.      Generally, you'll want to conduct a Simple search unless the
  6638.      complexity of the search criteria requires that you conduct a
  6639.      Formula search. Use any of the five methods of entering search
  6640.      criteria described above when conducting a Simple search.
  6641.  
  6642.      To conduct a Simple search:
  6643.  
  6644.      1.Choose the Search button or press CTRL-S. The Simple search
  6645.        screen displays.
  6646.  
  6647.      2.Enter the search criteria in the appropriate field(s).
  6648.  
  6649.      3.Turn off Autoswitch, if you want to remain in the current
  6650.        index. See "Index Autoswitching" earlier in this chapter for
  6651.        details.
  6652.  
  6653.      4.Choose OK to begin the search. PC-File displays the first
  6654.        record that meets the criteria.
  6655.  
  6656.      5.Choose the Again button or press CTRL-A to display the next
  6657.        record that meets the criteria. Repeat this step to retrieve
  6658.        all additional records that meet the criteria.
  6659.  
  6660.  
  6661.  
  6662.      PC-File Version 7 Users Guide                            115
  6663.  
  6664.  
  6665.      PC-File interprets unused character positions that follow your
  6666.      criteria as wildcards. Thus, if you search for the name Anders
  6667.      in a last name field, you'll find records for Anders,
  6668.      Anderson, and Andersen. If you only want to find records for
  6669.      Anders, enter a space with SPACEBAR after the last character
  6670.      in Anders.
  6671.  
  6672.      You can enter search criteria in a single field or in multiple
  6673.      fields. For example, to search for members living in Seattle,
  6674.      move the cursor to the City field and type Seattle. That is a
  6675.      single field search.
  6676.  
  6677.      A multiple-field search is a more selective type of search. If
  6678.      you enter search data in multiple fields, all of the data must
  6679.      match before the record is considered found.
  6680.  
  6681.      For example, you can search for zoo members living in Seattle
  6682.      that are life members.
  6683.  
  6684.      Only the records for those people that are both life members
  6685.      and live in Seattle are found as a result of the above search.
  6686.  
  6687.      Conducting a Formula Search
  6688.  
  6689.      A Formula search provides more power than a Simple search.
  6690.      With a Formula search, you enter the entire search command
  6691.      rather than just the search criteria. This gives you more
  6692.      flexibility when conducting the search.
  6693.  
  6694.      For example, you can enter multiple search criteria for a
  6695.      specific field. And you can use OR as a logical operator, as
  6696.      well as AND.
  6697.  
  6698.      To conduct a Formula search:
  6699.  
  6700.      1.Choose Search from the menu bar.
  6701.  
  6702.      2.Choose Formula from the Search menu. A dialog box appears.
  6703.  
  6704.      3.Enter the search command in the text box.
  6705.  
  6706.      4.Turn off Autoswitch, if you want to remain in the current
  6707.        index. See "Index Autoswitching" earlier in this chapter for
  6708.        details.
  6709.  
  6710.      5.Choose OK to begin the search. The first record that meets
  6711.        the search criteria displays.
  6712.  
  6713.      6.Click on the Again button or press CTRL-A to display
  6714.        additional records that meet the search criteria. The
  6715.        Formula search dialog box allows up to 250 characters.
  6716.  
  6717.      The Format of a Search Command
  6718.  
  6719.      A Formula search command follows a basic format containing a
  6720.      Search Location, a Comparison Operator and Search Criteria.
  6721.  
  6722.  
  6723.  
  6724.      PC-File Version 7 Users Guide                            116
  6725.  
  6726.  
  6727.  
  6728.      The search location always appears on the left side of the
  6729.      comparison operator and the search criteria on the right side.
  6730.  
  6731.  
  6732.      Another example illustrates a more involved search command:
  6733.  
  6734.      LASTNM = "SMITH" | LASTNM = "JONES" & CITY = SEATTLE"
  6735.  
  6736.      Translated into plain English, this command says "First find
  6737.      anyone named SMITH or JONES, then make sure the city is
  6738.      SEATTLE."
  6739.  
  6740.      You can include up to 34 comparisons in a search command. Use
  6741.      spaces as you see fit to improve readability. They don't
  6742.      affect the command, except when used in search criteria to
  6743.      indicate a space.
  6744.  
  6745.      The components of a search command are explained in detail
  6746.      below, followed by examples of various search commands.
  6747.  
  6748.      Search Location
  6749.  
  6750.      The search location is normally a field in the database, but
  6751.      can also be a calculation. The search location always appears
  6752.      on the left side of a comparison. Enter field names without
  6753.      any punctuation, as follows:
  6754.  
  6755.           LASTNAME = "SMITH"
  6756.  
  6757.      However, you can enter just enough of the field name so that
  6758.      PC-File recognizes it as unique in the database. Thus
  6759.  
  6760.           LA = "SMITH"
  6761.  
  6762.      would be fine as long as no other field in the database begins
  6763.      with LA.
  6764.  
  6765.      You must enter a search location for each comparison within a
  6766.      command. For example, you cannot enter
  6767.  
  6768.           LASTNAME = "SMITH" | "JONES"
  6769.           **INCORRECT**
  6770.  
  6771.      You must enter a field name for each criteria separately, like
  6772.      this:
  6773.  
  6774.           LASTNAME = "SMITH" | LASTNAME = "JONES"      **CORRECT**
  6775.  
  6776.  
  6777.      A calculation used as a search location can be any valid
  6778.      numeric or date calculation. You can't use relational lookups.
  6779.      The following example illustrates a calculation involving two
  6780.      fields:
  6781.  
  6782.           (TOTALDUE - AMTPD) >= 500
  6783.  
  6784.  
  6785.  
  6786.      PC-File Version 7 Users Guide                            117
  6787.  
  6788.  
  6789.  
  6790.      In this calculation, the program searches for all records
  6791.      where the balance due is greater than or equal to $500.
  6792.  
  6793.  
  6794.      Comparison Operators
  6795.  
  6796.      Comparison operators determine the relationship between the
  6797.      search location and the search criteria. The six comparison
  6798.      operators are:
  6799.  
  6800.      Equal to                 =
  6801.      Not equal to             !=
  6802.      Greater than             >
  6803.      Less than                <
  6804.      Greater than or equal    <=
  6805.      Less than or equal to    <=
  6806.  
  6807.      The operator Equal to (=) means that the comparison is exact.
  6808.      The command
  6809.  
  6810.           LASTNAME = "SMITH"
  6811.  
  6812.      will not find SMYTH (unless you do a sounds-like search). It
  6813.      will only find SMITH.
  6814.  
  6815.      PC-File follows the ASCII table in determining the order of
  6816.      alphanumeric characters. Greater than refers to those
  6817.      characters with higher numbers on the ASCII table. Less than
  6818.      is the opposite. Case insensitivity changes the rules
  6819.      slightly, making SMITH also equal to Smith, rather than Less
  6820.      than (Uppercase letters are lower in the ASCII table than
  6821.      lowercase letters).
  6822.  
  6823.      The operators Not equal to (!=), Greater than or equal to
  6824.      (>=), and Less than or equal to (<=) should always be entered
  6825.      in the order shown. Do not place the equal sign first.
  6826.  
  6827.      Search Criteria
  6828.  
  6829.      The right side of each comparison is normally a constant, but
  6830.      can also be a calculation or a field. In a Formula search, the
  6831.      constant must be surrounded by special characters. The only
  6832.      exception occurs when you use a numeric value as a constant.
  6833.      In that case, quotation marks are optional.
  6834.  
  6835.      The characters differ depending on the method of entering
  6836.      search criteria, as follows:
  6837.  
  6838.      Generic Quotation marks       (")  "SMITH"
  6839.  
  6840.      Scan-across Tilde             (~)       ~MIT~
  6841.  
  6842.      Sounds-like Question mark     (?)  ?SMITH?
  6843.  
  6844.  
  6845.  
  6846.      PC-File Version 7 Users Guide                            118
  6847.  
  6848.  
  6849.      The wildcard character ( _ ) must be used only in combination
  6850.      with generic and scan-across searches. You can't use wildcards
  6851.      with sounds- like searches.
  6852.  
  6853.      Logical Operators
  6854.  
  6855.      Use logical operators to link multiple comparisons. Use the
  6856.      ampersand (&) for AND and the pipe (|) for OR. On most
  6857.      keyboards, the pipe appears on the same key as the backslash.
  6858.      It is not a colon. PC-File does not recognize the words OR and
  6859.      AND as logical operators, so be sure to use the symbols
  6860.      instead.
  6861.  
  6862.      The operator AND means that both comparisons must be met to
  6863.      satisfy the search criteria. The operator OR means that either
  6864.      can be met. Normally OR is used when you are linking
  6865.      comparisons for the same field and AND is used when linking
  6866.      comparisons from different fields. Thus, in the search command
  6867.  
  6868.           STATE = "WA" | STATE = "CA"
  6869.  
  6870.      you must use the operator OR because both abbreviations do not
  6871.      appear in one record.
  6872.  
  6873.      Parentheses
  6874.  
  6875.      Parentheses are used to group comparisons logically. In many
  6876.      search commands, they are necessary to make the command work
  6877.      properly. Without them you would retrieve a different group of
  6878.      records.
  6879.  
  6880.      In most cases, a command that includes both logical operators
  6881.      requires parentheses to make the command work properly. For
  6882.      example, the command
  6883.  
  6884.           CITY = "SEATTLE" & (NAME = "JONES" | NAME =  "SMITH")
  6885.  
  6886.      would produce a different result without the parentheses. As
  6887.      it is, the search retrieves all records in which the city is
  6888.      SEATTLE and the name is either JONES or SMITH. Remove the
  6889.      parentheses and the command retrieves all records in which the
  6890.      city is SEATTLE and the name is JONES, plus those records for
  6891.      which the name is SMITH, no matter what the city.
  6892.  
  6893.      The reason it works this way is that PC-File reads commands
  6894.      from left to right. However, it disregards the previous
  6895.      logical operator when it encounters a new logical operator,
  6896.      unless it also encounters parentheses. Parentheses force the
  6897.      program to consider the information within the parentheses as
  6898.      a unit. Thus, with the parentheses in place in the above
  6899.      example, there are two main parts to the search command, which
  6900.      it considers together. Without the parentheses, PC-File
  6901.      disregards the AND when
  6902.      it gets to the OR, and treats it separately.
  6903.  
  6904.  
  6905.  
  6906.      PC-File Version 7 Users Guide                            119
  6907.  
  6908.  
  6909.      You normally don't need parentheses when you only use OR or
  6910.      only use AND in the command. For example, in the command
  6911.  
  6912.           STATE = "WA" | STATE = "CA" | STATE = "NY"
  6913.  
  6914.      parentheses are unnecessary. The same is true with the command
  6915.  
  6916.           NAME = "JONES" & STATE = "WA" & YEAR = "1985"
  6917.  
  6918.      However, in the search command
  6919.  
  6920.           STATE = "WA" & (NAME != ?SMITH? & NAME !=    ?JONES?)
  6921.  
  6922.      the parentheses make a difference in the records retrieved.
  6923.  
  6924.      Examples of Formula Search Commands
  6925.  
  6926.      A number of examples further illustrate the syntax used in
  6927.      Formula search commands. The examples are shown in uppercase
  6928.      letters, but uppercase letters are not required.
  6929.  
  6930.      Example #1
  6931.  
  6932.      The following example can also be performed as a Simple search
  6933.      by typing >150 into the AMOUNT field on the Simple search
  6934.      screen.
  6935.  
  6936.           AMOUNT > 150
  6937.  
  6938.      Example #2
  6939.  
  6940.      The following example can also be performed as a Simple search
  6941.      because an AND operation is assumed when using multiple search
  6942.      criteria in a Simple search. To perform this search as a
  6943.      Simple search, type <150 into the AMOUNT field and type
  6944.      >=03/15/91 into the DATE field.
  6945.  
  6946.           AMOUNT < 150 & DATE >= "03/15/91"
  6947.  
  6948.      Using the logical operator for AND requires that both criteria
  6949.      be met. As with the previous example, numeric values (150 in
  6950.      this case) don't require quotation marks. PC-File would find
  6951.      the same records if you did use quotation marks, though.
  6952.  
  6953.      Example #3
  6954.  
  6955.      In the following example, PC-File searches for all records
  6956.      between the two dates. This search cannot be performed as a
  6957.      Simple search because you cannot enter multiple criteria for
  6958.      one field.
  6959.  
  6960.           DATE > "03/15/91" & DATE < "03/31/91"
  6961.  
  6962.      Example #4
  6963.  
  6964.  
  6965.  
  6966.      PC-File Version 7 Users Guide                            120
  6967.  
  6968.  
  6969.      In the following example, PC-File searches for records with
  6970.      one or the other member number. The numbers are enclosed in
  6971.      quotation marks because Member_no is a character field, not a
  6972.      numeric field. This and all the following examples cannot be
  6973.      performed as Simple searches.
  6974.  
  6975.           MEMBER_NO = "001729" | MEMBER_NO = "096119"
  6976.  
  6977.      Example #5
  6978.  
  6979.      In the following example, PC-File searches for records with a
  6980.      specific date and either one or the other member number.
  6981.  
  6982.           DATE = "05/05/91" & (MEMBER_NO = "001729" |  MEMBER_NO =
  6983.      "096119")
  6984.  
  6985.      Example #6
  6986.  
  6987.      When using the comparison operator Not equal to (!=) with
  6988.      multiple criteria, you generally want to use AND (&) as a
  6989.      logical operator, rather than OR ( | ), as in the following
  6990.      example:
  6991.  
  6992.           DATE != "02/14/91" & DATE != "02/15/91"
  6993.  
  6994.      If you were to use OR, PC-File would search for dates not
  6995.      equal to 2/14/91, which includes 2/15/91, and dates not equal
  6996.      to 2/15/91, which includes 2/14/91. You must use AND to
  6997.      exclude both dates.
  6998.  
  6999.      Example #7
  7000.  
  7001.      Wildcards are especially useful when searching for dates. The
  7002.      following example illustrates this:
  7003.  
  7004.           DATE = "03/__/91" | DATE = "04/__/91"
  7005.  
  7006.      This command searches for all records with dates in the months
  7007.      of March and April.
  7008.  
  7009.      Example #8
  7010.  
  7011.      A global search looks everywhere for the search criteria
  7012.      except in memo fields. For memo fields, use a scan-across
  7013.      search, as follows:
  7014.  
  7015.           COMMENTS = ~cold~ | COMMENTS = ~icy~
  7016.  
  7017.      This command searches for the words cold and icy throughout
  7018.      the memo field.
  7019.  
  7020.      Conducting a Global Search
  7021.  
  7022.  
  7023.  
  7024.      PC-File Version 7 Users Guide                            121
  7025.  
  7026.  
  7027.      Global searches are similar to scan-across searches in that
  7028.      you can search for a word or part of a word. However, a global
  7029.      search looks through all fields (except memo fields) of all
  7030.      the records, while a scan-across search looks only in the
  7031.      designated field.
  7032.  
  7033.      When you conduct a Global search, enter the search criteria
  7034.      just as it appears in the records. PC-File treats the search
  7035.      criteria as a character string. Don't use quotation marks or
  7036.      other punctuation, unless that punctuation is part of the
  7037.      string you are searching for. You can't use wildcards either.
  7038.      If you enter an underscore character, PC-File searches for
  7039.      data containing an underscore.
  7040.  
  7041.      As long as case sensitivity remains turned off in your
  7042.      configuration profile, PC-File searches for both uppercase and
  7043.      lowercase variations on the criteria.
  7044.  
  7045.      You can't use multiple criteria, comparison operators, or
  7046.      logical operators in a Global search.
  7047.  
  7048.      To conduct a Global search:
  7049.  
  7050.      1.Choose Search from the menu bar.
  7051.  
  7052.      2.Choose Global search from the Search menu. PC-File prompts
  7053.        you for the search criteria.
  7054.  
  7055.      3.Enter the criteria in the text box.
  7056.  
  7057.      4.Choose OK. PC-File conducts the search and displays the
  7058.        first record that meets the criteria.
  7059.  
  7060.      5.Click on the Search Again button or press CTRL-A to display
  7061.        additional records that meet the search criteria.
  7062.  
  7063.      Because PC-File searches the data file in global searches, you
  7064.      must enter dates in the format they are maintained in this
  7065.      file: YYYYMMDD.
  7066.  
  7067.      Checking For Duplicate Records
  7068.  
  7069.      Duplicate records often appear in databases, particularly in
  7070.      mailing lists. PC-File makes it easy to find and display
  7071.      duplicate records, allowing you to delete them.
  7072.  
  7073.      There are two ways to process duplicate records:
  7074.  
  7075.        Display the duplicate records side by side, then choose to
  7076.        delete the record on the right, on the left, both, or
  7077.        neither of the records.
  7078.  
  7079.        Print a report listing all duplicate records, either on-
  7080.        screen, to a printer, or to a file. Then you can go back and
  7081.        consolidate data and delete duplicate records as necessary.
  7082.  
  7083.  
  7084.  
  7085.      PC-File Version 7 Users Guide                            122
  7086.  
  7087.  
  7088.      If you are the cautious type, you might want to run a report
  7089.      of your duplicate records before you start to compare and
  7090.      delete them on the screen. A report gives you time to check
  7091.      for address changes and other possible causes of duplicates
  7092.      that you might not catch if you go through the records quickly
  7093.      on the screen.
  7094.  
  7095.      How Duplicate Records Are Found
  7096.  
  7097.      Records are checked for duplication by comparing the data in
  7098.      one or more fields. You choose the fields from the database by
  7099.      which you want the data compared. You can choose up to 10
  7100.      fields. Be aware, though, that duplication exists only where
  7101.      two records are identical in all fields being compared. Thus,
  7102.      the more fields you select for comparison, the stiffer the
  7103.      comparison.
  7104.  
  7105.      PC-File ONLY compares adjacent records. For example, the data
  7106.      in the second record is compared to the data in the first and
  7107.      third records, but is NOT compared to the data in the fourth,
  7108.      fifth, or any other records. As the order of the records is
  7109.      based on the current index, it is important that your primary
  7110.      field of comparison (the first comparative field selected)
  7111.      coincides with your current index. If you are using last names
  7112.      as the primary comparison field, for example, a database
  7113.      indexed by
  7114.      zip codes will likely miss some if not all of the
  7115.      duplications.
  7116.  
  7117.      Displaying Duplicate Records
  7118.  
  7119.      Placing duplicate records side by side makes it easy to
  7120.      compare the fields in each record.
  7121.  
  7122.      The two records show two people with the same first and last
  7123.      name, but different addresses. This is in fact two separate
  7124.      people. You would not want to delete either record.
  7125.  
  7126.      To display duplicate records side by side:
  7127.  
  7128.      1.Choose Search from the menu bar.
  7129.  
  7130.      2.Choose Duplicate records from the Search menu.
  7131.  
  7132.      3.Choose one or more fields from the list box by which you
  7133.        want to compare records. The primary field of comparison
  7134.        should match your index. All other comparison fields are up
  7135.        to you. Select no more than 10. You can compare based on a
  7136.        portion of field by typing the notation for a partial field
  7137.        in the text box, e.g. ZIP,1,5 only compares the first 5
  7138.        characters of the ZIP field. See Chapter 1, "Selecting a
  7139.        Field or Partial Field" for more details.
  7140.  
  7141.      4.Choose OK when you finish selecting fields. A dialog box
  7142.        displays.
  7143.  
  7144.  
  7145.  
  7146.      PC-File Version 7 Users Guide                            123
  7147.  
  7148.  
  7149.      5.Choose Now when asked what course you want to take. The
  7150.        first pair of duplicates displays on the screen, along with
  7151.        a dialog box.
  7152.  
  7153.      6.Choose to delete the record on the left side of the screen,
  7154.        the record on the right side of the screen, both records, or
  7155.        neither record. The next pair of duplicates displays.
  7156.  
  7157.      7.Display each pair of duplicates and choose one of the
  7158.        options until you have gone through all the duplicate
  7159.        records. A box displays when you finish, informing you how
  7160.        many duplicate records were displayed and deleted.
  7161.  
  7162.      Printing a Report of Your Duplicate Records
  7163.  
  7164.      A printed report of your duplicate records can be handy for
  7165.      checking address changes, determining what causes duplication,
  7166.      and generally examining your duplicates before deleting any of
  7167.      them.
  7168.  
  7169.      PC-File prompts you to make several choices while defining a
  7170.      duplicates report, as follows:
  7171.  
  7172.      Print to the screen, a printer, or disk
  7173.  
  7174.      Print to the screen if you suspect just a few duplicates or
  7175.      want to check to see if there are any duplicates at all.
  7176.  
  7177.      Print to the default printer if you want a report you can
  7178.      study at length.
  7179.  
  7180.      Print to disk to produce a report that you can read with a
  7181.      word processing program or text editor. PC-File prints an
  7182.      ASCII file called databasename.DUP, located on the current
  7183.      directory. With a word processing program or text editor, you
  7184.      can conduct searches, which can be helpful if you have a lot
  7185.      of duplications. Use this option also if you have no printer
  7186.      currently available.
  7187.  
  7188.      Print all data or compared data
  7189.  
  7190.      You can print data from all the fields in the database for
  7191.      each duplicate record, or just the data in the fields you have
  7192.      chosen for comparison. If you feel you can compare duplicate
  7193.      records adequately with just the comparison data, just print
  7194.      compared data. Otherwise, you probably want to print all the
  7195.      data.
  7196.  
  7197.      If printing to a printer, you can also choose all the fields,
  7198.      then truncate those fields that don't fit within the width of
  7199.      the printer.
  7200.  
  7201.      Do you want to truncate?
  7202.  
  7203.  
  7204.  
  7205.      PC-File Version 7 Users Guide                            124
  7206.  
  7207.  
  7208.      If you are printing to the printer and the fields extend
  7209.      beyond the width of the printer, PC-File asks if you want to
  7210.      truncate the data. Choose Yes to print just the fields that
  7211.      fit. Choosing No results in data being printed off the edge of
  7212.      the paper, wrapping, or being truncated anyway. It depends on
  7213.      your printer.
  7214.  
  7215.      To print a duplicates report:
  7216.  
  7217.      1.Choose Search from the menu bar.
  7218.  
  7219.      2.Choose Duplicate records from the Search menu.
  7220.  
  7221.      3.Choose one or more fields from the list box by which you
  7222.        want to compare records. The primary field of comparison
  7223.        should match your index. All other comparison fields are up
  7224.        to you. Select no more than 10. You can enter a partial
  7225.        field for comparison by entering the field, starting
  7226.        position, and number of characters in the text box. See the
  7227.        section on choosing partial fields in Chapter 1, "Navigating
  7228.        in PC-File."
  7229.  
  7230.  
  7231.      4.Choose OK when you finish selecting fields. A dialog box
  7232.        displays.
  7233.  
  7234.      5.Choose List when asked what action you want to take.
  7235.  
  7236.      6.Choose to print the report to the screen, the printer, or to
  7237.        a file.
  7238.  
  7239.      7.Choose to print all data or just the data from the fields
  7240.        you have chosen for comparison.
  7241.  
  7242.      If you choose to print to the screen, the report displays on
  7243.      the screen. There is no way to stop and start the display if
  7244.      the duplicates run beyond a single screen.
  7245.  
  7246.      If you choose to print to a printer, the printing operation
  7247.      begins unless the fields being printed don't fit within the
  7248.      width of the printer. In that case, PC-File prompts you to
  7249.      truncate the fields to those that do fit.
  7250.  
  7251.      If you choose to print to a disk, PC-File prints a list of the
  7252.      duplicates to a file on the current directory named
  7253.      databasename.DUP.
  7254.  
  7255.      Modifying and Deleting Records
  7256.  
  7257.      The Read-only Mode option on the Edit menu must be off (not
  7258.      checked) to modify or delete records. This is true whether you
  7259.      are modifying or deleting individual records or making global
  7260.      changes or deletions.
  7261.  
  7262.  
  7263.  
  7264.      PC-File Version 7 Users Guide                            125
  7265.  
  7266.  
  7267.      As long as Read-only Mode is off, you can modify or delete a
  7268.      single record any time it is displayed on the screen. Global
  7269.      changes, on the other hand, can be made without displaying the
  7270.      individual records.
  7271.  
  7272.      In some cases, PC-File also lets you undo changes and restore
  7273.      deleted records.
  7274.  
  7275.      Read-only Mode
  7276.  
  7277.      Read-only mode permits the viewing of your data only. This
  7278.      option is provided because it is very easy to modify records
  7279.      otherwise. In Read- only mode you can navigate within records,
  7280.      but you cannot modify data. You can access the menu bar and
  7281.      the button bar; however all options on the Edit menu other
  7282.      than Read-only Mode are grayed out. Only the Edit menu is
  7283.      affected by Read-only mode. There are no limitations on other
  7284.      activities within PC-File, such as creating reports, printing
  7285.      graphs, and so
  7286.      on.
  7287.  
  7288.      Read-only mode is on when the Read-only Mode option is checked
  7289.      on the Edit menu.
  7290.  
  7291.      To toggle Read-only mode on and off:
  7292.  
  7293.      1.Choose Edit from the menu bar.
  7294.  
  7295.      2.Choose Read-only Mode.
  7296.  
  7297.      When a check mark is displayed to the left of the Read-only
  7298.      Mode menu option, Read-only Mode is on. When there is no check
  7299.      mark to the left, Read-only mode is off.
  7300.  
  7301.      Reading to and Writing from the Buffer
  7302.  
  7303.      PC-File provides a buffer that you can read to and write from
  7304.      at anytime. A buffer is a storage area that holds data in
  7305.      memory until it is needed. It is most useful for copying data
  7306.      from one spot and pasting it to another.
  7307.  
  7308.      You can use the buffer to hold data from fields in your
  7309.      records and from the edit window. The buffer is particularly
  7310.      useful when recording a recursive macro to make changes to a
  7311.      group of records. See Chapter 16, "Using Macros," for
  7312.      information on recursive macros.
  7313.  
  7314.      Only one block of data is held in the buffer at a time. If you
  7315.      read another block of data to the buffer, it replaces what was
  7316.      there before. The previous block of data is gone.
  7317.  
  7318.      You can use the following hot keys to read and write to the
  7319.      buffer.
  7320.  
  7321.           Hot key    Function
  7322.  
  7323.  
  7324.  
  7325.      PC-File Version 7 Users Guide                            126
  7326.  
  7327.  
  7328.           CTRL-INS   Read to the buffer
  7329.  
  7330.           SHIFT-DEL  Read to the buffer and delete
  7331.  
  7332.           SHIFT-INS  Write to the screen from the buffer
  7333.  
  7334.  
  7335.      To read to the buffer:
  7336.  
  7337.      1.Select the data you want to read to the buffer.
  7338.  
  7339.      2.Press CTRL-INS to copy the data to the buffer. If you want
  7340.        to copy the data to the buffer and delete it from its
  7341.        current location at the same time, press SHIFT-DEL instead.
  7342.  
  7343.      To write from the buffer:
  7344.  
  7345.      1.Place the cursor where you want the data to appear.
  7346.  
  7347.      2.Press SHIFT-INS to copy from the buffer to the screen.
  7348.  
  7349.      Data remains in the buffer only during the current session.
  7350.      When you exit from PC-File, the buffer is emptied.
  7351.  
  7352.      Modifying a Record
  7353.  
  7354.      Changes can be made to any record displayed on the screen, as
  7355.      long as you are in Modify mode. It doesn't matter whether you
  7356.      displayed the record by paging through your database or by
  7357.      conducting a search. Nor does it matter whether you are in
  7358.      Record view or Table view. If you can move the cursor to the
  7359.      fields in a record, you can change the record.
  7360.  
  7361.      To change a record, simply type in the correct information.
  7362.      You can type right over the previous entry, or erase the field
  7363.      first (by pressing CTRL-B) and then type in the correction.
  7364.      You can also use BACKSPACE and DEL to erase current data.
  7365.  
  7366.  
  7367.      Saving Your Changes
  7368.  
  7369.      Changes made to a record are saved automatically as soon as
  7370.      you leave the record. This is true whether you move to a new
  7371.      record or choose a menu option to begin a new action. Even if
  7372.      you choose Exit on the File menu, the change is saved.
  7373.  
  7374.      Automatic saving works in Table view just as it does in Record
  7375.      view. As soon as you move the cursor from one record to
  7376.      another, any changes made in the previous record are saved.
  7377.  
  7378.      Canceling a Change
  7379.  
  7380.      If you make changes to a record, then decide you don't like
  7381.      the changes, you can undo them. However, you can only undo
  7382.      them if you haven't saved the changes by moving to a new
  7383.      record.
  7384.  
  7385.  
  7386.  
  7387.      PC-File Version 7 Users Guide                            127
  7388.  
  7389.  
  7390.  
  7391.      To undo changes to a record:
  7392.  
  7393.      1.Choose Edit from the menu bar.
  7394.  
  7395.      2.Choose Cancel Changes from the Edit menu, or press CTRL-C or
  7396.        ESC. The record is restored to its state when it was last
  7397.        saved.
  7398.  
  7399.      Recalculating
  7400.  
  7401.      Press ALT-R or choose the Recalc button to rerun any
  7402.      calculations in your records for which data has changed. All
  7403.      the calculations in the current record, whether in a Record
  7404.      view or a Table view, are rerun.
  7405.  
  7406.      This button is most useful for relational lookups in which the
  7407.      data in the lookup database has changed, and for date
  7408.      calculations in which one or more dates have changed.
  7409.  
  7410.      The results of the recalculation display on your screen as
  7411.      soon as the calculation is finished, or when you save the
  7412.      record.
  7413.  
  7414.      Deleting a Record
  7415.  
  7416.      You can delete records in a Record view or a Table view.
  7417.  
  7418.      To delete a record in a Record view:
  7419.  
  7420.      1.Display the record on the screen.
  7421.  
  7422.      2.Choose Edit from the menu bar.
  7423.  
  7424.      3.Choose Delete from the Edit menu.
  7425.  
  7426.      4.Choose Yes when asked to confirm the deletion.
  7427.  
  7428.      The next record replaces the deleted record on the screen. If
  7429.      there is no next record, the previous record is shown.
  7430.  
  7431.      To delete a record in a Table view:
  7432.  
  7433.      1.Place the cursor anywhere within the record you want to
  7434.        delete.
  7435.  
  7436.      2.Choose Edit from the menu bar
  7437.  
  7438.      3.Choose Delete from the Edit menu.
  7439.  
  7440.      4.Choose Yes when asked to confirm the deletion. PC-File
  7441.        refreshes the screen, deleting the record in the process.
  7442.  
  7443.  
  7444.  
  7445.      PC-File Version 7 Users Guide                            128
  7446.  
  7447.  
  7448.      If you change your mind after you have deleted a record, you
  7449.      must use the Undelete option on the Edit menu. See the section
  7450.      below on undeleting records. The Cancel Changes option on the
  7451.      Edit menu restores only fields, not deleted records.
  7452.  
  7453.      NOTE: A record is not removed from the data file when it is
  7454.      deleted, it is only removed from view. For this reason, the
  7455.      record count that displays in the lower left corner of the
  7456.      screen stays the same after deleting records. For the same
  7457.      reason, deleting records does not reduce the size of the data
  7458.      file. You can pack the database to permanently remove all
  7459.      deleted records from the data file. See Chapter 13, "Packing a
  7460.      Database" for details on packing.
  7461.  
  7462.      Modifying Multiple Records
  7463.  
  7464.      You can modify all or a selected group of records in your
  7465.      database at one time, using the Global modify option on the
  7466.      Edit menu. For example, if the post office changes a
  7467.      particular zip code from 98007 to 98008, you can select all
  7468.      the records with the 98007 zip code and change them to 98008
  7469.      without displaying the records.
  7470.  
  7471.      Using Global modify to change a selected group of records
  7472.      assumes that there is some common denominator within the
  7473.      database that you can use as a criteria for selecting those
  7474.      records. The change in the zip code, for example, provides
  7475.      criteria by which you can search for specific records. A batch
  7476.      of address changes from your members, on the other hand, does
  7477.      not provide the criteria necessary to make a global change. In
  7478.      that case you would have to make changes individually.
  7479.  
  7480.      There are also some types of global changes that you can't
  7481.      make with the Global modify option, but that you can make with
  7482.      a recursive macro. Generally those changes involve variable
  7483.      length data and inserting data within other data. See Chapter
  7484.      16, "Using Macros," for information on what types of changes
  7485.      you can make with a recursive macro that you can't make with
  7486.      Global modify.
  7487.  
  7488.      You can only make changes in the open database.
  7489.  
  7490.      To make a global change:
  7491.  
  7492.      1.Choose Edit from the menu bar.
  7493.  
  7494.      2.Choose Global modify from the Edit menu.
  7495.  
  7496.      3.Choose All or Some from the dialog box that displays. Choose
  7497.        All to change ALL the records in the database. Choose Some
  7498.        if you want to make changes to a selected group of records.
  7499.        PC-File prompts you to conduct a search. See the section on
  7500.        searching earlier in this chapter.
  7501.  
  7502.      4.Enter the change or changes on the screen that displays.
  7503.  
  7504.  
  7505.  
  7506.      PC-File Version 7 Users Guide                            129
  7507.  
  7508.  
  7509.      5.Choose OK.
  7510.  
  7511.      6.PC-File displays the first record selected and asks if you
  7512.        want to make changes to the displayed record.
  7513.  
  7514.           Choose Yes to change the current record and display the
  7515.           next.
  7516.  
  7517.           Choose No to leave the displayed record as is, and
  7518.           display the next record.
  7519.  
  7520.           Choose All to make the prescribed changes to the current
  7521.           and all remaining records.
  7522.  
  7523.           Choose Quit to quit the operation.
  7524.  
  7525.      Use spaces to blank out characters in a change.
  7526.  
  7527.      Use wildcards to prevent changes to specific characters within
  7528.      a field you are changing. The wildcard character is the
  7529.      underscore ( _ ). Place it in a field you are changing to
  7530.      indicate you want no change at that particular spot. For
  7531.      example, if you are changing a nine-digit zip code field, but
  7532.      want no changes to the last four digits, use the underscore in
  7533.      the last four spots. Do not use blank spaces in those spots,
  7534.      as they will blank out that portion of the zip code in all
  7535.      records that are changed.
  7536.  
  7537.      Deleting Multiple Records
  7538.  
  7539.      If you want to delete all or a large group of records in your
  7540.      database, you may be able to use the Global delete option on
  7541.      the Edit menu. As with the Global modify option, you can only
  7542.      delete a selected group of records if there is a common
  7543.      denominator that allows you to select these records.
  7544.  
  7545.      You can only delete records in the open database.
  7546.  
  7547.      NOTE: A record is not removed from the data file when it is
  7548.      deleted, it is only removed from view. For this reason, the
  7549.      record count that displays in the lower left corner of the
  7550.      screen stays the same after deleting records. For the same
  7551.      reason, deleting records does not reduce the size of the data
  7552.      file. You can pack the database to permanently remove all
  7553.      deleted records from the data file. See Chapter 13, "Packing a
  7554.      Database" for details on packing.
  7555.  
  7556.      To delete multiple records:
  7557.  
  7558.      1.Choose Edit from the menu bar.
  7559.  
  7560.      2.Choose Global delete from the Edit menu.
  7561.  
  7562.  
  7563.  
  7564.      PC-File Version 7 Users Guide                            130
  7565.  
  7566.  
  7567.      3.Choose All or Some from the dialog box that displays. Choose
  7568.        All to delete ALL the records in the database. Choose Some
  7569.        to delete a selected group of records. PC-File prompts you
  7570.        to conduct a search. See the section on searching earlier in
  7571.        this chapter.
  7572.  
  7573.      4.PC-File displays the first selected record and asks if you
  7574.        want to delete it. Choose Yes to delete the record and
  7575.        display the next record. Choose No to leave it as is and
  7576.        display the next record. Choose All to delete it and all the
  7577.        remaining selected records as well. Choose Quit to quit the
  7578.        operation.
  7579.  
  7580.      Recovering Deleted Records
  7581.  
  7582.      You can restore records that you have deleted if you change
  7583.      your mind about them or find you have deleted them by mistake.
  7584.      This includes records deleted individually or through a global
  7585.      delete.
  7586.  
  7587.      The reason you can recover deleted records is that PC-File
  7588.      doesn't erase records when you delete them. Instead it just
  7589.      removes them from view.
  7590.  
  7591.      However, if you pack the database all deleted records are
  7592.      erased (see Chapter 13, "Packing a Database" for details on
  7593.      packing). Also, redefining the database writes a new copy of
  7594.      the data file which omits deleted records. Therefore, you
  7595.      cannot undelete records deleted before packing or redefining.
  7596.  
  7597.      To recover deleted records:
  7598.  
  7599.      1.Choose Edit from the menu bar.
  7600.  
  7601.      2.Choose Undelete records from the Edit menu. PC-File displays
  7602.        the deleted records that it finds one at a time. You can
  7603.        then choose which records you want to restore.
  7604.  
  7605.  
  7606.  
  7607.      PC-File Version 7 Users Guide                            131
  7608.  
  7609.  
  7610.  
  7611.  
  7612.      CHAPTER 8 SORTING AND INDEXING DATA
  7613.  
  7614.      PC-File uses indexes to sort data. Indexes are normally based
  7615.      on one or more fields in your database. However, they can also
  7616.      include dBASE and PC-File functions, as well as calculations.
  7617.      This chapter tells you how to create and use indexes.
  7618.  
  7619.      Rearranging Data
  7620.  
  7621.      Data in a database is always arranged in some order. It might
  7622.      only be the order that it was entered, but it does have an
  7623.      order. To be most useful for you, it should be arranged
  7624.      according to your needs.
  7625.  
  7626.      To print out mailing labels, for example, you might want the
  7627.      labels arranged in zip code order. To print out a phone list
  7628.      from the same database, however, sorting the records in
  7629.      alphabetical order by last name would be more useful.
  7630.  
  7631.      In PC-File, indexes are used to sort data. Indexes are
  7632.      normally based on fields, the data within the field is used
  7633.      for the sort. Thus, if you index on a zip code field, the data
  7634.      is arranged in the order of the zip code numbers. You can
  7635.      arrange indexes in either ascending or descending order.
  7636.  
  7637.      Indexes can also include functions (normally dBASE functions)
  7638.      and calculations. These are called Formula indexes.
  7639.  
  7640.      You can create several indexes for a database, allowing you to
  7641.      quickly rearrange the data in any order you want it. For
  7642.      example, you could arrange files in zip code order to print
  7643.      out a set of mailing labels, then quickly switch to
  7644.      alphabetical order by last name to print a membership list. If
  7645.      you're viewing your data in a Table view on the screen,
  7646.      switching indexes rearranges the data as you watch.
  7647.  
  7648.      You can also define indexes that sort on multiple fields. For
  7649.      example, you can create an index that sorts first on the last
  7650.      name field, then on the first name field. Thus, when you get
  7651.      to the Smiths, Andy would appear first, then Bob, then
  7652.      Charles.
  7653.  
  7654.      PC-File also lets you create one index for each database that
  7655.      is based on a selected group of records only. This is called a
  7656.      Subgroup index. You can redefine this index whenever the need
  7657.      arises.
  7658.  
  7659.      Along with sorting data, indexes speed up the process of
  7660.      searching for records. Conducting a search using an indexed
  7661.      field is a faster operation than conducting the search on a
  7662.      non-indexed field.
  7663.  
  7664.      Unindexed Order
  7665.  
  7666.  
  7667.  
  7668.      PC-File Version 7 Users Guide                            132
  7669.  
  7670.  
  7671.      Sometimes, you will find it advantageous to use no indexes.
  7672.      You can see the data in the order in which it was entered by
  7673.      using the Unindexed Order option. This option can be useful
  7674.      when you have small databases because you don't need to create
  7675.      additional files, and searches are still fast because there is
  7676.      little data.
  7677.  
  7678.      Indexing Operations
  7679.  
  7680.      When you create a database, you don't need to define an index.
  7681.      However, an index can be very useful because it displays your
  7682.      data in a particular order. One index may be all you need.
  7683.      However, it is likely that you will find a need for additional
  7684.      indexes, or that you need to modify a current index. When you
  7685.      do, choose Index Maintenance from the File menu. PC-File
  7686.      displays a dialog box.
  7687.  
  7688.      The command buttons are used to access each of the indexing
  7689.      operations. These operations are described briefly below.
  7690.  
  7691.      Make Index
  7692.  
  7693.      If you find a need for an index, it is easy to create one. You
  7694.      will find yourself creating indexes as the need arises. For
  7695.      example, you can decide what indexes you need as you create
  7696.      reports that require specific sorting options. When that
  7697.      occurs, choose this option from the dialog box to define the
  7698.      index.
  7699.  
  7700.      Make Subgroup
  7701.  
  7702.      Use this option when you want to work with a specific subset
  7703.      of records from the whole database. If you wanted to print all
  7704.      the records that have a specific zipcode, you would create a
  7705.      subgroup of only those records. Using this index, PC-File
  7706.      would only need to manipulate these records and not the whole
  7707.      database. When you have a large database and only need to work
  7708.      with one easily identifiable portion, this is a convenient way
  7709.      to do it.
  7710.  
  7711.      Delete Index
  7712.  
  7713.      If you find you have created indexes you don't use, delete
  7714.      them. Updating indexes when you add or modify data takes time,
  7715.      so keep only those you need. Select the index to delete, then
  7716.      choose this option from the dialog box.
  7717.  
  7718.      Rename Index
  7719.  
  7720.      If you want to change the name you gave an index, you can
  7721.      rename it. Renaming does not affect the DOS file name, only
  7722.      the description used to identify the index.
  7723.  
  7724.      Rebuild Index
  7725.  
  7726.  
  7727.  
  7728.      PC-File Version 7 Users Guide                            133
  7729.  
  7730.  
  7731.      If you suspect that you have a "bad" index, rebuild that
  7732.      index. A "bad" index usually results from some unforeseen
  7733.      trouble like a power outage while adding records. Use this
  7734.      option to rebuild only one index. In some cases, PC-File
  7735.      prompts you to rebuild an index when it encounters a problem
  7736.      with an index. See Chapter 13, "Repairing a Database" for more
  7737.      information.
  7738.  
  7739.      Rebuild All
  7740.  
  7741.      Use this option to rebuild all the indexes associated with a
  7742.      database. See Rebuild Indexes above for more information.
  7743.  
  7744.      Switching Indexes
  7745.  
  7746.      PC-File lets you switch indexes at almost any time. You may
  7747.      want to switch indexes prior to printing a report or while
  7748.      paging through a Table view of your records.
  7749.  
  7750.      NOTE: The current index is always listed on the status line at
  7751.      the bottom of the main screen.
  7752.  
  7753.      There are three ways to switch indexes in PC-File:
  7754.  
  7755.      Press CTRL-I
  7756.  
  7757.      Use this hot key to display a list of the indexes defined for
  7758.      the current database. Choose the index you want from the list.
  7759.  
  7760.      Use the menu
  7761.  
  7762.      Choose Index Switch from the File menu, then choose the
  7763.      appropriate index from the list.
  7764.  
  7765.      Let PC-File switch the index automatically
  7766.  
  7767.      PC-File lets you choose whether to automatically switch
  7768.      indexes when performing Simple and Formula searches. This is
  7769.      called autoswitching. When you conduct a search for records
  7770.      with autoswitching on, PC-File automatically switches indexes
  7771.      to the field you are searching on, if that field is indexed.
  7772.      This will generally make the search go faster. PC-File will
  7773.      also autoswitch to unindexed access if that is the most
  7774.      efficient way to perform the search. If the search field is
  7775.      not indexed, PC-File
  7776.      maintains the current index.
  7777.  
  7778.      If you want to prevent an automatic index switch, turn off the
  7779.      Autoswitch option from the Simple or Formula search screen.
  7780.      See Chapter 7, "Index Autoswitching" for more information on
  7781.      the Autoswitch feature.
  7782.  
  7783.      To switch indexes:
  7784.  
  7785.      1.Choose File from the menu bar.
  7786.  
  7787.  
  7788.  
  7789.      PC-File Version 7 Users Guide                            134
  7790.  
  7791.  
  7792.      2.Choose Index Switch from the File menu. As an alternative to
  7793.        steps 1 and 2, press CTRL-I. The Switch Index dialog box
  7794.        displays.
  7795.  
  7796.      3.Choose the index you want from the list. Data is arranged
  7797.        according to the new index.
  7798.  
  7799.      In PC-Label, the hot key CTRL-I doesn't function. To switch
  7800.      indexes, choose Define/modify setup from the PC-Label Main
  7801.      Menu. On the setup screen, choose Define Search to display a
  7802.      list of the current indexes. Choose the one you want. The list
  7803.      of indexes only displays if you have more than one index
  7804.      defined in the database.
  7805.  
  7806.  
  7807.      Index Maintenance Operations
  7808.  
  7809.      Indexes are very helpful in managing your data, and generally,
  7810.      you will employ indexes at one time or another. You create and
  7811.      maintain indexes using the Index Maintenance option on the
  7812.      File menu which displays a dialog box.
  7813.  
  7814.      When you create an index, you designate which field or fields
  7815.      take precedence in sorting the data. For example, in a list of
  7816.      names and addresses, you could sort the data by first names,
  7817.      by last names, by addresses, cities, and so on. Obviously,
  7818.      some fields make more sense for sorting than others. If you
  7819.      are creating mailing labels, you probably want to sort by zip
  7820.      codes. If you are creating a phone list, sorting by last name
  7821.      is more logical, or, if it's a short list, perhaps by first
  7822.      name.
  7823.  
  7824.      In a database, you can determine what fields to sort by as the
  7825.      need arises. If you have created a database to print mailing
  7826.      labels, then decide later to use the same list to keep track
  7827.      of membership renewals, you can add an index based on the
  7828.      renewal date.
  7829.  
  7830.  
  7831.  
  7832.      Choosing the Type of Index
  7833.  
  7834.      To create a new index, choose Index Maintenance from the File
  7835.      menu, then choose Make Index from the dialog box. PC-File
  7836.      displays the following dialog box, prompting you to choose the
  7837.      type of index you want to create.
  7838.  
  7839.      Choose either the Simple index or Formula index option.
  7840.  
  7841.      A Simple index lets you sort data directly on the contents of
  7842.      one or more fields. You can:
  7843.  
  7844.        Sort on up to 10 fields, each one sorting within the
  7845.        previous field
  7846.  
  7847.        Order each field in ascending or descending order
  7848.  
  7849.  
  7850.  
  7851.      PC-File Version 7 Users Guide                            135
  7852.  
  7853.  
  7854.  
  7855.        Sort on partial fields
  7856.  
  7857.      Simple indexes should handle most of your indexing needs.
  7858.      However, there are some kinds of indexes you can't define with
  7859.      the Simple index option. For those you need to create a
  7860.      Formula index.
  7861.  
  7862.      A Formula index allows for a wider range of index definitions
  7863.      by letting you define an index in the form of an expression.
  7864.      With an expression, you can enter dBASE and PC-File functions.
  7865.      Functions allow you to:
  7866.  
  7867.        Enter a calculation as part of an index
  7868.  
  7869.        Define an index based on the record number
  7870.  
  7871.      Both Simple indexes and Formula indexes are explained in depth
  7872.      below.
  7873.  
  7874.      Defining a Simple Index
  7875.  
  7876.      A Simple index lets you sort data directly on the contents of
  7877.      one or more fields. For example, you can create an index based
  7878.      on a single zip code field. You can also create an index based
  7879.      on both a last name field and on a first name field. You can
  7880.      include up to 10 fields in an index.
  7881.  
  7882.      Each field you add in an index is nested, in a sense, within
  7883.      the previous field. Thus, in the above example, last names are
  7884.      sorted first, then first names are sorted within the last
  7885.      names. The Johnsons would appear before the Kelloggs, and
  7886.      within the list of Johnsons, Bob would appear before Kathleen
  7887.      and Kathleen before Vicki.
  7888.  
  7889.      Whether you index on a single field or multiple fields, each
  7890.      field is sorted in ascending or descending order. Ascending
  7891.      order sorts spaces first, then 0 to 9, then A to Z, and from
  7892.      earlier to later. Descending order runs in the opposite
  7893.      direction. The default is ascending order.
  7894.  
  7895.      For indexes with multiple fields, you select the order for
  7896.      each field individually. Thus, if you define an index sorted
  7897.      first on state, then on zip code, you could sort the state
  7898.      field in descending order and the zip code field in ascending
  7899.      order.
  7900.  
  7901.      You can also sort on partial fields, in both single and
  7902.      multiple field indexes. Thus, you could index first on a state
  7903.      field, then on just the first five characters of a 10-
  7904.      character zip code field.
  7905.  
  7906.  
  7907.  
  7908.      PC-File Version 7 Users Guide                            136
  7909.  
  7910.  
  7911.      NOTE: You can't sort memo fields. You can sort date fields,
  7912.      but you can't sort dates in character-type fields with a
  7913.      Simple index. If you try to sort dates in character fields,
  7914.      08/27/78 would sort after 03/27/91, as the date would be
  7915.      treated as a string and 08 comes after 03.
  7916.  
  7917.      To define a simple index:
  7918.  
  7919.      1.Choose File from the menu bar.
  7920.  
  7921.      2.Choose Index Maintenance from the File menu. The Index
  7922.        Maintenance dialog box displays.
  7923.  
  7924.      3.Choose Make Index. PC-File prompts you to choose the type of
  7925.        index.
  7926.  
  7927.      4.Choose Simple index. A field selection dialog box displays.
  7928.  
  7929.      5.Determine the sorting order for the primary field. Leave the
  7930.        default of Ascending, or choose the Descending option
  7931.        button.
  7932.  
  7933.      6.Choose the primary field you want to sort on. The field you
  7934.        select is checked and displays in the Selected list. The
  7935.        number 1 and the letter A (for ascending) or D (for
  7936.        descending) displays next to the field name. If you are
  7937.        indexing on just a single field, choose OK and skip the next
  7938.        two steps.
  7939.  
  7940.      7.If you are defining a multiple-field index, repeat the
  7941.        previous two steps for each field you add. First determine
  7942.        the order by choosing the appropriate option button, then
  7943.        choose the field. The second field you choose appears in the
  7944.        Selected list right below the first field with the
  7945.        appropriate letter, A or D, next to it; the third field
  7946.        appears below the first two with the appropriate letter next
  7947.        to it, and so on. You can choose a partial field instead of
  7948.        an entire field for any part of the index. To do so, enter
  7949.        the field name, starting position, and number of characters
  7950.        in the text box. See the section on choosing partial fields
  7951.        in Chapter 1, "Navigating in PC-File," for more information
  7952.        on this operation.
  7953.  
  7954.      8.Choose OK when you finish.
  7955.  
  7956.      9.Enter a description up to 30 characters long for the index
  7957.        when prompted or leave the default suggestion. A status box
  7958.        displays indicating the how the index building operation is
  7959.        proceeding. This may take a long time on large databases.
  7960.        Once the index is completely built, PC-File displays an
  7961.        information box indicating that the new index is now
  7962.        current.
  7963.      10.  Choose OK.
  7964.  
  7965.      11.  Choose OK to clear the information box.
  7966.  
  7967.  
  7968.  
  7969.      PC-File Version 7 Users Guide                            137
  7970.  
  7971.  
  7972.      Defining a Formula Index
  7973.  
  7974.      When you create a formula index, you enter an expression in a
  7975.      text box. With index expressions, you can enter dBASE and PC-
  7976.      File functions, as well as calculations.
  7977.  
  7978.      Functions are commands that perform a specific, predefined
  7979.      action. For example, the function UPPER converts all
  7980.      characters to uppercase. The function TOSTR converts all non-
  7981.      character field data to character strings.
  7982.  
  7983.      Index expressions range from basic to complex. The following
  7984.      illustrates a basic index expression:
  7985.  
  7986.      UPPER(Lastname)
  7987.  
  7988.      This expression defines a single field index for the field
  7989.      Lastname. The function UPPER converts all characters to
  7990.      uppercase. That forces the field to sort without concern for
  7991.      case sensitivity. It also assumes that case sensitivity
  7992.      remains turned off in your configuration profile.
  7993.  
  7994.      It is unlikely you would define this index with the Formula
  7995.      option, as you could create the same index more quickly with
  7996.      the Simple index option. (The function UPPER is assumed in
  7997.      Simple indexes as long as case sensitivity is turned off.)
  7998.  
  7999.      A more complex index expression might look like this:
  8000.  
  8001.      SUBSTR(Part_no,4,2) + LEFT(Code,3) + TOSTR(Date)
  8002.  
  8003.      This expression defines an index based on three fields. Both
  8004.      the Part_no and Code fields are character fields. The SUBSTR
  8005.      function performs the same operation as defining a partial
  8006.      field in a Simple index. The LEFT function also lets you
  8007.      define a partial field, but the field always starts with the
  8008.      first character in the field. In the example above, it uses
  8009.      the first three characters of the Code field. The TOSTR
  8010.      function converts the date into a character string. This
  8011.      expression can also be accomplished with a Simple index.
  8012.  
  8013.      PC-File lets you pattern a new index after any other index
  8014.      within the current database. When you get ready to enter an
  8015.      index expression, choose the Pattern button instead. PC-File
  8016.      displays the list of indexes. Choose the one you want to use.
  8017.      PC-File enters the index expression in the text box. You can
  8018.      then edit it to fit your new index.
  8019.  
  8020.      To create a Formula index:
  8021.  
  8022.      1.Choose File from the menu bar.
  8023.  
  8024.      2.Choose Index Maintenance from the File menu. The Index
  8025.        Maintenance dialog box displays.
  8026.  
  8027.  
  8028.  
  8029.      PC-File Version 7 Users Guide                            138
  8030.  
  8031.  
  8032.      3.Choose Make Index. PC-File prompts you to choose the type of
  8033.        index.
  8034.  
  8035.      4.Choose Formula index. A text box displays.
  8036.  
  8037.      5.Enter an index expression in the text box. Choose the
  8038.        Pattern after button if there is another index expression
  8039.        after which you want to pattern the current index. Choose
  8040.        the appropriate index when prompted.
  8041.  
  8042.      6.Choose OK when you finish entering the index expression.
  8043.  
  8044.      7.Enter a description up to 30 characters long for the index
  8045.        when prompted or leave the default suggestion.
  8046.  
  8047.      8.Choose OK. A status box displays indicating the how the
  8048.        index building operation is proceeding. This may take a long
  8049.        time on large databases. Once the index is completely built,
  8050.        PC-File displays an information box indicating that the new
  8051.        index is now current.
  8052.  
  8053.      9.Choose OK to clear the information box.
  8054.  
  8055.      NOTE: As with Simple indexes, you can't use memo fields in
  8056.      Formula indexes.
  8057.  
  8058.      Guidelines for Formula Indexes
  8059.  
  8060.      There are a few guidelines you should keep in mind when
  8061.      creating Formula indexes:
  8062.  
  8063.        Use complete field names in index expressions.
  8064.  
  8065.        Expressions are limited to 100 characters.
  8066.  
  8067.        The data that results from the expression is also limited to
  8068.        100 characters. Thus, you could not sort on two 60-character
  8069.        fields together. Use partial fields for one or both of them.
  8070.  
  8071.        If you are mixing field types within an expression, convert
  8072.        all the fields to character strings, using the TOSTR or STR
  8073.        functions.
  8074.  
  8075.        Ensure that you use the same number of left and right
  8076.        parentheses in an expression.
  8077.  
  8078.        When you use the CALC function, enclose the calculation
  8079.        within quotation marks as well as within parentheses. For
  8080.        example: CALC("Amount + 3")
  8081.  
  8082.        Expressions are evaluated left to right and inside of
  8083.        parentheses first. For example, in the expression CALC("5 *
  8084.        (2 + 3)"), the addition of 2 + 3 takes place first, then the
  8085.        result is multiplied by 5. The result is 25. If the
  8086.        expression read CALC("(5 * 2) + 3"), 5 is multiplied by 2
  8087.        and the result is added to 3. The result is 13.
  8088.  
  8089.  
  8090.  
  8091.      PC-File Version 7 Users Guide                            139
  8092.  
  8093.  
  8094.  
  8095.      Formula Functions
  8096.  
  8097.      You can find a complete list of dBASE functions in a dBASE
  8098.      manual. The ones most often employed in indexing in PC-File
  8099.      are explained below. This list also contains four functions
  8100.      specific to PC-File.
  8101.  
  8102.      UPPER(field)
  8103.  
  8104.      Converts all characters to uppercase before performing the
  8105.      action. This makes the expression case insensitive. Use this
  8106.      expression only when you have case sensitivity for sorting
  8107.      turned OFF in your configuration profile.
  8108.  
  8109.      SUBSTR(field,starting position,length)
  8110.  
  8111.      Use this function to define a partial field for sorting.
  8112.  
  8113.      LEFT(field,length)
  8114.  
  8115.      This function also creates a partial field, in this case
  8116.      starting with the first character and running to the right the
  8117.      prescribed length.
  8118.  
  8119.      RIGHT(field,length)
  8120.  
  8121.      The opposite of the previous function. Creates a partial field
  8122.      starting with the last character and running to the left the
  8123.      prescribed number of characters.
  8124.  
  8125.      TOSTR(field)
  8126.  
  8127.      Converts the data in a numeric, date, or logical field to a
  8128.      character string so that it can be indexed. Indexes in
  8129.      ascending order. This function is specific to PC-File.
  8130.  
  8131.      STR(field,length,decimal)
  8132.  
  8133.      Converts numeric values to a character string for indexing.
  8134.      Specify the length and the number of places to the right of
  8135.      the decimal. Because you can specify the length with this
  8136.      function, it produces a much shorter result than the TOSTR
  8137.      function, and thus is recommended when converting numeric
  8138.      values.
  8139.  
  8140.      DESCEND(field)
  8141.  
  8142.      This function operates like the TOSTR function, in that it
  8143.      converts the data in a numeric, date, or logical field to a
  8144.      character string. However, it indexes in descending order.
  8145.  
  8146.      VAL(field)
  8147.  
  8148.  
  8149.  
  8150.      PC-File Version 7 Users Guide                            140
  8151.  
  8152.  
  8153.      The opposite of TOSTR in that it converts a character string
  8154.      to a numeric value. Use it for indexing numeric data in
  8155.      character-type fields when the data is of different lengths.
  8156.  
  8157.      RECNO( )
  8158.  
  8159.      Each record is assigned a record number within the data file
  8160.      based on the order it was entered. This function sorts the
  8161.      records in that order.
  8162.  
  8163.      IIF(condition, field1,field2)
  8164.  
  8165.      If condition is true, uses the data in field 1 as the index
  8166.      data. If condition is false, uses the data in field 2 instead.
  8167.      This function is most often used to sort data based on the
  8168.      second expression when the first expression comes up with a
  8169.      blank.
  8170.  
  8171.      SOUNDEX(field)
  8172.  
  8173.      Use this function to sort data that sounds alike. Thus, if
  8174.      used with a last name field, this function would sort names
  8175.      that are similar in sound together. For example, Smith and
  8176.      Smythe would sort together. This function is specific to PC-
  8177.      File.
  8178.  
  8179.      ROMAN(field)
  8180.  
  8181.      Converts roman numerals to numbers before sorting. Like the
  8182.      previous function, this function is specific to PC-File.
  8183.  
  8184.      CALC("calculation")
  8185.  
  8186.      Use this PC-File function for any calculation you want to use
  8187.      in an index. Use both quotation marks and parentheses around
  8188.      the calculation itself.
  8189.  
  8190.      Examples of Formula Indexes
  8191.  
  8192.      The following examples illustrate some Formula indexes.
  8193.      Several basic examples are illustrated first to show how to
  8194.      put an expression together.
  8195.  
  8196.      Multi-level Sorting
  8197.  
  8198.      You can define a multi-level index in either the Simple index
  8199.      option or the Formula index option. A Formula multi-level
  8200.      index expression looks like this:
  8201.  
  8202.      UPPER(Lastname + Firstname)
  8203.  
  8204.      The function UPPER converts all characters to uppercase,
  8205.      essentially causing the index to sort without sensitivity to
  8206.      case. The first field in the expression, Lastname, is the
  8207.      primary sort field. Thus, records are sorted first on the last
  8208.      name and then on the first name.
  8209.  
  8210.  
  8211.  
  8212.      PC-File Version 7 Users Guide                            141
  8213.  
  8214.  
  8215.  
  8216.      This expression is equivalent to a Simple index in which you
  8217.      selected the Lastname field as the first field and the
  8218.      Firstname field as the second field.
  8219.  
  8220.      You can also enter the expression in this way:
  8221.  
  8222.      UPPER(Lastname) + UPPER(Firstname)
  8223.  
  8224.      Since there is a limit of 100 characters for expressions, it
  8225.      is recommended that you use the first method above, which is
  8226.      shorter. If you are sorting on character fields, you may
  8227.      string as many of these expressions together as will fit in
  8228.      the 100-character window. For example, you could define this
  8229.      index:
  8230.  
  8231.      UPPER(Company+Dept_No+Manager+Employee+Acct_no)
  8232.  
  8233.      As with Simple indexes, you can sort to 10 levels in a Formula
  8234.      index.
  8235.  
  8236.      Indexing Multiple Non-Character Fields
  8237.  
  8238.      If you define a multiple field index, some or all of which are
  8239.      non- character fields, you must convert all the fields to
  8240.      character strings. The only exception to this rule is an index
  8241.      with all numeric fields in which you want to add the data
  8242.      together before indexing.
  8243.  
  8244.      Thus, if you index on a character field and a date field,
  8245.      convert the date field to a character string. The same rule
  8246.      applies if you combine a date field and a numeric field, or
  8247.      any other combination of field types.
  8248.  
  8249.      NOTE: You can't index on memo fields, no matter what you try
  8250.      to do to them.
  8251.  
  8252.      Use the function TOSTR to convert date and logical fields to
  8253.      character strings and the function STR to convert numeric
  8254.      fields to a character string. Several examples illustrate the
  8255.      use of these functions.
  8256.  
  8257.      If you indexed on the company name and the company number,
  8258.      your index expression might look like this:
  8259.  
  8260.      UPPER(Company) + STR(Comp_no,8,0)
  8261.  
  8262.      The STR function converts the numeric field Comp_no to a
  8263.      character string.
  8264.  
  8265.      The following index, used in the Donation database,
  8266.      illustrates the conversion of a date field to a character
  8267.      string:
  8268.  
  8269.      UPPER(Member_no) + TOSTR(Date)
  8270.  
  8271.  
  8272.  
  8273.      PC-File Version 7 Users Guide                            142
  8274.  
  8275.  
  8276.      In the case of date fields only, PC-File reorders the data
  8277.      internally so that it reads the date as year, month, and day.
  8278.      That way the date is sorted properly.
  8279.  
  8280.      If you index on two date fields, convert both of them to
  8281.      character strings:
  8282.  
  8283.      TOSTR(Duedate) + TOSTR(Duedate2)
  8284.  
  8285.      In most cases, you also want to convert the numeric fields in
  8286.      an index containing multiple fields to character strings. If
  8287.      you leave the data as numeric values, PC-File adds the data in
  8288.      each record before indexing it. That would result in a
  8289.      different index order than you would get if you converted the
  8290.      data to character strings.
  8291.  
  8292.      Indexing Character Fields Containing Numeric Data
  8293.  
  8294.      If you have a character field that contains numeric data, you
  8295.      may want to convert the character data to numeric values for
  8296.      sorting. This is necessary because character fields locate
  8297.      data flush left, which can cause problems if the values are of
  8298.      different length. The following example illustrates how a
  8299.      character field containing numeric values might sort: 1, 10,
  8300.      100, 2, 26.
  8301.  
  8302.      Changing these character strings to numeric values forces them
  8303.      to sort in the proper numeric order, as follows: 1, 2, 10, 26,
  8304.      100.
  8305.  
  8306.      Use the function VAL to convert character strings to numeric
  8307.      values. An index might look like this:
  8308.  
  8309.      VAL(MemberID)
  8310.  
  8311.      If the numeric data in a character field is all the same
  8312.      length, the conversion to numeric values is unnecessary.
  8313.  
  8314.      Sorting by Record Number
  8315.  
  8316.      When you add data to a database, PC-File derives an internal
  8317.      record number for each record. The first record is assigned
  8318.      number 1, the second record number 2, and so on. Within limits
  8319.      (see note below), you can sort your data in the order it was
  8320.      entered by sorting on the derived record number.
  8321.  
  8322.      Use the function RECNO to sort by record number. To sort on
  8323.      the record number alone, enter the expression RECNO( ) in the
  8324.      text box. Be sure to use the parentheses, but with nothing
  8325.      between them. If you combine the record number with other
  8326.      fields in an index, convert the record number to a character
  8327.      string, like this:
  8328.  
  8329.      UPPER(Lastname + STR(RECNO(),6,0)
  8330.  
  8331.  
  8332.  
  8333.      PC-File Version 7 Users Guide                            143
  8334.  
  8335.  
  8336.      NOTE: If you delete records, records added later replace the
  8337.      deleted records. The record numbers of the deleted records are
  8338.      assigned to the new records-in this case, RECNO will not give
  8339.      you an accurate representation of the order the data was
  8340.      entered.
  8341.  
  8342.      Increasing Speed on Large Databases with Duplicate Entries
  8343.  
  8344.      Adding, modifying, and searching for records in large
  8345.      databases with a large number of duplicate entries can slow
  8346.      PC-File down. This is because indexes are most efficient when
  8347.      PC-File is searching for unique entries. For example, suppose
  8348.      you have a large database indexed on Last_name and you have a
  8349.      1000 entries under the name Smith. If you search for the most
  8350.      recently added Smith record, PC- File has to search through
  8351.      the 999 previous entries before it can locate the record you
  8352.      want. You can make PC-File operate faster by defining a
  8353.      Formula index that adds the record number at the end of the
  8354.      Last_name index entry, like this:
  8355.  
  8356.      UPPER(Last_name + STR(RECNO(),6,0))
  8357.  
  8358.      You should consider using this type of index if more than 10
  8359.      records have the same duplicated index information. It is
  8360.      especially helpful if you have a large number of records where
  8361.      the indexed field is blank.
  8362.  
  8363.      Using a Calculation to Sort
  8364.  
  8365.      You can sort on a calculation. Normally, the calculation used
  8366.      in indexes involve arithmetic operations involving two or more
  8367.      numeric fields. For example, you can subtract the data in one
  8368.      field from another, and index on the balance. Or you can add
  8369.      the values in two or more fields together.
  8370.  
  8371.      You can use the PC-File function CALC to perform calculations,
  8372.      or you can perform them without a function. Use the CALC
  8373.      function if you want to abbreviate field names, as in the
  8374.      example below, and when performing date calculations. The CALC
  8375.      function is the only indexing function that allows you to
  8376.      abbreviate field names.
  8377.  
  8378.      For example, an index in the sample database called Attend
  8379.      looks like this:
  8380.  
  8381.      CALC("Pr + Y + A + Sn + Pa + C + Sp + Sc + O")
  8382.  
  8383.      This calculation adds the attendance figures for each category
  8384.      together and then sorts on the total. The field names are
  8385.      shortened to conserve space, but remain unique within the
  8386.      database.
  8387.  
  8388.  
  8389.      Creating a Subgroup Index
  8390.  
  8391.  
  8392.  
  8393.      PC-File Version 7 Users Guide                            144
  8394.  
  8395.  
  8396.      You can create one index within a database that sorts a
  8397.      selected group of records. This can be a time-saver when
  8398.      working with a large database.
  8399.  
  8400.      For example, you might want to send out a mailing to just
  8401.      those people who have been members for more than 40 years. If
  8402.      this group amounts to about 300 out of 20,000 members, you
  8403.      could create a separate zipcode index for just those 300
  8404.      members. Then, when you get ready to print mailing labels, PC-
  8405.      File doesn't have to search through your entire database to
  8406.      find and print labels for 300 records. For a large database,
  8407.      this can save a lot of time, even if you only print the labels
  8408.      once.
  8409.  
  8410.      You can have only one Subgroup index within any given database
  8411.      and it will always be named Subgroup Index. If you try to
  8412.      create another Subgroup index, PC-File will prompt you to
  8413.      delete your existing subgroup index before proceeding to
  8414.      create one.
  8415.  
  8416.      Subgroup indexes are designed to be used on a temporary basis.
  8417.      Create a new Subgroup index every time you find a need for
  8418.      using just a small part of a large database. You can use
  8419.      Subgroup indexes for reports, letters, labels, redefining
  8420.      databases, and graphs.
  8421.  
  8422.      A Subgroup index can be a Simple or Formula index. It is
  8423.      created much the same way as you have defined one of your
  8424.      other indexes.
  8425.  
  8426.      To create a Subgroup index:
  8427.  
  8428.      1.Choose File from the menu bar.
  8429.  
  8430.      2.Choose Index Maintenance from the File menu. The Index
  8431.        Maintenance dialog box displays.
  8432.  
  8433.      3.Choose Make Subgroup. If you already have a Subgroup Index,
  8434.        you will be prompted to delete it before moving onto the
  8435.        next step in the procedure. A dialog box displays prompting
  8436.        you to choose the type of index to define. You can select
  8437.        either type of index to create. Subgroup indexes can be
  8438.        either simple or formula indexes. See above, "Defining a
  8439.        Simple Index" or "Defining a Formula Index" for more
  8440.        information.
  8441.  
  8442.      4.Choose the kind of index you want to make and define the
  8443.        index as you would any other index. PC-File prompts you to
  8444.        choose the type of search.
  8445.  
  8446.      5.Choose Simple or Formula search. See Chapter 7, "Finding and
  8447.        Modifying Data," for more information on searches.
  8448.  
  8449.      6.Define the search criteria. PC-File performs the search and
  8450.        defines the index.
  8451.  
  8452.  
  8453.  
  8454.      PC-File Version 7 Users Guide                            145
  8455.  
  8456.  
  8457.      When you get ready to perform the operation that requires the
  8458.      Subgroup index, press CTRL-I to switch indexes. Choose the
  8459.      index labeled Subgroup Index from the list. This index remains
  8460.      current until you switch indexes again.
  8461.  
  8462.      Once a Subgroup index is defined, it remains available until
  8463.      you overwrite the file with a new Subgroup index for that
  8464.      database. However, all updated records within the database are
  8465.      added to this index, even if they wouldn't have been included
  8466.      initially. For example, if you defined the subgroup to include
  8467.      records where State = CA, all records added or modified in the
  8468.      database since you created the Subgroup index are added to it,
  8469.      no matter what the State. Thus, you need to recreate this
  8470.      index if
  8471.      you update the database.
  8472.  
  8473.  
  8474.      Renaming an Index
  8475.  
  8476.      You may find it necessary to rename an index. PC-File allows
  8477.      you to do this easily.
  8478.  
  8479.      To rename an index:
  8480.  
  8481.      1.Choose File from the menu bar.
  8482.  
  8483.      2.Choose Index Maintenance from the File menu. The Index
  8484.        Maintenance dialog box displays including a list of the
  8485.        available indexes.
  8486.  
  8487.      3.Select the index you want to rename from the Indexes list.
  8488.  
  8489.      4.Choose Rename Index. The Rename Index dialog box will
  8490.        display.
  8491.  
  8492.      5.Type in a new name up to 30 characters long.
  8493.  
  8494.      6.Choose OK.
  8495.  
  8496.      Modifying an Index Expression
  8497.  
  8498.      If you find that an index doesn't quite work the way you
  8499.      hoped, you can modify the index expression using the Formula
  8500.      option and try it again. To modify an expression, start by
  8501.      making a new index, then display a pattern of the one you want
  8502.      to edit. Make changes to expression, then build the new index.
  8503.      Then delete the original "problem" index as described in the
  8504.      "Deleting an Index" section later in this chapter.
  8505.  
  8506.      To modify an index expression:
  8507.  
  8508.      1.Choose File from the menu bar.
  8509.  
  8510.      2.Choose Index Maintenance from the File menu.
  8511.  
  8512.      3.Choose Make Index.
  8513.  
  8514.  
  8515.  
  8516.      PC-File Version 7 Users Guide                            146
  8517.  
  8518.  
  8519.  
  8520.      4.Choose Formula.
  8521.  
  8522.      5.Choose the Pattern after button.
  8523.  
  8524.      6.Choose the index you want to use as a pattern.
  8525.  
  8526.      7.Modify the expression.
  8527.  
  8528.      8.Choose OK.
  8529.  
  8530.      9.Enter a name for the index up to 30 characters long or
  8531.        accept the default.
  8532.  
  8533.      10.  Choose OK. PC-File builds the index.
  8534.  
  8535.      11.  Delete the old index as described in the "Deleting an
  8536.        Index" section later in this chapter.
  8537.  
  8538.      Rebuilding Indexes
  8539.  
  8540.      Sometimes indexes need to be rebuilt. Rebuilding an index
  8541.      recreates the index, though with the same definition, the same
  8542.      name, and the same file name. If you want to make changes to
  8543.      the index, you have to make a new index instead.
  8544.  
  8545.      PC-File allows you to rebuild just one index or all your
  8546.      indexes at once. The Index Maintenance dialog box provides
  8547.      both options. There are two ways to rebuild indexes:
  8548.  
  8549.        Choose "Rebuild Index" or "Rebuild All" from the Index
  8550.        Maintenance dialog box
  8551.  
  8552.        Choose "Rebuild the index" when PC-File prompts you to
  8553.        rebuild an index
  8554.  
  8555.      If you suspect a problem with an index, rebuilding the indexes
  8556.      in the database may solve the problem. For example, if your
  8557.      searches aren't working properly, try rebuilding the indexes.
  8558.      You may find that takes care of the problem.
  8559.  
  8560.      To rebuild one index:
  8561.  
  8562.      1.Choose File from the menu bar.
  8563.  
  8564.      2.Choose Index Maintenance from the File menu. The Index
  8565.        Maintenance dialog box displays including a list of the
  8566.        available indexes.
  8567.  
  8568.      3.Select the index to rebuild from the Indexes list.
  8569.  
  8570.      4.Choose Rebuild Index. PC-File rebuilds that index.
  8571.  
  8572.      To rebuild all indexes:
  8573.  
  8574.      1.Choose File from the menu bar.
  8575.  
  8576.  
  8577.  
  8578.      PC-File Version 7 Users Guide                            147
  8579.  
  8580.  
  8581.  
  8582.      2.Choose Index Maintenance from the File menu. The Index
  8583.        Maintenance dialog box displays.
  8584.  
  8585.      3.Choose Rebuild All.
  8586.  
  8587.      4.Choose OK.
  8588.  
  8589.      PC-File rebuilds all the indexes in the current database.
  8590.  
  8591.      NOTE: When you choose to rebuild all the indexes in the
  8592.      database, PC- File deletes the Subgroup index if there is one.
  8593.      You can't rebuild a Subgroup index; you have to remake it.
  8594.  
  8595.      Rebuilding "Bad" Indexes
  8596.  
  8597.      If PC-File detects a "bad" index, it displays a dialog box
  8598.      that lets you decide how you want to handle it.
  8599.  
  8600.      "Bad" indexes can result in a variety of circumstances. If a
  8601.      power outage occurred when adding records, your indexes may be
  8602.      corrupted. If this were to happen, you would rebuild all the
  8603.      indexes for the database that were in use at the time of the
  8604.      power interruption. See Chapter 13, "Repairing a Database" for
  8605.      more information.
  8606.  
  8607.      You can choose to Rebuild the index, delete the index, or
  8608.      ignore the warning.
  8609.  
  8610.      Ignoring the warning is the same as choosing Cancel.
  8611.  
  8612.      To rebuild an index when prompted:
  8613.  
  8614.      1.Choose Rebuild the Index when the Bad Index dialog box
  8615.        displays. PC-File rebuilds the index.
  8616.  
  8617.      Bad indexes can also result from a corrupted data or index
  8618.      file or from a damaged disk. You can try copying your files to
  8619.      another directory to see if that remedies the problem. You can
  8620.      also run the DOS CHKDSK /F command to check for damaged files.
  8621.      See your DOS manual for information on using this command. See
  8622.      Chapter 11, "Repairing a Database" for more details on how to
  8623.      address a corrupted database.
  8624.  
  8625.      WARNING: Exit from ALL programs and applications before
  8626.      running the CHKDSK /F command. Do not use the Drop to DOS
  8627.      option to run this command. If you are running Windows, exit
  8628.      from Windows and return to the DOS prompt before running the
  8629.      command. Otherwise, damage to the File Allocation Table on
  8630.      your hard disk can result.
  8631.  
  8632.      Deleting an Index
  8633.  
  8634.  
  8635.  
  8636.      PC-File Version 7 Users Guide                            148
  8637.  
  8638.  
  8639.      Too many indexed fields in a database slow down operations and
  8640.      take up space. Each time you add, modify, or delete data in a
  8641.      database, PC-File updates each index. This takes time. If you
  8642.      have indexes that you don't use for sorting or searching, get
  8643.      rid of them. You can always redefine them if you find a need
  8644.      for them in the future.
  8645.  
  8646.      When you delete an index, PC-File deletes the file for that
  8647.      index and removes any reference to the index in the header
  8648.      file.
  8649.  
  8650.      To delete an index:
  8651.  
  8652.      1.Choose File from the menu bar.
  8653.  
  8654.      2.Choose Index Maintenance from the File menu. The Index
  8655.        Maintenance dialog box displays including a list of the
  8656.        available indexes.
  8657.  
  8658.      3.Select the index you want to delete from the Indexes list.
  8659.  
  8660.      4.Choose Delete Index. The index is deleted from the database.
  8661.  
  8662.      NOTE: If you delete an index file with the DOS DELETE command,
  8663.      the reference to the index in the header file doesn't get
  8664.      deleted. As a result, PC-File warns you that the index may be
  8665.      damaged the next time you open the database.
  8666.  
  8667.      PC-File Index Files
  8668.  
  8669.      In previous versions of PC-File (PC-File:dB, PC-File 5.x, and
  8670.      PC-File 6.x), index files were saved to whatever name the user
  8671.      specified using .NDX extensions. This could sometimes cause
  8672.      problems because index files from different database could be
  8673.      accidentally overwritten.
  8674.  
  8675.      In this version of PC-File, all indexes for a database are
  8676.      saved to the same name as the database with an .NDn extention,
  8677.      where "n" is a digit 0-9. For example, if a database named
  8678.      CONTACTS has three indexes defined for it the indexes would be
  8679.      named: CONTACTS.ND0, CONTACTS.ND1, and CONTACTS.ND3.
  8680.  
  8681.      This naming convention applies to all indexes regardless of
  8682.      how they were defined.
  8683.  
  8684.  
  8685.  
  8686.      PC-File Version 7 Users Guide                            149
  8687.  
  8688.  
  8689.  
  8690.  
  8691.      CHAPTER 9 CREATING REPORTS
  8692.  
  8693.      Reports are one of the most important features of a database
  8694.      program. Reports let you rearrange your data for viewing or
  8695.      printing in a wide variety of formats. You can create mailing
  8696.      labels, phone lists, invoices, checks, inventories, and
  8697.      quarterly sales reports. This chapter tells you how to create
  8698.      a new report. See Chapter 11, "Printing Reports and Letters,"
  8699.      for information on printing a report.
  8700.  
  8701.  
  8702.  
  8703.      Introduction
  8704.  
  8705.      Use PC-File to create the report that fits your needs using a
  8706.      format that fits your experience.
  8707.  
  8708.      Fit your needs by creating any of a wide variety of report
  8709.      types, including mailing labels and phone lists, invoices,
  8710.      checks, inventory reports, and quarterly sales reports.
  8711.  
  8712.      Fit your experience by selecting the report-generating format
  8713.      that's right for you. PC-File provides five formats for your
  8714.      use, ranging from an easy single record per page format to a
  8715.      very flexible but also complex command statement format.
  8716.  
  8717.      When you create a report, you essentially create a report
  8718.      structure. The structure is saved to a separate file. The file
  8719.      carries the report name and the extension .REP.
  8720.  
  8721.      Choosing a Report Format
  8722.  
  8723.      PC-File provides five format options for defining a report:
  8724.      Page, Row, Mail label, Free form, and Language. If you are
  8725.      inexperienced in creating reports, consider using one of the
  8726.      first three options, as PC- File leads you through the
  8727.      operation each step of the way.
  8728.  
  8729.      More experienced users should select the format that serves
  8730.      their current needs. The simpler formats are generally faster,
  8731.      but not as flexible as the Free form and Language formats.
  8732.      However, you can define a report using any format, then go
  8733.      back and edit it with either the Free form or Language
  8734.      formats. Thus, you could lay out a report quickly with the Row
  8735.      format, for example, then edit the report to add whatever
  8736.      changes and features you want.
  8737.  
  8738.      The five report formats are explained briefly below. Choose
  8739.      the format that will help you produce the report you want.
  8740.  
  8741.      PAGE
  8742.  
  8743.  
  8744.  
  8745.      PC-File Version 7 Users Guide                            150
  8746.  
  8747.  
  8748.      Prints one record per page-similar to the format of a data
  8749.      entry screen designed with the Record view designer. All the
  8750.      fields in the database are used, and all or some records are
  8751.      printed. This is the quickest and easiest format.
  8752.  
  8753.      ROW
  8754.  
  8755.      Prints the data in columns, with the field names listed across
  8756.      the top of the screen. You can select and order the fields you
  8757.      want displayed. Automatically totals and subtotals numeric
  8758.      fields. Also lets you enter a title for the report.
  8759.  
  8760.      MAIL LABEL
  8761.  
  8762.      Defines simple mailing labels in a single column format. This
  8763.      format is also useful for defining snapshot labels. For multi-
  8764.      column mailing labels, use the mailing label program (PC-
  8765.      Label) described in Chapter 14.
  8766.  
  8767.      FREE FORM
  8768.  
  8769.      Lets you "paint" the report on the screen. You place titles,
  8770.      headings, and fields where you want them. This is the most
  8771.      visual format for creating a report, as you can see what your
  8772.      report will look like as you create it. Use this format when
  8773.      you want more flexibility of design than found in the first
  8774.      three formats.
  8775.  
  8776.      Along with giving you a lot more flexibility in the design of
  8777.      the report, the Free form format lets you subtotal and total
  8778.      numeric fields, add system fields, perform calculations, and
  8779.      add miscellaneous text and lines. You can also use Free form
  8780.      to edit a report, although complex reports are better edited
  8781.      using the Language format.
  8782.  
  8783.      LANGUAGE
  8784.  
  8785.      Gives you complete flexibility and control over your report.
  8786.      In addition to the operations permitted with the Free form
  8787.      format, the Language format allows you to use IF commands,
  8788.      perform calculations on subtotals and totals, use buckets to
  8789.      accumulate totals and hold string text, and use the
  8790.      conditional page command.
  8791.  
  8792.      The Language format lets you edit any report, no matter what
  8793.      format you produced it in. However, the Language format does
  8794.      require some knowledge of programming concepts.
  8795.  
  8796.  
  8797.      Using the Page Format
  8798.  
  8799.      The Page format provides the quickest and easiest method for
  8800.      creating a report. Each record is printed on a separate page,
  8801.      with the fields arranged just as they appear in one of your
  8802.      Record views.
  8803.  
  8804.  
  8805.  
  8806.      PC-File Version 7 Users Guide                            151
  8807.  
  8808.  
  8809.      All fields defined in the Record view you choose are used in
  8810.      the report. Reports stretch to as many pages as necessary for
  8811.      each record to accommodate all the fields.
  8812.  
  8813.      To create a report using Page format:
  8814.  
  8815.      1.Choose Print from the menu bar.
  8816.  
  8817.      2.Choose Reports from the Print menu.
  8818.  
  8819.      3.Choose New from the dialog box listing the operations.
  8820.  
  8821.      4.Choose Page from the dialog box listing the formats.
  8822.  
  8823.      5.A dialog displays to choose which Record view to pattern
  8824.        your page report on.
  8825.  
  8826.      6.Choose the view you want from the list.
  8827.  
  8828.      7.   Choose OK. PC-File creates the report while you wait.
  8829.  
  8830.      8.When prompted to save the report, choose Yes or No. Choose
  8831.        Yes if you want to save the report for future viewing or
  8832.        printing. Choose No if you want to print or view the report
  8833.        only once, and don't want to save it. PC-File displays the
  8834.        Print options dialog box. See Chapter 11 for information on
  8835.        printing reports.
  8836.  
  8837.      9.If you chose Yes in the previous step, enter a report
  8838.        description of up to 50 characters. Choose OK when you
  8839.        finish. The description is optional, but can be useful in
  8840.        reminding you of the contents of the report at some later
  8841.        date.
  8842.  
  8843.      10.  Enter a report name of up to eight characters. Choose OK.
  8844.        The Print options dialog box displays. See Chapter 11 for
  8845.        information on printing reports.
  8846.  
  8847.      Using the Row Format
  8848.  
  8849.      A report defined in the Row format lines up the data in
  8850.      columns across the page. This format lets you choose the
  8851.      fields to be printed and select their order of appearance. You
  8852.      can also enter a title for the report, either when creating
  8853.      the report or prior to printing.
  8854.  
  8855.      Limiting the number of fields allows you to create specialized
  8856.      reports within a database. For example, five of 12 fields were
  8857.      selected to create the report shown above. In the same
  8858.      database you could run out a phone list by selecting the name
  8859.      and phone number fields.
  8860.  
  8861.  
  8862.  
  8863.      PC-File Version 7 Users Guide                            152
  8864.  
  8865.  
  8866.      PC-File prints the fields side by side with one space between
  8867.      each field. If the report is printed to the screen and is
  8868.      wider than 79 characters, only the first 79 characters of each
  8869.      row are displayed. When sending the report to the printer, the
  8870.      width should not exceed what the printer can print on one
  8871.      line. Consider using condensed type if it does run over
  8872.      somewhat.
  8873.  
  8874.      All numeric fields used in a Row-formatted report generate
  8875.      subtotals and totals, which are printed in the appropriate
  8876.      places in the report.
  8877.  
  8878.      NOTE: To print Subtotals, you must also choose the Subtotals
  8879.      option in the Print options dialog box. See Chapter 11 for
  8880.      information about this operation.
  8881.  
  8882.      Only the display length of character and memo fields prints
  8883.      when you use the Row format. To print the entire field, you
  8884.      must edit the field using the Free form or Language format.
  8885.      See the section on using these formats later in this chapter
  8886.      for more information.
  8887.  
  8888.      To create a report using Row format:
  8889.  
  8890.      1.Choose Print from the menu bar.
  8891.  
  8892.      2.Choose Reports from the Print menu.
  8893.  
  8894.      3.Choose New from the dialog box listing the operations.
  8895.  
  8896.      4.Choose Row from the dialog box listing the formats. PC-File
  8897.        displays a check-off dialog box, listing the fields in your
  8898.        database.
  8899.  
  8900.      5.Choose the fields you want to appear on the report, in the
  8901.        order that you want them to appear.
  8902.  
  8903.      6.Choose OK when you are finished choosing all the fields to
  8904.        include in your row report.
  8905.  
  8906.      7.The Title dialog box displays.
  8907.  
  8908.      8.Enter a permanent title for the teport. If you leave this
  8909.        box blank, PC-File prompts you for a temporary title each
  8910.        time you print the report. A permanent title can be up to 65
  8911.        characters in length, while temporary titles can only be 35
  8912.        characters in length.
  8913.  
  8914.      9.When prompted to save the report, choose Yes or No. Choose
  8915.        Yes if you want to save the report for future viewing or
  8916.        printing. Choose No if you want to print or view the report
  8917.        only once, and don't want to save it. PC-File displays the
  8918.        Print options dialog box. See Chapter 11 for information on
  8919.        printing reports.
  8920.  
  8921.  
  8922.  
  8923.      PC-File Version 7 Users Guide                            153
  8924.  
  8925.  
  8926.      10.  If you chose Yes in the previous step, enter a report
  8927.        description of up to 50 characters. Choose OK when you
  8928.        finish. The description is optional, but can be useful in
  8929.        reminding you of the contents of the report at some later
  8930.        date.
  8931.  
  8932.      11.  Enter a report name of up to eight characters. Choose OK.
  8933.        The Print options dialog box displays. See Chapter 11 for
  8934.        information on printing reports.
  8935.  
  8936.      Using the Mail Label Format
  8937.  
  8938.      Use the Mail label format to define simple mailing labels to
  8939.      be printed in single column format. The mail label option is
  8940.      also used to create a format for snapshot labels. See Chapter
  8941.      15, "Tools" for information on snapshot labels.
  8942.  
  8943.      For more complex labels, such as labels in a side by side
  8944.      format, use the PC-Label utility, described in Chapter 14.
  8945.  
  8946.      When you create labels using this format, first determine the
  8947.      number of print lines per label. The print lines are the total
  8948.      number of lines from the top of one mailing label to the top
  8949.      of the next label. The print lines include both the lines on
  8950.      which the name and address are printed and the blank lines
  8951.      above or below the name and address. The common one-inch label
  8952.      has six lines, but your label stock may have a different
  8953.      number of lines. Font size can also determine the number of
  8954.      lines on your
  8955.      label.
  8956.  
  8957.      To create a report using Mail label format:
  8958.  
  8959.      1.Choose Print from the menu bar.
  8960.  
  8961.      2.Choose Reports from the Print menu.
  8962.  
  8963.      3.Choose New from the dialog box listing the operations.
  8964.  
  8965.      4.Choose Mail label from the dialog box listing the formats.
  8966.  
  8967.      5.Enter the number of print lines for each label. The default
  8968.        is 6.
  8969.  
  8970.      6.Choose OK.
  8971.  
  8972.      7.The dialog box to select the fields to print on the first
  8973.        line of the label displays.
  8974.  
  8975.      8.Select the fields that you want to print on the line in the
  8976.        order you want them printed across the line. For example, to
  8977.        print a first name field followed by a last name field:
  8978.        Select the field containing the first name first, then
  8979.        select the field containing the last name. Each field is
  8980.        numbered as you select it and it displays in the Selected
  8981.        list.
  8982.  
  8983.  
  8984.  
  8985.      PC-File Version 7 Users Guide                            154
  8986.  
  8987.  
  8988.  
  8989.      9.Choose OK when you are finished selecting all the fields for
  8990.        that line. If you want to leave the line blank, choose OK
  8991.        without selecting any fields.
  8992.  
  8993.      10.  Repeat steps 8 and 9 for each of the following lines. The
  8994.        numbering starts over for each line. Choose OK after
  8995.        selecting the fields for each line.
  8996.  
  8997.      11.  When prompted to save the report, choose Yes or No.
  8998.        Choose Yes if you want to save the labels for future viewing
  8999.        or printing. Choose No if you want to print or view the
  9000.        report only once, and don't want to save it. PC-File
  9001.        displays the Print options dialog box. See Chapter 11 for
  9002.        information on printing reports.
  9003.  
  9004.      12.  If you chose Yes in the previous step, enter a report
  9005.        description of up to 50 characters. Choose OK when you
  9006.        finish. The description is optional, but can be useful in
  9007.        reminding you of the contents of the report at some later
  9008.        date.
  9009.  
  9010.      13.  Enter a report name of up to eight characters. Choose OK.
  9011.  
  9012.      The Print options dialog box displays. See Chapter 11 for
  9013.      information on printing reports.
  9014.  
  9015.      Lines that have no data to print from a given record are
  9016.      removed automatically by PC-File. Thus, you can format the
  9017.      label for three line addresses, knowing that records with only
  9018.      two lines worth of data will print neatly.
  9019.  
  9020.      This format prints one space between fields which appear on
  9021.      the same line. If you want punctuation between fields, you can
  9022.      either include it in the field when you enter data or edit the
  9023.      report using the Free form or Language format.
  9024.  
  9025.      Using the Free Form Format
  9026.  
  9027.      The Free form format lets you create a report by painting it
  9028.      directly on the screen. Giving you much more flexibility than
  9029.      the Row, Page, and Label formats, the Free form format lets
  9030.      you enter title lines and headings, locate fields where you
  9031.      want, draw lines, and sum the data into subtotals and totals.
  9032.  
  9033.      While providing flexibility, Free form also makes creating a
  9034.      report relatively easy. You use a special edit window divided
  9035.      into six sections to create your report. This allows you to
  9036.      build the report piece-by-piece. You can format fields
  9037.      directly from the keyboard, or you can have PC-File enter
  9038.      fields for you. Report fields can pull data from database
  9039.      fields, system fields (like the computer's clock),
  9040.      calculations, and field totals.
  9041.  
  9042.  
  9043.  
  9044.      PC-File Version 7 Users Guide                            155
  9045.  
  9046.  
  9047.      You can also edit any existing report, no matter what format
  9048.      you used to create it. Thus, you can define a quick report
  9049.      with the Page format, then display the report in Free form and
  9050.      play around with it until you get exactly what you want.
  9051.  
  9052.      Procedures for Creating a Free Form Report
  9053.  
  9054.      This section briefly outlines the procedures for creating a
  9055.      new report using the Free form format. Each of the various
  9056.      features that go into making up a Free form report, such as
  9057.      text and fields, are covered in more depth later in this
  9058.      section.
  9059.  
  9060.      To create a Free form report:
  9061.  
  9062.      1.Choose Print from the menu bar.
  9063.  
  9064.      2.Choose Reports from the Print menu.
  9065.  
  9066.      3.Choose New from the dialog box listing the operations.
  9067.  
  9068.      4.Choose Free form from the dialog box listing the formats.
  9069.        The Free form edit window displays.
  9070.  
  9071.      5.Paint the report on the screen. Enter text, fields, and any
  9072.        lines or boxes within the appropriate sections. Choose OK
  9073.        when you finish.
  9074.  
  9075.      6.Choose Yes or No when prompted to save the report. Choose
  9076.        Yes if you want to save the report for future viewing or
  9077.        printing. Choose No if you want to print or view the report
  9078.        only once, and don't want to save it. PC-File displays the
  9079.        Print options dialog box. See Chapter 11 for information on
  9080.        printing reports.
  9081.  
  9082.      7.If you chose Yes in the previous step, enter a report
  9083.        description of up to 50 characters. Choose OK when you
  9084.        finish. The description is optional, but can be useful in
  9085.        reminding you of the contents of the report at some later
  9086.        date.
  9087.  
  9088.      8.Enter a report name of up to eight characters. Choose OK.
  9089.  
  9090.      The Print options dialog box displays. See Chapter 11 for
  9091.      information on printing reports.
  9092.  
  9093.      Procedures for Modifying a Report Using Free Form
  9094.  
  9095.      You can display any existing report in the Free form edit
  9096.      window. You can then make changes to it and add any features
  9097.      available in Free form. Thus, you might find it useful to
  9098.      create a report quickly with another format, such as Row, then
  9099.      add to the report structure as needed by modifying it in the
  9100.      Free form window.
  9101.  
  9102.      To modify a report in the Free form window:
  9103.  
  9104.  
  9105.  
  9106.      PC-File Version 7 Users Guide                            156
  9107.  
  9108.  
  9109.  
  9110.      1.Choose Print from the menu bar.
  9111.  
  9112.      2.Choose Reports from the Print menu.
  9113.  
  9114.      3.Choose Modify from the dialog box listing the operations.
  9115.  
  9116.      4.Choose Free form from the dialog box listing the edit
  9117.        formats. PC-File displays the Free form edit window.
  9118.  
  9119.      5.Choose File from edit window menu bar.
  9120.  
  9121.      6.Choose Open from the File menu.
  9122.  
  9123.      7.Choose the report you want to modify from the file selection
  9124.        dialog box. The report displays in the edit window, broken
  9125.        down appropriately between the different sections.
  9126.  
  9127.      8.Make your changes to the report.
  9128.  
  9129.      9.Choose Save from the File menu when you finish. If you want
  9130.        to save the modified report under a new name, choose Save As
  9131.        instead. The original report remains unchanged in that case.
  9132.  
  9133.      10.  Enter a new description or leave the default. The Print
  9134.        options dialog box displays. See Chapter 11 for information
  9135.        on printing reports.
  9136.  
  9137.      Free Form Guidelines
  9138.  
  9139.      Though the Free form edit window is divided into sections, it
  9140.      is the same edit window found elsewhere in PC-File.
  9141.  
  9142.      Follow these guidelines in using the edit window and creating
  9143.      a Free form report:
  9144.  
  9145.      Sections
  9146.  
  9147.      The edit window is divided into the six report sections. Each
  9148.      section will scroll up to 120 characters wide. There is no way
  9149.      to set a right margin to wrap lines-you must indicate the end
  9150.      of a line manually by pressing ENTER when you want to break to
  9151.      a new line. Enter only the information in each section that
  9152.      you intend. If you don't want to use a section, leave it
  9153.      blank. The end marker (<<) should appear in the first line of
  9154.      those sections you leave blank.
  9155.  
  9156.      You don't have to define the report in the order suggested by
  9157.      the sections. If fact, it may be easier to enter fields in the
  9158.      Detail section of the report before doing anything else. That
  9159.      can help you line up headings in the Heading section, and
  9160.      subtotals and totals in their respective sections.
  9161.  
  9162.      Formatting Commands
  9163.  
  9164.  
  9165.  
  9166.      PC-File Version 7 Users Guide                            157
  9167.  
  9168.  
  9169.      Use formatting commands to force a new page, compress out
  9170.      blank lines, or enter printer codes. The formatting commands
  9171.      are described in detail beginning on page 202. You can use any
  9172.      of the formatting commands that begin with a period, like .FF
  9173.      or .GROUP. Enter these commands on a separate line.
  9174.  
  9175.      Blank lines
  9176.  
  9177.      All blank lines are saved and printed as blank lines. Enter
  9178.      only those blank lines that you want.
  9179.  
  9180.      Lines
  9181.  
  9182.      You can use the hyphen or underscore characters to create
  9183.      lines on a report, or you can use ASCII characters to make
  9184.      lines and boxes. See the section on creating lines and boxes
  9185.      in Chapter 1, "Navigating in PC-File," for more information.
  9186.      Use lines in any section of a report format.
  9187.  
  9188.      Text
  9189.  
  9190.      Anything typed in the edit window other than form feeds or
  9191.      fields (indicated by field markers) is text. Text is printed
  9192.      on the report just as it is entered on the screen. Uppercase
  9193.      and lowercase letters are read as entered.
  9194.  
  9195.      The Free Form Window
  9196.  
  9197.      The Free form edit window is divided into six sections,
  9198.      representing the six parts of a Free form report.
  9199.  
  9200.      Navigating in Free Form
  9201.  
  9202.      This section explains how to move between and within the six
  9203.      sections of the Free form edit window, how to expand each
  9204.      section for easier use, and how to determine the current
  9205.      location of the cursor.
  9206.  
  9207.      To move between sections:
  9208.  
  9209.      1.Click on the appropriate section with the mouse. With the
  9210.        keyboard, use TAB and SHIFT-TAB to move between the
  9211.        sections. The active section of the window is shaded darker
  9212.        than the rest of the window.
  9213.  
  9214.      You can "paint" a report within each section in either of two
  9215.      views:
  9216.  
  9217.        A contracted view
  9218.  
  9219.        An expanded view
  9220.  
  9221.  
  9222.  
  9223.      PC-File Version 7 Users Guide                            158
  9224.  
  9225.  
  9226.      The contracted view is the view you see of each section when
  9227.      you first open the Free form edit window. You can enter text
  9228.      and fields in this view, but you can only see two or three
  9229.      lines of the section at a time. As you move from one line to
  9230.      another within a section, a new line scrolls into view.
  9231.  
  9232.      Expanding each section individually makes it easier to define
  9233.      and format that section, as well as to visualize what you are
  9234.      doing. However, the menus are unavailable when a section is
  9235.      expanded.
  9236.  
  9237.      To expand a section to a window:
  9238.  
  9239.      1.Place the cursor in the section you want to expand.
  9240.  
  9241.      2.Press CTRL-E. The section expands to a window.
  9242.  
  9243.      Paint your report in this format, then choose OK to return the
  9244.      section window to its original contracted size.
  9245.  
  9246.      If necessary, you can determine the current location of the
  9247.      cursor in the edit window, in either the contracted or
  9248.      expanded section windows. This can be handy for lining up
  9249.      fields with their respective column headings.
  9250.  
  9251.      To display the cursor location:
  9252.  
  9253.      1.Press CTRL-W. A dialog box displays, indicating the current
  9254.        row and column location of the cursor.
  9255.  
  9256.      2.Choose OK to return to the edit window.
  9257.  
  9258.      Report Sections
  9259.  
  9260.      A Free form report consists of up to six sections. These
  9261.      sections- Cover, Heading, Detail, Subtotal, Total, and
  9262.      Footing-each control a specific part of the report. Only those
  9263.      sections you define in your report are used when the report is
  9264.      printed.
  9265.  
  9266.      Cover
  9267.  
  9268.      This section is used to print text once at the beginning of a
  9269.      report. You can define a separate title page or print a title
  9270.      at the top of the first page of the report. Use a form feed
  9271.      (.FF) after the title to locate it on a separate title page.
  9272.  
  9273.      Heading
  9274.  
  9275.      The text in the Heading section is printed at the top of each
  9276.      page. Use this section to print titles, page numbers, column
  9277.      headings, and lines under the headings.
  9278.  
  9279.      Detail
  9280.  
  9281.  
  9282.  
  9283.      PC-File Version 7 Users Guide                            159
  9284.  
  9285.  
  9286.      This is the most important section, as it is here that the
  9287.      records from the database are printed. Everything in the
  9288.      Detail section is printed once for each record selected.
  9289.      Without a Detail section, data from individual records won't
  9290.      be printed.
  9291.  
  9292.      Subtotal
  9293.  
  9294.      The Subtotal section is only printed when a subtotal break is
  9295.      requested. The Subtotal section can be used to print text,
  9296.      subtotals of numeric fields, and blank lines.
  9297.  
  9298.      Total
  9299.  
  9300.      The Total section is printed at the end of a report after all
  9301.      of the records have been printed. Items that usually appear in
  9302.      the Total section include totals for numeric fields, the
  9303.      number of records printed, and any criteria used for selecting
  9304.      records.
  9305.  
  9306.      Footing
  9307.  
  9308.      This section is printed at the end of each page, and
  9309.      determines the bottom margin on each page. Information in the
  9310.      Footing section can include page numbers, blank lines, and
  9311.      text. The Footing section is required in any report that
  9312.      includes any section other than a Detail section, and with any
  9313.      report that needs a bottom margin on each page. The Footing
  9314.      section should contain at least one printed line (which can be
  9315.      blank).
  9316.  
  9317.      The Free Form Menus
  9318.  
  9319.      The menu bar at the top of the Free form window contains three
  9320.      options. Two of the options-File and Data-display pull-down
  9321.      menus when selected. The Help option displays a Help window.
  9322.  
  9323.      Using the File Menu
  9324.  
  9325.      Use the File menu to open and save reports.
  9326.  
  9327.      Option    Purpose
  9328.  
  9329.      New       Start a new report
  9330.  
  9331.      Open      Display an existing report
  9332.  
  9333.      Save As   Save the current report to a new name or 
  9334.           directory
  9335.  
  9336.      OK        Quit the Free form edit window; PC-File prompts you
  9337.      to save
  9338.  
  9339.      Cancel    Quit the Free form edit window
  9340.  
  9341.  
  9342.  
  9343.      PC-File Version 7 Users Guide                            160
  9344.  
  9345.  
  9346.      When you first display the Free form edit window for the
  9347.      purpose of creating a report, you don't need to choose New
  9348.      from the File menu. This option is designed to clear an
  9349.      existing report from the screen and provide you with an empty
  9350.      edit window for starting a new report.
  9351.  
  9352.  
  9353.      Using the Data Menu
  9354.  
  9355.      You can enter fields in your report from the keyboard or have
  9356.      PC-File enter them for you. Use the options on the Data menu
  9357.      to have PC-File enter the fields.
  9358.  
  9359.      Option              Purpose
  9360.  
  9361.      Field (trimmed)     Displays a field selection dialog box.
  9362.      Choose a field from the dialog box. Enters data with the
  9363.      spaces removed.
  9364.  
  9365.      Field (padded)      Displays a field selection dialog box.
  9366.      Choose a field from the dialog box. Enters data without the
  9367.      spaces removed.
  9368.  
  9369.      Field (bar code)    Displays a field selection dialog box,
  9370.      followed by bar code type and bar code height dialog boxes.
  9371.      Enters data formatted to print as bar code. See "Printing Bar
  9372.      Codes" later in this chapter for details.
  9373.  
  9374.      System field        Displays a list of system field options.
  9375.      Choose an option to enter system-generated data.
  9376.  
  9377.      Calculation         Displays a text box for entering a
  9378.      calculation. Data is generated by the calculation.
  9379.  
  9380.      Lookup (relational)      Displays relational lookup definition
  9381.      dialog boxes. See "Defining Relational Lookups" for details.
  9382.  
  9383.  
  9384.      Entering Text
  9385.  
  9386.      Use text in a Free form report for titles, field headings and
  9387.      labels, lines and boxes, and miscellaneous descriptions or
  9388.      information. To enter text, place the cursor where you want
  9389.      the text to begin and type the text from the keyboard. PC-File
  9390.      prints uppercase and lowercase letters just as they are
  9391.      entered.
  9392.  
  9393.      Be sure you enter text in the correct section of the report.
  9394.      If you want the title of the report to print at the beginning
  9395.      only, for example, enter it in the Cover section. If you want
  9396.      it printed on every page, place it in the Heading section.
  9397.  
  9398.  
  9399.  
  9400.      PC-File Version 7 Users Guide                            161
  9401.  
  9402.  
  9403.      Most if not all fields should have labels, headings, or a
  9404.      description associated with them on the report. In rare cases,
  9405.      data can stand alone without some kind of descriptive label
  9406.      next to it or above it. For example, the current date
  9407.      displayed at the top of a report normally doesn't need to be
  9408.      identified.
  9409.  
  9410.      If you build the report to display columns of data, use field
  9411.      headings above the data. Headings generally should be entered
  9412.      in the Heading section of a report. They are then printed on
  9413.      each page of the report, making it clear for readers to
  9414.      understand what the data is without having to refer back to
  9415.      the first page. The following report illustrates the use of
  9416.      field headings.
  9417.  
  9418.      Field headings are often enhanced by entering a single or
  9419.      double line beneath them. You can use the hyphen or equal sign
  9420.      for this purpose, though on most printers these produce broken
  9421.      lines. Use line characters from the ASCII table to create a
  9422.      solid line. See the section on creating lines and boxes in
  9423.      Chapter 1, "Navigating in PC-File," for more information on
  9424.      these characters.
  9425.  
  9426.      Locating Fields
  9427.  
  9428.      Fields are defined in a Free form report to pull data from one
  9429.      of four places:
  9430.  
  9431.        Database fields
  9432.        A calculation
  9433.        The system (such as the computer's clock)
  9434.        A summation of other fields
  9435.  
  9436.      You can locate fields in any of the six sections of a report,
  9437.      but there are limitations on the type of field you can locate
  9438.      in certain sections. These limitations are outlined below:
  9439.  
  9440.           Section: Valid Fields
  9441.  
  9442.           Cover: System fields
  9443.  
  9444.           Heading, Detail, and Footing: System fields, database
  9445.           fields, and calculated fields
  9446.  
  9447.           Subtotal and Total: System fields and summations of other
  9448.           fields
  9449.  
  9450.  
  9451.  
  9452.      PC-File Version 7 Users Guide                            162
  9453.  
  9454.  
  9455.      Fields are represented in the Free form edit window with the
  9456.      use of two marker characters: the "at" sign (@) or the "pound"
  9457.      sign (#). These markers appear on the Free Form edit window
  9458.      only. They don't show up when you print a report. These
  9459.      characters are automatically placed on the screen when
  9460.      choosing options from the Data menu. If you type field marker
  9461.      characters directly from the keyboard, which character you use
  9462.      determines whether the data you have formatted for this
  9463.      location prints as a padded field or a trimmed field.
  9464.  
  9465.      The at (@) sign is used to print your data as a padded field.
  9466.      A padded field includes extra spaces to "pad" the printed data
  9467.      to the number of marker characters on the Free form edit
  9468.      window. For example, if there are 10 at signs on the report
  9469.      structure screen, but the data printing for a given record at
  9470.      that location is only 5 characters long, PC-File will "print"
  9471.      5 extra spaces at the end of the data. Padded fields are
  9472.      generally used to line up data in columns when printing more
  9473.      than one field per line.
  9474.  
  9475.      The pound sign (#) is used to print your data as a trimmed
  9476.      field. A trimmed field removes any leading or trailing spaces
  9477.      in the data, but not internal spaces. This format is commonly
  9478.      used when combining first and last name fields, and city,
  9479.      state, and zipcode fields when printing addresses.
  9480.  
  9481.      You can use either marker character with data from any field
  9482.      type, system field, subtotal, total, or calculation. You
  9483.      cannot mix the two characters within one string of marker
  9484.      characters for one field.
  9485.  
  9486.      For most fields, you can use either of two methods for
  9487.      entering the field markers:
  9488.  
  9489.        Choose options from the Data menu
  9490.  
  9491.        Type the characters directly from the keyboard
  9492.  
  9493.      If you use the options on the Data menu, PC-File prompts you
  9494.      to define the data source as you place each item. This method
  9495.      is recommended, as most users find it less confusing. If you
  9496.      enter a field from the keyboard, PC-File prompts you to define
  9497.      the data source after you finish painting the entire report.
  9498.      Both methods are described below.
  9499.  
  9500.      Guidelines for Locating Fields
  9501.  
  9502.      Follow these guidelines when locating and defining your fields
  9503.      in a report:
  9504.  
  9505.      Spacing
  9506.  
  9507.      There must be at least one space between each field, and at
  9508.      least one space between a field and any text.
  9509.  
  9510.      Field length
  9511.  
  9512.  
  9513.  
  9514.      PC-File Version 7 Users Guide                            163
  9515.  
  9516.  
  9517.  
  9518.      The number of field markers you enter to designate a field on
  9519.      the screen determines the number of characters that can appear
  9520.      in the report. For example, @@@@@ or ##### prints a maximum of
  9521.      five characters. If you create a field in the report that is
  9522.      shorter than the field in the database, PC-File truncates data
  9523.      that is longer than the report field. The same is true for
  9524.      system fields, summations, and calculations, so be sure to
  9525.      make your fields long enough to hold the data you expect to
  9526.      fill them with. This is generally not an issue when using the
  9527.      Data menu to place report items, because the Data menu options
  9528.      will automatically place the same number of field markers as
  9529.      the field's display length.
  9530.  
  9531.      Wrapping fields
  9532.  
  9533.      The maximum number of field markers you can use in one field
  9534.      is 65. PC-File ignores all field markers after the 65th in a
  9535.      group. For memo fields or character fields longer than 65
  9536.      characters, you can choose to print only the first 65
  9537.      characters of the field, or you can use one of two methods to
  9538.      wrap the data to two or more lines.
  9539.  
  9540.      One method is to enter a single set of field markers on your
  9541.      Free form report, then edit the report using the Language
  9542.      format. Change the print mask for the field from @'s to a
  9543.      "word wrap mask," which allows the data to wrap to its full
  9544.      length. When using this method you only have one wrapping
  9545.      field per line and no field can print to the right of that
  9546.      field. See the section, "Character Masks" later in this
  9547.      chapter for more information.
  9548.  
  9549.      The other method is to enter as many sets of @'s as necessary
  9550.      to print all the data. Then define each set of field markers
  9551.      as successive partial fields. For example, for a 100-character
  9552.      field called Description, you might define two 50-character
  9553.      partial fields, like this:
  9554.  
  9555.      Description,1,50 Description,51,50
  9556.  
  9557.      The first 50 characters of data print in the first group of at
  9558.      signs and the second 50 characters print in the second group.
  9559.  
  9560.      Entering Fields from the Data Menu
  9561.  
  9562.      You can enter any kind of field from the Data menu other than
  9563.      a summation field. Summation fields must be entered from the
  9564.      keyboard, in either the Subtotal or Total sections of the
  9565.      report.
  9566.  
  9567.      Entering fields from the Data menu is a two step operation:
  9568.  
  9569.        Choose an option from the menu.
  9570.  
  9571.        Define the data source.
  9572.  
  9573.  
  9574.  
  9575.      PC-File Version 7 Users Guide                            164
  9576.  
  9577.  
  9578.      Which option you select determines how you define the data
  9579.      source. For padded and trimmed fields, you choose the field
  9580.      from the field selection dialog box. For calculations, enter
  9581.      the expression in the text box. For system fields, choose one
  9582.      of 10 system field options from a dialog box.
  9583.  
  9584.      Once you define the data source, PC-File determines the
  9585.      correct field marker and the field length. For calculations,
  9586.      you are prompted for a field length.
  9587.  
  9588.      To enter fields from the Data menu:
  9589.  
  9590.      1.Place the cursor where you want the field to start.
  9591.  
  9592.      2.Choose Data from the menu bar.
  9593.  
  9594.      3.Choose the appropriate option from the Data menu. The dialog
  9595.        box that displays depends on your choice of option.
  9596.  
  9597.      4.Define the data source by choosing an option from the dialog
  9598.        box or entering a calculation. PC-File enters the field
  9599.        markers in the report.
  9600.  
  9601.      You can lengthen or shorten a field entered from the menu if
  9602.      necessary. For example, if you have defined a field with a
  9603.      field length of 15 characters, but know that none of the data
  9604.      in that field is more than 12 characters in length, you can
  9605.      shorten the field when you locate it on your report
  9606.      accordingly.
  9607.  
  9608.  
  9609.      Entering Fields from the Keyboard
  9610.  
  9611.      You can enter a field yourself by typing it into the
  9612.      appropriate section in the edit window. Use the desired marker
  9613.      character and enter the correct number of characters to
  9614.      indicate the field length. For example, type @@@@@@@@ if you
  9615.      are printing an 8-character field as a padded field. You can
  9616.      enter any type of field from the keyboard.
  9617.  
  9618.      Fields entered from the keyboard are defined in a different
  9619.      manner than fields entered from the Data menu. Since you don't
  9620.      define the source of data for a field when you just type in a
  9621.      series of field markers, PC- File has to prompt you for the
  9622.      source. It does this after you have finished painting the
  9623.      entire report and choose to save it. A dialog box displays for
  9624.      each field that must be defined. A set of question marks
  9625.      replaces the field that PC-File is prompting you to define.
  9626.      Choose the type
  9627.      of data source first, such as System field, then the source
  9628.      itself.
  9629.  
  9630.      To enter a field from the keyboard:
  9631.  
  9632.      1.Place the cursor where you want the field to start.
  9633.  
  9634.  
  9635.  
  9636.      PC-File Version 7 Users Guide                            165
  9637.  
  9638.  
  9639.      2.Type the field information. Indicate length by the number of
  9640.        characters you enter. Choose the field marker based on how
  9641.        you intend to define the field.
  9642.  
  9643.      To define the source of data for fields entered from the
  9644.      keyboard:
  9645.  
  9646.      1.Paint the entire report in the Free form edit window.
  9647.  
  9648.      2.Choose Save from the Free form File menu. PC-File displays a
  9649.        dialog box prompting you to define the source of data for
  9650.        the first field that you entered from the keyboard.
  9651.  
  9652.      3.Choose the appropriate data source button. Depending on the
  9653.        button you chose, PC-File prompts you to choose a database
  9654.        field or a system field, or enter a calculation.
  9655.  
  9656.      4.Choose the appropriate option or enter a calculation.
  9657.  
  9658.      5.PC-File moves to the next undefined field and prompts you
  9659.        for a data source. Fields that you defined using the Data
  9660.        menu options are skipped over, as PC-File already knows the
  9661.        data source.
  9662.  
  9663.      Defining the Fields
  9664.  
  9665.      How you define the field is determined by how you enter the
  9666.      field in the report. If you enter a field from the Data menu,
  9667.      you define the source of data for the field during the process
  9668.      of entering it on the screen. If you enter a field from the
  9669.      keyboard, PC-File prompts you to define the source of data for
  9670.      the field after you have painted your entire report in the
  9671.      edit window.
  9672.  
  9673.      No matter which method you use, however, you must define the
  9674.      source of data. This section describes each of the four source
  9675.      options:
  9676.  
  9677.        Data fields
  9678.        System fields
  9679.        Summations
  9680.        Calculations
  9681.  
  9682.      Data Fields
  9683.  
  9684.      If you enter fields from the Data menu, you can define either
  9685.      padded or trimmed fields. If you enter a field from the
  9686.      keyboard, it is assumed to be a padded field.
  9687.  
  9688.      A padded field retains blank spaces that occur in a field.
  9689.      Thus, if you define a report field as 15 characters long, 15
  9690.      characters print each time, even if some of them are blank.
  9691.      Use padded fields in reports when you want to maintain data in
  9692.      columns.
  9693.  
  9694.  
  9695.  
  9696.      PC-File Version 7 Users Guide                            166
  9697.  
  9698.  
  9699.      If you define a trimmed field, on the other hand, PC-File
  9700.      removes the trailing spaces, printing only the data within
  9701.      each field. Use trimmed fields for mailing labels, in
  9702.      particular, where you want the data within fields to flow
  9703.      together.
  9704.  
  9705.      For example, if you define the City, State, and Zip code
  9706.      fields as trimmed fields on an address label like this:
  9707.  
  9708.           ############, ## #####
  9709.  
  9710.      PC-File removes trailing spaces from the City field any time
  9711.      the city name is less than 12 characters in length. Thus, the
  9712.      report would produce an address like this:
  9713.  
  9714.           Seattle, WA 98103
  9715.  
  9716.      The State and Zip code fields adjust to the length of the data
  9717.      in the city field as it changes from record to record.
  9718.  
  9719.      System Fields
  9720.  
  9721.      System fields can be located in any section of the report. A
  9722.      system field pulls data directly from the computer, the
  9723.      program, the database, and even the operator. For example, you
  9724.      can use a system field to have PC-File enter the current date
  9725.      any time you print the report.
  9726.  
  9727.      There are 10 system fields supported in the Free form format,
  9728.      as follows:
  9729.  
  9730.      System field: Description
  9731.  
  9732.      Date now: The current date as determined by the computer's
  9733.      calendar.
  9734.  
  9735.      Time now: The current time as determined by the computer's
  9736.      clock.
  9737.  
  9738.      Page number: Displays the current page number, counting the
  9739.      first one as page 1.
  9740.  
  9741.      Records in database: The current number of records in the
  9742.      database.
  9743.  
  9744.      Selection criteria: Any criteria used to select records to be
  9745.      printed. For example, if you chose to just print reports with
  9746.      Washington addresses, the criteria might be STATE=WA.
  9747.  
  9748.      Index field: The index currently active when you print the
  9749.      report.
  9750.  
  9751.      Qty in Subtotal group: Number of records in the current
  9752.      subtotal.
  9753.  
  9754.      Field name of Subtotalgroup: The field you chose to subtotal.
  9755.  
  9756.  
  9757.  
  9758.      PC-File Version 7 Users Guide                            167
  9759.  
  9760.  
  9761.  
  9762.      Count of records printed: The total number of records printed.
  9763.  
  9764.      Operator input: PC-File prompts the user for input at this
  9765.      point.
  9766.  
  9767.  
  9768.      Summations
  9769.  
  9770.      If your report includes fields for which you want to show
  9771.      subtotals or totals, you must enter them in their respective
  9772.      section of the report. Subtotals are always defined in the
  9773.      Subtotal section and totals are always defined in the Total
  9774.      section.
  9775.  
  9776.      When you include a subtotal in a report, you define both the
  9777.      field you want to sum into subtotals and the field that
  9778.      determines the subtotal break. The subtotal break is the
  9779.      manner in which you group records that you want to subtotal.
  9780.  
  9781.      For example, you could subtotal sales volume by month or by
  9782.      department. In that case, sales would be the field you sum and
  9783.      month or department would be the break field.
  9784.  
  9785.      You define the field you want to sum when you define the field
  9786.      marker in the Subtotal section of your report. Enter a
  9787.      subtotal field marker from the keyboard only.
  9788.  
  9789.      The subtotal break field is defined later when you print the
  9790.      report using the Print Options dialog box. At that time, you
  9791.      indicate that you want to perform subtotals, then PC-File asks
  9792.      for the break field. See Chapter 11 for more information on
  9793.      this operation.
  9794.  
  9795.      If you include a total in a report, you just define which
  9796.      field to sum up. Totals only print at the end of a report.
  9797.  
  9798.      Calculations
  9799.  
  9800.      Calculations can be used in the Detail, Heading, and Footing
  9801.      sections of a report. You can use any type of calculation
  9802.      supported by PC-File. Calculations are described in Chapter
  9803.      17, "Calculations."
  9804.  
  9805.      However, you can't perform calculations on subtotals or totals
  9806.      using the Free form format. For example, you couldn't figure a
  9807.      commission based on a subtotal of sales. To do that, you would
  9808.      have to edit the report in Language format and add the
  9809.      commission calculation to the Subtotal section.
  9810.  
  9811.      Formatting and IF Commands
  9812.  
  9813.  
  9814.  
  9815.      PC-File Version 7 Users Guide                            168
  9816.  
  9817.  
  9818.      The Free form format supports most of the formatting commands
  9819.      described in the "Formatting Commands" section of the "Using
  9820.      the Language Format" section. Refer to the appropriate
  9821.      sections for details on how they work. The commands supported
  9822.      are:
  9823.  
  9824.      .FF
  9825.      .CP n
  9826.      .GROUP
  9827.      .EGROUP
  9828.      .EGROUP R
  9829.      .REFORMAT nn
  9830.      .ENDREFORMAT
  9831.  
  9832.      To use these commands in a Free form report enter each command
  9833.      on a line of it's own in the report section where you want it
  9834.      to take effect.
  9835.  
  9836.      The "Printer Markers" and the "Printer Control Codes" commands
  9837.      also documented in the "Formatting Commands" section of the
  9838.      "Using the Language Format" section cannot be used in Free
  9839.      form reports. However, you can edit a report originally
  9840.      formatted as a Free form report using the Language Format to
  9841.      insert these commands.
  9842.  
  9843.      You can also use the commands documented in the "IF Commands"
  9844.      section of the "Using the Language Format" section. Each IF
  9845.      command must be entered on a line of it's own in the report
  9846.      section you want affected.
  9847.  
  9848.  
  9849.      Using the Language Format
  9850.  
  9851.      As you create a report using one of the simpler formats (such
  9852.      as Row or Free form), PC-File translates it into written
  9853.      command statements. You don't see these command statements, as
  9854.      they remain below the surface of the report format, one level
  9855.      down. But it is these statements that PC- File reads when it
  9856.      prints a report.
  9857.  
  9858.      For example, when you enter a column heading with a line under
  9859.      it while painting a Free form report, PC-File translates that
  9860.      action into five command statements, as shown below.
  9861.  
  9862.      Free form
  9863.  
  9864.      Last name
  9865.      ========
  9866.  
  9867.  
  9868.      Commands
  9869.  
  9870.      =1
  9871.      "Last name"
  9872.      /1
  9873.      =1
  9874.  
  9875.  
  9876.  
  9877.      PC-File Version 7 Users Guide                            169
  9878.  
  9879.  
  9880.      "========"
  9881.  
  9882.      The first command statement indicates the column at which the
  9883.      heading starts, the second tells the program to print the
  9884.      heading, the third moves the printer down one line, the fourth
  9885.      indicates the column at which the line starts, and the last
  9886.      statement tells the program to draw the line.
  9887.  
  9888.      The command statements are, in a sense, the report language
  9889.      for PC- File. You can work with the command statements by
  9890.      choosing the Language format. You can either create a new
  9891.      report or edit an existing report, no matter what format was
  9892.      used to create it. In most cases, in fact, you will find it
  9893.      easier to create a report in another format, such as Row or
  9894.      Free form, then edit and customize it in the Language format.
  9895.  
  9896.      The advantage of the Language format is that it gives you the
  9897.      widest range of flexibility in PC-File. Among the features
  9898.      only available in Language format are:
  9899.  
  9900.        the ability to perform calculations upon subtotals, totals,
  9901.        and buckets
  9902.  
  9903.        the ability to use all formatting commands
  9904.  
  9905.        the ability to use printer markers and word wrap
  9906.  
  9907.      A report displayed in the Language format is a series of
  9908.      command statements, each on its own line. There are seven
  9909.      kinds of commands recognized in PC-File.
  9910.  
  9911.  
  9912.      Type of command     Description
  9913.  
  9914.      Section head        Specify the beginning of a 
  9915.                section
  9916.  
  9917.      Formatting          Define location of text and 
  9918.                fields, and set printer codes
  9919.  
  9920.      Text                Enter text, including titles, 
  9921.                column heads, and lines, in a 
  9922.           report
  9923.  
  9924.      Data field          Define which field to print
  9925.  
  9926.      System field        Pull information from the 
  9927.                computer, the database (other 
  9928.           than from a field), or from                       the
  9929.      operator
  9930.  
  9931.      Calculation         Perform a calculation or a 
  9932.                relational lookup
  9933.  
  9934.      IF                  Set conditions for performing 
  9935.                an operation
  9936.  
  9937.  
  9938.  
  9939.      PC-File Version 7 Users Guide                            170
  9940.  
  9941.  
  9942.  
  9943.  
  9944.      A command statement can also include print masks and buckets.
  9945.      Print masks are used to define how data is formatted when it
  9946.      prints. Buckets are used to hold data or text temporarily.
  9947.  
  9948.      Each type of command, along with print masks and buckets, is
  9949.      explained in detail later in this chapter.
  9950.  
  9951.      Procedures for Creating a Language Format Report
  9952.  
  9953.      To create a report using the Language format:
  9954.  
  9955.      1.Choose Print from the menu bar.
  9956.  
  9957.      2.Choose Reports from the Print menu.
  9958.  
  9959.      3.Choose New from the dialog box listing the operations.
  9960.  
  9961.      4.Choose Language from the dialog box listing the formats. The
  9962.        edit window displays.
  9963.  
  9964.      5.Create the report by entering the command statements in the
  9965.        edit window.
  9966.  
  9967.      6.Choose OK when you finish.
  9968.  
  9969.      7.When prompted to save the report, choose Yes or No. Choose
  9970.        Yes if you want to save the report for future viewing or
  9971.        printing. Choose No if you want to print or view the report
  9972.        only once, and don't want to save it. PC-File displays the
  9973.        Print options dialog box. See Chapter 11 for information on
  9974.        printing reports.
  9975.  
  9976.      8.If you chose Yes in the previous step, enter a report
  9977.        description of up to 50 characters. Choose OK when you
  9978.        finish. The description is optional, but can be useful in
  9979.        reminding you of the contents of the report at some later
  9980.        date.
  9981.  
  9982.      9.Enter a report name of up to eight characters. Choose OK.
  9983.        The Print options dialog box displays. See Chapter 11 for
  9984.        information on printing reports.
  9985.  
  9986.  
  9987.      Procedures for Modifying a Report With the Language Format
  9988.  
  9989.      To edit a report using the Language format:
  9990.  
  9991.      1.Choose Print from the menu bar.
  9992.  
  9993.      2.Choose Reports from the Print menu.
  9994.  
  9995.      3.Choose Modify from the dialog box listing the operations.
  9996.  
  9997.  
  9998.  
  9999.      PC-File Version 7 Users Guide                            171
  10000.  
  10001.  
  10002.      4.Choose Language from the dialog box listing the formats. The
  10003.        file selection dialog box displays.
  10004.  
  10005.      5.Choose the report you want to edit. The report appears in
  10006.        the edit window.
  10007.  
  10008.      6.Make your changes to the report.
  10009.  
  10010.      7.Choose OK when you finish.
  10011.  
  10012.      8.Give the report a new name if you want to keep the original
  10013.        report, or accept the original name to overwrite the report.
  10014.  
  10015.      9.Enter a description (optional).
  10016.  
  10017.      Basic Guidelines
  10018.  
  10019.      PC-File displays the edit window when you choose to create or
  10020.      edit a report using the Language format. However, you can use
  10021.      any word processor that can produce an ordinary ASCII file
  10022.      (also referred to as "DOS text" or "unformatted" files) to
  10023.      create or edit the report. Just be sure to store the report in
  10024.      a file using the .REP extension.
  10025.  
  10026.      Follow these simple rules when creating or editing a report
  10027.      using the Language format:
  10028.  
  10029.        Enter each command statement on a separate line.
  10030.  
  10031.        Use no more than one line and 80 characters for each command
  10032.        statement.
  10033.  
  10034.      As with the Free form format, use only the sections you need.
  10035.  
  10036.      Section Head Commands
  10037.  
  10038.      The Language format divides up a report into the same six
  10039.      sections found in the Free form format: Cover, Heading,
  10040.      Detail, Subtotal, Total, and Footing. Each section head begins
  10041.      with a colon and must be in all uppercase letters, like this:
  10042.  
  10043.      :DETAIL :TOTAL
  10044.  
  10045.      Sections can be ordered in any sequence. However, for clarity
  10046.      in reading a report definition, it is easier to keep the
  10047.      sections in the basic order that the report follows. For more
  10048.      information on the purpose and parameters of each section, see
  10049.      "Report Sections" in the section on Free form formats earlier
  10050.      in this chapter.
  10051.  
  10052.      Formatting Commands
  10053.  
  10054.      Use formatting commands to tell PC-File where and how to print
  10055.      text and fields. Formatting commands control line and
  10056.      character spacing, compress out blank lines, and insert
  10057.      printer control codes.
  10058.  
  10059.  
  10060.  
  10061.      PC-File Version 7 Users Guide                            172
  10062.  
  10063.  
  10064.  
  10065.      The following formatting commands are used in PC-File.
  10066.  
  10067.      Command        Description
  10068.  
  10069.      =nn            Horizontal tab (tab to column nn)
  10070.  
  10071.      /n             Line feed (insert n lines)
  10072.  
  10073.      .FF            Form feed (start new page)
  10074.  
  10075.      .CP n          Conditional page (start new page if 
  10076.           less than n lines left on page)
  10077.  
  10078.      .GROUP         Compress lines within grouping
  10079.  
  10080.      .EGROUP        End grouping
  10081.  
  10082.      .EGROUP R      End grouping, but replace lines at 
  10083.           end
  10084.  
  10085.      .x             Printer markers (where x is a print 
  10086.           enhancement or style, such as                     .BOLD)
  10087.  
  10088.      .A nn,nn       Printer control codes
  10089.  
  10090.  
  10091.      Formatting commands amount to over half the commands used in a
  10092.      report, as they dictate the placement of fields and text
  10093.      within the report.
  10094.  
  10095.      Each of the formatting commands are explained in more detail
  10096.      below.
  10097.  
  10098.      Horizontal Tab
  10099.  
  10100.      Use =nn to control the horizontal print location. The nn
  10101.      indicates the column that is tabbed to, not the number of
  10102.      spaces to insert before the next piece of data. For example,
  10103.      the command =40 would tab to column 40 and =73 would tab to
  10104.      column 73. To move the print head to the first column in the
  10105.      next line, use the line feed command instead.
  10106.  
  10107.      You can't tab backwards on a line. For example, you can't
  10108.      locate a field at column 73 on a line and then locate another
  10109.      field at column 40 on the same line. Commands must be issued
  10110.      with the idea that the print head will move from left to right
  10111.      on a line.
  10112.  
  10113.      The following sample shows two horizontal tabs.
  10114.  
  10115.      :DETAIL
  10116.      =25
  10117.      [SALUTATION]
  10118.      =29
  10119.      [FIRSTNAME]
  10120.  
  10121.  
  10122.  
  10123.      PC-File Version 7 Users Guide                            173
  10124.  
  10125.  
  10126.  
  10127.      Line Feed
  10128.  
  10129.      The /n command tells the printer to move down n number of
  10130.      lines. To skip down five lines you would use the command /5.
  10131.      Each section that doesn't end with a form feed (.FF) must end
  10132.      with a line feed.
  10133.  
  10134.      The following sample shows several line feeds.
  10135.  
  10136.      :DETAIL
  10137.      /1
  10138.      [FIRSTNAME]
  10139.      /1
  10140.      [LASTNAME]
  10141.      /2
  10142.  
  10143.      Form Feed
  10144.  
  10145.      The .FF command tells the printer to begin a new page, even if
  10146.      the current page is not full. The form feed is most useful for
  10147.      printing a cover page at the beginning of a report or for
  10148.      starting a new page after each subtotal break. DO NOT use the
  10149.      .FF command in the Heading or Footing sections. If you use .FF
  10150.      in the Cover, Detail, Subtotal, or Total sections, you must
  10151.      include a Footing section with at least one line feed (/1)
  10152.      command. If any data is printed in the section with a form
  10153.      feed, you
  10154.      must also have a line feed before the form feed.
  10155.  
  10156.      The following sample shows a form feed used to begin a new
  10157.      page.
  10158.  
  10159.      :DETAIL
  10160.      /1
  10161.      [FIRSTNAME]
  10162.      /1
  10163.      [LASTNAME]
  10164.      /2
  10165.      .FF
  10166.  
  10167.  
  10168.      Conditional Page
  10169.  
  10170.      Use the .CP n command to prevent several lines of data from
  10171.      being split between two pages. The .CP n command tells the
  10172.      printer to begin a new page, but only if there are less than n
  10173.      lines left on a page. The number of lines taken into account
  10174.      does not include any lines in headers or footers-if you are
  10175.      printing 66 lines per page, and you have a 3 line header and a
  10176.      3 line footer, the conditional page command will check for how
  10177.      many of the 60 "body" lines remain. For example, the command
  10178.      .CP 8 will prompt PC-File to check how many lines are left on
  10179.      the page. If there are less than eight lines left, the printer
  10180.      will skip to the next page.
  10181.  
  10182.  
  10183.  
  10184.      PC-File Version 7 Users Guide                            174
  10185.  
  10186.  
  10187.      The .CP n command is normally placed at the beginning of a
  10188.      section, but never at the end (as it would serve no purpose).
  10189.      Don't use the .CP n command in the Heading or Footing section.
  10190.      And don't use it to determine the bottom margin on the page.
  10191.      Use a Footing section with a line feed instead.
  10192.  
  10193.      The following sample shows a conditional page command.
  10194.  
  10195.      :DETAIL
  10196.      .CP 3
  10197.      /1
  10198.      [FIRSTNAME]
  10199.      /1
  10200.      [LASTNAME]
  10201.      /1
  10202.  
  10203.      Line Compression
  10204.  
  10205.      The .GROUP, .EGROUP, and .EGROUP R commands are used to
  10206.      compress lines, most often in address lists and mailing
  10207.      labels. Addresses are often formatted for four or five lines
  10208.      to accommodate those addresses that need them, but most
  10209.      addresses are only three or four lines long. Without the line
  10210.      compression commands, you could end up with mailing labels
  10211.      that look like this:
  10212.  
  10213.      Janet Ratite
  10214.      438 Savannah Way
  10215.  
  10216.      Seattle, WA 98103
  10217.  
  10218.      To remove blank lines from addresses, place the .GROUP command
  10219.      before and the .EGROUP command after the commands that locate
  10220.      your name and address fields. Use the .EGROUP R command
  10221.      instead of .EGROUP to place any blank lines removed from the
  10222.      middle of an address after the last data line in the group.
  10223.      This command is most used in mailing labels where you must
  10224.      maintain the same number of lines for each label.
  10225.  
  10226.      Here's an example of a typical label report using the .GROUP
  10227.      and .EGROUP R commands:
  10228.  
  10229.      :DETAIL
  10230.      .GROUP
  10231.      [NAME]
  10232.      /1
  10233.      [ADDRESS1]
  10234.      /1
  10235.      [ADDRESS2]
  10236.      /1
  10237.      <CITY>
  10238.      ", "
  10239.      <STATE>
  10240.      " "
  10241.      <ZIP>
  10242.      .EGROUP R
  10243.  
  10244.  
  10245.  
  10246.      PC-File Version 7 Users Guide                            175
  10247.  
  10248.  
  10249.      /3
  10250.  
  10251.  
  10252.      Every .GROUP command must be followed by either an .EGROUP or
  10253.      an .EGROUP R command.
  10254.  
  10255.      Reformatting Commands
  10256.  
  10257.      There are times where you need to reformat a section of a
  10258.      report to a particular width. For example, if you are printing
  10259.      several fields of varying length in the midst of a paragraph
  10260.      of constant text. Use the .REFORMAT nn (where nn is the width
  10261.      you want the following lines reformatted to) and .ENDREFORMAT
  10262.      commands to reformat the paragraph to the specified width.
  10263.  
  10264.      You use the .REFORMAT and .ENDREFORMAT commands like the
  10265.      .GROUP and .EGROUP commands-surround the Text and Field
  10266.      commands to be reformatted. Each command should be placed on a
  10267.      line by itself, and should start at the left edge. For
  10268.      example:
  10269.  
  10270.      .REFORMAT 55
  10271.      "If you have questions, call your local sales"
  10272.      "office at:
  10273.      "
  10274.      <PHONE>
  10275.      ". "
  10276.      "Your salesperson will answer any questions"
  10277.      "you have."
  10278.      /1
  10279.      .ENDREFORMAT
  10280.  
  10281.      This would reformat the paragraph to a width of 55. The
  10282.      resulting paragraph would look something like this:
  10283.  
  10284.      If you have any questions, call your local sales office at:
  10285.      555-1234. Your salesperson will answer any questions you have.
  10286.  
  10287.      Printer markers
  10288.  
  10289.      Use printer markers to change character formatting within the
  10290.      report. Printer markers are available for many of the standard
  10291.      print enhancements, such as bold, italics, and underlined
  10292.      type.
  10293.  
  10294.      The available printer markers are:
  10295.  
  10296.      .NORMAL
  10297.      .CONDENSED
  10298.      .BOLD
  10299.      .ITALIC
  10300.      .UNDERLINE
  10301.      .PORTRAIT
  10302.      .LANDSCAPE
  10303.      .PROPORTIONAL
  10304.      .DOUBLEWIDE
  10305.  
  10306.  
  10307.  
  10308.      PC-File Version 7 Users Guide                            176
  10309.  
  10310.  
  10311.      .USERn (where n is 1-5)
  10312.  
  10313.      Enter a printer marker where you want a change in the font or
  10314.      type to occur. Use the marker .NORMAL to return to the
  10315.      default.
  10316.  
  10317.      For example, if you want to make the title of a report
  10318.      boldface, it might look like this:
  10319.  
  10320.      :HEADING
  10321.      .BOLD
  10322.      "Current Member List"
  10323.      .NORMAL
  10324.      /1
  10325.      :DETAIL
  10326.      <LASTNAME>
  10327.      " "
  10328.      <FIRSTNAME> /1
  10329.  
  10330.  
  10331.      .USERn is a user-defined printer marker. You can define up to
  10332.      five of these markers in a configuration profile. See Chapter
  10333.      13, "Utilities" for information on defining these markers.
  10334.  
  10335.      Printer Control Codes
  10336.  
  10337.      To change character formatting in ways not defined with the
  10338.      printer markers listed above, use the ASCII (A nn,nn) command.
  10339.      The values following A represent the ASCII decimal value of
  10340.      the printer control code. For example, if you want to change
  10341.      the typeface for a particular section of a report, enter the
  10342.      ASCII command for that particular typeface. You can then use
  10343.      the printer marker .NORMAL to change back to the default
  10344.      typeface.
  10345.  
  10346.      You can also use the ASCII command to enter characters not
  10347.      available on the keyboard.
  10348.  
  10349.      Enter the command in the format
  10350.  
  10351.           .A nn,nn
  10352.  
  10353.      with a space between A and the printer code string. Follow
  10354.      each ASCII value with a comma, but no space. For example:
  10355.  
  10356.           .A 27,38,108,49,79
  10357.  
  10358.      You can use up to 67 characters in an ASCII command. If you
  10359.      need more than that, as some laser printer fonts do, divide
  10360.      the command into two or more commands.
  10361.  
  10362.      Text Commands
  10363.  
  10364.  
  10365.  
  10366.      PC-File Version 7 Users Guide                            177
  10367.  
  10368.  
  10369.      Use text commands to print text. Text includes titles,
  10370.      headings, lines, and miscellaneous text that appears in a
  10371.      report. Text is always surrounded by quotation marks in a text
  10372.      command statement, as shown in the following example:
  10373.  
  10374.      :HEADING
  10375.      "Current Member List"
  10376.      /1
  10377.      :DETAIL
  10378.      <LASTNAME>
  10379.      " "
  10380.      <LASTNAME>
  10381.      /1
  10382.  
  10383.      Enter text as you want it to appear in the report; that is,
  10384.      words you want to appear in uppercase letters, enter in
  10385.      uppercase.
  10386.  
  10387.      Database Field Commands
  10388.  
  10389.      Use database field commands to print data from fields in your
  10390.      database. Field commands are entered in either of two modes:
  10391.  
  10392.           [field]   padded field
  10393.  
  10394.           <field>   trimmed field (spaces removed)
  10395.  
  10396.  
  10397.      Use a padded field to line up fields in columns. This format
  10398.      is most often used in combination with horizontal tab
  10399.      commands. For example, the commands
  10400.  
  10401.      =4
  10402.      [City]
  10403.      =18
  10404.      [St]
  10405.  
  10406.      produce a report like this
  10407.  
  10408.           Miami              FL
  10409.           Tallahassee        FL
  10410.  
  10411.      Use a trimmed field to remove trailing spaces (and leading
  10412.      spaces, if they appear, but not internal spaces). This format
  10413.      is most often used when combining first and last name fields,
  10414.      city, state, and zipcode fields, and in similar situations.
  10415.  
  10416.      A text command, such as the addition of a space or comma, is
  10417.      often used with these commands. The commands
  10418.  
  10419.      =4
  10420.      <City>
  10421.      ", "
  10422.      <St>
  10423.  
  10424.      produce a report like this
  10425.  
  10426.  
  10427.  
  10428.      PC-File Version 7 Users Guide                            178
  10429.  
  10430.  
  10431.  
  10432.           Miami, FL
  10433.           Tallahassee, FL
  10434.  
  10435.      PC-File lets you designate a partial field with either mode as
  10436.      well, though this is most often used with square bracketed
  10437.      fields, as follows:
  10438.  
  10439.      =4
  10440.      [City,1,12]
  10441.      =17
  10442.      [St,1,2]
  10443.  
  10444.      Database field commands can be used with print masks and
  10445.      buckets, which are explained later in this chapter.
  10446.  
  10447.      System Field Commands
  10448.  
  10449.      Use system field commands to print data that is taken from the
  10450.      system in one form or another. System field commands include
  10451.      commands to print the current time or date as recorded by the
  10452.      computer, page numbers, and counts of records. The command to
  10453.      prompt the user to key in information is a system field
  10454.      command as well.
  10455.  
  10456.      System field commands available in the Language format are:
  10457.  
  10458.      Command        Description
  10459.  
  10460.      [DATE*]        System date
  10461.  
  10462.      [TIME*]        System time
  10463.  
  10464.      [PAGE*]        Current page number
  10465.  
  10466.      [SELECT*]      Selection criteria for the report
  10467.  
  10468.      [SORT*]        Current index-field index is 
  10469.           attached to, not index formula
  10470.  
  10471.      [COUNT*]       Number of records printed
  10472.  
  10473.      [RECORDS*]     Number of records in database
  10474.  
  10475.      [KEYIN*msg]    Prompt for operator input
  10476.  
  10477.      System field commands must be entered in uppercase letters,
  10478.      followed by an asterisk (*), and enclosed in brackets. Like
  10479.      data field commands, system field command statements can
  10480.      include print masks and buckets.
  10481.  
  10482.      PC-File also provides system field commands for handling data
  10483.      derived from subtotal operations. See "Subtotal Report
  10484.      Commands" later in this chapter for details.
  10485.  
  10486.  
  10487.  
  10488.      PC-File Version 7 Users Guide                            179
  10489.  
  10490.  
  10491.      Calculation Commands
  10492.  
  10493.      A calculation can use a database field, a system field, a
  10494.      constant, or a total bucket. You can use any PC-File-supported
  10495.      calculation in a report. A calculation must be surrounded by
  10496.      parentheses.
  10497.  
  10498.      When entering a calculation in a report, type field names as
  10499.      they appear in the database; do not use brackets. Constants
  10500.      must be surrounded by quotation marks. System fields and total
  10501.      buckets must be surrounded by square brackets. System fields
  10502.      must be entered in uppercase with an asterisk following the
  10503.      system field name. Relational calculations must be surrounded
  10504.      by parentheses.
  10505.  
  10506.      The following example illustrates the use of a calculation in
  10507.      a report.
  10508.  
  10509.      :DETAIL
  10510.      /1
  10511.      (DONATION * 12):zz,zzz.##:
  10512.  
  10513.      For more information on calculations, see Chapter 17,
  10514.      "Calculations."
  10515.  
  10516.      IF Commands
  10517.  
  10518.      Use the IF...ENDIF commands when you want PC-File to perform a
  10519.      task only when certain conditions are met. In most cases, this
  10520.      means that PC-File checks the data within a field or
  10521.      calculation, then performs the task if the data meets the
  10522.      condition(s) set within the IF command.
  10523.  
  10524.      IF commands follow a set format:
  10525.  
  10526.      .IF (a comparison calculation)
  10527.      Things to do if true (can be many commands long) .ELSE
  10528.      Things to do if not true (can be many commands    long)
  10529.      .ENDIF
  10530.  
  10531.      Every .IF statement must have a matching .ENDIF statement. The
  10532.      .ELSE statement is optional, however.
  10533.  
  10534.      You can't put an IF statement within another IF statement,
  10535.      which is known as "nesting" statements in programming
  10536.      languages. Use separate IF commands rather than nesting the IF
  10537.      commands. This doesn't mean you can't have many commands
  10538.      between the IF command and the ENDIF command-you can use as
  10539.      many commands as necessary within memory limitations.
  10540.  
  10541.      The following example selectively performs a calculation based
  10542.      on the contents of the Tax field, where the Tax field is used
  10543.      to indicate whether or not an item is taxable.
  10544.  
  10545.      .IF (Tax = " Y")
  10546.      " Amount of tax for this item is "
  10547.  
  10548.  
  10549.  
  10550.      PC-File Version 7 Users Guide                            180
  10551.  
  10552.  
  10553.      ([Amount]*.081):zz#.##:
  10554.      .ELSE
  10555.      " Not a taxable item"
  10556.      .ENDIF
  10557.  
  10558.      The IF statement calculates the tax when there is a Y in the
  10559.      Tax field and prints "Not a taxable item" when there is an N
  10560.      in the Tax field.
  10561.  
  10562.      IF commands are closely related to complex searches. All of
  10563.      the valid complex search operators work in IF commands,
  10564.      including scan-across, soundex, generic, and wildcard
  10565.      searches. The IF command can also include system fields, total
  10566.      buckets, and calculations in the IF condition. System fields
  10567.      and total buckets must be enclosed by square brackets.
  10568.  
  10569.      The following example of an IF command shows how to print
  10570.      address information using relational lookups once for each
  10571.      subtotal group. This example uses relational lookups to pull
  10572.      in the address information based on an account number present
  10573.      in both the Customer list database and the Order database.
  10574.      This report is run from within the Order database.
  10575.  
  10576.      :DETAIL
  10577.      .IF ([SUBCOUNT*] = 1)
  10578.      [Company]
  10579.      /1
  10580.      (@Acct_no,Customer,Cust_ID,Address)
  10581.      /1
  10582.      (@*,City)
  10583.      ", "
  10584.      (@*,State)
  10585.      " "
  10586.      (@*,Zipcode)
  10587.      /1
  10588.      .ENDIF
  10589.  
  10590.  
  10591.      Print Masks
  10592.  
  10593.      Use print masks to format a field or calculation. Print masks
  10594.      can be used to restrict the output to a certain length, add
  10595.      dollar signs or decimal places to numeric entries, or suppress
  10596.      leading zeroes.
  10597.  
  10598.      Print masks are not commands; instead, they are added to
  10599.      commands to indicate how the command should be printed. You
  10600.      can use them with database field commands, system field
  10601.      commands, and calculation commands.
  10602.  
  10603.      Print masks are always enclosed within colons, and follow the
  10604.      command itself, as the following examples illustrate:
  10605.  
  10606.      [Month]:@@@:
  10607.  
  10608.  
  10609.  
  10610.      PC-File Version 7 Users Guide                            181
  10611.  
  10612.  
  10613.           Only the first three characters of the field called Month
  10614.           are printed
  10615.  
  10616.      [Amount]:$$,$$$.##:
  10617.  
  10618.           Adds a dollar sign to a numeric figure
  10619.  
  10620.      Print masks are not mandatory for fields or calculations
  10621.      (except for date calculations), but are useful when you want
  10622.      to prescribe how the field will look in the report.
  10623.  
  10624.      There are three types of print masks:
  10625.  
  10626.           Character masks
  10627.           Numeric masks
  10628.           Empty masks
  10629.  
  10630.      The different types of masks are explained below.
  10631.  
  10632.      Character Masks
  10633.  
  10634.      There are two character masks:
  10635.           the :@@@: mask limits the number of characters that print
  10636.           in a field;
  10637.           the :Wnn: word wrap mask (where nn is a number) limits
  10638.           the width of the printed data to nn characters, wrapping
  10639.           any additional text from one line to the next.
  10640.  
  10641.      For :@@@: masks, the number of @ characters between the colons
  10642.      equals the width of the printed field. Thus, :@@: prints the
  10643.      first two characters in the field, and :@@@@@@: prints the
  10644.      first six characters. Any characters beyond the formatted
  10645.      width are not printed. For the word wrap mask, the number
  10646.      following the W determines the width at which the printed data
  10647.      will wrap. For example, :W6: prints no more than six
  10648.      characters wide, but will use as many lines as it takes to
  10649.      print all the data in the
  10650.      field.
  10651.  
  10652.      The following examples illustrate how character masks format
  10653.      data in a report:
  10654.  
  10655.      [Name]         Roosevelt
  10656.  
  10657.      [Name]:@@@@@:  Roose
  10658.  
  10659.      [Notes]:W6:    This
  10660.                     member
  10661.                     has no
  10662.                     phone.
  10663.  
  10664.      The word wrap mask doesn't split words. It is most useful with
  10665.      memo fields and scroll fields, but can be used with any field
  10666.      type, including numeric fields.
  10667.  
  10668.  
  10669.  
  10670.      PC-File Version 7 Users Guide                            182
  10671.  
  10672.  
  10673.      The :@@@: mask can be used with any field type, but they are
  10674.      most appropriate for fields that contain character data:
  10675.      character, date, and memo fields.
  10676.  
  10677.      Both kinds of character masks cause output to be left-aligned.
  10678.  
  10679.      Numeric Masks
  10680.  
  10681.      The pound sign (#) and the lowercase z represent digits and
  10682.      are used to format numeric fields. The only difference between
  10683.      the two masks is that the lowercase z suppresses leading
  10684.      zeros, the # doesn't. The following examples show how the two
  10685.      masks would treat the same data:
  10686.  
  10687.      [Amount]:##,###.##:      02,564.50
  10688.  
  10689.      [Amount]:zz,zzz.zz:       2,564.50
  10690.  
  10691.      If the value of a field was zero, the two masks would handle
  10692.      it as follows:
  10693.  
  10694.      [Amount]:##,###.##:      00,000.00
  10695.  
  10696.      [Amount]:zz,zzz.zz:
  10697.  
  10698.      Commas and decimal points should be placed where you want them
  10699.      to appear in the field. A leading comma will not print if
  10700.      there are no digits to the left of it, as shown in the
  10701.      following example:
  10702.  
  10703.      [Amount]:zz,zzz.##:      26.49
  10704.  
  10705.      The asterisk (*) and dollar sign ($) are used as floating
  10706.      characters in numeric fields, and are useful for check
  10707.      writing. Both suppress leading zeros, like the lowercase z.
  10708.      The $ prints a single dollar sign immediately to the left of
  10709.      the first non-zero digit, while the * prints as many asterisks
  10710.      as space allows. The following examples illustrate their use.
  10711.  
  10712.      [Amount]:$$,$$$.##:      $4.52
  10713.  
  10714.      [Amount]:**,***.##: *****4.52
  10715.  
  10716.      Any other characters placed in a numeric print mask will print
  10717.      as entered, as shown in the following examples:
  10718.  
  10719.      [Item]:zz-zz:       2-45
  10720.  
  10721.      [Serial_no]:TY######:    TY040090
  10722.  
  10723.      All numeric print masks cause the value to be right-aligned.
  10724.  
  10725.      Empty Masks
  10726.  
  10727.  
  10728.  
  10729.      PC-File Version 7 Users Guide                            183
  10730.  
  10731.  
  10732.      Empty masks are used in combination with buckets, which are
  10733.      explained in the next section. Essentially, an empty mask
  10734.      (also called a null mask) prevents the value in the field from
  10735.      being printed. Instead, the value is placed in the bucket,
  10736.      sort of a temporary holding bin. An empty mask looks like
  10737.      this:
  10738.  
  10739.      [Amount]::`Amt
  10740.  
  10741.      The value in the Amount field is added to the bucket `Amt. The
  10742.      empty mask, represented by the double colon (::), prevents the
  10743.      value from being printed.
  10744.  
  10745.      Buckets
  10746.  
  10747.      As the name implies, buckets are storage containers. In PC-
  10748.      File, they are used to store values temporarily. Temporary
  10749.      storage is useful in two ways:
  10750.  
  10751.      To accumulate numeric values (the total can then be printed in
  10752.      the report or used in a calculation)
  10753.  
  10754.      To hold text to be printed later Buckets used to accumulate
  10755.      numeric values are called total buckets; those used to hold
  10756.      text are called string buckets.
  10757.  
  10758.      Buckets are like print masks in that they are not commands
  10759.      themselves, but are used in command statements. Buckets can be
  10760.      used with text commands (string buckets only), database field
  10761.      commands, system field commands, and calculation commands.
  10762.  
  10763.      A bucket is designated by a name of one to five characters,
  10764.      using only letters (no numbers, spaces, or punctuation). You
  10765.      can use more than five characters, but any characters after
  10766.      the fifth character are ignored. Bucket names are case-
  10767.      sensitive; uppercase and lowercase names are different. Total
  10768.      bucket names are preceded by a backwards apostrophe (`);
  10769.      string bucket names are preceded by the backwards apostrophe
  10770.      and the dollar sign ($).
  10771.  
  10772.      Examples of valid total bucket names are:
  10773.  
  10774.      `a `Value `VALUE
  10775.  
  10776.      Valid string bucket names include:
  10777.  
  10778.      `$a `$Name `$TITLE
  10779.  
  10780.      Using Total Buckets
  10781.  
  10782.      As mentioned above, total buckets are used to accumulate
  10783.      numeric totals. There are two steps to using total buckets.
  10784.  
  10785.  
  10786.  
  10787.      PC-File Version 7 Users Guide                            184
  10788.  
  10789.  
  10790.      In the Detail section of the report, specify the field or
  10791.      calculation for which you want to accumulate totals. Subtotals
  10792.      and Totals for a particular field are accumulated in the same
  10793.      bucket.
  10794.  
  10795.      In the Subtotal and/or Total section of the report, print the
  10796.      bucket or use it in a calculation.
  10797.  
  10798.      To specify the field or calculation to be accumulated, simply
  10799.      place the bucket name at the end of the command line. For
  10800.      example, in this command statement
  10801.  
  10802.      [Commission]:: `Comm
  10803.  
  10804.      the data in the Commission field is accumulated in a bucket
  10805.      called Comm. The individual values are not printed as a result
  10806.      of the empty mask (::).
  10807.  
  10808.      In the command statement
  10809.  
  10810.      (Price*Quantity):zz,zzz.##:`Amt
  10811.  
  10812.      the result of the calculation is printed in the format
  10813.      zz,zzz.## and is also accumulated in the bucket called Amt for
  10814.      later use.
  10815.  
  10816.      To print the value in a bucket, enclose the bucket name in
  10817.      square brackets, just as you would a field name. Include a
  10818.      print mask to format the output. The buckets created in the
  10819.      earlier examples are printed like this:
  10820.  
  10821.      [`Comm]:$$$.##: [`Amt]:zz,zzz.##:
  10822.  
  10823.      You can also include bucket totals in calculations. The result
  10824.      of the calculation is then printed. A calculation that
  10825.      includes a bucket might look like this:
  10826.  
  10827.      ([`Amt]*[Tax]):$$,$$$.##:
  10828.  
  10829.      A total bucket can be used to keep a count. To keep a count,
  10830.      use the calculation
  10831.  
  10832.      (1)::`x
  10833.  
  10834.      This calculation adds 1 to the bucket called x each time it is
  10835.      encountered, thus accumulating a running count. The empty mask
  10836.      (::) keeps it from printing.
  10837.  
  10838.      To set a bucket to zero, use the command
  10839.  
  10840.      (0-[`Value])::`Value
  10841.  
  10842.      In this calculation, the value of the bucket called Value is
  10843.      subtracted from zero, resulting in a negative value. When the
  10844.      negative bucket value is added to the positive bucket value,
  10845.      the result is always zero.
  10846.  
  10847.  
  10848.  
  10849.      PC-File Version 7 Users Guide                            185
  10850.  
  10851.  
  10852.  
  10853.      Using String Buckets
  10854.  
  10855.      String buckets hold text in memory until you are ready to
  10856.      print it. Unlike total buckets, string buckets can't
  10857.      accumulate or append text. If you add another string of text
  10858.      to a bucket, it replaces the previous contents. However, you
  10859.      can have several different string buckets in memory at one
  10860.      time.
  10861.  
  10862.      To store text in a string bucket, include the string bucket
  10863.      name at the end of the command line. In the text command
  10864.  
  10865.      "Janet Ratite" `$Name
  10866.  
  10867.      the name Janet Ratite is stored in a bucket called Name.
  10868.  
  10869.      In the database field command
  10870.  
  10871.      [State]:@@:`$St
  10872.  
  10873.      each state name in the field called State is stored in a
  10874.      bucket called St. At the same time, it prints out in a two-
  10875.      character format as indicated by the mask.
  10876.  
  10877.  
  10878.      If you create a report using the Row format, and decide to
  10879.      enter the title of your report each time you print it, the
  10880.      command
  10881.  
  10882.      <KEYIN*TITLE LINE>::`$TITLE
  10883.  
  10884.      appears in the Cover section of the report if you print it out
  10885.      in Language format. This command prints the message TITLE LINE
  10886.      when you call up the report, then holds your response in a
  10887.      string bucket called TITLE.
  10888.  
  10889.      To print out the text string that is stored in a string
  10890.      bucket, enclose the bucket name in brackets, just as you would
  10891.      a field. For example, in the last example above, the title is
  10892.      printed with the following command:
  10893.  
  10894.      [`$TITLE]
  10895.  
  10896.      String buckets can be used in any section of the report.
  10897.  
  10898.  
  10899.      Subtotal Report Commands
  10900.  
  10901.  
  10902.  
  10903.      PC-File Version 7 Users Guide                            186
  10904.  
  10905.  
  10906.      PC-File provides special system field commands to handle data
  10907.      derived from subtotal operations. While you would typically
  10908.      only use one subtotal level, PC-File allows up to nine levels
  10909.      of subtotal breaks. For example, you might want to print a
  10910.      report for a database tracking sales that breaks to print
  10911.      subtotals on three levels: Level 1 - Region, Level 2 - Branch,
  10912.      and Level 3 - Salesperson. Level 1 breaks are the largest,
  10913.      most general subtotal groupings, level 2 are groups break
  10914.      within level 1,
  10915.      level 3 groups break within level 2, and so on. Use subtotal
  10916.      report commands to print subtotal data, or to control what
  10917.      happens for each subtotal level.
  10918.  
  10919.      [SUBLEVEL*]
  10920.  
  10921.      Returns the level number of the subtotal break that caused the
  10922.      current :SUBTOTAL section to print. Level 1 is the first
  10923.      (outermost) subtotal level, level 9 is the last (innermost)
  10924.      level. This command is generally used in .IF statement
  10925.      conditions to control what happens for each break when
  10926.      performing multiple level subtotal breaks.
  10927.  
  10928.      [SUBCMD*n]
  10929.  
  10930.      Returns the subtotal trigger formula in dBASE format. For
  10931.      example: (MONTH(date)). Omit "n" to have PC-File return the
  10932.      formula for the current level, replace "n" with 1-9 to return
  10933.      the command for a particular level. For example, [SUBCMD*3]
  10934.      returns the trigger formula for subtotal level 3.
  10935.  
  10936.      [SUBCOUNT*n]
  10937.  
  10938.      Returns the number of records printed in a subtotal group.
  10939.      Omit "n" to return the current level's group, replace "n" with
  10940.      1-9 to return the number of records for that level's groups.
  10941.      For example, [SUBCOUNT*2] returns the number of records for
  10942.      the current level 2 group.
  10943.  
  10944.      [SUBFLD*n]
  10945.  
  10946.      Returns the subtotal trigger field name. Omit "n" to return
  10947.      the current level's trigger field, replace "n" with 1-9 to
  10948.      return the trigger field for that level. For example,
  10949.      [SUBFLD*5] returns the trigger field name for subtotal level
  10950.      5.
  10951.  
  10952.      [SUBID*n]
  10953.  
  10954.      Returns the data (either from the field or the result of the
  10955.      trigger formula) that triggered the subtotal break. Omit "n"
  10956.      to return the current level's trigger data, replace "n" with
  10957.      1-9 to return the trigger data for that level. For example,
  10958.      [SUBID*7] returns the current trigger data for subtotal level
  10959.      7.
  10960.  
  10961.      Subtotal Levels and Total Buckets
  10962.  
  10963.  
  10964.  
  10965.      PC-File Version 7 Users Guide                            187
  10966.  
  10967.  
  10968.  
  10969.      Individual total buckets hold the values from all subtotal
  10970.      levels at the same time. When you enter the bucket command in
  10971.      the :SUBTOTAL section of a report, for example:
  10972.  
  10973.      :SUBTOTAL [`AMT]:zzz,zz#.##: /1
  10974.  
  10975.      PC-File returns the value for the level that triggered the
  10976.      subtotal break. You can refer to a specific subtotal level by
  10977.      putting the appropriate level number immediately after the
  10978.      bucket name, for example: [`AMT3] returns the subtotal for
  10979.      subtotal level 3. Note that the "3" following "AMT" is NOT
  10980.      part of the bucket name, it is only used to force PC-File to
  10981.      return the bucket value for that level.
  10982.  
  10983.      If you are only choosing one subtotal break when printing your
  10984.      report, you do not need to use subtotal level numbers ("n" in
  10985.      the descriptions above). Also, even when performing multiple
  10986.      level subtotal breaks, you only need to use level numbers to
  10987.      force a subtotal system field to return data for that level.
  10988.      If you do not include level numbers, the current subtotal
  10989.      break level is assumed.
  10990.  
  10991.      With all the above commands, you can also refer to level 0,
  10992.      which is the level that is never reset, that is, the grand
  10993.      total level. For example, using [`AMT0] in the :SUBTOTAL
  10994.      section would print the running total.
  10995.  
  10996.      A typical :SUBTOTAL section for multiple level breaks uses .IF
  10997.      statements to determine what action to take for each subtotal
  10998.      level. For example, a three-level report might print total
  10999.      buckets for levels 2 and 3, printing an extra blank line after
  11000.      level 2 breaks, and feed to a new page for level 1 breaks:
  11001.  
  11002.      :SUBTOTAL
  11003.      .IF ([SUBLEVEL*] > 1)
  11004.      "Totals: "
  11005.      [`AMT]:zzz,zz#.##:
  11006.      /1
  11007.      .ENDIF
  11008.      .IF ([SUBLEVEL*] = 2)
  11009.      /1
  11010.      .ENDIF
  11011.      .IF ([SUBLEVEL*] = 1)
  11012.      .FORMFEED
  11013.      .ENDIF
  11014.  
  11015.  
  11016.  
  11017.      Printing Bar Codes
  11018.  
  11019.  
  11020.  
  11021.      PC-File Version 7 Users Guide                            188
  11022.  
  11023.  
  11024.      PC-File can print a large variety of bar codes on most dot-
  11025.      matrix and laser printers-without requiring special drivers or
  11026.      font cartridges. For example, you can use PC-File to print
  11027.      zipcode bar codes (Postnet) directly on envelopes, postcards
  11028.      or labels. You can also use this feature to print price tags,
  11029.      inventory control labels, and inventory control sheets in UPC
  11030.      and many other bar code formats.
  11031.  
  11032.      Printers Supported
  11033.  
  11034.      PC-File's bar code printing supports the following printers
  11035.      (and should work on any printer that fully emulates any of
  11036.      these printers):
  11037.  
  11038.           PostScript
  11039.           Epson 9 pin
  11040.           Epson 24 pin
  11041.           IBM Proprinter 9 pin
  11042.           IBM Proprinter 24 pin
  11043.           HP LaserJet
  11044.           HP DeskJet
  11045.           Toshiba 24 pin
  11046.           Okidata Microline Standard
  11047.  
  11048.      NOTE: You must use Configuration on the Utilities menu to
  11049.      choose the type of printer you are using before formatting
  11050.      reports to print bar codes. See "Configuring Your Database" in
  11051.      Chapter 13 for details.
  11052.  
  11053.      Also note that bar codes will only appear in printed output or
  11054.      as graphic commands when printing to a disk file. Bar codes
  11055.      will NOT display when choosing Display on the Print Options
  11056.      dialog box. The bar code graphics commands when printing to a
  11057.      disk file are specifically for the printer you choose when
  11058.      configuring your database.
  11059.  
  11060.  
  11061.      Available Bar Code Formats
  11062.  
  11063.      PC-File supports the following bar code types:
  11064.  
  11065.      UPC-A
  11066.  
  11067.      The standard bar code for items for sale to the public, UPC-A
  11068.      is the bar code used at grocery stores. The standard UPC-A
  11069.      code contains 1 system digit, 5 digits for the manufacturer
  11070.      number, and 5 digits for the product number. PC-File's bar
  11071.      code output also supports 2 or 5 supplemental digits that can
  11072.      follow the standard UPC-A code's 11 digits.
  11073.  
  11074.      UPC-E
  11075.  
  11076.  
  11077.  
  11078.      PC-File Version 7 Users Guide                            189
  11079.  
  11080.  
  11081.      A zero-suppressed and compressed version of the UPC code. The
  11082.      same number and kind of digits as UPC-A (including 2 and 5
  11083.      supplemental codes) can be encoded, but the code number must
  11084.      have at least 4 zeros. The possible number of different
  11085.      product numbers encoded varies from 5 to 1000 depending on the
  11086.      where the zeros are in the UPC code number.
  11087.  
  11088.      EAN/JAN-13
  11089.  
  11090.      An extended version of the UPC code containing digits to
  11091.      encode the country of origin. EAN/JAN-13 codes contain 2
  11092.      digits for the country code, 10 digits for the product
  11093.      information and a checksum number. Since the checksum number
  11094.      is generated, the standard EAN/JAN-13 input code number
  11095.      contains 12 characters. EAN/JAN-13 also supports 2 or 5 digit
  11096.      supplemental codes.
  11097.  
  11098.      EAN/JAN-8
  11099.  
  11100.      A shorter version of the EAN/JAN code composed of 2 country
  11101.      digits, 5 data digits, and a generated checksum number. Also
  11102.      supports 2 or 5 digit supplemental codes.
  11103.  
  11104.      3 of 9 (Code 39)
  11105.  
  11106.      Probably the most common bar code because it allows digits,
  11107.      letters and some punctuation to be bar coded. It is standard
  11108.      for many government bar code specifications. An input string
  11109.      of 2 to 30 characters is supported. All lowercase letters are
  11110.      converted to uppercase letters.
  11111.  
  11112.      Extended 3 of 9
  11113.  
  11114.      Supports every character in the standard ASCII 128 character
  11115.      set, including uppercase and lowercase letters and control
  11116.      codes. Supports codes from 2 to 30 characters in length.
  11117.  
  11118.      Interleaved 2 of 5
  11119.  
  11120.      A numeric-only bar code that supports numbers from 2 to 30
  11121.      digits.
  11122.  
  11123.      Code 128
  11124.  
  11125.      A very compact bar code that can encode the full ASCII 128
  11126.      character set. Supports codes from 2 to 30 characters in
  11127.      length.
  11128.  
  11129.      Codabar
  11130.  
  11131.      Encodes digits and the + - $ : / . symbols, often used to
  11132.      encode dollar figures and mathematical values. Supports codes
  11133.      from 2 to 30 characters long.
  11134.  
  11135.      ZIP + 4 Postnet
  11136.  
  11137.  
  11138.  
  11139.      PC-File Version 7 Users Guide                            190
  11140.  
  11141.  
  11142.      The special bar code to encode ZIP+4 codes for mailing
  11143.      addresses. Also supports 5 and 11 digit ZIP codes.
  11144.  
  11145.      MSI Plessey
  11146.  
  11147.      Used most often in grocery stores for shelf labels. A numeric-
  11148.      only code that supports codes from 2 to 15 characters in
  11149.      length.
  11150.  
  11151.      Code 93
  11152.  
  11153.      A compressed version of the 3 of 9 bar code.
  11154.  
  11155.      Extended 93
  11156.  
  11157.      A compressed version of the Extended 3 of 9 bar code.
  11158.  
  11159.      UCC-128
  11160.  
  11161.      19 digit fixed length numeric bar code used on shipping
  11162.      containers for items marked with UPC code.
  11163.  
  11164.  
  11165.      The following table summarizes the type and number of
  11166.      characters allowed for each bar code type:
  11167.  
  11168.  
  11169.           Bar Code Type Input Length Allowed Characters
  11170.  
  11171.  
  11172.           UPC-A 11,13, or 16 N
  11173.  
  11174.           UPC-E 11,13, or 16 N
  11175.  
  11176.           EAN/JAN-13 12, 14, or 17 N
  11177.  
  11178.           EAN/JAN-8 7, 9 or 12 N
  11179.  
  11180.           3 of 9 (Code 39) 2 to 30 N-U-P
  11181.  
  11182.           Extended 39 2 to 30 N-U-L-P-C
  11183.  
  11184.           Interleaved 2 of 5 2 to 30 N
  11185.  
  11186.           Code 128 2 to 30 N-U-L-P-C
  11187.  
  11188.           Codabar 2 to 30 N
  11189.  
  11190.           ZIP+4 Postnet 5, 9, or 11 N
  11191.  
  11192.           MSI Plessey 2 to 30 N
  11193.  
  11194.           Code 93 2 to 30 N-U-P
  11195.  
  11196.           Extended 93 2 to 30 N-U-L-P
  11197.  
  11198.  
  11199.  
  11200.      PC-File Version 7 Users Guide                            191
  11201.  
  11202.  
  11203.           UCC-128 19 N
  11204.  
  11205.  
  11206.  
  11207.      Allowed Characters:
  11208.  
  11209.           N-Numbers (0-9)
  11210.           U-Uppercase (A-Z)
  11211.           L-Lowercase (a-z)
  11212.           P-Punctuation
  11213.           C-Control Characters (ASCII values less than 32)
  11214.  
  11215.  
  11216.  
  11217.      Bar Code Printing Restrictions
  11218.  
  11219.      PC-File can only print one bar code per line. Additionally,
  11220.      nothing can be printed to the right on the same line as a bar
  11221.      code. Further, each of the bar code types supports specific
  11222.      data lengths and types of characters. See "Table of Bar Code
  11223.      Input Requirements" above for the input requirements of each
  11224.      type of bar code. Also note that bar codes will only appear in
  11225.      printed output or as graphic commands when printing to a disk
  11226.      file. Bar codes will NOT display when choosing Display on the
  11227.      Print
  11228.      Options dialog box.
  11229.  
  11230.      Type of Bar Code Dialog Box
  11231.  
  11232.      PC-File can produce 14 types of bar code output (see list and
  11233.      descriptions of available bar code types above). When using
  11234.      the Row, Mail Label, and Free Form formats, PC-File displays a
  11235.      dialog box for each field you've formatted to print as a bar
  11236.      code.
  11237.  
  11238.      The top line of the dialog box lists the name of the field
  11239.      that will print as a bar code. Type the corresponding letter,
  11240.      or click the mouse on the appropriate button to choose what
  11241.      type of bar code to print.
  11242.  
  11243.      Bar Code Height Dialog Box
  11244.  
  11245.      After you've chosen the type of bar code, PC-File displays the
  11246.      following dialog box to choose how high to print the bar code.
  11247.  
  11248.      Type the corresponding number or click the mouse on the
  11249.      appropriate button to select the height of your bar code
  11250.      output.
  11251.  
  11252.      NOTE: This dialog box does not appear when printing the ZIP+4
  11253.      Postnet bar code which can only print one height.
  11254.  
  11255.  
  11256.  
  11257.      PC-File Version 7 Users Guide                            192
  11258.  
  11259.  
  11260.  
  11261.  
  11262.      Printing Bar Codes with Row Format
  11263.  
  11264.      You can use a Row Format report to quickly produce reports in
  11265.      a one record per row format. Using the Row Format you can
  11266.      print bar codes for inventory control catalogs and the like.
  11267.      PC-File can only print one bar code per line with no other
  11268.      data or text printing to the right of the bar code. Therefore,
  11269.      you can only choose to print one field as a bar code with a
  11270.      Row Format report, and it must either be the only field you
  11271.      choose or the rightmost field you choose.
  11272.  
  11273.      First, you must choose any fields you want to print as text
  11274.      from the list box in the order you want to print them across
  11275.      the page. Then, to format the last (or only) field to print as
  11276.      a bar code, type the field's name followed by a comma and the
  11277.      letter "B" in the text box above the field selection list box
  11278.      (like FIELDNAME,B in the picture above), then press ENTER.
  11279.  
  11280.      For example, after you have made the menu selections to format
  11281.      a Row Report, the Field Selection dialog box is displayed.
  11282.  
  11283.      At this point, there should be a checkmark and a sequence
  11284.      number next to the left of each of the fields you have chosen.
  11285.      The field you chose to print as a bar code must be the last
  11286.      (or only) field in the sequence. If it is not, choose Reset
  11287.      and choose your fields again. Choose OK to continue with the
  11288.      report definition.
  11289.  
  11290.      After you choose OK, PC-File displays the bar code type
  11291.      selection box for the field you selected to print as a bar
  11292.      code. After choosing the bar code type, PC-File displays the
  11293.      bar code height selection box. The top border of both dialog
  11294.      boxes shows which field you are formatting to print as a bar
  11295.      code.
  11296.  
  11297.      To print bar code data using Row Format:
  11298.  
  11299.      1.Choose Reports from the Print menu.
  11300.  
  11301.      2.Choose New.
  11302.  
  11303.      3.Choose Row Format.
  11304.  
  11305.      4.Choose the fields you want to print as text:
  11306.  
  11307.           Click on the field name in the list box. Or...
  11308.  
  11309.           Highlight the field name in the list box and press ENTER.
  11310.           Or...
  11311.  
  11312.           Type the fieldname in the text box and press ENTER.
  11313.  
  11314.      5.Choose the field you want to print as a bar code:
  11315.  
  11316.  
  11317.  
  11318.      PC-File Version 7 Users Guide                            193
  11319.  
  11320.  
  11321.           Move the highlight to the text box above the field
  11322.           selection list box, if it isn't there already.
  11323.  
  11324.           Type the desired field's name exactly as it appears in
  11325.           the field selection list box, followed by a comma and the
  11326.           letter "B."
  11327.  
  11328.           Press ENTER.
  11329.  
  11330.        For example, to format a field named ZIPCODE for bar code
  11331.        printing, type: zipcode,b then press ENTER.
  11332.  
  11333.      6.Choose OK to continue.
  11334.  
  11335.      7.Choose the bar code type.
  11336.  
  11337.      8.Choose the bar code height. (The bar code height dialog box
  11338.        does not display when formatting ZIP+4 bar code).
  11339.  
  11340.      9.Type the report title and save the report, if desired.
  11341.  
  11342.      10.  Make selections on the Print Options dialog box. See
  11343.        Chapter 11, "The Print Options" for details).
  11344.  
  11345.      11.  Choose OK to print.
  11346.  
  11347.      See "Using the Row Format" earlier in this chapter for more
  11348.      information on printing using Row format.
  11349.  
  11350.  
  11351.  
  11352.      PC-File Version 7 Users Guide                            194
  11353.  
  11354.  
  11355.  
  11356.      Printing Bar Codes with Mailing Label Format
  11357.  
  11358.      PC-File now produces bar codes on labels. If you send mailings
  11359.      of 250- 500 pieces or more at a time, you may be able to save
  11360.      anywhere from 2o to over 5o per piece when using ZIP+4 bar
  11361.      coded addressing! (As of this printing-contact your local Post
  11362.      Office for up-to-date information on discounts and addressing
  11363.      standards). You can also use this feature to print labels with
  11364.      bar codes in other formats for applications such as inventory
  11365.      control tags and UPC price tags.
  11366.  
  11367.      Formatting labels to print bar codes with the Mail Label
  11368.      format works much like the procedure used with Row format. The
  11369.      same restrictions hold: You can print no more than one bar
  11370.      code per line, and if anything else is printing on that line,
  11371.      the bar code must be the last thing printing on the line. When
  11372.      selecting fields for each line of your label, type the field's
  11373.      name followed by a comma and the letter "B" to have that
  11374.      field's data print as a bar code. This triggers PC-File to
  11375.      display the bar code type and bar code size dialog boxes
  11376.      discussed at the beginning of this section. Note that the bar
  11377.      code definition dialog boxes do not display until you choose
  11378.      OK after choosing all fields for that line in the label.
  11379.  
  11380.      To print bar codes using the Mail Label report option:
  11381.  
  11382.      1.Choose Reports from the Print menu.
  11383.  
  11384.      2.Choose New.
  11385.  
  11386.      3.Choose Mail Label.
  11387.  
  11388.      4.Type the number of lines per label and choose OK.
  11389.  
  11390.      5.First, choose the fields (if any) you want to print as text
  11391.        on the first line of the label:
  11392.  
  11393.  
  11394.             Click on the field name in the list box. Or..
  11395.  
  11396.             Highlight the Field name in the list box and press
  11397.             ENTER. Or...
  11398.  
  11399.             Type the fieldname in the text box and press ENTER.
  11400.  
  11401.           Repeat for all fields to print as text on the first line.
  11402.  
  11403.      6.Only after choosing all fields to print as text, choose a
  11404.        field (if any) to print as a bar code on the first line:
  11405.  
  11406.           Move the highlight to the text box above the field
  11407.           selection list box, if it isn't there already.
  11408.  
  11409.           Type the desired field's name exactly as it appears in
  11410.           the field selection list box.
  11411.  
  11412.  
  11413.  
  11414.      PC-File Version 7 Users Guide                            195
  11415.  
  11416.  
  11417.  
  11418.           Type a comma followed by the letter "B."
  11419.  
  11420.           Press ENTER. For example, to format a field named ZIPCODE
  11421.           for bar code printing type: ZIPCODE,B then press ENTER.
  11422.           Remember: Do not choose any additional fields to print to
  11423.           the right of a bar code.
  11424.  
  11425.      7.Choose OK.
  11426.  
  11427.      8.If you have formatted a field to print as a bar code, the
  11428.        bar code type and height definition dialog boxes display as
  11429.        described above (height definition does not display for
  11430.        ZIP+4). Answer each box appropriately.
  11431.  
  11432.      9.Repeat steps 5-8 to define each line of the label.
  11433.  
  11434.      10.  Type a name and save the label format, if desired.
  11435.  
  11436.      11.  Make selections on the Print Options dialog box. See
  11437.        Chapter 11, "The Print Options," for details on the Print
  11438.        Options dialog box.
  11439.  
  11440.      12.  Choose OK to print.
  11441.  
  11442.      See "Using the Mailing Label Format" earlier in this chapter
  11443.      for more information on using the Mail Label format.
  11444.  
  11445.  
  11446.  
  11447.      PC-File Version 7 Users Guide                            196
  11448.  
  11449.  
  11450.  
  11451.      Printing Bar Codes with Free Form Format
  11452.  
  11453.      The Free Form format gives you more flexibility than either
  11454.      the Row or Mail Label formats. Use the Free Form format to
  11455.      print more complex labels, postcards, envelopes, catalogs,
  11456.      order forms, and other reports with bar codes. However, the
  11457.      same printing restrictions apply to all formats: only one bar
  11458.      code per line and nothing can print to the right of the bar
  11459.      code.
  11460.  
  11461.      A new menu option has been added to the Free Form report Data
  11462.      menu to let you to choose to print a field as a bar code. The
  11463.      Field (bar code) option lets you format a field to print as a
  11464.      bar code: First, place the cursor where you want the bar code
  11465.      to print in the appropriate report section (Heading, Detail,
  11466.      etc.). Then, pull down the Data menu and choose the Field (bar
  11467.      code) option. A field selection list box dialog appears to let
  11468.      you choose which field to print. After selecting the field to
  11469.      print, the Type of Bar Code dialog box is displayed, followed
  11470.      by the Bar Code Height dialog box.
  11471.  
  11472.      To print bar codes using the Free Form format:
  11473.  
  11474.      1.Choose Reports from the Print menu.
  11475.  
  11476.      2.Choose New.
  11477.  
  11478.      3.Choose Free Form.
  11479.  
  11480.      4.Move the cursor where you want to print the bar code, in the
  11481.        appropriate report section.
  11482.  
  11483.      5.Choose Field (bar code) from the Data menu.
  11484.  
  11485.      6.Choose the field from the list box.
  11486.  
  11487.      7.Choose the bar code type.
  11488.  
  11489.      8.Choose the bar code height. (The bar code height dialog box
  11490.        does not display when formatting ZIP+4 bar codes.) A row of
  11491.        @'s the length of the selected field appears in the location
  11492.        the bar code will print.
  11493.  
  11494.      9.Repeat steps 4-8 to print any    additional fields as a bar
  11495.        code. Remember not to print more than one bar code per line
  11496.        and do not print anything to the right of a bar code.
  11497.  
  11498.      10.  Format any additional fields as trimmed or padded text,
  11499.        system data, subtotals, or totals; typing any other text
  11500.        directly from the keyboard.
  11501.  
  11502.      11.  Choose OK from the File menu.
  11503.  
  11504.      12.  Choose Yes to if you want to save your report.
  11505.  
  11506.  
  11507.  
  11508.      PC-File Version 7 Users Guide                            197
  11509.  
  11510.  
  11511.      13.  Type a report description up to 50 characters, if you
  11512.        answered Yes in step 12.
  11513.  
  11514.      14.  Type a report name of up to 8 characters. Choose OK.
  11515.  
  11516.      15.  Make appropriate selections on the Print Options dialog
  11517.        box and choose OK to print your report. See "The Print
  11518.        Options" in Chapter 11 for more information on the Print
  11519.        Options dialog box.
  11520.  
  11521.  
  11522.      Printing Bar Codes with Language Format
  11523.  
  11524.      You can use the Language format to print fields or other data
  11525.      as a bar code by placing an appropriately formatted print mask
  11526.      after the data you want to print as a bar code. This includes
  11527.      printing calculations, relational lookups, string buckets,
  11528.      totals, subtotals, system fields, or formatted strings of
  11529.      text. The same printing restrictions apply as with other
  11530.      report formats: one bar code per line and no printing to the
  11531.      right of a bar code.
  11532.  
  11533.      The format of a bar code print mask is as follows:
  11534.  
  11535.      [Fieldname]:BAR*, Type, Height, ShowErrors:
  11536.  
  11537.      Or...
  11538.  
  11539.      (Calculation):BAR*, Type, Height, ShowErrors:
  11540.  
  11541.      Or...
  11542.  
  11543.      "String":BAR*, Type, Height, ShowErrors:
  11544.  
  11545.      Where "Fieldname" is a valid field name in the database you
  11546.      are printing from. "Fieldname" can also be a valid total
  11547.      bucket name, string bucket name, or system field name.
  11548.  
  11549.      Where "Calculation" is a valid PC-File calculation or
  11550.      relational lookup.
  11551.  
  11552.      Where "String" is any string of alphanumeric characters. Make
  11553.      sure that the number and kind of characters are supported by
  11554.      the bar code type you want to print.
  11555.  
  11556.      Replace "Type" with a number, 1 through 14, to print the
  11557.      desired bar code type. Refer to "Bar Code Type Numbers" below
  11558.      for the appropriate number.
  11559.  
  11560.      Replace "Height" with a number from 1 to 9 to print the bar
  11561.      code that many lines high. This setting is ignored for ZIP+4
  11562.      Postnet bar codes, which always print at a fixed height.
  11563.  
  11564.  
  11565.  
  11566.      PC-File Version 7 Users Guide                            198
  11567.  
  11568.  
  11569.      Replace "ShowErrors" with a 1 to cause PC-File to print error
  11570.      messages if it encounters problems when printing bar codes.
  11571.      (See Bar Code Errors for details). Replace "ShowErrors" with 0
  11572.      or omit to suppress printing of bar code error messages.
  11573.  
  11574.      Bar Code Type Numbers
  11575.  
  11576.      Bar Code Type Type Number
  11577.  
  11578.      UPC-A 1
  11579.  
  11580.      UPC-B 2
  11581.  
  11582.      EAN/JAN-13 3
  11583.  
  11584.      EAN/JAN-8 4
  11585.  
  11586.      3 of 9 (Code 39) 5
  11587.  
  11588.      Extended 3 of 9 6
  11589.  
  11590.      Interleaved 2 of 5 7
  11591.  
  11592.      Code 128 8
  11593.  
  11594.      Codabar 9
  11595.  
  11596.      ZIP+4 Postnet 10
  11597.  
  11598.      MSI Plessey 11
  11599.  
  11600.      Code 93 12
  11601.  
  11602.      Extended 93 13
  11603.  
  11604.      UCC-128 14
  11605.  
  11606.  
  11607.  
  11608.      For example, the line in a PC-File language report to print a
  11609.      field named ZIPCODE using the ZIP+4 Postnet bar code would
  11610.      look like this:
  11611.  
  11612.      [ZIPCODE]:BAR*,10,1:
  11613.  
  11614.      The number 10 following BAR* tells PC-File to use Postnet bar
  11615.      code. The number 1 to its right indicates 1 line high,
  11616.      although this number can be omitted for ZIP+4 Postnet bar code
  11617.      because Postnet only prints one height. Omitting anything to
  11618.      the right of the height number, suppresses the printing of
  11619.      error codes.
  11620.  
  11621.      Another example to print a field CODE using UPC-A bar code 3
  11622.      lines high and print error messages would look like this:
  11623.  
  11624.      [CODE]:BAR*,1,3,1:
  11625.  
  11626.  
  11627.  
  11628.      PC-File Version 7 Users Guide                            199
  11629.  
  11630.  
  11631.  
  11632.      The first number after BAR*, 1, indicates UPC-A bar code type,
  11633.      3 tells PC-File to print the bar code 3 lines high, the 1 at
  11634.      the end causes error messages to print if errors are
  11635.      encountered.
  11636.  
  11637.      To Print Bar Codes Using the Report Language Editor:
  11638.  
  11639.      1.Choose Reports from the Print menu.
  11640.  
  11641.      2.Choose New, if you are writing a report from scratch, or
  11642.        choose Modify, if you are editing a pre-existing report to
  11643.        print bar codes.
  11644.  
  11645.      3.Choose Language, if you chose New in step 2, or choose
  11646.        Language Editor, if you chose Modify in step 2, then choose
  11647.        the report to edit.
  11648.  
  11649.      4.Put a mask in the :BAR*, Type, Height, ShowErrors: format
  11650.        after any field or calculation you want to print as a bar
  11651.        code. Make sure only one bar code is printing per line, and
  11652.        that nothing prints to the right of a bar code.
  11653.  
  11654.      5.Choose OK and save the report.
  11655.  
  11656.      6.Answer Print Options dialog box appropriately. See "The
  11657.        Print Options" in Chapter 11 for more information on the
  11658.        Print Options dialog box.
  11659.  
  11660.      7.Choose OK to print.
  11661.  
  11662.      Refer to "Using the Language Format" earlier in this chapter
  11663.      for further details on using Language format.
  11664.  
  11665.      Bar Code Error Messages
  11666.  
  11667.      PC-File does not print bar code error messages for bar code
  11668.      reports set up with the Row, Mailing Label or Free Form
  11669.      formats. In this case, if PC-File encounters an error when
  11670.      printing any record, it will not print that record's bar code.
  11671.      You can use the Language Editor to modify bar code reports to
  11672.      print error messages, regardless of the method originally used
  11673.      to define them. To do this, insert a comma and a 1 at the end
  11674.      of the :*BAR: print mask. For example, if the line in your
  11675.      report format
  11676.      originally looks like this:
  11677.  
  11678.      [CODE]:BAR*,1,5:
  11679.  
  11680.      Inserting a comma and a 1 after the 5, like this:
  11681.  
  11682.      [CODE]:BAR*,1,5,1:
  11683.  
  11684.      causes PC-File to print error messages when it encounters
  11685.      them.
  11686.  
  11687.  
  11688.  
  11689.      PC-File Version 7 Users Guide                            200
  11690.  
  11691.  
  11692.      The error message prints directly on the page or label in the
  11693.      location where the bar code would have appeared had an error
  11694.      not occurred. The error message is printed in this format:
  11695.  
  11696.      BAR*x Error y
  11697.  
  11698.      where "x" is the Bar Code Type Number (see the table of bar
  11699.      code types above), and "y" is the Bar Code Error Number. The
  11700.      following table explains the significance of each error
  11701.      number.
  11702.  
  11703.  
  11704.      Bar Code Error Message Numbers
  11705.  
  11706.      Error Significance Number
  11707.  
  11708.      1 Wrong bar code type number in :BAR*:mask
  11709.  
  11710.      2 Length of input string is 0 or greater than 30
  11711.  
  11712.      3 Length of text is greater than 30
  11713.  
  11714.      4* Wrong printer number
  11715.  
  11716.      5 Trying to print beyond the 250th column position on the page
  11717.  
  11718.      6 Bar code height is greater than 20 (2") or less than 1
  11719.  
  11720.      7* Checksum is greater than 2
  11721.  
  11722.      8* Number of passes <1 or >5 on dot matrix printers
  11723.  
  11724.      9 Wrong number of characters, or characters not supported by
  11725.      bar code type
  11726.  
  11727.  
  11728.  
  11729.      Error message numbers in the table followed with an asterisk
  11730.      should not appear-PC-File does not allow you to control these
  11731.      functions. In nearly all cases, the only error you will see is
  11732.      "Error 9" which indicates that the data you are trying to
  11733.      print does not meet the requirements for the chosen bar code
  11734.      type. For example, you cannot encode Canadian Postal Codes
  11735.      using the Postnet bar code format which requires 5 or 10 digit
  11736.      zipcodes (no letters).
  11737.  
  11738.  
  11739.  
  11740.      PC-File Version 7 Users Guide                            201
  11741.  
  11742.  
  11743.  
  11744.  
  11745.      CHAPTER 10 WRITING LETTERS AND MERGING DATA
  11746.  
  11747.      PC-File's letter writing utility lets you combine word
  11748.      processing and data retrieval to create form letters. You can
  11749.      merge name and address information, as well as other data,
  11750.      easily and quickly. This chapter tells you how to do it. For
  11751.      information on printing letters, see Chapter 11, "Printing
  11752.      Reports and Letters."
  11753.  
  11754.  
  11755.      Overview
  11756.  
  11757.      Form letters combine text from the keyboard and data from a
  11758.      database. Thus, you can type up a basic letter, then merge in
  11759.      name and address information, as well as other data, and print
  11760.      out hundreds of "personal" letters. You can print out letters
  11761.      for all or a selected group of your records.
  11762.  
  11763.      PC-File uses the edit window for creating form letters. The
  11764.      edit window is a basic word processing utility that provides
  11765.      many of the same editing options available in other editors
  11766.      and word processors. See Chapter 1, "Navigating in PC-File,"
  11767.      for information on the editing tools usable in the edit
  11768.      window.
  11769.  
  11770.      You create a form letter just as you would a regular letter,
  11771.      except that you enter commands where you want to insert data
  11772.      from a database. When you print the letter, PC-File replaces
  11773.      the commands with the data from your records.
  11774.  
  11775.      Commands are also used to help format the letter. These
  11776.      commands let you determine spacing, enter special printing
  11777.      codes, and feed a new page through the printer at the right
  11778.      time.
  11779.  
  11780.      Text is typed into the letter just as it is with any word
  11781.      processing program. The commands can also be typed in, but
  11782.      must include special characters so that PC-File interprets
  11783.      them correctly. Or you can have PC-File enter the commands by
  11784.      choosing them from a menu.
  11785.  
  11786.      Writing a Letter
  11787.  
  11788.      Form letters include the text of the letter and the commands
  11789.      that merge data and control formatting. Combining text with
  11790.      these commands requires a bit of planning before you start.
  11791.      Decide what information you want to pull from a database and
  11792.      where you intend to place it in the letter. You may want to
  11793.      sketch out the letter on paper first.
  11794.  
  11795.      If you plan to use data from more than one database, decide
  11796.      which database provides the majority of the data. Create the
  11797.      letter with that database open. You can use relational lookups
  11798.      to pull in data from the secondary database.
  11799.  
  11800.  
  11801.  
  11802.      PC-File Version 7 Users Guide                            202
  11803.  
  11804.  
  11805.  
  11806.      Letter Writing Procedures
  11807.  
  11808.      The basic procedures involved in creating a form letter are
  11809.      outlined below. The specifics of entering mail merge commands
  11810.      are covered in detail later in this chapter.
  11811.  
  11812.      To create a letter:
  11813.  
  11814.      1.Open the primary database. The primary database is the
  11815.        database that will supply most or all of the data for your
  11816.        letter.
  11817.  
  11818.      2.Choose Print from the menu bar.
  11819.  
  11820.      3.Choose Letters from the Print menu. A dialog box displays.
  11821.  
  11822.      4.Choose New from the dialog box.
  11823.  
  11824.      5.Accept the column width of 70 characters, or enter a new
  11825.        width up to 120 characters. A width of 70 characters assumes
  11826.        a 3/4 inch margin on each side if you are using 8.5x11 paper
  11827.        and normal type. To increase the side margins, decrease the
  11828.        number of characters.
  11829.  
  11830.      6.Type your letter, including the appropriate mail merge
  11831.        commands, in the edit window. You can type in the mail merge
  11832.        commands yourself or, in most cases, choose the Insert
  11833.        button to have PC-File enter the commands.
  11834.  
  11835.      7.Choose OK when you finish.
  11836.  
  11837.      8.Choose Yes when prompted to save the letter.
  11838.        Choose No if you are sure you will only use it once.
  11839.  
  11840.      9.If you choose to save the letter, enter a name in the dialog
  11841.        box. You don't need to enter the extension, as PC-File adds
  11842.        it automatically.
  11843.  
  11844.      10.  Enter a description (optional).
  11845.  
  11846.      The Print Options dialog box appears. See Chapter 11,
  11847.      "Printing Reports and Letters," for information on printing a
  11848.      letter.
  11849.  
  11850.      Letter Writing Guidelines
  11851.  
  11852.      When you call up the letter writing utility to enter a new
  11853.      letter, the Edit Window appears.
  11854.  
  11855.      Use the edit window just as you would any other text editor or
  11856.      word processing program. Text wraps automatically from one
  11857.      line to the next as you type the letter.
  11858.  
  11859.      Follow these guidelines as you type your letter.
  11860.  
  11861.  
  11862.  
  11863.      PC-File Version 7 Users Guide                            203
  11864.  
  11865.  
  11866.      Top margin
  11867.  
  11868.      The letter writing utility does not provide for a top margin
  11869.      or header. You must determine the margin by inserting the
  11870.      appropriate number of lines at the start of the letter. For
  11871.      dot matrix and daisy wheel printers, drop down six lines for
  11872.      each inch of top margin required.
  11873.  
  11874.      Laser printers insert a three-line margin automatically, so
  11875.      you should insert blank lines at the top for whatever margin
  11876.      you want beyond three lines.
  11877.  
  11878.      Side margins
  11879.  
  11880.      Start your text in column 1. Don't try to increase your left
  11881.      margin by moving your text in from column one. Instead,
  11882.      determine your margins by increasing or decreasing the page
  11883.      width when prompted by PC-File. If your letter prints too far
  11884.      to the left or right on the paper, you can move the paper in
  11885.      some printers. You can also move the copy, to the right only,
  11886.      by increasing the number in the Left margin parameter in the
  11887.      Print Options dialog box.
  11888.  
  11889.      Bottom margin
  11890.  
  11891.      Place a form feed (.FF) at the bottom of the letter. The form
  11892.      feed kicks the letter out of the printer so that each letter
  11893.      starts on a new page. If your letter appears to be fairly
  11894.      long, determine the number of lines in the top margin and in
  11895.      the letter itself, then subtract them from the page length. In
  11896.      that way you can decide if you have enough room for a bottom
  11897.      margin or need to extend the letter to two pages.
  11898.  
  11899.      Multi-page letters
  11900.  
  11901.      If your form letter runs to more than one page, place a form
  11902.      feed (.FF) on the bottom of each page. The top margin of each
  11903.      page begins on the line immediately following the form feed
  11904.      for the previous page. You can include up to five pages in a
  11905.      letter. Be sure to include a form feed at the end of the final
  11906.      page.
  11907.  
  11908.      Determining Where You Are
  11909.  
  11910.      You can determine the current location of the cursor in the
  11911.      letter writing edit window (and in the Free form report edit
  11912.      window). This can be handy for lining up fields and
  11913.      determining how many lines you have used.
  11914.  
  11915.      To display the cursor location:
  11916.  
  11917.      Press CTRL-W. A dialog box displays, indicating the current
  11918.      row and column location of the cursor. Choose OK to return to
  11919.      the edit window.
  11920.  
  11921.      Spell Checking Your Letter
  11922.  
  11923.  
  11924.  
  11925.      PC-File Version 7 Users Guide                            204
  11926.  
  11927.  
  11928.  
  11929.      You can check the spelling in your letter at any time by
  11930.      choosing the Spell button on the bottom of the Letter editing
  11931.      window. See Chapter 15, "Spell Checking" for details on how to
  11932.      use the Spell Check dialog box.
  11933.  
  11934.      Adding Mail Merge Commands
  11935.  
  11936.      There are two ways to add mail merge commands to a letter:
  11937.  
  11938.        1. Type them in.
  11939.  
  11940.        2. Choose them from a dialog box.
  11941.  
  11942.      You can type the commands in yourself, following the
  11943.      formatting rules for entering the different types of commands
  11944.      correctly. These rules are described in the sections on the
  11945.      commands.
  11946.  
  11947.      An easier method is to use the Insert button. With this button
  11948.      you can have PC-File enter most of the available mail merge
  11949.      commands for you.
  11950.  
  11951.      Using the Insert Button
  11952.  
  11953.      Use the Insert button on the button bar to have PC-File enter
  11954.      merge commands for you. Choosing the button displays a list of
  11955.      commands, from which you can choose the one you want.
  11956.  
  11957.      To choose the Insert button, click on it or press ALT-I.
  11958.  
  11959.      To have PC-File enter a command:
  11960.  
  11961.        1. Place the cursor where you want to locate the merge
  11962.           command.
  11963.  
  11964.        2. Choose the Insert button from the bottom of the screen.
  11965.           PC-File remembers the location of the cursor in the edit
  11966.           window before you move it to choose the Insert button. A
  11967.           dialog box displays.
  11968.  
  11969.        3. Choose the appropriate option. For example, choose Data.
  11970.           Another dialog box displays.
  11971.  
  11972.        4. Choose a field from the dialog box. PC-File prints out
  11973.           the field name at the cursor location on the letter. The
  11974.           field name is formatted as a trimmed field.
  11975.  
  11976.  
  11977.  
  11978.      PC-File Version 7 Users Guide                            205
  11979.  
  11980.  
  11981.      Of the options in the insert dialog box, Data and Keyed data
  11982.      require additional information before they print a command to
  11983.      the screen. The Data option requires that you choose a field
  11984.      from the database. The Keyed data option displays a text box,
  11985.      allowing you to enter a prompt for the operator. The remaining
  11986.      options print commands directly to the screen. For the
  11987.      IF...ELSE...ENDIF command, you must enter the IF expression
  11988.      between the parentheses. You can erase the ELSE command if it
  11989.      isn't
  11990.      necessary.
  11991.  
  11992.      You can enter other commands in a letter from the keyboard
  11993.      that do not appear as options in the Insert dialog box.
  11994.      However, they are less often used than those offered. All of
  11995.      the commands are explained below.
  11996.  
  11997.      Command Guidelines
  11998.  
  11999.      Mail merge commands must be entered in a specific way in order
  12000.      for PC- File to recognize that they are commands and not text.
  12001.      If you use the Insert button, PC-File enters commands as they
  12002.      should appear. If you type the commands yourself, be sure to
  12003.      follow the rules described below.
  12004.  
  12005.      Start all mail merge commands with a period.
  12006.  
  12007.      Enter command words in uppercase letters. The exceptions are
  12008.      database field names, calculations, and any message included
  12009.      with a KEYIN command.
  12010.  
  12011.      Place all formatting and IF commands on a line by themselves,
  12012.      and begin these commands in the first column. Don't count the
  12013.      lines used by the commands as part of a letter. PC-File reads
  12014.      the commands, but eliminates the lines they occupy.
  12015.  
  12016.      Types of Commands
  12017.  
  12018.      Mail merge commands can be divided into five basic types:
  12019.  
  12020.      Type Function
  12021.  
  12022.           Data field commands Insert data from database fields
  12023.  
  12024.           System field commands Allow for user input and insert
  12025.           current date
  12026.  
  12027.           Formatting commands Determine the format and design of
  12028.           the letter
  12029.  
  12030.           Calculation commands Enter the results of a calculation
  12031.  
  12032.           IF commands Let you include or exclude text based on a
  12033.           comparison
  12034.  
  12035.      Each type of command is covered separately below.
  12036.  
  12037.  
  12038.  
  12039.      PC-File Version 7 Users Guide                            206
  12040.  
  12041.  
  12042.      Data Field Commands
  12043.  
  12044.      The most commonly used mail merge commands are the field
  12045.      commands. Field commands add data directly from fields in your
  12046.      database. For example, you would use a field command to enter
  12047.      first name, last name, address, city, state, and zip code from
  12048.      the respective fields in the database.
  12049.  
  12050.      Field commands can be entered in uppercase or lowercase
  12051.      letters. There are two formats:
  12052.  
  12053.      Trimmed field Padded field
  12054.  
  12055.      Trimmed Field
  12056.  
  12057.      Extra spaces are removed from the end of data when you
  12058.      designate a trimmed field. Thus, if the City field is 15
  12059.      characters in length, but the city is Seattle, only the seven
  12060.      characters in the city name are printed. The remaining eight
  12061.      spaces in the field are removed.
  12062.  
  12063.      This is the most commonly used format for letters, and is
  12064.      practically a must in addresses, where you want the data in
  12065.      the first name and last name fields, as well as the data in
  12066.      the city, state, and zip code fields, to flow together. If you
  12067.      use the Insert button to enter a field, it is formatted as a
  12068.      trimmed field.
  12069.  
  12070.      Trimmed fields are indicated with angle brackets around the
  12071.      field name. Thus, trimmed fields are entered like this:
  12072.      .<City>
  12073.  
  12074.      The following example shows the use of trimmed fields in an
  12075.      address. Spaces and punctuation are added where needed. For
  12076.      example, one space is entered between the first and last
  12077.      names. A comma and a space separate the city and state fields,
  12078.      as is normally the case, while a space separates the state
  12079.      from the zip code. The brackets and periods do not count as
  12080.      spaces.
  12081.  
  12082.      .<FNAME> .<LNAME> .<ADDRESS1> .<ADDRESS2> .<CITY>,.<ST> .<ZIP>
  12083.  
  12084.      You can abbreviate the field name in trimmed formats, as long
  12085.      as there is enough of the field name to identify it as unique
  12086.      in the database.
  12087.  
  12088.      Padded Field
  12089.  
  12090.      Use a padded field when you want to retain all the spacing
  12091.      within a field. This format is most useful when you want to
  12092.      set up columns of data in your letter. The field length you
  12093.      define in the letter doesn't have to be the same length as the
  12094.      data entry field, but if you create a shorter field in the
  12095.      letter, data that extends beyond that length is truncated.
  12096.  
  12097.  
  12098.  
  12099.      PC-File Version 7 Users Guide                            207
  12100.  
  12101.  
  12102.      Padded field are indicated with square brackets [ ] around the
  12103.      field name. Enter the number of characters between the
  12104.      brackets that you want to allow for in the letter.
  12105.  
  12106.      Padded field commands look like this:
  12107.  
  12108.      .[Habitat ] .[Species ]
  12109.  
  12110.      Use blank spaces after the field name to add the necessary
  12111.      padding to the field command. Thus, if the field name is seven
  12112.      characters long and the field itself is 15 characters long,
  12113.      add eight blank spaces after the field name to give the field
  12114.      the necessary spacing for the data.
  12115.  
  12116.      You can abbreviate the field name in padded formats, as long
  12117.      as there is enough of the field name to identify it as unique
  12118.      in the database.
  12119.  
  12120.      If you enter a field with the Insert button, it is formatted
  12121.      as a trimmed field. Change the angle brackets to square
  12122.      brackets to define the field as a padded field.
  12123.  
  12124.      System Field Commands
  12125.  
  12126.      System fields normally provide for automatic data from the
  12127.      computer. For letters, you can have PC-File enter the current
  12128.      date, or prompt the user to key in data during the printing of
  12129.      each record.
  12130.  
  12131.      Current Date
  12132.  
  12133.      This command pulls the current date from your computer or
  12134.      network system. It is handy when you plan to reuse a letter
  12135.      and don't want to update the current date each time you print
  12136.      it. Enter it in the format .<DATE*> or choose Current date
  12137.      from the Insert dialog box. Be sure to enter the asterisk in
  12138.      the field if you add it yourself. Otherwise, PC-File
  12139.      interprets the command as a field command, and looks for a
  12140.      field called DATE in your database.
  12141.  
  12142.      Keyed Data
  12143.  
  12144.      Use this command to set up a field that allows user input for
  12145.      each record. While printing letters, the printer pauses and
  12146.      displays the prompt (message) you entered as part of the
  12147.      command. Press ENTER once you finish entering the message to
  12148.      continue printing.
  12149.  
  12150.      Choose Keyed data from the Insert dialog box to have PC-File
  12151.      set up the keyed data command. PC-File asks you for the
  12152.      message to prompt the user with during the printing of each
  12153.      letter. Enter the message as you want it to appear on the
  12154.      screen. For example, you could enter Type p.s. here.
  12155.  
  12156.      To enter the command yourself, type both the command and the
  12157.      message. For example, you could use the following command:
  12158.  
  12159.  
  12160.  
  12161.      PC-File Version 7 Users Guide                            208
  12162.  
  12163.  
  12164.  
  12165.      .<KEYIN*Type a personal note here>
  12166.  
  12167.      With the angle bracket format, you don't have to indicate the
  12168.      field length of the user input. You can enter up to 65
  12169.      characters for each letter. If you want to fix the length of
  12170.      the potential input, use square brackets around the command.
  12171.  
  12172.      Always use the asterisk (*) with the system commands, as
  12173.      illustrated above.
  12174.  
  12175.      Formatting Commands
  12176.  
  12177.      As the name suggests, use these commands to format a letter.
  12178.      The commands can remove unwanted blank lines, force a page
  12179.      change, and set printer codes for special character formatting
  12180.      such as bold or italics.
  12181.  
  12182.      You can enter the more commonly used formatting commands from
  12183.      the Insert dialog box. You'll have to enter the printer codes
  12184.      yourself.
  12185.  
  12186.      Formatting commands do not use brackets, but must be preceded
  12187.      by a period and entered in uppercase letters.
  12188.  
  12189.      Form Feed
  12190.  
  12191.      The .FF or .FORMFEED command (use either format) tells PC-File
  12192.      to skip to a new page. Use the command at the end of a one
  12193.      page letter. Without the command, the page won't kick out
  12194.      unless it also happens to be the last printable line of the
  12195.      page. For letters with multiple pages, use the form feed at
  12196.      the end of each page.
  12197.  
  12198.      Always enter a form feed command on a line by itself and start
  12199.      it at the left margin.
  12200.  
  12201.      Conditional Page
  12202.  
  12203.      The .CP n command skips to a new page, but only if there are
  12204.      less than n lines left on the page. For example, the command
  12205.      .CP 8 would skip to a new page only if there were less than
  12206.      eight lines left on the current page. This command is useful
  12207.      when you want to prevent a section of a letter from being
  12208.      split between two pages.
  12209.  
  12210.      Always enter a conditional page command on a line by itself
  12211.      and start it at the left margin.
  12212.  
  12213.      Reformatting Commands
  12214.  
  12215.  
  12216.  
  12217.      PC-File Version 7 Users Guide                            209
  12218.  
  12219.  
  12220.      There are times where you need to reformat a section of a
  12221.      letter to a particular width. For example, if you are printing
  12222.      several fields of varying length in the midst of a paragraph.
  12223.      The .REFORMAT nn (where nn is the width you want the following
  12224.      lines reformatted to) and .ENDREFORMAT commands reformat the
  12225.      paragraph to the specified width.
  12226.  
  12227.      To use the .REFORMAT nn and .ENDREFORMAT commands surround the
  12228.      paragraph to be reformatted. Each command should be placed on
  12229.      a line by itself, and should start at the left edge. For
  12230.      example:
  12231.  
  12232.      .REFORMAT 55 If you have any questions, please call your local
  12233.      sales office at: .<PHONE>. Your salesperson will be happy to
  12234.      answer any questions you have. .ENDREFORMAT
  12235.  
  12236.      This would reformat the paragraph to a width of 55. The
  12237.      resulting paragraph would look something like this:
  12238.  
  12239.      If you have any questions, please call your local sales office
  12240.      at: 555-1234. Your salesperson will be happy to answer any
  12241.      questions you have.
  12242.  
  12243.      Do not surround more than one paragraph with the .REFORMAT nn
  12244.      and .ENDREFORMAT or they will be reformatted into a single
  12245.      paragraph. Use the commands around each paragraph you need to
  12246.      reformat.
  12247.  
  12248.      Line Compression (Begin group and End group)
  12249.  
  12250.      The .GROUP, .EGROUP, and .EGROUP R commands are used to
  12251.      compress out blank lines, most often in addresses. Addresses
  12252.      can be formatted to accommodate four or five lines, but often
  12253.      require only three or four lines. With the line compression
  12254.      commands, blank lines resulting from empty fields are
  12255.      compressed out.
  12256.  
  12257.      Place the .GROUP command before and the .EGROUP command after
  12258.      the body of text in which you want the blank lines removed.
  12259.      Use .EGROUP R in place of .EGROUP if you want to relocate the
  12260.      blank lines to the end of the grouping, thus maintaining the
  12261.      overall line spacing. If you are entering the commands from
  12262.      the Insert dialog box, you have to add the space and the R
  12263.      from the keyboard.
  12264.  
  12265.      The following example illustrates the use of the line
  12266.      compression commands:
  12267.  
  12268.           .GROUP
  12269.           .<FNAME> .<LNAME>>
  12270.           .<ADDRESS1>
  12271.           .<<ADDRESS2>
  12272.           .<CITY>,.<ST>> .<ZIP>
  12273.           .EGROUP
  12274.  
  12275.  
  12276.  
  12277.      PC-File Version 7 Users Guide                            210
  12278.  
  12279.  
  12280.      For those cases with no data in the ADDRESS2 field, the blank
  12281.      line gets compressed out.
  12282.  
  12283.      Always enter line compression commands on a line by themselves
  12284.      and start the command at the left margin.
  12285.  
  12286.      Printer Markers
  12287.  
  12288.      Use printer markers to change character formatting within your
  12289.      letter. Printer markers are available for many of the standard
  12290.      print enhancements, such as bold, italics, and underlined
  12291.      type. You have to enter printer markers from the keyboard;
  12292.      they are not available from the Insert dialog box.
  12293.  
  12294.      The available printer markers are:
  12295.  
  12296.           .NORMAL
  12297.           .CONDENSED
  12298.           .BOLD
  12299.           .ITALIC
  12300.           .UNDERLINE
  12301.           .PORTRAIT
  12302.           .LANDSCAPE
  12303.           .PROPORTIONAL
  12304.           .DOUBLEWIDE
  12305.           .USERn (where n is 1-5)
  12306.  
  12307.      Enter a printer marker where you want a change in the font or
  12308.      type to occur. Use the marker .NORMAL to return to the
  12309.      default.
  12310.  
  12311.      The following line taken from the sample letter illustrates
  12312.      the use of a pair of printer markers.
  12313.  
  12314.      ...5-acre .BOLDRocky Mtn.NORMAL habitat for ...
  12315.  
  12316.      You can enter a printer marker at the start of a letter to
  12317.      enhance the entire letter. For markers such as .PORTRAIT and
  12318.      .LANDSCAPE, you would normally do that anyway.
  12319.  
  12320.      The .USERn printer markers are user-defined printer codes that
  12321.      you can set in your configuration profile. If you think you
  12322.      might use a particular print enhancement on a regular basis,
  12323.      consider creating a user-defined code. Otherwise, you can use
  12324.      ASCII decimal value for the code, described below. See Chapter
  12325.      13, "Utilities," for information on user-defined printer
  12326.      codes.
  12327.  
  12328.      Miscellaneous Printer Codes
  12329.  
  12330.      You can imbed printer codes other than those listed as printer
  12331.      markers. To imbed these codes, use the ASCII command.
  12332.  
  12333.  
  12334.  
  12335.      PC-File Version 7 Users Guide                            211
  12336.  
  12337.  
  12338.      For example, if you want to insert a superscript or subscript
  12339.      character into a letter, you have to use the ASCII command.
  12340.      You can also change the line spacing in this way. Normally,
  12341.      line spacing is set to 6 lines per inch. You can change it to
  12342.      8 lines per inch to accent a particular paragraph or tighten
  12343.      up the entire letter.
  12344.  
  12345.      The ASCII command follows this format: .A nn,nn . The .A is
  12346.      followed by a space, then by the decimal values of printer
  12347.      control characters, each separated by a comma. A space must
  12348.      follow the last digit in the command. The space at the end of
  12349.      the command is not printed. See your printer manual for the
  12350.      printer codes and their respective decimal values.
  12351.  
  12352.      Calculation Commands
  12353.  
  12354.      Calculations can be used in letters in much the same way they
  12355.      are used in reports. The answer to the calculation appears in
  12356.      each letter at the prescribed location.
  12357.  
  12358.      Use both angle brackets and parentheses to enclose
  12359.      calculations, as shown:
  12360.  
  12361.      .<(@Member_no,Donation,Member_no,Amount):$$,$##.##:>
  12362.  
  12363.      This relational lookup pulls the data from the Amount field in
  12364.      the Donation database by using the Member_no field common to
  12365.      both the Members and Donation database.
  12366.  
  12367.      Use print masks with calculations to specify the formatting.
  12368.      In the above example, the print mask adds the dollar sign and
  12369.      punctuation to the data. Enclose the print mask within colons.
  12370.      Enter the closing angle bracket after the mask. Print masks
  12371.      are explained in detail in Chapter 9, "Creating Reports."
  12372.  
  12373.      All types of calculations supported by PC-File can be used in
  12374.      a letter, including relational lookups. See Chapter 17,
  12375.      "Calculations," for information on using calculations.
  12376.  
  12377.      IF Commands
  12378.  
  12379.      IF commands can be useful in letters to include or omit
  12380.      information based on a comparison. For example, you can use an
  12381.      IF to include a middle initial in a name when the field
  12382.      contains data, but omit it and close up the space when the
  12383.      field is empty.
  12384.  
  12385.      IF commands also follow a set format:
  12386.  
  12387.           .IF (add a comparison calculation)
  12388.           Things to do if true (can be many commands long)
  12389.           .ELSE
  12390.           Things to do if not true (can be many commands long)
  12391.           .ENDIF
  12392.  
  12393.  
  12394.  
  12395.      PC-File Version 7 Users Guide                            212
  12396.  
  12397.  
  12398.      Every .IF statement must have a matching .ENDIF statement. The
  12399.      .ELSE statement is optional. Always start the commands in the
  12400.      first column of the letter.
  12401.  
  12402.      The following example illustrates the use of an IF command in
  12403.      a letter:
  12404.  
  12405.           .IF (Middle = " ")
  12406.           .<First>> .<Last>
  12407.           .ELSE .
  12408.           <First> .<Middle> .<Last>
  12409.           .ENDIF
  12410.           .<Address>
  12411.           .<City>,.<State> .<Zip>
  12412.  
  12413.      The comparison is always contained on the same line with the
  12414.      .IF command. The .ELSE and .ENDIF commands must appear on
  12415.      lines by themselves. For that reason, you can't include IF
  12416.      commands within the body of a paragraph of text. The lines
  12417.      used by the commands disappear when you print the letter.
  12418.  
  12419.      Choose the option If, Else, Endif from the Insert dialog box
  12420.      to have PC-File enter the command for you. PC-File prints the
  12421.      three commands on separate lines. You can remove the Else
  12422.      command if you don't use it.
  12423.  
  12424.      Modifying a Letter
  12425.  
  12426.      You can call up an existing letter and make changes to it at
  12427.      any time.
  12428.  
  12429.      To modify a letter:
  12430.  
  12431.      1.Choose Print from the menu bar.
  12432.  
  12433.      2.Choose Letters from the Print menu.
  12434.  
  12435.      3.Choose Modify from the dialog box. A file selection dialog
  12436.        box appears.
  12437.  
  12438.      4.Choose the letter you want to modify from the list.
  12439.  
  12440.      5.Accept the column width of 70 characters, or enter a new
  12441.        width up to 120 characters.
  12442.  
  12443.      6.Make your changes to the letter.
  12444.  
  12445.      7.Choose OK when you finish.
  12446.  
  12447.      8.Choose Yes to save the letter.
  12448.  
  12449.      9.Accept the current description or enter a new one. The
  12450.        modified letter is saved.
  12451.  
  12452.  
  12453.  
  12454.      PC-File Version 7 Users Guide                            213
  12455.  
  12456.  
  12457.  
  12458.  
  12459.      CHAPTER 11 PRINTING REPORTS AND LETTERS
  12460.  
  12461.      Reports and letters follow similar printing procedures and use
  12462.      the same dialog box for setting printing parameters. This
  12463.      chapter explains those procedures and parameters. In addition,
  12464.      this chapter covers Printer setup, an option on the Print
  12465.      menu.
  12466.  
  12467.  
  12468.  
  12469.      Printing Procedures
  12470.  
  12471.      PC-File simplifies the process of printing a report or letter.
  12472.      When you get ready to print, the program displays the Print
  12473.      options dialog box. Make all your necessary settings and
  12474.      adjustments there. When you finish, you are ready to begin
  12475.      printing.
  12476.  
  12477.      Before attempting to print a report or letter, be sure your
  12478.      computer is properly connected to the printer and that PC-File
  12479.      is configured for your printer. For information on configuring
  12480.      your printer, see Chapter 13, "Utilities," and the section on
  12481.      printer setup later in this chapter.
  12482.  
  12483.      NOTE: Printing graphs and multi-column labels follow separate
  12484.      procedures. See Chapter 12, "Creating Graphs," for information
  12485.      on printing graphs. See Chapter 14 for information on printing
  12486.      labels created with PC-Label. See Chapter 15, "Tools," for
  12487.      information on printing snapshot labels.
  12488.  
  12489.      To print a report or letter, you can either choose an existing
  12490.      report or letter or create a new one. In either case, PC-File
  12491.      displays the Print options dialog box that allows you to set
  12492.      the parameters for printing.
  12493.  
  12494.      To print a report or letter:
  12495.  
  12496.      1.Choose Print from the menu bar.
  12497.  
  12498.      2.Choose Report or Letter from the Print menu, depending on
  12499.        which one you want to print.
  12500.  
  12501.        PC-File displays a dialog box. The options are the same
  12502.        whether you choose reports or letters.
  12503.  
  12504.      3.Choose Run from the dialog box.
  12505.  
  12506.        If you are creating or modifying a report or letter before
  12507.        printing, choose the appropriate option. When you finish,
  12508.        the Print options dialog box displays.
  12509.  
  12510.      4.Choose the report or letter from the file selection dialog
  12511.        box.
  12512.  
  12513.  
  12514.  
  12515.      PC-File Version 7 Users Guide                            214
  12516.  
  12517.  
  12518.        The Print options dialog box displays.
  12519.  
  12520.      5.Set the options you want and choose OK.
  12521.  
  12522.        If you are printing a report, the settings are saved to a
  12523.        file, named reportname.ANS. The settings become the default
  12524.        the next time you print the report.
  12525.  
  12526.        If you are printing a letter, the settings only pertain to
  12527.        the current printing. The program default settings display
  12528.        the next time you print the letter.
  12529.  
  12530.      6.What happens next depends upon your settings in the Print
  12531.        Options box.
  12532.  
  12533.        If you chose to print Some records, PC-File prompts you to
  12534.        conduct a search for the records you want to print.
  12535.  
  12536.        If you chose to print to disk, PC-File prompts you to enter
  12537.        a path and file name.
  12538.  
  12539.        If you checked the Do Subtotals box, PC-File prompts you to
  12540.        enter the field or calculation that triggers the subtotal.
  12541.  
  12542.      7.If you are printing to a printer or to a file, PC-File
  12543.        displays the first record on the screen and prompts you to
  12544.        choose Yes, No, All, or Quit.
  12545.  
  12546.      This prompt displays for two reasons. First, it allows you to
  12547.      choose a selected group of records for which there is no
  12548.      precise selection criteria. In other words, you can print a
  12549.      random group of records. Secondly, if you have defined a
  12550.      selection criteria, it lets you assure yourself your criteria
  12551.      is correct by viewing your records. Once you feel certain you
  12552.      have chosen the right records, you don't have to look at the
  12553.      rest.
  12554.  
  12555.      8.Choose Yes to print the record and display the next.
  12556.  
  12557.      9.Choose No to skip the current record and display the next.
  12558.  
  12559.      10.  Choose All to print the current record and all the
  12560.        remaining records that meet the selection criteria without
  12561.        any further prompting.
  12562.  
  12563.      11.  Choose Quit to stop printing the report or letter.
  12564.  
  12565.      If you are printing to the screen, PC-File displays the report
  12566.      or letter without prompting you.
  12567.  
  12568.  
  12569.  
  12570.      PC-File Version 7 Users Guide                            215
  12571.  
  12572.  
  12573.  
  12574.      The Print Options
  12575.  
  12576.      PC-File displays the Print options dialog box when you are
  12577.      ready to print a report or letter. Set your printing
  12578.      parameters there.
  12579.  
  12580.      The setting options are the same for both letters and reports,
  12581.      but PC- File handles the two features differently. This is
  12582.      because reports are often run repeatedly, while letters are
  12583.      more likely to be used only once.
  12584.  
  12585.      When you print a report, PC-File remembers the settings from
  12586.      the Print options window and places them in a file. The file
  12587.      is named reportname.ANS. The settings are then used as the
  12588.      default anytime you print that particular report. Presumably,
  12589.      you would not have to reset any of the parameters. If you do
  12590.      make a change, that becomes the new default.
  12591.  
  12592.      For letters, PC-File doesn't retain the settings and doesn't
  12593.      create a file for them. After you print a letter, PC-File
  12594.      replaces your settings with the program default. Thus, if you
  12595.      want to double-space a letter, you have to set the line
  12596.      spacing parameter to 2 each time you print the letter.
  12597.  
  12598.      Each parameter in the Print options dialog box is explained
  12599.      below.
  12600.  
  12601.      Print
  12602.  
  12603.      You can choose which records in your database you want to
  12604.      print. Choose All records to print all the records in your
  12605.      database; choose Some records to select certain records. If
  12606.      you choose to print Some records, PC-File prompts you to
  12607.      select the records by conducting a search. See Chapter 7,
  12608.      "Finding and Modifying Data," for information on conducting a
  12609.      search.
  12610.  
  12611.      You can also print selected records for which there is no
  12612.      specific criteria. For example, you may want to print letters
  12613.      to send to a few members chosen at random from the database.
  12614.      To do this, choose All records. When you get ready to print,
  12615.      the records display one by one on the screen for you to
  12616.      select. Choose the records you want to print. You can follow
  12617.      the same procedure after choosing Some records if you want to
  12618.      pick out selected records from within a specific subgroup of
  12619.      your database.
  12620.  
  12621.      The program default is All records.
  12622.  
  12623.      Output
  12624.  
  12625.      PC-File can print a report or letter to the printer, screen,
  12626.      or to a file on the disk. To select the output device, choose
  12627.      the appropriate option. Only one option can be selected at a
  12628.      time. The program default is Printer.
  12629.  
  12630.  
  12631.  
  12632.      PC-File Version 7 Users Guide                            216
  12633.  
  12634.  
  12635.  
  12636.      If you select Printer as the output device, PC-File prints to
  12637.      the printer port selected in the configuration profile or in
  12638.      Printer setup.
  12639.  
  12640.      If you print to a file on the disk, PC-File prompts you for
  12641.      the drive, path, and file name. Enter the output file
  12642.      specifications in the dialog box. For example, you might type:
  12643.      c:\pcfile\sample\temp.txt.
  12644.  
  12645.      The file printed to disk is an ASCII file.
  12646.  
  12647.      Subtotals
  12648.  
  12649.      Subtotal breaks allow you to separate groups of related
  12650.      records in a report. You can then print subtotal values for
  12651.      each group, or you can just separate the groupings by
  12652.      inserting blank lines or page breaks between them.
  12653.  
  12654.      Creating subtotal breaks is a two-part process. The first part
  12655.      involves creating a Subtotal section within the report and
  12656.      defining the action that will occur. See Chapter 9, "Creating
  12657.      Reports," for details. For the second part, select the
  12658.      Subtotals option button in the Print options dialog box,
  12659.      choose OK, then name the break. A subtotal break can be a
  12660.      field, a portion of a field, or a calculation.
  12661.  
  12662.      Normally, a break is a field or partial field. Whenever the
  12663.      data in the break field changes, a new subtotal grouping is
  12664.      triggered. The following example shows a subtotal break on the
  12665.      first letter of the last name. When the first letter changes,
  12666.      a blank line is inserted to break up the names.
  12667.  
  12668.      A subtotal break can produce a simple break or a break with
  12669.      subtotals.
  12670.  
  12671.      Subtotal breaks can also be based on calculations. You can use
  12672.      the same information in the above example, but break it on a
  12673.      calculation based on the amount of the donation. The subtotal
  12674.      break calculation is (Amount >150). The result is illustrated
  12675.      below.
  12676.  
  12677.      PC-File allows up to nine levels of subtotal breaks. For
  12678.      example, you could subtotal by product within salesperson
  12679.      within department within division. In general, the primary
  12680.      subtotal level should be the current index field.
  12681.  
  12682.      After you choose how to perform subtotals, PC-File lets you
  12683.      choose whether you want to print the data from the break only
  12684.      once when it changes or every time it appears. This is called
  12685.      group highlighting. Turning group highlighting ON prevents the
  12686.      data from being repeated over and over. Group highlighting
  12687.      works on every subtotal level. In the previous two examples,
  12688.      group highlighting is turned off. The following example shows
  12689.      the Donation report subtotaled on Member_no with group
  12690.      highlighting
  12691.  
  12692.  
  12693.  
  12694.      PC-File Version 7 Users Guide                            217
  12695.  
  12696.  
  12697.      turned on.
  12698.  
  12699.      In addition to group highlighting, PC-File provides the
  12700.      option, "New Page After Subtotals." Choosing this option
  12701.      causes your report to feed to a new page at the end of each
  12702.      level 1 subtotal break. You must use the Language format to
  12703.      set up more sophisicated paging when performing multiple level
  12704.      subtotal breaks. See the section, "Subtotal Report Commands"
  12705.      in Chapter 9, for details.
  12706.  
  12707.      The default is for subtotals to be turned off. When the
  12708.      setting is turned off, the Subtotal section of the report is
  12709.      ignored. The subtotal setting is always ignored when you print
  12710.      a letter.
  12711.  
  12712.      To set subtotal breaks:
  12713.  
  12714.      1.Select the Subtotals option button.
  12715.  
  12716.      2.Choose OK when you finish with the dialog box.
  12717.  
  12718.      3.Enter the primary subtotal break. You can choose a field
  12719.        name or enter a calculation into the text box and press
  12720.        ENTER.
  12721.  
  12722.      4.Repeat step 3 for any additional subtotal break levels. You
  12723.        can enter up to nine levels of subtotal breaks.
  12724.  
  12725.      5.Choose Cancel when you finish entering breaks.
  12726.  
  12727.      6.Choose Group Highlighting or New Page After Subtotals, if
  12728.        desired.
  12729.  
  12730.      7.Choose OK.
  12731.  
  12732.      PC-File prints the report to your specifications.
  12733.  
  12734.      Pause Between Pages
  12735.  
  12736.      If you feed paper into your printer manually, select the Pause
  12737.      Between Pages option button on the Print Options dialog box.
  12738.      The program will pause after each page, allowing you to insert
  12739.      a new sheet of paper. Press any key to start printing again.
  12740.  
  12741.      The program default is No Page Pause.
  12742.  
  12743.      Flip Data
  12744.  
  12745.      PC-File normally flips the data in a field containing the flip
  12746.      character, a tilde (~). This is indicated by the Flip Data
  12747.      option button on the Print Options dialog box. You can
  12748.      suppress the flip action by selecting the Don't Flip Data
  12749.      option button instead.
  12750.  
  12751.  
  12752.  
  12753.      PC-File Version 7 Users Guide                            218
  12754.  
  12755.  
  12756.      For example, if a name field contains data entered in the
  12757.      format LASTNAME ~FIRSTNAME, and you leave Flip Data on, PC-
  12758.      File prints data in the order FIRSTNAME LASTNAME. If you
  12759.      select Don't Flip Data, the data in the field remains in the
  12760.      LASTNAME ~FIRSTNAME format. The tilde prints as part of the
  12761.      data.
  12762.  
  12763.      The program default is Flip Data. If you have no fields
  12764.      containing tildes, this setting is ignored.
  12765.  
  12766.      Normal Type/Condensed Type
  12767.  
  12768.      PC-File can print a report using one of two pre-defined print
  12769.      sizes. These sizes are determined in your configuration
  12770.      profile, based on the printer you choose or the user codes you
  12771.      set.
  12772.  
  12773.      Condensed type is most useful for reports that are wider than
  12774.      the normal carriage width. Normally, you should use condensed
  12775.      type if your report exceeds 80 characters in width. Otherwise,
  12776.      the printer will either wrap each line of the report to the
  12777.      next line or it will print off the edge of the paper.
  12778.  
  12779.      Most printers other than daisy-wheel printers are set up to
  12780.      handle normal and condensed type. However, you can enter new
  12781.      printer codes in your configuration profile so that the normal
  12782.      and condensed options actually produce some other type style.
  12783.      For example, you can enter printer codes for condensed type
  12784.      that will print a larger type size or a landscape format.
  12785.  
  12786.      The program default is Normal Type, in which case your report
  12787.      or letter prints in normal type. Select the Condensed Type
  12788.      option button to print in condensed type.
  12789.  
  12790.      Number of Copies
  12791.  
  12792.      You can print up to 99 copies of your report or letter in one
  12793.      printing. If you have a multi-page report or letter, PC-File
  12794.      normally prints the entire document before it begins the next
  12795.      copy.
  12796.  
  12797.      Enter the number of copies you want to print. The default is
  12798.      1.
  12799.  
  12800.      Line Spacing
  12801.  
  12802.      You can set the line spacing in a report or letter. For
  12803.      reports, the spacing only affects the Detail section. For
  12804.      letters, the entire letter is affected, including the name and
  12805.      address.
  12806.  
  12807.      Enter 1 to single-space the report or letter. Enter 2 to
  12808.      double-space it. The default is 1.
  12809.  
  12810.  
  12811.  
  12812.      PC-File Version 7 Users Guide                            219
  12813.  
  12814.  
  12815.      For reports, enter 0 to prevent the Detail section from
  12816.      printing. This is useful when only the subtotal or total
  12817.      information is required.
  12818.  
  12819.      NOTE: If you want to double space the body of a letter, but
  12820.      not the name and address, you must enter the extra line
  12821.      spacing directly into the letter itself.
  12822.  
  12823.      Left Margin
  12824.  
  12825.      The Left margin parameter lets you add extra spaces to the
  12826.      left side of your report or letter, beyond the normal left
  12827.      margin. This is especially useful if you have a narrow report
  12828.      that you want to center. For example, if you print a phone
  12829.      listing that includes just names and phone numbers, you could
  12830.      increase the left margin to center the two columns of data.
  12831.  
  12832.      The program default is 0.
  12833.  
  12834.      Page Length
  12835.  
  12836.      The page length setting makes it easy to adjust the length of
  12837.      your report or letter for different size paper and different
  12838.      types of printers without changing the configuration profile.
  12839.      To change the number of lines per page, enter the new page
  12840.      length. The default is 66 lines per page.
  12841.  
  12842.      For reports, PC-File calculates the number of lines of Detail
  12843.      per page by subtracting the number of lines in the Heading and
  12844.      Footing sections from the page length. To adjust your top and
  12845.      bottom margins, edit the report format and change the size of
  12846.      the Heading and Footing sections.
  12847.  
  12848.      Laser printers usually require a page length of 60 lines when
  12849.      printing in portrait mode and 45 lines in landscape mode. Dot
  12850.      matrix and daisy wheel printers normally use 66 lines. For
  12851.      legal size paper, the page length is 78 for laser printers and
  12852.      84 for other printers. You can determine the number of lines
  12853.      per page by multiplying the page length in inches times the
  12854.      number of lines per inch.
  12855.  
  12856.      The program default is 66.
  12857.  
  12858.      NOTE: If each page of your report or letter prints higher on
  12859.      the page than the previous one, increase the page length; if
  12860.      it prints lower, decrease it.
  12861.  
  12862.      Start at Page #
  12863.  
  12864.      Normally, printing starts on the first page of a report. This
  12865.      setting lets you start printing on a later page.
  12866.  
  12867.      For example, if you have already printed part of the report
  12868.      and need to restart printing (after a paper jam, for example),
  12869.      this permits you to skip over what has already been printed.
  12870.  
  12871.  
  12872.  
  12873.      PC-File Version 7 Users Guide                            220
  12874.  
  12875.  
  12876.      NOTE: Don't change your selection criteria midway through
  12877.      printing a report or set of letters. PC-File uses the original
  12878.      selection criteria for printing.
  12879.  
  12880.      The program default is 1.
  12881.  
  12882.      Printer Setup
  12883.  
  12884.      Use the Printer setup option on the Print menu to override the
  12885.      printer defaults in the current configuration profile. These
  12886.      default settings include page length, printer, and printer
  12887.      port. This option is most useful if you only need to change
  12888.      printers or page lengths on rare occasions. If you need to
  12889.      change settings on a regular basis, it is recommended that you
  12890.      define an auxiliary configuration profile. You can then load
  12891.      that profile when you want to change your settings. Refer to
  12892.      Chapter 13,
  12893.      "Utilities," for information on auxiliary profiles.
  12894.  
  12895.      Changes made using the Printer setup option remain in effect
  12896.      only during the current session in PC-File. The settings are
  12897.      overriden if you load another configuration profile.
  12898.  
  12899.      To change your printer defaults temporarily:
  12900.  
  12901.      1.Choose Print from the menu bar.
  12902.  
  12903.      2.Choose Printer setup from the Print menu.
  12904.  
  12905.        The printer setup dialog box displays.
  12906.  
  12907.      3.Set the options you want.
  12908.  
  12909.      4.Choose OK.
  12910.  
  12911.      Your printer options are adjusted for the current session
  12912.      based on your settings.
  12913.  
  12914.      NOTE: The Page length setting in the Print options dialog box
  12915.      overrides the setting defined with the Printer setup option.
  12916.      Be sure to check that the settings match when you print your
  12917.      report or letter.
  12918.  
  12919.      Common Printing Problems
  12920.  
  12921.      This section lists some of the common problems that occur with
  12922.      printing reports and letters, and offers suggestions on how to
  12923.      correct them. Most of the problems relate to reports only,
  12924.      though some refer to both reports and letters.
  12925.  
  12926.      Bad Report Format Message
  12927.  
  12928.      If PC-File does not recognize a field name or names in a
  12929.      report or letter when asking to print them, a message displays
  12930.      in this format:
  12931.  
  12932.  
  12933.  
  12934.      PC-File Version 7 Users Guide                            221
  12935.  
  12936.  
  12937.      Bad Report Format Field: fieldname
  12938.  
  12939.      where "fieldname" is a field in your report or letter.
  12940.  
  12941.      This occurs when:
  12942.  
  12943.      A field name is spelled incorrectly in the report or letter
  12944.      The report or letter was defined for a different database
  12945.      (with different field names)
  12946.  
  12947.      The name of the field has changed since the report or letter
  12948.      was defined
  12949.  
  12950.      To correct the problem, first check to make sure the report or
  12951.      letter was defined to go with the current database. Then check
  12952.      the field name in the document with the field name in the
  12953.      database. You can run a database description (from the
  12954.      Utilities menu) to get a complete list of the database fields
  12955.      if necessary.
  12956.  
  12957.      If the Bad Report Format message displays when trying to print
  12958.      a system field, check to make sure that the system field name
  12959.      is followed by an asterisk and that the system field name is
  12960.      entered entirely in uppercase letters.
  12961.  
  12962.      The Document Creeps Up or Down the Page
  12963.  
  12964.      There are several reasons why a report or letter might creep
  12965.      up or down the page.
  12966.  
  12967.      Incorrect page length
  12968.  
  12969.      Check the Page length setting in the Print options dialog box
  12970.      to see that it is correct. Generally, if the report is
  12971.      creeping up the page, you should increase the page length. If
  12972.      the report is creeping down the page, you should decrease it.
  12973.  
  12974.      Report too wide
  12975.  
  12976.      The printer may be wrapping information from one line to the
  12977.      next. This happens when the report is too wide for your
  12978.      printer to print. (This is seldom a problem with letters.) To
  12979.      correct this problem, edit the report using the Language
  12980.      format option. Insert a new line with the /1 command after the
  12981.      command to print the last field that fits on one line.
  12982.      Alternatively, you may be able to print the report in
  12983.      condensed print so that all columns fit on one line.
  12984.  
  12985.      Missing line feeds
  12986.  
  12987.      The report may not have a /1 command at the end of each
  12988.      section. Generally, every section should end with at least one
  12989.      /1 command. The only exception to this rule is if the section
  12990.      ends with a .FF. You can edit reports with the Language editor
  12991.      to make sure the line feeds are in place.
  12992.  
  12993.  
  12994.  
  12995.      PC-File Version 7 Users Guide                            222
  12996.  
  12997.  
  12998.      Missing Footing section
  12999.  
  13000.      Generally, every report should include a Footing section with
  13001.      at least one line feed command (/1) at the end. The only
  13002.      exception is when the report contains only a Detail section
  13003.      and is designed to print on continuous form labels or cards.
  13004.  
  13005.      The Report Prints on the Perforation
  13006.  
  13007.      There are three reasons why PC-File might print on the bottom
  13008.      perforation.
  13009.  
  13010.      Missing or incorrect Footing section
  13011.  
  13012.      The report does not have a Footing section, or the Footing
  13013.      section is not defined to print a bottom margin (blank lines).
  13014.      The number of blank lines at the end of the Footing section
  13015.      determine the bottom margin of each page. Edit the report and
  13016.      add the following line in the Footing section:
  13017.  
  13018.      /6
  13019.  
  13020.      If the report already has a Footing section, add six line
  13021.      feeds (/6) at the end of the section. This gives you a one-
  13022.      inch bottom margin. You can increase the number of line feeds
  13023.      to lengthen the bottom margin, or decrease it to shorten the
  13024.      bottom margin.
  13025.  
  13026.      PC-File determines how many lines of data to print per page by
  13027.      subtracting the number of lines in the Heading and Footing
  13028.      section from the page length. For example, if the page length
  13029.      is 66 and there are 4 lines in the Heading section and 5 lines
  13030.      in the Footing section, PC-File prints 57 lines of data per
  13031.      page.
  13032.  
  13033.      Do not use the .CP command in the Detail section to determine
  13034.      the bottom margin. The .CP command is used only to prevent
  13035.      data from being split between two pages.
  13036.  
  13037.      Incorrect page length
  13038.  
  13039.      Check to see that the page length is correct. Refer to the
  13040.      section "The Report Creeps Up or Down the Page" above for more
  13041.      information.
  13042.  
  13043.      Incorrect page alignment
  13044.  
  13045.      The initial page alignment may be incorrect. To ensure the
  13046.      initial page alignment is correct, the printer should be
  13047.      aligned to the top of the page before printing begins. Do not
  13048.      manually move the paper in the printer. Use the buttons on the
  13049.      printer to move the paper. You can also align the paper in the
  13050.      printer, turn the printer off, then turn the printer on to
  13051.      reset the printer to the top of the page.
  13052.  
  13053.  
  13054.  
  13055.      PC-File Version 7 Users Guide                            223
  13056.  
  13057.  
  13058.      On laser printers, make sure the Form feed light is not on
  13059.      before you start printing.
  13060.  
  13061.      Nothing Prints on the Report or Only Headings Print
  13062.  
  13063.      There are four possible reasons why no data prints on the
  13064.      report.
  13065.  
  13066.      Incorrect line spacing setting
  13067.  
  13068.      Check the Line spacing setting in the Print options dialog
  13069.      box. To print the data from individual records, line spacing
  13070.      must be set at 1 or higher. If you set the line spacing at 0,
  13071.      data from individual records is not printed; only the Cover,
  13072.      Heading, Subtotal, Total, and Footing sections are printed.
  13073.  
  13074.      Report incorrectly defined
  13075.  
  13076.      Make sure the report is defined correctly. The commands to
  13077.      print data from individual records must be in the Detail
  13078.      section. Refer to Chapter 9, "Creating Reports," to make sure
  13079.      you have defined the rest of your report correctly.
  13080.  
  13081.      No records meet selection criteria
  13082.  
  13083.      If you are printing some records rather than all of them,
  13084.      check to see that you haven't narrowed the range so much that
  13085.      no records meet your selection criteria. Try printing the
  13086.      report selecting all records. If nothing prints, investigate
  13087.      the other possible reasons.
  13088.  
  13089.      Damaged file or index
  13090.  
  13091.      The index or data file may be damaged. Rebuild the indexes or
  13092.      run the Repair option from the Utilities menu. However, if you
  13093.      can view your records while browsing, this is not the reason.
  13094.  
  13095.      The Heading Only Prints on the First Page
  13096.  
  13097.      There are two possible reasons why the heading information
  13098.      only prints on the first page.
  13099.  
  13100.      1.Heading incorrectly defined
  13101.  
  13102.        The heading information is defined in the Cover section
  13103.        instead of the Heading section. The Cover section is only
  13104.        printed once at the beginning of the report.
  13105.  
  13106.      2.Footing incorrectly defined
  13107.  
  13108.        If you have a Heading section, you must have a Footing
  13109.        section. If nothing else, at least enter a line feed (/1) in
  13110.        the footing section.
  13111.  
  13112.  
  13113.  
  13114.      PC-File Version 7 Users Guide                            224
  13115.  
  13116.  
  13117.  
  13118.  
  13119.      CHAPTER 12 CREATING GRAPHS
  13120.  
  13121.      You can create visual representations of your data with PC-
  13122.      File's graphing option. PC-File walks you through the process
  13123.      step by step. Once you have created a basic graph, you can
  13124.      switch between several different types, including line graphs,
  13125.      bar graphs, and pie charts.
  13126.  
  13127.  
  13128.      Graphing Your Database
  13129.  
  13130.      PC-File can give you a graphic view of your data. Graphing can
  13131.      be an especially powerful way to present data because it
  13132.      allows you to summarize large volumes of data in an easily
  13133.      understood picture.
  13134.  
  13135.      You can create several types of graphs-line graphs, horizontal
  13136.      and vertical bar charts, pie charts, scatter charts,
  13137.      overlapped bar charts, and cumulative bar and line graphs. And
  13138.      once you create a graph, you can switch back and forth between
  13139.      the different types to find the one that best displays your
  13140.      data.
  13141.  
  13142.      You can also add a grid, calculate and display an average, and
  13143.      determine and show smoothed averages.
  13144.  
  13145.      Graphing data can seem a bit intimidating to an inexperienced
  13146.      user, but, in fact, it can be a lot of fun. So don't be afraid
  13147.      to give it a try. PC-File walks you through the process of
  13148.      creating a graph step by step. It usually only takes a minute
  13149.      or two to create a graph, so if you make a mistake, you can
  13150.      try it again.
  13151.  
  13152.      System Requirements
  13153.  
  13154.      The PC-File graphing utility will display a graph on most
  13155.      monitors and print a graph on most printers in use today.
  13156.      However, check the following requirements to see that your
  13157.      equipment meets the minimum needs of the program.
  13158.  
  13159.      Monitors
  13160.  
  13161.      The following monitors support the PC-File graphing utility:
  13162.  
  13163.           Hercules or Hercules-compatible monochrome
  13164.  
  13165.           CGA
  13166.  
  13167.           EGA
  13168.  
  13169.           VGA
  13170.  
  13171.  
  13172.  
  13173.      PC-File Version 7 Users Guide                            225
  13174.  
  13175.  
  13176.      The graphing utility runs "as is" on a color monitor. However,
  13177.      if you have a Hercules or Hercules-compatible graphics card
  13178.      and a monochrome monitor, you must run a special program
  13179.      before you can produce graphs. The program is called
  13180.      MSHERC.COM. It is included with PC-File and is automatically
  13181.      loaded onto your hard disk when you install PC-File.
  13182.  
  13183.      If you intend to work with the graphing utility and have a
  13184.      monochrome monitor, you need to run MSHERC.COM before you
  13185.      start PC-File. To run the program, type msherc at the DOS
  13186.      prompt and press ENTER. The program runs through quickly and
  13187.      returns you to the DOS prompt.
  13188.  
  13189.      If you use the graphing option regularly, enter the command
  13190.      MSHERC in your AUTOEXEC.BAT file. The program will run
  13191.      automatically each time you boot up. Refer to your DOS manual
  13192.      for more information on the AUTOEXEC.BAT file.
  13193.  
  13194.      Printers
  13195.  
  13196.      Graphs created with PC-File can be printed on the following
  13197.      printers:
  13198.  
  13199.           Epson (FX) dot matrix
  13200.  
  13201.           Epson (MX) / IBM dot matrix
  13202.  
  13203.           Okidata dot matrix
  13204.  
  13205.           HP Laserjet
  13206.  
  13207.           PostScript printers
  13208.  
  13209.      For other printers, you may be able to use the DOS GRAPHICS
  13210.      command to print graphs as they appear on the screen. See your
  13211.      DOS manual for information on using this command.
  13212.  
  13213.      Graphing Concepts
  13214.  
  13215.      During the process of defining a graph, PC-File introduces a
  13216.      number of concepts that may not be completely clear to the
  13217.      user at first glance. These concepts are explained in detail
  13218.      below.
  13219.  
  13220.      Subtotals and Totals
  13221.  
  13222.      You must choose between graphing subtotals and totals during
  13223.      the process of defining a graph. The difference is fairly
  13224.      straightforward. Choose Subtotals if you want to graph the
  13225.      data within a field or within several fields. Choose Totals if
  13226.      you want to compare the totals of two or more fields. In other
  13227.      words, if you want to graph records within a field or fields,
  13228.      choose subtotals; if you want to graph a summation of all the
  13229.      records from several fields, choose totals.
  13230.  
  13231.      Values and Counts
  13232.  
  13233.  
  13234.  
  13235.      PC-File Version 7 Users Guide                            226
  13236.  
  13237.  
  13238.  
  13239.      During graph definition, PC-File asks you to choose between
  13240.      accumulating Values or Counts. Values refers to the actual
  13241.      data in the database that you are graphing. Counts refers to
  13242.      the number of records being graphed.
  13243.  
  13244.      In most cases, you want to choose values. If you are graphing
  13245.      sales by each employee, zoo attendance by year, or increases
  13246.      in the captive snow leopard population, you are graphing data
  13247.      from a database and should select Values. Values should always
  13248.      be numeric.
  13249.  
  13250.      It is much less likely that you would choose counts. If you
  13251.      wanted to count the number of sales made by each employee,
  13252.      rather than total the sales themselves, you would choose
  13253.      counts. In that case you would graph the number of records,
  13254.      with each record representing a sale, rather than the sales
  13255.      data itself.
  13256.  
  13257.      Counts are also useful when the data is not numeric. For
  13258.      example, if you want to graph the number of members that lived
  13259.      in each state, you could just count the records by state.
  13260.  
  13261.      Graph Titles
  13262.  
  13263.      PC-File prompts you to enter four titles for the graph. These
  13264.      titles include the main graph title, a subtitle, a category
  13265.      heading and a variable heading. The placement of these titles
  13266.      is illustrated below.
  13267.  
  13268.      The title and subtitle always appear above the graph. They are
  13269.      synonymous with a report title and subtitle.
  13270.  
  13271.      The variable heading normally appears on the vertical axis of
  13272.      the graph. It describes the data of the fields you are
  13273.      graphing. For example, if you are graphing sales by month,
  13274.      sales would be your variable heading.
  13275.  
  13276.      The category heading normally appears along the horizontal
  13277.      axis of a graph. It often describes the contents of the field
  13278.      that you choose for the subtotal break (which is described
  13279.      below). For example, if you are graphing sales by month, month
  13280.      is the field on which you categorize the data, and is your
  13281.      likely category heading.
  13282.  
  13283.      Exceptions to the rules are horizontal bar graphs and pie
  13284.      charts. In horizontal bar graphs, the headings are reversed.
  13285.      In pie charts, the variable heading normally displays as a
  13286.      description beneath the chart and the category heading is used
  13287.      with a legend on the side. The legend provides a description
  13288.      for the wedges of the pie.
  13289.  
  13290.      The titles are case sensitive, and thus appear just as you
  13291.      enter them.
  13292.  
  13293.      All titles are optional. Press ENTER to skip a title.
  13294.  
  13295.  
  13296.  
  13297.      PC-File Version 7 Users Guide                            227
  13298.  
  13299.  
  13300.  
  13301.      Subtotal Breaks
  13302.  
  13303.      If you graph subtotals, PC-File prompts you to choose a
  13304.      subtotal break. The subtotal break is normally the field by
  13305.      which you are grouping your data (it can also be a
  13306.      calculation). In that way it is very similar to a subtotal
  13307.      break in a report.
  13308.  
  13309.      Normally, the subtotal break is the field plotted along the
  13310.      horizontal axis of the graph. This is the same field on which
  13311.      you based the category heading. The subtotal break is usually
  13312.      not a field that you are graphing.
  13313.  
  13314.      If you are graphing sales by month, the break field is month.
  13315.      If you are graphing sales by department, the break field is
  13316.      department.
  13317.  
  13318.      Types of Graphs
  13319.  
  13320.      There are four basic kinds of graphs that you can create in
  13321.      PC-File. Read the descriptions below to help you decide which
  13322.      kind you want to use for the data you are graphing. However,
  13323.      once you define a graph, you can switch back and forth between
  13324.      various graph types, using the same selected data. In that
  13325.      way, you can often tell which is the best representation of
  13326.      your data.
  13327.  
  13328.      Line Graphs
  13329.  
  13330.      In general, line graphs are useful for seeing trends-increases
  13331.      or decreases-over time.
  13332.  
  13333.      Line graphs can also be used to plot engineering or scientific
  13334.      data. How temperature readings in one city vary over several
  13335.      months, or how a car's gas mileage changes as the r.p.m.'s
  13336.      increase are two simple examples of possible uses for line
  13337.      graphs.
  13338.  
  13339.      Scatter Graphs
  13340.  
  13341.      Scatter graphs are very similar to line graphs. (Line graphs
  13342.      are actually scatter graphs with lines drawn between the
  13343.      points.) Scatter graphs are most useful when you have a lot of
  13344.      points to plot. As a general rule, if you will be plotting
  13345.      more than 20 points, a scatter graph or line graph will give
  13346.      you a clearer visual summary of your information than one of
  13347.      the other graph formats.
  13348.  
  13349.      Pie Charts
  13350.  
  13351.      Pie charts are the least flexible of all the graph choices.
  13352.      They are primarily used to compare or show percentages. If you
  13353.      want your graph to answer the question, "how much of the pie
  13354.      did this person/these people get?" you probably want a pie
  13355.      chart.
  13356.  
  13357.  
  13358.  
  13359.      PC-File Version 7 Users Guide                            228
  13360.  
  13361.  
  13362.  
  13363.      Pie charts are not good if you will be plotting many fields,
  13364.      or if you will have many subtotal breaks. A pie chart becomes
  13365.      cluttered and hard to interpret with more than 10 or 15
  13366.      wedges.
  13367.  
  13368.      Bar Graphs
  13369.  
  13370.      Bar graphs are one of the most versatile of all the graph
  13371.      formats. Like pie charts, they are useful for visual
  13372.      comparison, but instead of showing you a percentage, bar
  13373.      graphs show actual numeric amounts. Like line graphs, you can
  13374.      use bar graphs to show trends by plotting the values of one or
  13375.      several fields' data over time.
  13376.  
  13377.      The strong point of bar graphs is their ability to show
  13378.      numerical amounts, be it dollars, time, mileage, etc. The
  13379.      choice between horizontal or vertical bar graphs is strictly a
  13380.      matter of preference. You can easily switch between either
  13381.      style to decide which you prefer.
  13382.  
  13383.      Defining a Graph
  13384.  
  13385.      Before you begin to define a graph, you should know:
  13386.  
  13387.           Which fields you are graphing
  13388.  
  13389.           Whether you are graphing subtotals or totals
  13390.  
  13391.           If graphing subtotals, which field or fields will serve
  13392.           as the break
  13393.  
  13394.           Whether you are using values or counts
  13395.  
  13396.      You might find it handy to sketch your graph on paper first.
  13397.      Draw a basic graph, indicating which fields you want to use
  13398.      and how the data will appear when graphed. Decide on the
  13399.      titles and headings. With your sketch in front of you, the
  13400.      actual process of defining a graph on the screen will take
  13401.      only a few moments.
  13402.  
  13403.      To define a graph:
  13404.  
  13405.      1.Choose Print from the menu bar.
  13406.  
  13407.      2.Choose Graphs from the Print menu.
  13408.  
  13409.      3.Choose New from the dialog box listing the operations. A
  13410.        file selection dialog box displays.
  13411.  
  13412.      4.Enter a file name for your graph in the text box. Choose OK.
  13413.        PC-File prompts you to choose how the data should be
  13414.        summarized.
  13415.  
  13416.  
  13417.  
  13418.      PC-File Version 7 Users Guide                            229
  13419.  
  13420.  
  13421.      5.Choose one of the four options. For example, if you are
  13422.        graphing totals rather than subtotals and counts rather than
  13423.        values, choose the fourth option, Total Counts. PC-File
  13424.        displays a field selection dialog box.
  13425.  
  13426.      6.Choose the fields you want to graph, in the order you want
  13427.        them to appear on the graph from left to right. PC-File
  13428.        displays a dialog box asking you to enter the titles and
  13429.        headings for the graph.
  13430.  
  13431.      7.Enter the Title, subtitle, and headings in the appropriate
  13432.        text boxes. Press ENTER to skip any of the titles. Choose OK
  13433.        to continue.
  13434.  
  13435.      8.Choose a default graph type. You can switch types later if
  13436.        you want. PC-File prompts you to save the graph.
  13437.  
  13438.      9.Choose Yes to save the graph or No to run the graph only
  13439.        once.
  13440.      10.  PC-File displays another field selection dialog box.
  13441.  
  13442.      11.  Choose the subtotal break.
  13443.  
  13444.      12.  Choose to graph all or some records.
  13445.  
  13446.      13.  Perform a search if you chose some records. PC-File
  13447.        displays the first record and asks if you want to output
  13448.        this record.
  13449.  
  13450.      14.  Choose Yes to graph this record and display the next.
  13451.        Choose No to skip this record and display the next. Choose
  13452.        All to output this and all remaining selected records
  13453.        without further prompting. PC-File displays the graph on the
  13454.        screen. Instructions for using
  13455.      15.  the menu commands on the graphing screen are covered
  13456.        below.
  13457.  
  13458.      Viewing and Printing a Graph
  13459.  
  13460.      Once you have displayed a graph on the screen, you have
  13461.      several options:
  13462.  
  13463.      Switch to a different type of graph Add one or more of the
  13464.      optional features Print the graph
  13465.  
  13466.      To perform any of these actions, use the menu. Press the
  13467.      letter M to display the menu. There are two menu lines, as
  13468.      shown below.
  13469.  
  13470.      The General menu, on the top line, remains the same no matter
  13471.      which graph type is displayed. The Type menu, on the bottom
  13472.      line, varies, depending on the type of graph displayed. The
  13473.      name of the menu also varies, depending on the type of graph
  13474.      currently displayed. For example, in the above screen, the
  13475.      menu is called Bar because a bar graph is displayed.
  13476.  
  13477.  
  13478.  
  13479.      PC-File Version 7 Users Guide                            230
  13480.  
  13481.  
  13482.      To choose an option from either menu line, press the letter
  13483.      indicated. You can choose options in this manner whether or
  13484.      not the menu is displayed.
  13485.  
  13486.      NOTE: The mouse is inactive within the graphing utility, so
  13487.      you must use the keyboard to choose menu options.
  13488.  
  13489.      The General Menu Options
  13490.  
  13491.      Of the nine options on the General menu, use the last five -
  13492.      Pie, Line, H(orizontal) bar, V(ertical) bar, and Scatter - to
  13493.      switch between the different graph types.
  13494.  
  13495.      Choose Quit when you finish to leave the graphing utility and
  13496.      return to the PC-File menu bar.
  13497.  
  13498.      The first three options on the General menu, Output, Color,
  13499.      and Menu, are explained in detail below.
  13500.  
  13501.      Output
  13502.  
  13503.      Choose Output to print the graph. There are several steps
  13504.      involved in printing. During printing, the menu bar, if
  13505.      currently displayed, is removed from the screen and is not
  13506.      printed.
  13507.  
  13508.      To print a graph:
  13509.  
  13510.      1.Choose Output from the General menu.
  13511.  
  13512.      2.Choose Portrait, Landscape, or GIF from the dialog box that
  13513.        displays.
  13514.  
  13515.        Portrait prints the graph in the normal vertical manner.
  13516.  
  13517.        Landscape rotates the graph 90 degrees and prints a somewhat
  13518.        larger image of the graph. If you are making overhead
  13519.        projector view foils, you probably want to use landscape.
  13520.  
  13521.        The GIF format produces a graphics file that can be imported
  13522.        into documents in most word processing or desktop publishing
  13523.        programs. GIF files are in a standard graphics format that
  13524.        is compressed to minimize the amount of disk space used. PC-
  13525.        File defines GIF files with names like PCG2_nnn.GIF, where
  13526.        nnn is a number such as 001. GIF files are defined to the
  13527.        current directory.
  13528.  
  13529.      3.If you chose Portrait or Landscape, choose the output
  13530.        printer from the list that displays.
  13531.  
  13532.  
  13533.  
  13534.      PC-File Version 7 Users Guide                            231
  13535.  
  13536.  
  13537.        Choose Epson for Epson FX and LQ model printers only. Choose
  13538.        IBM for IBM printers, Epson MX model printers, and Okidata
  13539.        printers set to IBM mode. Choose Okidata if your Okidata
  13540.        printer isn't set to IBM mode. Choose Laserjet for all HP-
  13541.        compatible laser printers. Choose PostScript for all
  13542.        printers with a PostScript driver. We recommend that you use
  13543.        PostScript if you have it. It produces the best quality
  13544.        output of all the options available.
  13545.  
  13546.      4.For PostScript only, another menu displays.
  13547.  
  13548.        Choose an option from this menu.
  13549.  
  13550.        Decide whether you are printing to a file or to the printer,
  13551.        then choose between pattern fill or gray fill.
  13552.  
  13553.        Pattern fill produces various patterns in the rectangles of
  13554.        bar charts and the wedges of pie charts, while gray fill
  13555.        colors those same areas in shades of gray. Choosing gray
  13556.        fill results in a much faster printing operation.
  13557.  
  13558.      As the graph prints, the screen colors change to their
  13559.      "negative" colors to show the progress of the printing
  13560.      process. When creating Postscript output, the graph is redrawn
  13561.      on the screen twice.
  13562.  
  13563.      When printing is completed, the graph is redrawn on the screen
  13564.      and the menu redisplayed (depending upon the state of the M
  13565.      toggle.)
  13566.  
  13567.      NOTE: If you are printing a Pie chart, it is redrawn on the
  13568.      screen when you select the orientation of the output. The
  13569.      aspect ratio defined for the selected orientation is used.
  13570.  
  13571.      Color
  13572.  
  13573.      Some colors may not show up clearly on your screen. The Color
  13574.      option allows you to select those colors which show up best,
  13575.      and also permits you to select the foreground and background
  13576.      colors. Your selections are saved to a file, called PCG2.ASP,
  13577.      and used in future graphing operations.
  13578.  
  13579.      NOTE: The Color option has no effect if you are using a
  13580.      monochrome or CGA screen, both of which display in black and
  13581.      white. CGA monitors display in black and white because the
  13582.      resolution is at its maximum in that mode.
  13583.  
  13584.      To change colors:
  13585.  
  13586.  
  13587.  
  13588.      PC-File Version 7 Users Guide                            232
  13589.  
  13590.  
  13591.      Choose Color from the General menu. PC-File displays a dialog
  13592.      box. Adjust the background and foreground colors if you want.
  13593.      Press B repeatedly to run through the available background
  13594.      colors, and press F repeatedly to run through the foreground
  13595.      colors until you have the color combination that you prefer.
  13596.      Turn any of the detail colors off. To turn a detail color off,
  13597.      press the number that is displayed to the left of the
  13598.      respective color bar. An N is displayed to the right of the
  13599.      bar when the
  13600.      color is turned off. Press the number again to turn it back
  13601.      on. You can press Q at any time to go back to your graph and
  13602.      view the current colors. Press C to return to the color
  13603.      screen. Press Q to return to the graph when you finish.
  13604.  
  13605.      Menu
  13606.  
  13607.      The Menu option toggles the menu display on and off. When the
  13608.      menu lines are not displayed, the message (press M for menu)
  13609.      is shown at the lower-right of your screen. You can press
  13610.      SHIFT-F1 to remove this message.
  13611.  
  13612.      The menu lines do not need to be displayed for you to choose
  13613.      any of the menu options. (When you print the graph, the menu
  13614.      lines are removed for you automatically.)
  13615.  
  13616.      The Type Menu Options
  13617.  
  13618.      Use the options on the Type menu to enhance your graphs. You
  13619.      can add a grid, display a calculated average, display smoothed
  13620.      averages, or replot your graph on a logarithmic scale.
  13621.  
  13622.      There are 14 enhancement options. The options available on the
  13623.      Type menu vary, depending on the type of graph currently
  13624.      displayed. Only those options that appear on the menu for the
  13625.      current graph can be used.
  13626.  
  13627.      All of the options are explained below.
  13628.  
  13629.      Bound
  13630.  
  13631.      You can change the scale of a graph with the Bound option.
  13632.      This is done in three steps.
  13633.  
  13634.      First, edit the GRAPH.ME file, using any text editor or word
  13635.      processing program that saves standard ASCII (non-formatted)
  13636.      files. Insert a one-line BOUND command before the first TITLE
  13637.      line in the file. Use the format
  13638.  
  13639.      BOUND:Xh,X1,Yh,Y1,0,Ch
  13640.  
  13641.      where
  13642.  
  13643.      Xh is the maximum X axis value X1 is the minimum X axis value
  13644.      Yh is the maximum Y axis value Y1 is the minimum Y axis value
  13645.      0 (zero) is required Ch is the maximum cumulative value
  13646.  
  13647.  
  13648.  
  13649.      PC-File Version 7 Users Guide                            233
  13650.  
  13651.  
  13652.      For example, to set the scale of the Y axis so that the
  13653.      maximum value is 500 and the minimum value is 1, and the
  13654.      maximum cumulative value is 5000, use the command
  13655.  
  13656.      BOUND:0,0,500,1,0,5000
  13657.  
  13658.      Second, after saving the edited GRAPH.ME file, run the
  13659.      graphing utility in stand-alone mode, from the DOS prompt.
  13660.      Making sure you are in the directory that contains both the
  13661.      PCG2.EXE file and the GRAPH.ME file, type pcg2 at the DOS
  13662.      prompt and press ENTER. When the graph is displayed, the old
  13663.      scale is still in effect.
  13664.  
  13665.      For the third step, choose Bound from the menu. The graph
  13666.      displays with the new scale in effect. Use the Bound option as
  13667.      a toggle to switch between the normal scale and the scale
  13668.      specified in the GRAPH.ME file.
  13669.  
  13670.      The Bound option is available with line, scatter, and bar
  13671.      graphs.
  13672.  
  13673.      Log
  13674.  
  13675.      Choose the Log option (by pressing the letter T) to change the
  13676.      scale along the vertical axis to a logarithmic scale. Choose
  13677.      Log again to return to the normal scale.
  13678.  
  13679.      The Log option is available with line, scatter, and bar
  13680.      graphs.
  13681.  
  13682.      Grid
  13683.  
  13684.      Place grid lines on your graph by choosing the Grid option.
  13685.      Remove the grid lines by choosing Grid again.
  13686.  
  13687.      The Grid option is available with line, scatter, and bar
  13688.      graphs.
  13689.  
  13690.      Xchg
  13691.  
  13692.      If you are using multiple variables in your graph, you can
  13693.      switch the way the data elements are displayed with the Xchg
  13694.      option. Choose Xchg to swap the elements. Choose it again to
  13695.      return to the original graph.
  13696.  
  13697.      The Xchg option is available with all types of graphs.
  13698.  
  13699.      Cum
  13700.  
  13701.      Use the Cum option to produce cumulative line and bar graphs.
  13702.      This option is most useful when you have multiple variables.
  13703.      The Y value of the points for each group at a given position
  13704.      on the X axis are totaled to produce this graph.
  13705.  
  13706.  
  13707.  
  13708.      PC-File Version 7 Users Guide                            234
  13709.  
  13710.  
  13711.      The Cum option is a toggle. Choose the option once to produce
  13712.      the cumulative graph, choose it again to return to the normal
  13713.      graph.
  13714.  
  13715.      The Overlap and Log options become inactive when you display a
  13716.      cumulative graph. The Cum option is available with line and
  13717.      bar graphs.
  13718.  
  13719.      Avg
  13720.  
  13721.      Choose the Avg option to draw a line across the graph showing
  13722.      the average or mean of all the data. This lets you see which
  13723.      points are above the average and which are below.
  13724.  
  13725.      To remove the average line, refresh the current graph format.
  13726.      For example, if you are viewing a scatter graph, press S to
  13727.      display a new scatter graph without the line.
  13728.  
  13729.      The Avg option is available with line, scatter, and bar
  13730.      graphs.
  13731.  
  13732.      Overlap
  13733.  
  13734.      The Overlap option lets you produce a somewhat more
  13735.      aesthetically pleasing bar graph, in which the bars within a
  13736.      group overlap each other.
  13737.  
  13738.      Press E to overlap the bars; press E again to return to the
  13739.      non- overlapped graph.
  13740.  
  13741.      Overlap is inactive for cumulative bar graphs.
  13742.  
  13743.      Fit
  13744.  
  13745.      To display the trend of your data, choose Fit. This option
  13746.      uses the method of least squares to calculate the regression
  13747.      line.
  13748.  
  13749.      To remove the line, refresh the current graph format by
  13750.      choosing the format again.
  13751.  
  13752.      The Fit option is available with line and scatter graphs.
  13753.  
  13754.      (0-9)Smoothed Avg
  13755.  
  13756.      Smoothed averages are used to show trends when you have a lot
  13757.      of data which varies considerably.
  13758.  
  13759.      Unlike the average line, which shows a single average of all
  13760.      the data, a smoothed average is produced by calculating an
  13761.      average for each point on the graph based on the values a
  13762.      specified number of data points to the left and right of that
  13763.      point.
  13764.  
  13765.  
  13766.  
  13767.      PC-File Version 7 Users Guide                            235
  13768.  
  13769.  
  13770.      The number you select (from 0 to 9) controls the amount of
  13771.      smoothing used. The number chosen is the number of points to
  13772.      the left and to the right that are included in the smoothed
  13773.      average. For example, if you press 2, then 2 points to the
  13774.      left, the current point, and 2 points to the right are
  13775.      included in the average for each plotted point. The higher the
  13776.      number you choose, the greater the amount of smoothing.
  13777.  
  13778.      Choosing 0 means that no points to the right or left are
  13779.      included in the average and you essentially duplicate a line
  13780.      graph. Choosing 9 on a graph with just 9 data points is the
  13781.      same as choosing the Avg option.
  13782.  
  13783.      You can display as many smoothed averages on your line or
  13784.      scatter graph as you want. To remove the lines, refresh the
  13785.      current graph format by choosing the format again.
  13786.  
  13787.      Aspect
  13788.  
  13789.      The Aspect option is used to make your pie charts round, both
  13790.      on- screen and printed. This option works by letting you
  13791.      adjust the aspect ratio of the circle. Aspect ratio is the
  13792.      ratio of height to width. If your pie charts appear elliptical
  13793.      rather than round, adjust the height and width with this
  13794.      option.
  13795.  
  13796.      When you choose Aspect, PC-File displays a screen with a
  13797.      circle enclosed in a box. Use this screen to adjust the
  13798.      roundness of the pie chart on your monitor only. To adjust the
  13799.      roundness of a printed pie chart, press P for Portrait or L
  13800.      for Landscape, depending on which format you plan to use. In
  13801.      either case, a similar screen displays. However, all three
  13802.      screens are separate and adjust the aspect of the pie for
  13803.      their respective uses only: the monitor, portrait print, or
  13804.      landscape print.
  13805.  
  13806.      In all three cases, use the arrow keys to adjust the
  13807.      horizontal and vertical dimensions until the circle appears
  13808.      round and the box appears square. The box makes it easier to
  13809.      tell if the dimensions of the circle are correct.
  13810.  
  13811.           The right arrow increases the width
  13812.  
  13813.           The left arrow decreases the width
  13814.  
  13815.           The down arrow increases the height
  13816.  
  13817.           The up arrow decreases the height
  13818.  
  13819.      Whichever arrow key you depress, hold it down for a few
  13820.      seconds. The degree of change with each keystroke is very
  13821.      slight, so you have to give it time to change. This allows you
  13822.      to really fine-tune the circle.
  13823.  
  13824.  
  13825.  
  13826.      PC-File Version 7 Users Guide                            236
  13827.  
  13828.  
  13829.      If you correct the aspect ratio for either portrait or
  13830.      landscape printing, you can print out a test circle to check
  13831.      it. With the respective screen in view, press P to print.
  13832.      Choose your printer from the menu that displays. The line
  13833.      inside the circle helps you differentiate between vertical and
  13834.      horizontal on your screen versus your printed output.
  13835.  
  13836.      Press Q to exit from the screens and return to the pie chart
  13837.      itself. Use the Output option to print the chart with the
  13838.      corrected aspect ratio.
  13839.  
  13840.      The aspect ratios are saved to the file PCG2.ASP and used in
  13841.      future graphs.
  13842.  
  13843.      Wedge
  13844.  
  13845.      You can emphasize specific slices of a pie chart by pulling
  13846.      wedges of the pie away from the center. If you are displaying
  13847.      multiple pies, the wedge(s) you pull out apply to all the
  13848.      pies.
  13849.  
  13850.      A new menu displays when you choose Wedge, and one section of
  13851.      the pie changes to a solid color. The solid-colored wedge is
  13852.      the active wedge.
  13853.  
  13854.      Use the menu options as follows:
  13855.  
  13856.           Detach the solid slice
  13857.  
  13858.           Attach the solid slice
  13859.  
  13860.           Skip to the next slice
  13861.  
  13862.           Return all detached sections to the center and exit the
  13863.           Wedge option screen
  13864.  
  13865.           Quit the Wedge option screen, saving your modifications
  13866.  
  13867.      Moving around the entire pie also causes you to exit the Wedge
  13868.      option screen.
  13869.  
  13870.      Disp
  13871.  
  13872.      If your pie chart appears cluttered, you can move the heading
  13873.      and percentage labels to a separate legend. This can create a
  13874.      much more pleasing display.
  13875.  
  13876.      The Disp option is actually a three-way toggle. Press D once
  13877.      to create a legend and move the heading labels next to it.
  13878.      Press D again to add the percent labels to the legend as well.
  13879.      Press D a third time to remove the legend and return to the
  13880.      original pie chart.
  13881.  
  13882.      (1-2)#pies
  13883.  
  13884.  
  13885.  
  13886.      PC-File Version 7 Users Guide                            237
  13887.  
  13888.  
  13889.      If you graphed multiple fields, each field is displayed on a
  13890.      separate pie chart. This option lets you display two pies on
  13891.      the screen at one time.
  13892.  
  13893.      Press 2 to display two pies on the screen side by side. Press
  13894.      1 to display just one pie.
  13895.  
  13896.      Next group
  13897.  
  13898.      If you graphed multiple fields, each field is displayed on a
  13899.      separate pie chart. This option lets you cycle through the
  13900.      pies, either one or two at a time, depending on your selection
  13901.      for the previous option.
  13902.  
  13903.      Editing Graphs
  13904.  
  13905.      Generally, if you make a mistake in defining a graph, the
  13906.      easiest thing to do is start over again. That's particularly
  13907.      true once you have some experience in creating graphs.
  13908.  
  13909.      However, there are some other options, though they are
  13910.      somewhat limited.
  13911.  
  13912.      If you selected the wrong subtotal break or selected too many
  13913.      or the wrong records, just rerun the graph. PC-File prompts
  13914.      you to rename the subtotal break and select the records to
  13915.      graph every time you run a graph you have already created.
  13916.  
  13917.      You can also edit the graph files. PC-File produces two files
  13918.      when you create a graph:
  13919.  
  13920.        FILENAME.GR
  13921.  
  13922.        GRAPH.ME
  13923.  
  13924.      FILENAME.GR contains the commands you issued as you created
  13925.      the graph. Basically, this is the structure of the graph. This
  13926.      file is like a report file and can be edited using the command
  13927.      format in reports.
  13928.  
  13929.      To edit a .GR file:
  13930.  
  13931.      1.Change the .GR extension to .REP.
  13932.  
  13933.        Use the DOS RENAME command to change the extension while at
  13934.        the DOS prompt. (See your DOS manual for information on this
  13935.        command.) You can use the Drop to DOS option in PC-File to
  13936.        display the DOS prompt.
  13937.  
  13938.      2.Return to PC-File and choose Reports from the Print menu.
  13939.  
  13940.      3.Choose Modify from the first dialog box, then the Language
  13941.        editor from the next one.
  13942.  
  13943.      4.Choose the graph file from the file selection dialog box.
  13944.  
  13945.  
  13946.  
  13947.      PC-File Version 7 Users Guide                            238
  13948.  
  13949.  
  13950.      5.Edit the file just as you would a report.
  13951.  
  13952.      6.Return to the DOS prompt and change the file extension back
  13953.        to .GR.
  13954.  
  13955.      7.Return to PC-File and call up the corrected graph.
  13956.  
  13957.      The GRAPH.ME file contains the data from the current graph.
  13958.      When you create or display another graph, the data from that
  13959.      graph replaces the previous data. Thus, there is just one
  13960.      GRAPH.ME file, which is rewritten every time you run a graph.
  13961.  
  13962.      You can edit the GRAPH.ME file using any text editor or word
  13963.      processing program that saves ASCII (unformatted) files.
  13964.      However, it is unlikely you will want to do so, unless you
  13965.      need to add a BOUND command (which is explained earlier in
  13966.      this chapter).
  13967.  
  13968.      If you want to save a particular GRAPH.ME file, rename it
  13969.      using the DOS RENAME command so it doesn't get overwritten.
  13970.      Change the name back to GRAPH.ME when you want to display the
  13971.      graph.
  13972.  
  13973.  
  13974.  
  13975.      PC-File Version 7 Users Guide                            239
  13976.  
  13977.  
  13978.  
  13979.  
  13980.      CHAPTER 13 UTILITIES
  13981.  
  13982.      This chapter covers the first four and the last three options
  13983.      on the Utilities menu. Exporting and importing files lets you
  13984.      exchange data between PC-File databases and most, if not all,
  13985.      of the popular database and spreadsheet programs. File
  13986.      management allows you to copy, delete, and rename files within
  13987.      PC-File. Use Configuration to set the parameters that
  13988.      influence the way PC-File looks and works. Use Pack to remove
  13989.      deleted records. Use Repair to fix damaged databases. And, use
  13990.      Database Description to document the structure of your
  13991.      database.
  13992.  
  13993.  
  13994.  
  13995.      Exporting and Importing Files
  13996.  
  13997.      Exchanging data with other programs or files is an important
  13998.      feature of PC-File. You can import data from and export data
  13999.      to just about any of the popular database and spreadsheet
  14000.      programs, including Lotus, Multiplan, and Excel. (Since PC-
  14001.      File databases are already in dBASE format, no transfer is
  14002.      necessary with dBASE files.) You can also move data to and
  14003.      from word processing data files used for mail merging,
  14004.      including those handled by WordPerfect, WordStar, and
  14005.      Microsoft Word.
  14006.  
  14007.      Imported data can be added to an empty database or appended to
  14008.      existing records. You can also use the import feature to
  14009.      append records from one PC-File database to another.
  14010.  
  14011.      When exporting data, PC-File creates a new file. Data is not
  14012.      appended to an existing file.
  14013.  
  14014.      Exchange Formats
  14015.  
  14016.      PC-File supports almost a dozen formats for transferring data
  14017.      between files. These include the data interchange format
  14018.      (.DIF) used by Lotus and Excel for transferring data, comma
  14019.      and line delimited formats, ASCII files, and the formats used
  14020.      by the major word processing programs for data merge in form
  14021.      letters.
  14022.  
  14023.      To transfer files to and from programs that don't support one
  14024.      of these formats, consult the program's manual and select a
  14025.      format common to both. For example, if you want to transfer a
  14026.      file in a Paradox format to PC-File, convert the Paradox file
  14027.      to the dBASE III format. You can then open it in PC-File, with
  14028.      no importing necessary. Whenever possible, convert to a dBASE
  14029.      file, as that eliminates the need to import the file in PC-
  14030.      File. However, if necessary, you can convert the file to ASCII
  14031.      or
  14032.      some other format and then convert that to the PC-File format.
  14033.  
  14034.  
  14035.  
  14036.      PC-File Version 7 Users Guide                            240
  14037.  
  14038.  
  14039.      PC-File can exchange data using the following formats:
  14040.  
  14041.      PC-File/dBASE
  14042.  
  14043.      PC-File uses the dBASE format, so it isn't necessary to export
  14044.      this format. However, you can export using this format to
  14045.      easily specify which fields and records to include in a new
  14046.      file. You can also use this format in importing. PC-File's
  14047.      dBASE import feature provides convenient way to tell PC-File
  14048.      where to put the fields from the database you are importing.
  14049.  
  14050.      Select this format only when you want to append (import) one.
  14051.      DBF file to another. These can be files created using PC-File,
  14052.      dBASE III, dBASE III PLUS, dBASE IV, FoxPRO, or any other
  14053.      programs that use the .DBF format. PC-File can't open dBASE IV
  14054.      files that contain more than 128 fields or float type fields.
  14055.      Also dBASE IV memo field data is not compatible.
  14056.  
  14057.      DIF
  14058.  
  14059.      The data interchange format is used by many spreadsheet and
  14060.      database programs for transferring data. These include Lotus
  14061.      1-2-3, Multiplan, and Microsoft Excel. For 1-2-3, convert the
  14062.      .WKS files to .DIF before making the transfer. For Multiplan,
  14063.      convert the SYLK files to .DIF before making the transfer. For
  14064.      Excel, save the .XLS file to a .DIF file.
  14065.  
  14066.      Fixed length
  14067.  
  14068.      Fixed length format is used by many programs which create
  14069.      "random" files. Every record is exactly the same length, with
  14070.      no delimiters or record separators. The only way to tell where
  14071.      one record stops and the next one starts is by knowing the
  14072.      exact length of each field. This format is just like the text
  14073.      editor format described below, except that the end of each
  14074.      record is not marked by a carriage return.
  14075.  
  14076.      Mail-merge
  14077.  
  14078.      This format consists of data fields separated by commas, with
  14079.      quotation marks surrounding fields that contain a comma. The
  14080.      end of each record has a carriage-return and optionally a line
  14081.      feed. Many word processing programs, including WordStar and
  14082.      Microsoft Word, use this format for their data files when
  14083.      creating form letters. It is also produced by many BASIC
  14084.      programs, and is an export option in many database programs.
  14085.      PC-File also gives you the option to put quotation marks
  14086.      around all fields,
  14087.      for programs that require them.
  14088.  
  14089.      Lotus .PRN
  14090.  
  14091.  
  14092.  
  14093.      PC-File Version 7 Users Guide                            241
  14094.  
  14095.  
  14096.      This is essentially the same format as mail-merge, with one
  14097.      exception. In the mail-merge format, if a field is blank or
  14098.      empty, nothing is written out except the comma, or, if all
  14099.      fields are enclosed in quotation marks, a space appears
  14100.      between the quotation marks. In .PRN files, if a character
  14101.      field is blank, a pair of quotation marks is written out,
  14102.      followed by the comma. If a numeric field is blank, 0 is
  14103.      written out. PRN files can be imported into 1-2- 3 by using
  14104.      the File Import Numbers
  14105.      command sequence in Lotus 1-2-3. The Lotus .PRN format is
  14106.      supported on export, but not import. To import a .PRN file
  14107.      created by 1-2-3 into PC-File, use the text editor format.
  14108.  
  14109.      Line delimited
  14110.  
  14111.      This format places each field on a separate line. It's
  14112.      sometimes called "field delimited" or "field per line" format.
  14113.      The only way to know where one record stops and another starts
  14114.      is to know exactly how many fields exist in each record. Each
  14115.      record must have the same number of lines. Blank fields are
  14116.      stored as blank lines. PeachText uses this format.
  14117.  
  14118.      Text editor or SDF format
  14119.  
  14120.      This format consists of fixed length fields with no separators
  14121.      between fields. The end of each record has a carriage return
  14122.      and sometimes a line-feed. This format is produced by many
  14123.      text editor and word processing programs, and is an
  14124.      export/import option in many database programs. If you were to
  14125.      look at a file in this format with your word processor, it
  14126.      would look like a columnar or tabular report, with each record
  14127.      on a separate line and each field starting at a fixed
  14128.      location.
  14129.  
  14130.      User-defined delimiter
  14131.  
  14132.      This format allows you to exchange data with programs that
  14133.      don't use one of the standard formats. You specify the field
  14134.      delimiter on import, and the field and record delimiter on
  14135.      export. When importing using this format, PC-File assumes the
  14136.      record delimiter is either a line-feed or carriage-
  14137.      return/line-feed.
  14138.  
  14139.      WordPerfect
  14140.  
  14141.      PC-File can transfer to or from WordPerfect secondary merge
  14142.      files and document files, but in most cases, you want to
  14143.      transfer data to and from the secondary merge files. For
  14144.      importing files, PC-File detects which version of WordPerfect
  14145.      you are using (4.2, 5.0, or 5.1) and handles the data
  14146.      accordingly. To export, choose the WordPerfect version you are
  14147.      exporting to when prompted.
  14148.  
  14149.      ASCII files
  14150.  
  14151.  
  14152.  
  14153.      PC-File Version 7 Users Guide                            242
  14154.  
  14155.  
  14156.      PC-File can import and export ASCII files. The ASCII formats
  14157.      supported by PC-File are fixed length, mail-merge, line
  14158.      delimited, text editor (.SDF), and Lotus .PRN
  14159.  
  14160.  
  14161.      Exporting Data
  14162.  
  14163.      Export data from a PC-File file when you want to use that data
  14164.      in another program or format. You can export all the data in
  14165.      the file or just selected records. You can also choose to
  14166.      export selected fields if you want.
  14167.  
  14168.      PC-File lets you select records as you export, viewing each
  14169.      record and exporting just those you want. Or you can choose
  14170.      just to export all the selected records without looking at
  14171.      them. Data is exported in sequence according to the current
  14172.      index.
  14173.  
  14174.      If you were exporting names and addresses for merging into a
  14175.      fundraising letter written in WordPerfect, you could select
  14176.      just the name and address fields and leave out extraneous
  14177.      fields such as the phone numbers. Plus, you could just select
  14178.      those members that live within a specific geographic area.
  14179.  
  14180.      The procedures for exporting data are the same for all format
  14181.      options except mail-merge and user-defined delimiter. Each of
  14182.      these two options requires an additional step, which is
  14183.      explained following the basic procedures.
  14184.  
  14185.      To export data:
  14186.  
  14187.      1.Make sure there is enough space on the receiving disk or
  14188.        drive to hold the data you are about to export. Fixed length
  14189.        and text editor formats occupy somewhat more disk space than
  14190.        .DBF files.
  14191.  
  14192.      2.Open the database from which you want to export data. You
  14193.        cannot export from a closed database.
  14194.  
  14195.      3.Choose Utilities from the menu bar.
  14196.  
  14197.      4.Choose Export from the Utilities menu. The export format
  14198.        dialog box displays.
  14199.  
  14200.      5.Choose the format type you want your exported file to take.
  14201.        The file selection dialog box displays.
  14202.  
  14203.      6.Choose the path and enter the file name you want to save the
  14204.        exported data to.
  14205.  
  14206.      7.Refer to additional steps described below if you chose an
  14207.        export format of mail-merge or user-defined delimited file.
  14208.  
  14209.  
  14210.  
  14211.      PC-File Version 7 Users Guide                            243
  14212.  
  14213.  
  14214.      8.Choose to flip the data or not. Choose Yes if the data
  14215.        contains a tilde (~) character and you want to flip the
  14216.        output. This is most likely in a mail-merge when you want to
  14217.        flip first and last names. Choose No if there is no data
  14218.        that needs to be flipped.
  14219.  
  14220.      9.Choose to export All or Some Fields. Choose Some if you want
  14221.        to limit the fields that are exported. PC- File displays the
  14222.        database fields in a check-off list box. Choose each field
  14223.        you want to export. A checkmark appears next to the fields
  14224.        that you choose. If you want to export a portion of a field,
  14225.        choose the Options button and designate the portion. Choose
  14226.        All to export all the fields in the database.
  14227.  
  14228.      10.  Choose to export All or Some Records. Choose Some if you
  14229.        want to limit the records that are exported. PC- File asks
  14230.        if you want to conduct a simple or formula search for the
  14231.        records. Choose the search mode and then enter the search
  14232.        criteria or command. See Chapter 7, "Finding and Modifying
  14233.        Data," for more information on searching. Choose All to
  14234.        export all records in the database, or to choose them as
  14235.        they are exported.
  14236.  
  14237.      11.  Choose Yes, No, All, or Quit once the export operation
  14238.        begins and the first record displays. Choose Yes to export
  14239.        the record displayed. Choose No if you don't want to export
  14240.        the displayed record. Choose All if you want to export the
  14241.        current record and all the remaining selected records
  14242.        without being asked again. Choose Quit to stop the
  14243.        operation.
  14244.  
  14245.      Mail-merge
  14246.  
  14247.      Various word processing programs handle the mail-merge format
  14248.      differently, so PC-File asks you to define a couple of
  14249.      additional options during the export process. The two steps
  14250.      below are inserted in the above procedures.
  14251.  
  14252.      1.   Choose Yes or No when asked if the first record of the
  14253.      exported file should contain the field names.
  14254.  
  14255.           Choose Yes if using a program like Microsoft Word, 
  14256.           which requires the field names in the first record.
  14257.  
  14258.           Choose No if field names are not required.
  14259.  
  14260.      2.   Choose Yes or No when asked if you want quotation 
  14261.           marks around every field.
  14262.  
  14263.           Choose Yes if the program you are exporting to 
  14264.           requires quotation marks around every field, even when 
  14265.           the field doesn't contain a comma. See your manual if 
  14266.           you are unsure about the program requirements.
  14267.  
  14268.           Choose No otherwise.
  14269.  
  14270.  
  14271.  
  14272.      PC-File Version 7 Users Guide                            244
  14273.  
  14274.  
  14275.      Continue on with step 8 in the main export procedures.
  14276.  
  14277.      User-defined Delimiter
  14278.  
  14279.      As the format name suggests, you get to define the delimiter
  14280.      used between fields and between records. A delimiter is a
  14281.      character used as a separator between each field and each
  14282.      record. The backslash (\) is the character sometimes used in
  14283.      non-standard programs.
  14284.  
  14285.      The steps below are inserted in the main export procedures.
  14286.  
  14287.      1.Choose the field delimiter. If you choose ASCII decimal
  14288.        value, PC-File prompts you to enter the value. If you choose
  14289.        Keyboard character, PC-File prompts you to enter the
  14290.        character. For example, you could choose Keyboard character,
  14291.        then enter a backslash in the text box that displays.
  14292.  
  14293.      2.Choose the record delimiter. Just as with the previous step,
  14294.        PC-File prompts you to enter the ASCII decimal value or the
  14295.        Keyboard character if you choose one of them as the option.
  14296.  
  14297.      3.Choose Yes or No when asked if the first record of the
  14298.        exported file should contain the field names. Choose Yes if
  14299.        using a program like Microsoft Word, which requires the
  14300.        field names in the first record. Choose No if field names
  14301.        are not required.
  14302.  
  14303.      Continue on with the rest of the main export procedures.
  14304.  
  14305.      NOTE: If you need to export to a format not supported by the
  14306.      export function, you can create a report in PC-File that
  14307.      converts the data to the correct format. Print the report to a
  14308.      disk file. It is then ready for use in the desired format.
  14309.  
  14310.      The exported file will have one of the following names:
  14311.  
  14312.           PC-File/dBASE  filename.DBF
  14313.  
  14314.           DIF            filename.DIF
  14315.  
  14316.           Fixed length   filename.FXD
  14317.  
  14318.           Lotus PRN           filename.PRN
  14319.  
  14320.           Mail-merge          filename.WS
  14321.  
  14322.           Line delimited      filename.LD
  14323.  
  14324.           Text editor    ilename.SDF
  14325.  
  14326.           User-defined   filename.USR
  14327.  
  14328.           WordPerfect    filename.WP
  14329.  
  14330.      Importing Data
  14331.  
  14332.  
  14333.  
  14334.      PC-File Version 7 Users Guide                            245
  14335.  
  14336.  
  14337.  
  14338.      You can import files or databases created with other programs.
  14339.      You can also use the import feature to append records from
  14340.      another PC-File database to the current database. PC-File
  14341.      imports the data into the current (opened) database.
  14342.  
  14343.      To import data, you have to open an existing database or
  14344.      define a new database to which it will be imported. Unlike the
  14345.      export process, you cannot create the receiving file (the
  14346.      current database) during the import process.
  14347.  
  14348.      The format of the import file determines certain requirements
  14349.      of the database, as follows:
  14350.  
  14351.      If you are importing from the text editor (.SDF) or fixed
  14352.      length format, the database must match the import file
  14353.      exactly. The database must be defined with the fields in the
  14354.      same sequence as they exist in the import file, with the same
  14355.      number of fields, and matching field lengths.
  14356.  
  14357.      If you are importing from another PC-File database or dBASE
  14358.      file, the database must have the same field lengths, but not
  14359.      necessarily the same number of fields. PC-File lets you map
  14360.      the fields from the database you are importing from to the
  14361.      fields of the open database.
  14362.  
  14363.      If you are importing from the line delimited format, the
  14364.      database must have the same number of fields in the same
  14365.      sequence as the file you are importing. Field lengths should
  14366.      be at least as long as those in the import file to avoid
  14367.      truncation of data.
  14368.  
  14369.      If you are importing from any other format, PC-File does not
  14370.      require that the import file have the same number of fields or
  14371.      matching field lengths, but does require the fields to be in
  14372.      the same order. If the import file contains more fields than
  14373.      the database, the extra fields are ignored. If the import file
  14374.      contains fewer fields than the database, the fields at the end
  14375.      of the record in the database are left blank. This is also
  14376.      true for field lengths. If the import file contains fields
  14377.      longer
  14378.      than those defined in the database, data in those fields are
  14379.      truncated to the database field length. If the import file
  14380.      contains fields which are shorter than the database, the extra
  14381.      spaces are filled with blanks.
  14382.  
  14383.      The files being imported can have any file extensions, except
  14384.      for dBASE files, which must have a .DBF extension, and DIF
  14385.      files, which must have a .DIF extension.
  14386.  
  14387.      Mapping Field Data from dBASE Files
  14388.  
  14389.      This section only applies to importing from dBASE files. If
  14390.      you are importing from any other format, skip ahead to the
  14391.      "Overview of Importing Process" section for a step-by-step
  14392.      description of the importing process.
  14393.  
  14394.  
  14395.  
  14396.      PC-File Version 7 Users Guide                            246
  14397.  
  14398.  
  14399.  
  14400.      PC-File allows you to readily import files from PC-File or any
  14401.      other software product that create dBASE III + compatible
  14402.      file. These files must have the .DBF file extension.
  14403.  
  14404.      After you have chosen the Normal DBF format and the
  14405.      appropriate file to import, the Mapping screen displays.
  14406.  
  14407.      If you are familiar with redefining a database structure,
  14408.      mapping will be quite familiar. Import mapping is quite
  14409.      similar to the process used in redefining a database
  14410.      structure.
  14411.  
  14412.      The Fields column shows the field name for the open database.
  14413.      The Comes From column shows which fields from the imported
  14414.      database are mapped to the fields in the Fields column.
  14415.  
  14416.      PC-File automatically maps all field names that match. If you
  14417.      have identical fields in the open database and the import
  14418.      database, you will see the same name in both the New Fields
  14419.      and the Come From columns for each identical field. In many
  14420.      cases, when PC-File has done the mapping for you, you cam
  14421.      simply choose OK to continue the importing process.
  14422.  
  14423.      However, if a field does not have a match, the Comes From
  14424.      column will be blank for that field-you must choose the data
  14425.      source for that field. For example, if you have a field name
  14426.      FIRST in the open database, but your import database has a
  14427.      field name FIRSTNAME, you must tell PC-File that you want the
  14428.      information from the FIRSTNAME to be put into the FIRST field.
  14429.  
  14430.      There are two ways to map your fields. You can select them by
  14431.      using the List button or by typing field names into the Comes
  14432.      From column directly.
  14433.  
  14434.      Selecting Fields Using the List Button
  14435.  
  14436.      You will need to map any fields that don't have an exact match
  14437.      with the fields in the open database. The List button provides
  14438.      a simple way to do this. Choosing the List button displays a
  14439.      list of the field names from the import database on the right
  14440.      side of the Mapping screen.
  14441.  
  14442.      The Import Fields List Box shows all the fields from the
  14443.      import database. All fields that have already been mapped by
  14444.      PC-File have a checkmark next to them. To map a field, put the
  14445.      cursor in the Comes From column next to the field in the
  14446.      Fields column you want to map. Then, choose a field from the
  14447.      Import Fields List. This inserts that field's name into the
  14448.      Comes From column.
  14449.  
  14450.      To map import fields with the List button:
  14451.  
  14452.  
  14453.  
  14454.      PC-File Version 7 Users Guide                            247
  14455.  
  14456.  
  14457.      Highlight the text box in the Come From column next to the
  14458.      Fields name you want to map. The text box should be empty.
  14459.      Choose the List button The Import Fields List displays on the
  14460.      right half of the screen. The cursor is active in the list.
  14461.      Click on the field you want to map, or navigate to the name of
  14462.      the field with the keyboard and press ENTER. The field name
  14463.      from the Import Field List is entered into the Come From list
  14464.      next to the field you choose in step 1. Repeat steps 1 through
  14465.      3 for each
  14466.      field you want to map. When you have finished mapping your
  14467.      fields, choose OK to continue the importing process.
  14468.  
  14469.      Selecting Fields by Typing Names
  14470.  
  14471.      Alternatively, you can map fields by simply typing the name of
  14472.      the import field in the appropriate Comes From text box. This
  14473.      may be a faster method if you are only using the keyboard.
  14474.      However, you must type in the name exactly as it is saved in
  14475.      the database. You can press ALT-L to display the Import Fields
  14476.      List for reference.
  14477.  
  14478.      To map your fields by typing names:
  14479.  
  14480.      Move the cursor to the text box next to the field you want to
  14481.      map. The box should be empty. Type in the name of the field
  14482.      that will be mapped from the import file. Repeat steps 1 and 2
  14483.      for each field you want to map. When you have finished mapping
  14484.      your fields, choose OK to continue the importing process.
  14485.  
  14486.  
  14487.      Overview of Importing Process
  14488.  
  14489.      To import data:
  14490.  
  14491.      Open the database into which the data is to be imported.
  14492.      Choose Utilities from the menu bar. Choose Import from the
  14493.      Utilities menu. The import format dialog box displays. Choose
  14494.      the format of the import file. If you select the User-defined
  14495.      delimiter option, PC-File asks you to choose the field
  14496.      delimiter; the record delimiter is set automatically as a
  14497.      carriage return/line feed. Choose the path and file name of
  14498.      the import file in the file selection dialog box. If you chose
  14499.      Normal DBF in step 4,
  14500.      you must map the fields as described above in, "Mapping Field
  14501.      Data from dBASE Files." Choose to append the new records to
  14502.      the current database or to overwrite the current database. If
  14503.      you choose to append, the imported records are added to the
  14504.      current database and will be ordered according to the current
  14505.      index. If you choose to overwrite, the current records are
  14506.      DELETED and the new records start at record 1. Choose to
  14507.      import All or Some records. Choose Some if you want to limit
  14508.      the records that
  14509.  
  14510.  
  14511.  
  14512.      PC-File Version 7 Users Guide                            248
  14513.  
  14514.  
  14515.      are imported. PC- File asks if you want to conduct a simple or
  14516.      formula search for the records. Choose the search mode and
  14517.      then enter the search criteria or command. See Chapter 5,
  14518.      "Finding and Modifying Data," for more information on
  14519.      searching. Choose All to import all records in the database,
  14520.      or to let yourself choose them as they are imported. Choose
  14521.      Yes, No, All, or Quit once the import operation begins and the
  14522.      first record displays. Choose Yes to import the record
  14523.      displayed. Choose No if
  14524.      you don't want to import the displayed record. Choose All if
  14525.      you want to import the current record and all the remaining
  14526.      records without being asked again. Choose Quit to stop the
  14527.      operation.
  14528.  
  14529.  
  14530.      NOTE: It is recommended that you choose Yes for the first few
  14531.      records to make sure they are being imported properly. If they
  14532.      are not, choose Quit to stop the operation. Check to see that
  14533.      the current database matches the import file in the ways it is
  14534.      supposed to (as described previously). Make whatever
  14535.      adjustments are necessary and begin the import operation
  14536.      again.
  14537.  
  14538.  
  14539.  
  14540.      PC-File Version 7 Users Guide                            249
  14541.  
  14542.  
  14543.  
  14544.      Managing Files
  14545.  
  14546.      Most people use DOS commands or, if they have Windows, the
  14547.      File Manager, to copy, delete, and rename files. However, you
  14548.      may find it easier to use the File Management option in PC-
  14549.      File to perform those functions on your database files.
  14550.  
  14551.      PC-File creates several files as you define a database,
  14552.      including a header file, data file, configuration file, memo
  14553.      file, and separate files for each index. In addition, every
  14554.      report, graph, and letter you create adds a new file. Making a
  14555.      copy of all those files using a DOS command could be
  14556.      confusing, particularly if you have more than one database in
  14557.      a directory.
  14558.  
  14559.      With the File Management option, however, PC-File lists the
  14560.      files associated with a database and lets you copy, delete, or
  14561.      rename those files in groups or, to a limited extent,
  14562.      individually.
  14563.  
  14564.      You can perform file management functions on either an open or
  14565.      closed database.
  14566.  
  14567.      Types of Database Files
  14568.  
  14569.      Whether you choose to copy, delete, or rename a file or
  14570.      database, PC- File displays a list of the types of files in
  14571.      the database.
  14572.  
  14573.      Choose the option from the list that suits your purpose. The
  14574.      Database and Report options include all the files that have
  14575.      their file extensions listed. The remaining options only
  14576.      include individual files with the extension shown.
  14577.  
  14578.      If, for example, you wanted to copy a database to a floppy
  14579.      disk, you would choose the first option, Database files. All
  14580.      the database files that include the listed extensions would be
  14581.      copied to the disk. If you wanted to copy the two database
  14582.      reports that you had defined as well, you would have to repeat
  14583.      the copy operation twice, once for each report, choosing the
  14584.      Report files option from the above list during the process.
  14585.  
  14586.      Copying a File
  14587.  
  14588.      The Copy option is useful for making backup copies of your
  14589.      database, for making a copy to take to another machine, and
  14590.      for a variety of other purposes. It is important that you make
  14591.      a backup copy of your database(s) and associated files, and
  14592.      update the backup on a regular basis. You never know when you
  14593.      might need to refer to a backup copy. See Chapter 1,
  14594.      "Navigating in PC-File," for more information on backing up
  14595.      your database.
  14596.  
  14597.      NOTE: If you want to copy your database to make changes to the
  14598.      structure, use the Redefine option on the File menu instead.
  14599.  
  14600.  
  14601.  
  14602.      PC-File Version 7 Users Guide                            250
  14603.  
  14604.  
  14605.  
  14606.      When you copy a database, you must either give the copy a
  14607.      unique name or place it on a separate directory or disk from
  14608.      the current database. Otherwise you will overwrite the current
  14609.      database files.
  14610.  
  14611.      Be sure you have enough space for copying the database files.
  14612.      If you are copying to a floppy disk and your database takes up
  14613.      more space than is available on the disk, you can use the DOS
  14614.      BACKUP command, or various software backup utilities.
  14615.  
  14616.      To copy files:
  14617.  
  14618.      1.Choose Utilities from the menu bar.
  14619.  
  14620.      2.Choose File Management from the Utilities menu.
  14621.  
  14622.      3.Choose Copy from the File Management dialog box.
  14623.  
  14624.      4.Choose the type of file(s) you want to copy.
  14625.  
  14626.      5.Choose the file or database that you want to copy.
  14627.  
  14628.      6.Enter the drive, path, and file or database name that you
  14629.        want to copy to. If you are copying to a different drive or
  14630.        path, you can give the file or database the same name. If
  14631.        you are copying to the same drive and path, you must give
  14632.        the file a new name.
  14633.  
  14634.      PC-File copies the file(s).
  14635.  
  14636.      Deleting a File
  14637.  
  14638.      To delete files:
  14639.  
  14640.      1.Choose Utilities from the menu bar.
  14641.  
  14642.      2.Choose File Management from the Utilities menu.
  14643.  
  14644.      3.Choose Delete from the File Management dialog box.
  14645.  
  14646.      4.Choose the type of file(s) you want to delete.
  14647.  
  14648.      5.Choose the file or database that you want to delete.
  14649.  
  14650.      6.Choose Yes to confirm the deletion. Choose No if you decide
  14651.        not to delete the file or database.
  14652.  
  14653.      PC-File deletes the file(s).
  14654.  
  14655.      When you delete database files, PC-File first looks in the
  14656.      header file for the names of the index files. The index files
  14657.      are deleted along with the other database files.
  14658.  
  14659.      You can delete the database that is currently open. If you do,
  14660.      the result is that no database is open.
  14661.  
  14662.  
  14663.  
  14664.      PC-File Version 7 Users Guide                            251
  14665.  
  14666.  
  14667.  
  14668.      Renaming a File
  14669.  
  14670.      To rename files:
  14671.  
  14672.      1.Choose Utilities from the menu bar.
  14673.  
  14674.      2.Choose File Management from the Utilities menu.
  14675.  
  14676.      3.Choose Rename from the File Management dialog box.
  14677.  
  14678.      4.Choose the type of file(s) you want to rename.
  14679.  
  14680.      5.Choose the file or database that you want to rename.
  14681.  
  14682.      6.Enter the new name for the file or database. The name must
  14683.        be unique within the directory and follow DOS filename
  14684.        rules.
  14685.  
  14686.      PC-File renames the file(s).
  14687.  
  14688.      Configuring Your Database
  14689.  
  14690.      Once installed, PC-File is configured and ready to run. All
  14691.      the necessary configuration parameters are defined. Many of
  14692.      the parameters, such as screen color and case sensitivity, are
  14693.      set by defaults in the program. Others, such as mode of
  14694.      operation and printer port, are determined during
  14695.      installation.
  14696.  
  14697.      However, the configuration parameters can be altered at any
  14698.      time. For example, you can change the screen colors, add
  14699.      password limitations, or set a default database to open when
  14700.      you start PC-File.
  14701.  
  14702.      In addition, PC-File lets you define a different set of
  14703.      configuration parameters for each database. Thus, you could
  14704.      define different color combinations for each database. PC-File
  14705.      even lets you define auxiliary sets of parameters that can be
  14706.      pulled up for special purposes, such as connecting to an
  14707.      alternative printer.
  14708.  
  14709.      There are eight basic parameters that can be defined in your
  14710.      configuration, some of which include multiple settings. They
  14711.      are described briefly here and in more detail later in the
  14712.      chapter.
  14713.  
  14714.      Parameter: Description
  14715.  
  14716.      Display :Turn graphics mode ON or OFF and set your screen
  14717.      colors
  14718.  
  14719.      Printer: Determine printer port, printer, and page length
  14720.  
  14721.      Default Date Format: Set the default display format for date-
  14722.      type fields
  14723.  
  14724.  
  14725.  
  14726.      PC-File Version 7 Users Guide                            252
  14727.  
  14728.  
  14729.  
  14730.      Phone Dialer: Determine the modem port and enter dialing codes
  14731.      and prefixes
  14732.  
  14733.      Snapshot: Define the mailing label formats and printer port
  14734.  
  14735.      Passwords: Define passwords for a database
  14736.  
  14737.      Case sensitive: Define whether PC-File distinguishes between
  14738.      uppercase and lowercase letters during sorts and searches
  14739.  
  14740.      Default database: Open a specific database automatically upon
  14741.      starting PC-File
  14742.  
  14743.  
  14744.      Configuration Files
  14745.  
  14746.  
  14747.      PC-File allows for multiple configurations. Each configuration
  14748.      profile is maintained in a separate file. Configuration files
  14749.      use the extension .PRO.
  14750.  
  14751.      There are three types of configuration files:
  14752.  
  14753.      Master profile
  14754.  
  14755.      The master configuration file is called PCFILE.PRO. If you
  14756.      have only one configuration file, this is it. This file was
  14757.      installed with your other program files, and should remain in
  14758.      the directory with those files. PCFILE.PRO contains the
  14759.      configuration defaults, including those set during
  14760.      installation.
  14761.  
  14762.      Database profiles
  14763.  
  14764.      Profiles associated with specific databases need to be named
  14765.      after the database (databasename.PRO). You can define a
  14766.      separate profile for each database. If PC-File finds a profile
  14767.      of the same name as the database when you open a database, it
  14768.      loads the configuration settings in that profile, overriding
  14769.      PCFILE.PRO.
  14770.  
  14771.      Databasename.PRO files should be located in the same
  14772.      directories as the databases with which they are associated.
  14773.  
  14774.      Auxiliary profiles
  14775.  
  14776.      Auxiliary profiles can also be defined, using whatever name
  14777.      you want (as long as you follow DOS filename rules) with the
  14778.      extension .PRO. Auxiliary profiles can be loaded as needed.
  14779.  
  14780.      Auxiliary profiles can be located anywhere, as you can define
  14781.      the path when you load them. However, if an auxiliary profile
  14782.      is associated with a specific database, it is easiest to
  14783.      locate the profile in the same directory as the other database
  14784.      files.
  14785.  
  14786.  
  14787.  
  14788.      PC-File Version 7 Users Guide                            253
  14789.  
  14790.  
  14791.  
  14792.      Why Define Additional Profiles?
  14793.  
  14794.      PCFILE.PRO may prove to be the only configuration profile you
  14795.      need. If you define and use just one database, you can fit the
  14796.      configuration to that database. You can always modify it if
  14797.      you buy a new printer, add a modem, or simply want to change
  14798.      your screen colors. You can also modify it temporarily. For
  14799.      example, you could switch your screen colors for a few
  14800.      sessions, then switch back.
  14801.  
  14802.      Even with several databases, the master profile may prove to
  14803.      be all you need. It's when your system gets more sophisticated
  14804.      that multiple profiles begin to become useful. The most likely
  14805.      reasons for using several profiles are:
  14806.  
  14807.      Using more than one printer Using passwords in multiple
  14808.      databases Defining separate snapshot label layouts for
  14809.      different databases
  14810.  
  14811.      Database profiles are practically a necessity for using
  14812.      passwords, which are normally designed to limit access to a
  14813.      particular database or part of a database.
  14814.  
  14815.      There may be other reasons for defining multiple profiles as
  14816.      well. One particular database may require case sensitivity in
  14817.      sorting, while others may not. Or you might want to define
  14818.      different color schemes for each database, making it always
  14819.      easy to tell which one is open.
  14820.  
  14821.      Which Profile is Current?
  14822.  
  14823.      When you choose Configuration from the Utilities menu, the
  14824.      current configuration profile displays on the screen. However,
  14825.      it is important to understand which profile gets loaded when,
  14826.      without having to call up the screen to read the title bar.
  14827.      The following guidelines apply:
  14828.  
  14829.      PCFILE.PRO is loaded automatically when you start PC-File, as
  14830.      long as you start PC-File from a directory containing a copy
  14831.      of PCFILE.PRO. (You can copy the master profile to as many
  14832.      directories as you want.) Thus, if you have set the path for
  14833.      PC-File in your AUTOEXEC.BAT file and start the program from
  14834.      some other directory, copy the master profile to that
  14835.      directory.
  14836.  
  14837.      If you start PC-File from a directory that doesn't contain
  14838.      PCFILE.PRO, no profile is in effect. In that case, PC-File
  14839.      assumes certain defaults. These defaults are listed below.
  14840.  
  14841.      If you have created a databasename.PRO, that profile takes
  14842.      effect when you open the associated database, as long as the
  14843.      profile is in the same directory. The database profile
  14844.      overrides PCFILE.PRO, but only to the extent that it differs
  14845.      from the master profile.
  14846.  
  14847.  
  14848.  
  14849.      PC-File Version 7 Users Guide                            254
  14850.  
  14851.  
  14852.      If PC-File can't find a profile on the current directory, it
  14853.      assumes certain defaults. The defaults are:
  14854.  
  14855.      Parameter: Default
  14856.  
  14857.      Display mode:  Graphics (VGA, EGA, and Hercules-compatible
  14858.      monochrome); Character (CGA)
  14859.  
  14860.      Display colors:  Nautical (VGA, EGA, and CGA); Black & White
  14861.      (mono)
  14862.  
  14863.      Printer port:  LPT1
  14864.  
  14865.      Page length:  66
  14866.  
  14867.      Default Date Format:  MM/DD/YYY (Month-Day-Year, 4-digit, and
  14868.      Slash)
  14869.  
  14870.      Modem port:  COM1
  14871.  
  14872.      Long distance code:  1
  14873.  
  14874.      Modem dialing code:  ATD
  14875.  
  14876.      Case sensitive searches:  Off
  14877.  
  14878.      Case sensitive indexes Off
  14879.  
  14880.  
  14881.      The Configuration Window
  14882.  
  14883.      You can open a configuration window whether a profile is
  14884.      currently loaded or not. The configuration window is a dialog
  14885.      box with a menu bar.
  14886.  
  14887.      To open the configuration window:
  14888.  
  14889.      1.Choose Utilities from the menu bar.
  14890.  
  14891.      2.Choose Configuration from the Utilities menu.
  14892.  
  14893.      The window displays the different parameters that you can set.
  14894.      The three command buttons in the lower left corner of the
  14895.      window display dialog boxes.
  14896.  
  14897.      The Configuration Menu
  14898.  
  14899.      The menu bar at the top has two options. Help! displays a Help
  14900.      window. The File option displays a pull-down menu of options.
  14901.  
  14902.      Use the options on Configuration menu as follows:
  14903.  
  14904.      Option:  Description
  14905.  
  14906.      Load:  Load and display an existing profile
  14907.  
  14908.  
  14909.  
  14910.      PC-File Version 7 Users Guide                            255
  14911.  
  14912.  
  14913.      Save:  Save the current profile
  14914.  
  14915.      Save As:  Save the current profile to a new name
  14916.  
  14917.      Exit:  Quit the configuration window
  14918.  
  14919.  
  14920.      The options on the File menu are explained below.
  14921.  
  14922.      Loading a Profile
  14923.  
  14924.      Loading an existing profile and displaying it on the screen
  14925.      are a single operation.
  14926.  
  14927.      To load and display a profile:
  14928.  
  14929.      1.Choose File from the configuration window menu bar.
  14930.  
  14931.      2.Choose Load from the File menu. The file selection dialog
  14932.        box displays.
  14933.  
  14934.      3.Choose the profile you want to open.
  14935.  
  14936.      The profile is loaded into memory and displayed on the screen.
  14937.  
  14938.      To close the configuration window, choose Exit from the
  14939.      configuration window File menu. The window closes, but the
  14940.      profile remains active.
  14941.  
  14942.  
  14943.      Modifying a Profile
  14944.  
  14945.      To modify a profile, display the configuration window and make
  14946.      your changes to the parameters. If the profile you want to
  14947.      modify is currently loaded into memory, all you have to do is
  14948.      display it on the screen. If you want to modify another
  14949.      profile, you must first load that profile. Follow the
  14950.      procedure outlined above for loading a profile.
  14951.  
  14952.      Once you modify a profile, you must save your changes.
  14953.      Choosing Save from the File menu saves to the name you loaded,
  14954.      choosing Save As allows you to save to a new name.
  14955.  
  14956.      To save a modified profile to its original name:
  14957.  
  14958.      1.Choose File from the configuration window menu bar.
  14959.  
  14960.      2.Choose Save from the File menu.
  14961.  
  14962.      The profile is saved.
  14963.  
  14964.      To save a modified profile to a new name:
  14965.  
  14966.      1.Choose File from the configuration window menu bar.
  14967.  
  14968.      2.Choose Save As. The file selection dialog box displays.
  14969.  
  14970.  
  14971.  
  14972.      PC-File Version 7 Users Guide                            256
  14973.  
  14974.  
  14975.  
  14976.      3.Enter a new name in the text box.
  14977.  
  14978.      The changes you made are saved to the new name.
  14979.  
  14980.      Creating a New Profile
  14981.  
  14982.      You can create a new profile in the same manner as you modify
  14983.      an existing one, except you give the profile a new name. You
  14984.      would only use this method to create an auxilliary profile
  14985.      that is loaded on demand.
  14986.  
  14987.      To define a new profile:
  14988.  
  14989.      1.Display the configuration window.
  14990.  
  14991.      2.Make any necessary changes to the parameters.
  14992.  
  14993.      3.Choose Save As from the File menu.
  14994.  
  14995.      4.Enter a new name for the profile in the text box.
  14996.  
  14997.      The new profile is now loaded in memory.
  14998.  
  14999.  
  15000.      The Configuration Parameters
  15001.  
  15002.      When you choose Configuration from the Utilities menu, the
  15003.      configuration profile currently loaded in memory displays.
  15004.  
  15005.      Each of the profile options is explained below.
  15006.  
  15007.      Display Mode
  15008.  
  15009.      PC-File operates in two modes: Graphics mode and Character
  15010.      mode. Graphics mode is designed for VGA, EGA, and Hercules-
  15011.      compatible monochrome monitors, Character mode for CGA
  15012.      monitors. PC-File determined which type of monitor you were
  15013.      using when you installed the program and set the mode
  15014.      accordingly. You can switch modes in certain cases, however.
  15015.      When you can switch and why you might want to are explained in
  15016.      Chapter 1, "Navigating in PC-File."
  15017.  
  15018.      To switch modes:
  15019.  
  15020.      1.Choose the Graphics mode check-off box.
  15021.  
  15022.      PC-File is operating in graphics mode when the box is checked,
  15023.      in character mode when it's not. However, you have to exit PC-
  15024.      File and start it again for a change in mode to take effect.
  15025.  
  15026.      Screen Colors
  15027.  
  15028.  
  15029.  
  15030.      PC-File Version 7 Users Guide                            257
  15031.  
  15032.  
  15033.      PC-File provides four pre-defined color schemes, allowing you
  15034.      to change the color patterns on your screen. Each color scheme
  15035.      includes pre-set foreground and background color settings.
  15036.      Additionally, PC- File provides the Customize option that lets
  15037.      you specify the colors for particular screen elements so you
  15038.      can customize your screen colors.
  15039.  
  15040.      The Nautical color scheme is the default for all color monitor
  15041.      cards; Black & White is the default for Hercules cards. If you
  15042.      have a CGA card with a monochrome monitor or an LCD, you might
  15043.      want to switch to Black & White if you didn't during
  15044.      installation.
  15045.  
  15046.      To select a pre-defined color scheme:
  15047.  
  15048.      1.Choose the option button you want.
  15049.  
  15050.      The colors on your screen change immediately to reflect your
  15051.      choice.
  15052.  
  15053.      Customizing Screen Colors
  15054.  
  15055.      Choosing the Customize button to the right of the User option
  15056.      button displays the Design Colors dialog box.
  15057.  
  15058.      Choosing an option in the list box sets either the background
  15059.      or the foreground color of the designated screen element (with
  15060.      the exception of Window Border, which has only one option).
  15061.      When you choose an option from the list box, that option is
  15062.      highlighted and a checkmark displays to its left indicating it
  15063.      is active. The 16 colored buttons to the right of the list box
  15064.      both set and indicate the current color of the active screen
  15065.      element. An "X" on the color button indicates which color is
  15066.      active for the current screen element.
  15067.  
  15068.      To set colors, choose an item from the list, then choose the
  15069.      desired color button. New color settings are effective
  15070.      immediately, reflected in the colors of the Design Colors
  15071.      dialog box and screen areas visible behind it.
  15072.  
  15073.      If you make a color choice that makes the screen unreadable,
  15074.      such as choosing the same color for both the background and
  15075.      foreground of a screen element, choose another color button.
  15076.      If you decide you don't like the color choices you have made
  15077.      and want to start over, press ESC or choose Cancel. This
  15078.      returns you to the main Configuration window and restores your
  15079.      original colors. Choosing Customize again at this point re-
  15080.      displays the Design Colors dialog box.
  15081.  
  15082.      To customize screen colors:
  15083.  
  15084.      1.Choose Customize.
  15085.  
  15086.      2.Choose a screen element to change from the list box.
  15087.  
  15088.      3.Choose the desired color button.
  15089.  
  15090.  
  15091.  
  15092.      PC-File Version 7 Users Guide                            258
  15093.  
  15094.  
  15095.  
  15096.      4.Repeat steps 2 and 3 for each area you want to customize.
  15097.  
  15098.      5.Choose OK when you are done setting colors.
  15099.  
  15100.      Printer
  15101.  
  15102.      These parameters let you set the default page length, printer,
  15103.      and printer port for your system. You can override these
  15104.      defaults when you print a report, letter, graph, or set of
  15105.      mailing labels if necessary.
  15106.  
  15107.      To set printer defaults:
  15108.  
  15109.      1.Enter a default page length if different than 66 lines per
  15110.        page. Sixty-six is the standard page length for a dot matrix
  15111.        printer. If you use a laser printer, you probably want to
  15112.        set the page length at 60. If you use paper of a different
  15113.        length, or your printer uses a different line spacing,
  15114.        adjust the page length accordingly.
  15115.  
  15116.      2.Choose the printer from the list box. If your printer is not
  15117.        listed, press F1 to display the Help window. A list of
  15118.        printers compatible with those shown in the list box
  15119.        displays. If you still don't see your printer, and your
  15120.        printer manual doesn't mention one of the listed printers as
  15121.        compatible, choose User codes from the list. A dialog box
  15122.        displays, allowing you to define the printer codes yourself.
  15123.        Your printer manual If you intend to print to disk rather
  15124.        than to a printer, choose No codes. Printer codes appear as
  15125.        scrambled text and symbols when printed to a file, so it is
  15126.        better to omit them.
  15127.  
  15128.      Choose the printer port.
  15129.  
  15130.      Default Date Format
  15131.  
  15132.      PC-File provides you with convenient ways to format your
  15133.      dates. Using the Default Date Format options in the
  15134.      Configuration window, will apply to any date fields which
  15135.      don't have Date Format field attributes set with the Field
  15136.      Attributes option on the File menu. To have all your date
  15137.      fields display in the same format, use the Default Date Format
  15138.      options in the Configuration window.
  15139.  
  15140.      The default format is Month-Day-Year order, four digit year
  15141.      and slashes (/) as separators. The resulting date for December
  15142.      29, 1961, would be as follows:
  15143.  
  15144.      12/29/1961
  15145.  
  15146.      You change your default date format by changing each of the
  15147.      elements of the format: order, year and separator. Make the
  15148.      choice for each element that accurately reflects your desired
  15149.      date format.
  15150.  
  15151.  
  15152.  
  15153.      PC-File Version 7 Users Guide                            259
  15154.  
  15155.  
  15156.      PC-File can accomodate many date formats including those used
  15157.      throughout Europe and Japan. In Switzerland, you might choose
  15158.      Day- Month-Year order, four digit year, and period (.) as a
  15159.      separator. The resulting date would be as follows:
  15160.  
  15161.      29.12.1961
  15162.  
  15163.      To set the default date format:
  15164.  
  15165.      1.Choose an order for month, day and year.
  15166.  
  15167.      2.Choose either two or four digit years.
  15168.  
  15169.      3.Choose a separator to use between the elements.
  15170.  
  15171.      Phone Dialer
  15172.  
  15173.      If you use the autodialing feature of PC-File, you'll want to
  15174.      check the dialer parameters in your configuration profile. You
  15175.      can define the modem port, dialing code, long distance prefix,
  15176.      and access prefix. Some of these parameters have defaults that
  15177.      you may need to change.
  15178.  
  15179.      To define dialing parameters:
  15180.  
  15181.      1.Choose the Phone dialer command button from the
  15182.        configuration window. A dialog box displays.
  15183.  
  15184.      2.Define the parameters to fit your system.
  15185.  
  15186.      3.Choose OK.
  15187.  
  15188.      The dialing parameters are defined as follows:
  15189.  
  15190.      Dialing port
  15191.  
  15192.      PC-File assumes your modem is connected to the COM1 port. If
  15193.      it is connected to one of the other COM ports, change the
  15194.      profile accordingly.
  15195.  
  15196.      Modem dialing command
  15197.  
  15198.      The dialing command activates the modem. It essentially tells
  15199.      the modem that you are about to make a call. The default
  15200.      dialing command is ATD. ATD is used with Hayes-compatible
  15201.      modems to make either pulse or tone calls. You can change the
  15202.      command to ATDT if you want to force the modem to use tones, a
  15203.      slightly faster process. You must have a touchtone phone, in
  15204.      that case. You can enter other codes if necessary. See your
  15205.      modem manual for more information.
  15206.  
  15207.      Line access prefix
  15208.  
  15209.      The line access prefix is the number required to dial outside
  15210.      of your office telephone system. Most often this is the number
  15211.      9. Enter the appropriate prefix for your telephone system.
  15212.  
  15213.  
  15214.  
  15215.      PC-File Version 7 Users Guide                            260
  15216.  
  15217.  
  15218.  
  15219.      Long distance prefix
  15220.  
  15221.      The default long distance prefix is 1. If your particular
  15222.      phone system requires a different prefix, enter that here.
  15223.  
  15224.      PC-File sends the long distance prefix when dialing phone
  15225.      numbers that are 10 digits or longer, unless the phone number
  15226.      begins with a zero. For long distance calls outside of the
  15227.      U.S. and Canada, incorporate the long distance prefix into the
  15228.      phone number in your database. When PC-File reads a number
  15229.      that starts with 0, it skips the long distance prefix in your
  15230.      configuration.
  15231.  
  15232.      Also, you should enter "1" in your phone number field for long
  15233.      distance calls within your area, unless your phone company
  15234.      requires you to dial the local area code for long distance
  15235.      calls. If your phone company requires area codes for all long
  15236.      distance calls, enter the area code in your phone number field
  15237.      for all long distance numbers and PC-File will automatically
  15238.      send the long distance prefix.
  15239.  
  15240.      Snapshot
  15241.  
  15242.      The snapshot feature lets you print mailing labels one at a
  15243.      time. If you intend to print snapshot labels, you must follow
  15244.      these initial steps:
  15245.  
  15246.      1.Define the label report.
  15247.  
  15248.      2.Assign the label report to a snapshot.
  15249.  
  15250.      3.Define the output (printer port or file).
  15251.  
  15252.      Steps 2 and 3 are implemented in the configuration profile,
  15253.      and are explained here. Defining a label report is covered
  15254.      Chapter 9, "Using the Mail Label Format." Printing a snapshot
  15255.      is discussed in greater detail in the section on snapshot
  15256.      labels in Chapter 15, "Tools."
  15257.  
  15258.      You can assign up to five labels in a profile. Each label is
  15259.      assigned to a number, which you select when you print the
  15260.      label.
  15261.  
  15262.      Labels are normally assigned within a databasename.PRO file,
  15263.      as you would generally associate a label with a particular
  15264.      database. However, you can assign labels in PCFILE.PRO if you
  15265.      expect to use them with several databases that share the same
  15266.      field names, or if you only have one database.
  15267.  
  15268.      To assign a label and define the output:
  15269.  
  15270.      1.buttons Choose the Snapshot button. A dialog box with five
  15271.        numbered displays.
  15272.  
  15273.  
  15274.  
  15275.      PC-File Version 7 Users Guide                            261
  15276.  
  15277.  
  15278.      2.Choose the number to which you want to assign the label. A
  15279.        file selection dialog box displays.
  15280.  
  15281.      3.Choose the report upon which the label is based. The output
  15282.        dialog box displays.
  15283.  
  15284.      4.Choose the printer port or file.
  15285.  
  15286.      If you choose file, PC-File prompts you to name the file.
  15287.      Repeat these steps for each snapshot label.
  15288.  
  15289.      Passwords
  15290.  
  15291.      PC-File allows you to define passwords to prohibit access to
  15292.      specific operations within the program. You can define
  15293.      passwords for all your databases, or for specific databases.
  15294.  
  15295.      The passwords do NOT protect databases from being accessed by
  15296.      unauthorized persons. Passwords in PC-File are mainly designed
  15297.      to prevent users from accidentally performing operations that
  15298.      they don't normally do.
  15299.  
  15300.      If you define a password for a particular function, you must
  15301.      enter the correct password when you access that function. For
  15302.      example, if you define a password for adding data, PC-File
  15303.      prompts you for the password when you choose Add on the Edit
  15304.      menu. If you don't enter the correct password, PC-File won't
  15305.      let you add new records.
  15306.  
  15307.      To prohibit access to certain operations within a specific
  15308.      database, define a database profile and determine your
  15309.      passwords within that profile. If you want to prohibit access
  15310.      within all your databases, you can define passwords within the
  15311.      master profile. If you don't define passwords for a database,
  15312.      all users of the database can perform any operation on that
  15313.      database.
  15314.  
  15315.      You can control access to the following operations with
  15316.      passwords:
  15317.  
  15318.        Adding records (Add)
  15319.  
  15320.        Modifying records (Modify)
  15321.  
  15322.        Deleting records (Delete)
  15323.  
  15324.        Opening the database (Read)
  15325.  
  15326.        Accessing the Utilities menu options and the record, modify,
  15327.        and delete macro options (and associated hot keys).
  15328.        (Utilities)
  15329.  
  15330.        Accessing the Print menu options (Print)
  15331.  
  15332.  
  15333.  
  15334.      PC-File Version 7 Users Guide                            262
  15335.  
  15336.  
  15337.      PC-File passwords are from one to three characters long and
  15338.      can include any character on the keyboard. Here are some valid
  15339.      passwords:
  15340.  
  15341.           TED
  15342.  
  15343.           JR
  15344.  
  15345.           911
  15346.  
  15347.           ?%#
  15348.  
  15349.           Hi!
  15350.  
  15351.      Passwords are not case sensitive, so you can type in Ted, ted,
  15352.      or TED for the password TED.
  15353.  
  15354.      If you want, you can use the same password for all password
  15355.      options.
  15356.  
  15357.      NOTE: If you define passwords, write your passwords down
  15358.      somewhere. It's embarrassing to get locked out of your own
  15359.      database.
  15360.  
  15361.      To define passwords:
  15362.  
  15363.      1.Open the appropriate profile.
  15364.  
  15365.      2.Choose the Password command button in the configuration
  15366.        window. The password dialog box displays.
  15367.  
  15368.      3.Type in a password in the text box for each operation that
  15369.        you want to control. Passwords display in the Password
  15370.        dialog box; however, they don't display as you type them in
  15371.        when accessing a restricted part of the program.
  15372.  
  15373.      4.Choose OK.
  15374.  
  15375.      Case Sensitive
  15376.  
  15377.      PC-File normally treats uppercase and lowercase letters the
  15378.      same throughout the program. However, you can require that PC-
  15379.      File distinguish between the two during searches and/or sorts.
  15380.  
  15381.      With case sensitive searching, PC-File finds records based
  15382.      precisely on how you enter the search criteria. For example,
  15383.      if you request all records for WALLA WALLA, records for Walla
  15384.      Walla and walla walla are not displayed as a result of the
  15385.      search.
  15386.  
  15387.  
  15388.  
  15389.      PC-File Version 7 Users Guide                            263
  15390.  
  15391.  
  15392.      With case sensitive indexing, PC-File sorts records based on
  15393.      the rule that uppercase letters precede lowercase letters. For
  15394.      example, BOTHELL would come before Bellevue, as an uppercase O
  15395.      comes before a lowercase e. For the same reason, anchorage
  15396.      would follow Tacoma in a sorted list, and les Baux would
  15397.      follow Zurich. If you change case sensitivity, you have to
  15398.      rebuild existing indexes, using the Index option on the File
  15399.      menu, for the change to take effect.
  15400.  
  15401.      To turn case sensitivity ON:
  15402.  
  15403.      1.Place a check in the appropriate box by choosing it.
  15404.  
  15405.      Generally, if you want case sensitivity, you would select it
  15406.      for both searches and sorts.
  15407.  
  15408.      Default Database
  15409.  
  15410.      If you use a particular database all or most of the time, you
  15411.      can prompt PC-File to open that database for you automatically
  15412.      when you start PC-File.
  15413.  
  15414.      Define a database default in the master profile (PCFILE.PRO)
  15415.      only. Defining a default database in a database profile is
  15416.      redundant, as a specific database profile doesn't get loaded
  15417.      until the database is opened.
  15418.  
  15419.      To enter a default database:
  15420.  
  15421.      1.Type the drive, path, and database name in the appropriate
  15422.        text boxes.
  15423.  
  15424.      Enter only the drive letter; no colon is necessary. However,
  15425.      the backslash is necessary before a directory name.
  15426.  
  15427.      You can define just the drive or just the drive and directory
  15428.      if you want. A default path provides a shortcut if you use
  15429.      several databases regularly that are located on the same drive
  15430.      or even in the same directory. It makes opening the database
  15431.      just a little bit quicker.
  15432.  
  15433.      Advanced Profile Parameters
  15434.  
  15435.      Configuration profiles are relatively easy to understand and
  15436.      define when viewed in the configuration window. However, a
  15437.      profile can also be edited or viewed with a text editor (or
  15438.      word processing program). Profiles viewed through a text
  15439.      editor display the parameters as commands, rather than
  15440.      buttons, check boxes, or other forms that they take in the
  15441.      configuration window. For example, to select a printer port in
  15442.      the configuration window, you choose one of the seven option
  15443.      buttons. The same
  15444.      parameter is represented by the command /PRPORT,x (where x is
  15445.      the name of the printer port) when viewed with a text editor.
  15446.  
  15447.  
  15448.  
  15449.      PC-File Version 7 Users Guide                            264
  15450.  
  15451.  
  15452.      The major reason for accessing a configuration profile with a
  15453.      text editor is that you can add several parameters here that
  15454.      you can't add in the configuration window.
  15455.  
  15456.      Editing a Profile With a Text Editor
  15457.  
  15458.      To edit a profile with a text editor, start the editor and
  15459.      open the appropriate .PRO file. You will see a file that looks
  15460.      like this:
  15461.  
  15462.      /VIEW,R
  15463.      /PAGELEN,66
  15464.      /PHPORT,COM1
  15465.      /PHINIT,ATD
  15466.      /PHLONG,1,
  15467.      /PRPORT,LPT1
  15468.      /PRINTER,No_Codes
  15469.  
  15470.      Only parameters you have changed appear in the file. The
  15471.      defaults are stored within the program and do not show up in
  15472.      this file.
  15473.  
  15474.      You can add parameters to the file by typing them in at the
  15475.      end of the current text. Place each parameter on a separate
  15476.      line.
  15477.  
  15478.      Hidden Profile Commands
  15479.  
  15480.      Several parameters that you can't add in the configuration
  15481.      window can be added when you use an editor. These parameters
  15482.      are:
  15483.  
  15484.      /MEMOW,n
  15485.  
  15486.      Sets the width of the memo field edit window. For example, to
  15487.      set the width of the window to 75, type /MEMOW,75 in your
  15488.      profile. The maximum width is 78 chartacters.
  15489.  
  15490.      /NOSNOW
  15491.  
  15492.      Changes the way PC-File displays on some CGA monitors to
  15493.      prevent flickering or "snow."
  15494.  
  15495.      /NOXMS
  15496.  
  15497.      Prevents PC-File from using extended memory.
  15498.  
  15499.      /NOEMS
  15500.  
  15501.      Prevents PC-File from using expanded memory.
  15502.  
  15503.      /READONLY
  15504.  
  15505.      Sets the default on the Edit menu to Read-only mode.
  15506.  
  15507.      Adding Commands at the DOS Prompt
  15508.  
  15509.  
  15510.  
  15511.      PC-File Version 7 Users Guide                            265
  15512.  
  15513.  
  15514.  
  15515.      You can change any configuration parameter for the current
  15516.      session of PC-File by adding that parameter to the command
  15517.      when you start the program. For example, you could enter pcf
  15518.      /COLOR,4 at the DOS prompt. The command "pcf" starts PC-File
  15519.      and /COLOR,4 tells the program to change the colors for the
  15520.      current session from the current default to black & white.
  15521.      Separate pcf from the rest of the command(s) with a space. If
  15522.      you need to include more than one command, separate each
  15523.      command with a comma (but no space).
  15524.  
  15525.      Entering a configuration command at the DOS prompt overrides
  15526.      the current default, but does not change the setting in the
  15527.      profile. The next time you start PC-File, the original setting
  15528.      takes effect.
  15529.  
  15530.      You can also set up a batch file containing specific
  15531.      configuration parameters that you want to use at specific
  15532.      times. In a batch file, enter all parameters on one line, like
  15533.      this:
  15534.  
  15535.      pcf /NOSNOW, /READONLY, /CHARMODE
  15536.  
  15537.  
  15538.  
  15539.      Configuration Command Summary
  15540.  
  15541.      The following table lists all of the configuration commands.
  15542.      You can enter these commands in a configuration profile file
  15543.      or at the DOS prompt when starting PC-File.
  15544.  
  15545.      Precede all commands with a forward slash (/) and enter the
  15546.      commands in uppercase letters. Commands that take variables
  15547.      are indicated with an x or n following the command. An n
  15548.      indicates a number or string of numbers separated by commas
  15549.      (e.g. /LANDSCAPE, 27,38,108,49,79), an x indicates a string
  15550.      variable. Use a comma between the command and the variable,
  15551.      with no space.
  15552.  
  15553.      For example, to define a password for data entry, you might
  15554.      enter /ADDPW,jdh. The variable, jdh, is the password you are
  15555.      defining.
  15556.  
  15557.      Command Explanation
  15558.  
  15559.      /ADDPW,x Define password for data entry
  15560.  
  15561.      /BOLD,n Define print codes for boldface type
  15562.  
  15563.      /CASEFIND Set case sensitivity for searches
  15564.  
  15565.      /CASESORT Set case sensitivity for sorts
  15566.  
  15567.      /CHARMODE Set character mode of operation
  15568.  
  15569.      /COLOR,n Set color palette
  15570.  
  15571.  
  15572.  
  15573.      PC-File Version 7 Users Guide                            266
  15574.  
  15575.  
  15576.  
  15577.      /CONDENSED,n Define print codes for condensed type
  15578.  
  15579.      /DATEFORMAT,x Define default date format
  15580.  
  15581.      /DELPW,x Define password to allow deletions
  15582.  
  15583.      /DOUBLEWIDE,n Define print codes for wide type
  15584.  
  15585.      /DRIVE,x Define default drive
  15586.  
  15587.      /FILE,x Define default database
  15588.  
  15589.      /ITALIC,n Define print codes for italic type
  15590.  
  15591.      /LANDSCAPE,n Define print codes for landscape format
  15592.  
  15593.      /MEMOW,n Define the default width of the memo field edit
  15594.      window
  15595.  
  15596.      /MODPW,x Define password for Modify mode
  15597.  
  15598.      /NORMAL,n Define print codes for normal type
  15599.  
  15600.      /NOEMS Prevents use of expanded memory
  15601.  
  15602.      /NOXMS Prevents use of extended memory
  15603.  
  15604.      /NOSNOW Prevents snow on some CGA monitors
  15605.  
  15606.      /PAGELEN,n Define page length
  15607.  
  15608.      /PATH,x Define default path
  15609.  
  15610.      /PHINIT,n Define dialing initialization code
  15611.  
  15612.      /PHPRE,n Define phone line access prefix
  15613.  
  15614.      /PHPORT,x Define modem port
  15615.  
  15616.      /PHLONG,n Define long distance code
  15617.  
  15618.      /PORTRAIT,n Define print codes for portrait print
  15619.  
  15620.      /POSTSCRIPT Set for PostScript output
  15621.  
  15622.      /PRINTPW,x Define password to allow access to Print menu
  15623.  
  15624.      /PROPORTIONAL,n Define print codes for proportional font
  15625.  
  15626.      /PRPORT,x Define printer port
  15627.  
  15628.      /READONLY Set read-only mode as default
  15629.  
  15630.      /SNAP1,x Assign first snapshot label report
  15631.  
  15632.  
  15633.  
  15634.      PC-File Version 7 Users Guide                            267
  15635.  
  15636.  
  15637.      /SNAP2,x Assign second snapshot label report
  15638.  
  15639.      /SNAP3,x Assign third snapshot label report
  15640.  
  15641.      /SNAP4,x Assign fourth snapshot label report
  15642.  
  15643.      /SNAP5,x Assign fifth snapshot label report
  15644.  
  15645.      /SYSPW,x Define password to allow access to Utilities menu
  15646.  
  15647.      /UNDERLINE,n Define print codes for underlined type
  15648.  
  15649.      /USEPW,x Define password to open database
  15650.  
  15651.      /USER1,n Enter user-defined print codes
  15652.  
  15653.      /USER2,n Enter user-defined print codes
  15654.  
  15655.      /USER3,n Enter user-defined print codes
  15656.  
  15657.      /USER4,n Enter user-defined print codes
  15658.  
  15659.      /USER5,n Enter user-defined print codes
  15660.  
  15661.  
  15662.      If you are using a profile defined in a previous version of
  15663.      PC-File, some commands may appear that are not described on
  15664.      the list above. These commands, such as /FG (foreground
  15665.      colors) and /BG (background colors), have been replaced or
  15666.      phased out. They are ignored by the program.
  15667.  
  15668.  
  15669.      Packing a Database
  15670.  
  15671.      When you delete records, PC-File removes the records from view
  15672.      and internally marks them as deleted, but they remain in the
  15673.      database file (.DBF). This allows you to reclaim accidentally
  15674.      deleted records using the Undelete option on the Edit menu.
  15675.      The marked records are still counted as part of the database
  15676.      after deleting them. This is reflected in the number of
  15677.      records displayed at the bottom of the main screen and printed
  15678.      in reports.
  15679.  
  15680.      To remove deleted records from the database permenantly, you
  15681.      mus use the Pack option on the Utilities menu.
  15682.  
  15683.      If the database has memo fields, packing also affects the size
  15684.      of a database's .DBT file by removing any unused memo entries
  15685.      from the .DBT file. Unused memo entries can arise (1) if
  15686.      records with memo entries are deleted, or (2) if a memo is
  15687.      edited in such a way that the disk space the memo originally
  15688.      occupied cannot be reused.
  15689.  
  15690.      How Packing Works
  15691.  
  15692.  
  15693.  
  15694.      PC-File Version 7 Users Guide                            268
  15695.  
  15696.  
  15697.      First, PC-File renames the original database to a temporary
  15698.      name. Then, the active records are copied to new files using
  15699.      the original file names. At minimum, the active records in the
  15700.      .DBF file are copied. If your database has memo fields, the
  15701.      active memos in the .DBT file are also copied. Because packing
  15702.      generates new data files without deleting the originals,
  15703.      completing the packing operation requires about as much
  15704.      available disk space as the original database occupied (this
  15705.      can be somewhat less depending on how many records and memo
  15706.      entries will be removed by packing). Once the .DBF and .DBT
  15707.      files are packed, PC-File rebuilds all indexes for the
  15708.      database and returns you to the database, if the database was
  15709.      open when you started packing. If the database was not open
  15710.      when you started packing, indexes are rebuilt the next time
  15711.      the database is opened.
  15712.  
  15713.      If you have a large database, packing may take a long time.
  15714.      This will vary depending on the number of records removed, the
  15715.      complexity of the indexes that need to be rebuilt, and the
  15716.      speed of your system. In this case, you may want to consider
  15717.      running the packing operation overnight.
  15718.  
  15719.      PC-File renames the original database files to names in the
  15720.      format TMPnnnn.xxx, where "nnnnn" is some number that will
  15721.      create unique file names and "xxx" is the appropriate
  15722.      extension (at minimum, .DBF and .HDB, also .DBT if the
  15723.      database has memo fields). PC-File does this as a security
  15724.      measure to ensure that the original database cannot be damaged
  15725.      if you lose power during the packing operation. The TMPnnnn
  15726.      name is displayed in a message that appears at the end of the
  15727.      packing operation. Write
  15728.      down the TMPnnnn name so you can delete the database with the
  15729.      Utilities, File Management option once you are certain the
  15730.      packing operation was successful.
  15731.  
  15732.      To be more secure, you may want to copy the TMP files to a
  15733.      backup disk and rename them to their original names before
  15734.      deleting them. Assuming the files will fit on the drive you
  15735.      copy them to, you can copy and rename in one operation using a
  15736.      DOS command in the form:
  15737.  
  15738.      COPY c:\path\TMPnnnn.* d:\path\originalname.*
  15739.  
  15740.      where "c:\path" is the location of the original file,"TMPnnnn"
  15741.      is the name PC-File displayed at the end of the packing
  15742.      operation, "d:\path" is the drive and path you want to copy
  15743.      to, and "originalname" is the original name of the database.
  15744.      For example, if you packed a file named CLIENTS located on
  15745.      c:\pcfile\data that was renamed TMP27, you could copy and
  15746.      rename the original files to your A drive using this command:
  15747.  
  15748.      COPY c:\pcfile\data\TMP27.* a:CLIENTS.*
  15749.  
  15750.      NOTE: This command only renames the copied files on drive A,
  15751.      the TMP27 files would remain in c:\pcfile\data and those are
  15752.      the files you would delete to free disk space.
  15753.  
  15754.  
  15755.  
  15756.      PC-File Version 7 Users Guide                            269
  15757.  
  15758.  
  15759.  
  15760.      As an alternative to this procedure, you may want to backup
  15761.      your database files before packing.
  15762.  
  15763.      To pack a database:
  15764.  
  15765.      1.Open the database you want to pack. If no database is open
  15766.        when you choose the Pack option, PC-File will prompt you to
  15767.        choose the database you want to pack using the Open a File
  15768.        dialog box.
  15769.  
  15770.      2.Choose Utilities. C
  15771.  
  15772.      3.hoose Pack.
  15773.  
  15774.      4.Choose Yes to start the packing process.
  15775.  
  15776.      5.Note the TMP name of the original database and delete it
  15777.        with the Utilities, File Management option once you are
  15778.        certain that packing was successful. Alternatively, copy all
  15779.        files with this name (.HDB, .DBF, and possibly .DBT) as a
  15780.        backup, before deleting them.
  15781.  
  15782.  
  15783.  
  15784.      PC-File Version 7 Users Guide                            270
  15785.  
  15786.  
  15787.  
  15788.      Repairing a Database
  15789.  
  15790.      The Repair utility exists to correct certain kinds of damage
  15791.      that can occur to a database file. However, you should not
  15792.      assume that the Repair utility can correct all forms of file
  15793.      damage, or that this means you do not have to maintain regular
  15794.      backups of your files. Above all else, making regular backups
  15795.      of your database-ideally as often as the database is modified-
  15796.      is your best means of data security. See "Backing Up Your
  15797.      Database" for some suggestions on ways to back up databases.
  15798.  
  15799.      Even if you backup regularly, there may be times a database
  15800.      file becomes damaged before it has been backed up. In this
  15801.      case, the following procedures might allow you to reclaim a
  15802.      damaged database.
  15803.  
  15804.      Some of the signs that indicate your database file may be
  15805.      damaged are:
  15806.  
  15807.        "Garbage" characters (characters other than letters, numbers
  15808.        or punctuation) appear in your data, or data is lost.
  15809.  
  15810.        PC-File will not open your database (typically PC-File
  15811.        displays an error message with error code 4097 in this
  15812.        case).
  15813.  
  15814.        PC-File displays an error message (typically with error code
  15815.        4097) when making new indexes or re-building old indexes.
  15816.  
  15817.        PC-File indicates fewer records than should be in the
  15818.        database.
  15819.  
  15820.        PC-File cannot locate records you know exist.
  15821.  
  15822.      Preliminary Steps
  15823.  
  15824.      In many cases, the problem lies not in the data file, but in
  15825.      problems with one or more of the index files. This can be
  15826.      caused by someone turning off the computer without properly
  15827.      exiting PC-File (using Exit on the File menu), or by power
  15828.      loss or a power surge while PC-File is running.
  15829.  
  15830.      If PC-File can't open your database, follow the procedures
  15831.      described under "To Repair a Database" below. If PC-File can
  15832.      open the database, try rebuilding the indexes using the
  15833.      following steps before trying anything else:
  15834.  
  15835.      To rebuild all indexes
  15836.  
  15837.      1.Open the database.
  15838.  
  15839.      2.Choose File.
  15840.  
  15841.      3.Choose Index Maintenance.
  15842.  
  15843.  
  15844.  
  15845.      PC-File Version 7 Users Guide                            271
  15846.  
  15847.  
  15848.      4.Choose Rebuild All.
  15849.  
  15850.      If your database continues to have problems, the next thing to
  15851.      check is to make sure that the problem is not due to an error
  15852.      in the way DOS is storing the data file. For example, if DOS's
  15853.      file information indicates that the data file is smaller than
  15854.      it actually is, PC-File will not be able to read all the
  15855.      records in the database. To cover this possibility, the next
  15856.      thing to try is to run the DOS CHKDSK utility using the /F
  15857.      parameter to make sure that DOS's file information is correct.
  15858.  
  15859.      WARNING: Before running CHKDSK /F, you MUST quit all the way
  15860.      out of PC-File using Exit on the File menu and exit any other
  15861.      program running "on top" DOS, such as Microsoft Windows or a
  15862.      menu program. Failure to do so can damage files.
  15863.  
  15864.      To run CHKDSK against your database:
  15865.  
  15866.      1.Make a backup of your database.
  15867.  
  15868.      2.Exit all the way out of PC-File (using Exit on the File
  15869.        menu. DO NOT use CTRL-D or Drop to DOS on the Tools menu)
  15870.        and exit any program running "on top" of DOS such as
  15871.        Microsoft Windows or a menu program.
  15872.  
  15873.      3.Run the DOS CHKDSK /F command to correct logical file errors
  15874.        (refer to your DOS manual for details).
  15875.  
  15876.      4.Rebuild all indexes as described above.
  15877.  
  15878.      NOTE: As an alternative to the above procedure, you can use a
  15879.      third- party utility program (such as Norton Utilities, PC-
  15880.      Tools, SpinRite, etc.) to correct file and disk errors.
  15881.  
  15882.  
  15883.      Using Repair
  15884.  
  15885.      If your database still has problems after trying the two
  15886.      procedures above, damage may have occurred to your database's
  15887.      data files (.DBF and .DBT). The reasons this can happen are
  15888.      numerous, but are typically due to something that damages the
  15889.      magnetic information that is stored on your hard drive or
  15890.      floppy disk. For example:
  15891.  
  15892.      Loss of power during a disk operation.
  15893.  
  15894.      Wear and tear on the hard drive surface
  15895.  
  15896.      Physical shocks and poor handling of the hard drive can cause
  15897.      "head crashes" which literally scrape data from the hard
  15898.      drive's platters. Likewise, floppy disks can eventually wear
  15899.      out or become physically damaged.
  15900.  
  15901.      Magnetic damage, static discharge, or power surges
  15902.  
  15903.  
  15904.  
  15905.      PC-File Version 7 Users Guide                            272
  15906.  
  15907.  
  15908.      These environmental influences can erase or corrupt the
  15909.      magnetic information on a disk.
  15910.  
  15911.      "Track Drift" or old formatting
  15912.  
  15913.      When you first purchased your hard drive, it was either
  15914.      formatted at the factory or by a technician. The formatting is
  15915.      the filing system that shows your computer where it can store
  15916.      new files and keeps track of where old files are stored. Over
  15917.      time the tracks of the formatting can drift as the bearings of
  15918.      the hard drive wear, or the formatting (which is magnetic
  15919.      information itself) can fade or become damaged.
  15920.  
  15921.      Hardware errors in the disk controller
  15922.  
  15923.      The disk controller, the part of your computer which controls
  15924.      all access to disk drives, can damage or lose files if it
  15925.      isn't working properly.
  15926.  
  15927.      Program errors
  15928.  
  15929.      An error in any program, or conflicts between simultaneously
  15930.      running programs, can potentially damage disk information.
  15931.      Errors and conflicts which damage files can occur when
  15932.      software accesses the disk, or causes a conflict in RAM. This
  15933.      includes any of the following: application software, such as
  15934.      databases, spreadsheets, or word processors; errors or
  15935.      conflicts with memory-resident software (TSR's and device
  15936.      drivers) such as screen blankers, disk caching, task
  15937.      switching, menus or shells, memory
  15938.      management programs, or drivers for special hardware support;
  15939.      or errors in operating system software, DOS's or windowing
  15940.      OS's.
  15941.  
  15942.      If the damage was relatively minor, and there is no ongoing
  15943.      hardware problem or disk formatting error, you can generally
  15944.      repair damage with the following steps.
  15945.  
  15946.  
  15947.      To Repair a database:
  15948.  
  15949.      1.Make a backup copy of your database.
  15950.  
  15951.      2.Run the DOS CHKDSK /F command on the disk where your data
  15952.        resides directly from the DOS command line.
  15953.  
  15954.      3.WARNING: You MUST fully exit PC-File using Exit on the File
  15955.        menu-NOT CTRL-D or Drop to DOS on the Tools menu. Fully exit
  15956.        any other programs running "on top" of DOS, such as Windows
  15957.        or menu programs, before running the CHKDSK /F command-
  15958.        failure to do so could cause further problems.
  15959.  
  15960.      4.Correct any problems the CHKDSK command reports before
  15961.        proceeding. Refer to your DOS manual for details on the
  15962.        CHKDSK command.
  15963.  
  15964.  
  15965.  
  15966.      PC-File Version 7 Users Guide                            273
  15967.  
  15968.  
  15969.      5.Start PC-File and open the damaged database using the File,
  15970.        Open menu sequence. If PC-File will not open the database,
  15971.        proceed to step 4.
  15972.  
  15973.      6.Choose Utilities.
  15974.  
  15975.      7.Choose Repair. If you were unable to open the database in
  15976.        step 3, a file selection dialog box is displayed. Choose the
  15977.        database to repair at this point and choose OK.
  15978.  
  15979.      8.Choose Yes to scan for illegal characters.
  15980.  
  15981.      A status box displays showing the rate of progress. Some
  15982.      errors are automatically repaired. These errors and repairs
  15983.      are reported as they are encountered. Other errors present an
  15984.      option in this format:
  15985.  
  15986.           Error: This database has: problem
  15987.  
  15988.           PC-File can attempt to repair this problem, but doing so
  15989.           might further damage the database.
  15990.  
  15991.           If you have not made a backup of this database DO NOT
  15992.           choose Yes to proceed.
  15993.  
  15994.           If you have made a backup, you can safely choose Yes.
  15995.  
  15996.           Should PC-File attempt this repair? (Yes/No/Cancel)
  15997.  
  15998.      where "problem" is a brief description of the error in
  15999.      question. Correcting errors of this type might cause further
  16000.      damage to the database, because PC-File has to make certain
  16001.      assumptions that might be incorrect. You should only proceed
  16002.      with these options if you performed all preliminary steps:
  16003.      making a backup and correcting file errors with CHKDSK /F or a
  16004.      third-party utility program.
  16005.  
  16006.      An information box displays at the end of the Repair process
  16007.      indicating what repairs were done. PC-File tests the indexes
  16008.      and rebuilds them, if necessary.
  16009.  
  16010.      If your database still has problems after performing all of
  16011.      the above procedures, try packing the database as described in
  16012.      the section "Packing a Database." Only do this after trying
  16013.      all of the above procedures. If using Repair seemed to make
  16014.      the problems worse (this is possible if the assumptions Repair
  16015.      uses are inappropriate for the detected problem), restore a
  16016.      backup of your database before packing. Packing generates a
  16017.      new copy of the database, which can correct some problems that
  16018.      Repair
  16019.      does not correct due to risk to the original file.
  16020.  
  16021.  
  16022.  
  16023.      PC-File Version 7 Users Guide                            274
  16024.  
  16025.  
  16026.      If you still have problems after performing all the above,
  16027.      your file might be irrevocably damaged. Repair utilities such
  16028.      as Ashton-Tate's dBASE File Recovery, or other dBASE file
  16029.      recovery programs can perform more involved repair procedures
  16030.      that might allow you to reclaim the database. It is also
  16031.      possible that hardware or disk errors might be the source of
  16032.      the problem-run a diagnostic program or contact a technician
  16033.      if you suspect this is the source of your problem. Assuming
  16034.      your hardware is fine and your database cannot be recovered
  16035.      with PC-File's Repair command, Pack command, or a third- party
  16036.      repair utility, your only recourse is to restore your most
  16037.      recent backup of the database.
  16038.  
  16039.      Database Description
  16040.  
  16041.      PC-File lets you print a description of your database, listing
  16042.      the fields and the relevant information about each field. Data
  16043.      contained in the fields is not printed, just information on
  16044.      the fields. This feature can be useful when redefining or
  16045.      creating a database, or just as a reminder of field length and
  16046.      type. In fact, it's a good idea to keep on hand a printed
  16047.      description of each of your databases.
  16048.  
  16049.      The Datebase Description has five main parts:
  16050.  
  16051.      Database Structure
  16052.  
  16053.      This section shows the database's field names, a letter for
  16054.      the field type (C=Character, N=Numeric, D=Date, L=Logical, and
  16055.      M=Memo), the data length, and decimal place (only for numeric
  16056.      fields).
  16057.  
  16058.      Indexes
  16059.  
  16060.      This section shows the index search field, followed by the
  16061.      description with the index dBASE expression under it.
  16062.  
  16063.      Field Attributes
  16064.  
  16065.      This section lists any fields that have field attributes
  16066.      assigned, which attributes are associtated with the field, and
  16067.      the "when" assignments for the each attribute.
  16068.  
  16069.      List of Views
  16070.  
  16071.      This section lists all views in the database and their type.
  16072.  
  16073.      Pictures of Custom Record Views
  16074.  
  16075.      If there are any Custom Record views defined for the database
  16076.      a "picture" of each view is printed. If there are no Custom
  16077.      Record views, this section is omitted.
  16078.  
  16079.      The Database Description option gives you three output
  16080.      options:
  16081.  
  16082.  
  16083.  
  16084.      PC-File Version 7 Users Guide                            275
  16085.  
  16086.  
  16087.      Printer Prints your database's description using the printer
  16088.      indicated by the current profile.
  16089.  
  16090.      Screen Displays your database's description on screen
  16091.  
  16092.      Disk Stores your database's description in a disk file
  16093.  
  16094.      To produce a database description:
  16095.  
  16096.      1.Choose Utilities.
  16097.  
  16098.      2.Choose Ddatabase Description.
  16099.  
  16100.      3.Choose the database you want a description of, if no
  16101.        database is currently open.
  16102.  
  16103.      4.Choose Printer to print your database description. Or...
  16104.        Choose Screen to display your database description on
  16105.        screen. Or... Choose Disk to store your database description
  16106.        in a disk file, type the file name, and choose OK.
  16107.  
  16108.  
  16109.  
  16110.      PC-File Version 7 Users Guide                            276
  16111.  
  16112.  
  16113.  
  16114.      CHAPTER 14 PRINTING LABELS WITH PC-LABEL
  16115.  
  16116.      PC-Label is unique in that it can be accessed from both the
  16117.      menu and the DOS prompt. This chapter provides information on
  16118.      accessing and using PC-Label.
  16119.  
  16120.  
  16121.  
  16122.      Introduction
  16123.  
  16124.      A mailing label utility is one of the most-commonly used
  16125.      features of a database program. PC-File provides an easy-to-
  16126.      use labels program, PC- Label, that lets you produce mailing
  16127.      labels on almost any stock available. Over a dozen label
  16128.      templates are provided, and you can create your own for those
  16129.      that aren't.
  16130.  
  16131.      PC-Label is actually a separate program that runs with PC-
  16132.      File. In previous versions of PC-File, it was only accessible
  16133.      from the DOS prompt. You can now access PC-Label from the PC-
  16134.      File menu bar as well as from the DOS prompt.
  16135.  
  16136.      NOTE: The mouse is NOT functional within PC-Label, so don't be
  16137.      surprised if you don't see a pointer on the screen when using
  16138.      it.
  16139.  
  16140.      Creating and Printing Mailing Labels
  16141.  
  16142.      The ability to generate mailing labels is one of the most
  16143.      important and useful features of a database program. PC-File
  16144.      provides three options for producing mailing labels. You may
  16145.      find yourself using all three at different times. Choose the
  16146.      method that will do the job you want.
  16147.  
  16148.      Snapshot labels
  16149.  
  16150.      You can print out a single label while entering or displaying
  16151.      a record in a database. This is most useful when you want to
  16152.      print a label as needed or keep track of needed labels one at
  16153.      a time. See Chapter 11, "Utilities," to set up the snapshot
  16154.      label format in your configuration profile, and Chapter 13,
  16155.      "Tools," for information on printing a snapshot label.
  16156.  
  16157.      Single column labels in Reports
  16158.  
  16159.      Use the mailing label format in the Reports option to print
  16160.      out single column labels. Only a minimum amount of formatting
  16161.      is necessary, making this an easy way to print labels if you
  16162.      aren't using multi-column labels. See Chapter 7, "Creating
  16163.      Reports," for more information.
  16164.  
  16165.      PC-Label
  16166.  
  16167.  
  16168.  
  16169.      PC-File Version 7 Users Guide                            277
  16170.  
  16171.  
  16172.      This program, which can be run from the PC-File menu bar or
  16173.      from the DOS prompt, provides the most flexibility. You can
  16174.      set up a template for any label format, compress out lines and
  16175.      spaces, and add text to the labels. PC-Label also handles
  16176.      other kinds of files, not just those from PC-File databases;
  16177.      these include PC-Type, PC- Calc+, and comma-delimited files.
  16178.  
  16179.      This chapter covers only the PC-Label utility.
  16180.  
  16181.      Starting PC-Label
  16182.  
  16183.      PC-Label can be run from within PC-File or from the DOS
  16184.      prompt. If you start within PC-File, the program drops you out
  16185.      to PC-Label. The program works the same way, no matter where
  16186.      you start it from.
  16187.  
  16188.      To start PC-Label from the PC-File menu bar:
  16189.  
  16190.      1.Open the database you want to use.
  16191.  
  16192.      2.Choose Utilities from the menu bar
  16193.  
  16194.      3.Choose Labels from the Utilities menu. The PC-Label Main
  16195.        menu appears.
  16196.  
  16197.      To start PC-Label from the DOS prompt:
  16198.  
  16199.      1.Move to the directory that contains your PC-File program
  16200.        files.
  16201.  
  16202.      2.Type pclabel at the DOS prompt and press ENTER. You can add
  16203.        a file specification to your start command if you have an
  16204.        existing label definition and plan to use it immediately.
  16205.        For example, you might enter pclabel c:\pcfile\members.lbl
  16206.        to start up the label program and load the members.lbl label
  16207.        definition at the same time. Otherwise, you can load the
  16208.        defined label once you start the label program.
  16209.  
  16210.      If you have a graphics monitor that doesn't support color (not
  16211.      just a standard monochrome screen), enter pclabel /green at
  16212.      the prompt to set your colors to black and white.
  16213.  
  16214.      Once you start PC-Label, the PC-Label Main Menu appears.
  16215.  
  16216.      The PC-Label Main Menu
  16217.  
  16218.      All options necessary to create and print labels are provided
  16219.      from the Main Menu. The options are defined as follows:
  16220.  
  16221.      Load existing setup
  16222.  
  16223.      If you have created a label definition in the past, you can
  16224.      load that definition and start printing labels.
  16225.  
  16226.      Define/modify setup
  16227.  
  16228.  
  16229.  
  16230.      PC-File Version 7 Users Guide                            278
  16231.  
  16232.  
  16233.      Use this option to define the parameters for a label. The
  16234.      parameters include the label dimensions, number of labels
  16235.      across the page, label layout, number of copies of each label
  16236.      you want printed, and several other factors that determine how
  16237.      your labels will look.
  16238.  
  16239.      Print labels
  16240.  
  16241.      Once you have loaded or defined a label definition, you can
  16242.      print the labels.
  16243.  
  16244.      Save current setup
  16245.  
  16246.      Unless you know you will never print labels again, save your
  16247.      label definition for future use. The label definition is saved
  16248.      to a file with the extension .LBL. Like a report file, this
  16249.      file contains the definition only (essentially a list of the
  16250.      parameters you defined in the setup), not the actual data that
  16251.      prints on each label.
  16252.  
  16253.      Quit/Exit PC-Label
  16254.  
  16255.      Exit from PC-Label when you have finished. You will return to
  16256.      where you came from, either the PC-File menu bar or the DOS
  16257.      prompt.
  16258.  
  16259.      The first four options on the menu are covered in detail
  16260.      below.
  16261.  
  16262.      Loading an Existing Label Setup
  16263.  
  16264.      Use the Load existing setup option to load a label definition
  16265.      that has been previously defined. Once the setup is loaded,
  16266.      choose Define/modify setup to modify the setup. Choose Print
  16267.      labels to print a set of labels.
  16268.  
  16269.      If you want to use an existing label setup with a new
  16270.      database, load that setup and change only the Label source
  16271.      location (database path and name) parameter on the setup
  16272.      screen. Then save the setup and give it a new name.
  16273.  
  16274.      To load an existing label setup:
  16275.  
  16276.      Choose Load existing setup on the PC-Label Main Menu.
  16277.  
  16278.      Enter the path and label filename in the edit box. You don't
  16279.      need to enter the .LBL extension. If the label file resides on
  16280.      the current directory, just enter the file name, without a
  16281.      path. The program assumes the current directory. As an
  16282.      alternative, just enter the path for the label file. The
  16283.      program displays a list of the label files on that directory,
  16284.      from which you can choose the one you want.
  16285.  
  16286.      Defining or Modifying a Setup
  16287.  
  16288.  
  16289.  
  16290.      PC-File Version 7 Users Guide                            279
  16291.  
  16292.  
  16293.      You must define a setup before you can print labels. A label
  16294.      setup is defined on the setup screen, a menu of over a dozen
  16295.      parameters that determine the format and look of your labels.
  16296.      To display the setup screen, choose Define/modify setup on the
  16297.      PC-Label Main Menu.
  16298.  
  16299.      The settings for each parameter are shown in the center of the
  16300.      screen. A window of helpful information appears on the right.
  16301.      The information is pertinent to the setting currently
  16302.      highlighted, and changes as you move through the settings.
  16303.  
  16304.      Most of the parameters have default settings already in place.
  16305.      You can leave or change these defaults. To change a default or
  16306.      enter new information, highlight the appropriate field, then
  16307.      press ENTER. Pressing ENTER activates the field. Once you do
  16308.      this, one of four things happens:
  16309.  
  16310.        An edit window displays, allowing you to enter information
  16311.  
  16312.        The field toggles to another option
  16313.  
  16314.        A menu of options displays, allowing you to choose one
  16315.  
  16316.        A new screen appears, allowing further input
  16317.  
  16318.      It is important that you check each parameter and make sure
  16319.      the settings are correct for your needs. At the bare minimum,
  16320.      however, give attention to three parameters:
  16321.  
  16322.        Label Source Location
  16323.  
  16324.        Label Sheet definition
  16325.  
  16326.        Label layout
  16327.  
  16328.      You can't print a label unless you have defined these
  16329.      parameters. All the parameters are covered in detail below.
  16330.  
  16331.      To define a label setup:
  16332.  
  16333.      1.Choose Define label setup from the PC-Label Main Menu.
  16334.  
  16335.      2.Choose a Label Source Type and enter a Label Source
  16336.        Location, if it isn't filled in already. PC-Label won't
  16337.        allow you to make other changes or entries without first
  16338.        choosing the database you are using.
  16339.  
  16340.      3.Define any other options according to your needs. Most
  16341.        important are the Label Sheet definition and Label layout
  16342.        options. You can't print labels without laying out the
  16343.        label. For all options on the Setup screen, highlight the
  16344.        option and press ENTER to make any changes to it.
  16345.  
  16346.      4.Press F10 when you finish to return to the PC-Label Main
  16347.        Menu.
  16348.  
  16349.  
  16350.  
  16351.      PC-File Version 7 Users Guide                            280
  16352.  
  16353.  
  16354.      5.Unless you know you will use this setup only once, save it
  16355.        by choosing Save current setup from the Main Menu.
  16356.  
  16357.      To modify a label setup:
  16358.  
  16359.      1.Choose Load existing setup from the PC-Label Main Menu.
  16360.  
  16361.      2.Choose the label file you want to modify.
  16362.  
  16363.      3.Choose Define/modify setup from the PC-Label Main Menu.
  16364.  
  16365.      4.Make your changes to the setup.
  16366.  
  16367.      5.Press F10 to return to the Main Menu.
  16368.  
  16369.      6.Choose Save current setup from the menu.
  16370.  
  16371.      7.Press ENTER twice to save the setup with the same name.
  16372.  
  16373.      An explanation of each parameter on the setup screen follows.
  16374.  
  16375.      Label Source Type
  16376.  
  16377.      Choose the type of data file that you are using for your
  16378.      source. In most cases, you will use the default of PC-File,
  16379.      which includes all recent versions of PC-File and dBASE.
  16380.  
  16381.      PC-Label lets you use any of the following types of data
  16382.      files:
  16383.  
  16384.      PC-File 7
  16385.  
  16386.      This is the default option that is used to print labels with
  16387.      PC- File 7 databases. The following options are only used with
  16388.      files produced by other ButtonWare programs and ASCII files.
  16389.  
  16390.      PC-File 6
  16391.  
  16392.      Along with databases created in PC-File 6.0, 5.0, and PC-
  16393.      File:dB, this format includes dBASE III, dBASE III Plus, and
  16394.      dBASE IV files. PC-Label looks for a file with a .DBF
  16395.      extension.
  16396.  
  16397.      PC-File+
  16398.  
  16399.      This earlier version of PC-File used files with extensions
  16400.      .DTA, .HDR, and .INX. PC-Label looks for all three types of
  16401.      files when you use this format.
  16402.  
  16403.      PC-Calc+
  16404.  
  16405.      ButtonWare's spreadsheet program files use the file extension
  16406.      .PCC.
  16407.  
  16408.      Comma-delimited
  16409.  
  16410.  
  16411.  
  16412.      PC-File Version 7 Users Guide                            281
  16413.  
  16414.  
  16415.      Files of this type consist of data fields separated by commas.
  16416.      Often, double quotation marks are used around each field in
  16417.      addition to the commas. A carriage return ends each record,
  16418.      occasionally with a line feed as well.
  16419.  
  16420.      ASCII-L
  16421.  
  16422.      Files of this type consist of fixed length fields with no
  16423.      separators between them. Each record ends with a carriage
  16424.      return and sometimes a line feed. PC-Label prompts you to set
  16425.      the length of each field when you get ready to print. Indicate
  16426.      the length of each field by filling the space with a different
  16427.      character (letter) from the keyboard.
  16428.  
  16429.      ASCII-C
  16430.  
  16431.      Files of this type consist of one field on each line. Each
  16432.      record is separated by one or more blank lines.
  16433.  
  16434.      To set the Label Source Type:
  16435.  
  16436.      1.Highlight the Label Source type field.
  16437.  
  16438.      2.Press ENTER repeatedly to toggle through the list of source
  16439.        types. PC-File is the default.
  16440.  
  16441.      Label Source Location
  16442.  
  16443.      The Label Source Location is the actual file that contains the
  16444.      data for the labels. PC-Label requires both the path and the
  16445.      database name. Don't use any file extension.
  16446.  
  16447.      If you opened a database before starting Labels from the menu
  16448.      bar in PC-File, the path and database name are displayed here
  16449.      already.
  16450.  
  16451.      To enter the label source:
  16452.  
  16453.      1.Highlight the Label Source Location field and press ENTER.
  16454.  
  16455.      2.Enter the path and database name in the edit window at the
  16456.        bottom of the screen. The file extension is not necessary
  16457.        unless PC-Label prompts you for it. For example, type
  16458.        c:\pcfile\sample\members.  As an alternative, enter just the
  16459.        path and press ENTER. A list of the databases in the
  16460.        directory displays. Choose the database you want.
  16461.  
  16462.      3.If the database is in the current directory, press ENTER to
  16463.        bypass the edit window and display the menu of databases; or
  16464.        just type the name of the database in the edit window.
  16465.  
  16466.      NOTE: If you select comma-delimited, ASCII-L, or ASCII-C as
  16467.      the source type, you have to indicate a file extension. For
  16468.      example, if your comma-delimited file has the extension .WS,
  16469.      type ws when prompted for the extension.
  16470.  
  16471.  
  16472.  
  16473.      PC-File Version 7 Users Guide                            282
  16474.  
  16475.  
  16476.      Define Search (and switch indexes)
  16477.  
  16478.      PC-Label lets you print all the records in the database, or a
  16479.      selected group of them. The default is to print all the
  16480.      records. To print a selected group, choose this option and
  16481.      define the group you want to select.
  16482.  
  16483.      The Define Search option also lets you change indexes for a
  16484.      PC-File database. If you have multiple indexes, use this
  16485.      option to select an alternate index. The new index changes the
  16486.      order of the labels during printing.
  16487.  
  16488.      The procedures for defining the search vary slightly,
  16489.      depending on the type of database file you are using. The
  16490.      procedures for a PC-File file are spelled out first, followed
  16491.      by the procedures for all other types of files.
  16492.  
  16493.      To define the search for PC-File databases or to change
  16494.      indexes:
  16495.  
  16496.      1.Highlight the Define Search field and press ENTER. A menu
  16497.        listing the indexes in your database appears. The current
  16498.        index is highlighted.
  16499.  
  16500.      2.Choose the index for the order you want to print in. A menu
  16501.        appears, providing options for selecting records. If you
  16502.        just wanted to change indexes, press ENTER to return to the
  16503.        setup screen. Otherwise, proceed to the next step.
  16504.  
  16505.      3.Choose the type of search you want to conduct. For Simple
  16506.        searches, highlight the appropriate field and press ENTER.
  16507.        Enter the string of data you want the program to search for
  16508.        in selecting records. For Formula searches, enter the search
  16509.        command in the edit window at the bottom of the screen.
  16510.  
  16511.      PC-Label supports all of the search capabilities of PC-File.
  16512.      See Chapter 5, "Finding and Modifying Data," for more
  16513.      information on conducting searches.
  16514.  
  16515.      To define the search for other types of databases:
  16516.  
  16517.      1.Highlight the Define Search field and press ENTER. A menu
  16518.        appears, providing search options.
  16519.  
  16520.      2.Choose the type of search you want to conduct. For Simple
  16521.        searches, highlight the appropriate field and press ENTER.
  16522.        Enter the string of data you want the program to search for
  16523.        in selecting records. For Formula searches, enter the search
  16524.        command in the edit window at the bottom of the screen.
  16525.  
  16526.      Output Destination
  16527.  
  16528.      PC-Label lets you print to a printer or to a file. Use the
  16529.      Output destination option to set the port to which your
  16530.      printer is connected or to name the file.
  16531.  
  16532.  
  16533.  
  16534.      PC-File Version 7 Users Guide                            283
  16535.  
  16536.  
  16537.      The default for this field is LPT1, the first parallel port.
  16538.      Most dot matrix and laser printers use LPT1. However, printers
  16539.      can be connected to LPT2 or to a serial (COM) port.
  16540.  
  16541.      Printing your labels to a file can be useful for a couple of
  16542.      reasons. You can edit the labels with a word processing
  16543.      program. You can also print the labels directly from the file
  16544.      using the DOS PRINT command and continue working in the
  16545.      database at the same time.
  16546.  
  16547.      NOTE: Be sure you have enough space on your disk if you print
  16548.      labels to a file. A large database of names can take up a lot
  16549.      of space.
  16550.  
  16551.      To set an alternative printer port:
  16552.  
  16553.      1.Highlight the Output destination field and press ENTER.
  16554.  
  16555.      2.Press ENTER again when asked for a file extension.
  16556.  
  16557.      3.When prompted for the path, press ENTER.
  16558.  
  16559.      4.When prompted for the file name, enter the printer port
  16560.        device name. For example, type lpt2 to print to the second
  16561.        parallel port.
  16562.  
  16563.      NOTE: If you want to print to a serial port, such as COM1, be
  16564.      sure to initialize your printer by using the DOS MODE command.
  16565.      Consult your DOS manual for further instructions on this
  16566.      procedure.
  16567.  
  16568.      To print to a file:
  16569.  
  16570.      1.Highlight the Output destination field and press ENTER.
  16571.  
  16572.      2.Enter the file extension (without the period) of the file to
  16573.        which you want to print the labels. For example, type txt in
  16574.        the edit window and press ENTER. Leave this blank if no file
  16575.        extension is desired. Just be sure that if you want to
  16576.        access the file with a word processing program, the
  16577.        extension is compatible with that program.
  16578.  
  16579.      3.Enter the path name when prompted. Press ENTER to bypass the
  16580.        path if you want to be in the current directory.
  16581.  
  16582.      4.Choose a file from the list that PC-Label displays. Normally
  16583.        you'll choose New File from this list.
  16584.  
  16585.      5.Name the file if you are creating a new file, and press
  16586.        ENTER.
  16587.  
  16588.      No. of Copies
  16589.  
  16590.      You can print up to 99 copies of your labels. If you want to
  16591.      print more copies than that, you will have to choose the print
  16592.      option more than once.
  16593.  
  16594.  
  16595.  
  16596.      PC-File Version 7 Users Guide                            284
  16597.  
  16598.  
  16599.  
  16600.      The default is 1.
  16601.  
  16602.      To define the number of copies:
  16603.  
  16604.      1.Highlight the No. of copies field and press ENTER.
  16605.  
  16606.      2.Enter the number of copies in the edit window at the bottom
  16607.        of your screen.
  16608.  
  16609.      Copies Definition
  16610.  
  16611.      PC-Label ignores this option unless you choose to print more
  16612.      than one copy of your labels. If you do print multiple copies,
  16613.      you can print them one of two ways: By Group or By Label.
  16614.  
  16615.      By Group
  16616.  
  16617.      PC-Label prints all of the records once, then prints the
  16618.      entire group again, repeating until the desired number of
  16619.      copies has been printed. Thus, if you decided to print five
  16620.      copies of your labels, the entire set of labels would print
  16621.      out once, then again and again until you had printed it five
  16622.      times. By Group is the default.
  16623.  
  16624.      By Label
  16625.  
  16626.      PC-Label prints the first record the desired number of times,
  16627.      then prints the second record the desired number of times, and
  16628.      so on until all records are printed the specified number of
  16629.      times. Thus, if you decided to print five copies of your
  16630.      labels, the first record would print five times, then the
  16631.      second record would print five times, and so on.
  16632.  
  16633.      No matter which way you choose, consider changing the Formfeed
  16634.      option (described below) to End of each set. By doing that,
  16635.      the printer kicks out the last sheet of each set of labels
  16636.      before beginning the next set. That way each set of labels
  16637.      would be on separate sheets. However, that option can also
  16638.      prove to be wasteful of labels.
  16639.  
  16640.      To define how additional copies are printed:
  16641.  
  16642.      Highlight the Copies definition field. Press ENTER to toggle
  16643.      between the two options.
  16644.  
  16645.      Compress Blank Lines
  16646.  
  16647.      Line compression is important for maintaining the appearance
  16648.      of your labels. Without line compression, you can end up with
  16649.      blank lines in many of the labels. For example, if you're
  16650.      printing five lines of information, and one line is empty for
  16651.      a particular record, line compression prevents PC-Label from
  16652.      leaving a gaping hole in that label.
  16653.  
  16654.  
  16655.  
  16656.      PC-File Version 7 Users Guide                            285
  16657.  
  16658.  
  16659.      Line compression removes blank lines from within a label and
  16660.      replaces them at the end of the label. That way the number of
  16661.      lines in a label remains constant, maintaining the proper
  16662.      formatting for the entire sheet.
  16663.  
  16664.      The sample labels below illustrate the differences between
  16665.      printing labels with line compression and without line
  16666.      compression.
  16667.  
  16668.      Compress Blank Lines YES
  16669.           Janet Ratite
  16670.  
  16671.           438 Savannah Way
  16672.           Seattle, WA 98103
  16673.  
  16674.           Robert T. Hare
  16675.           Rapid Flo Corp.
  16676.           8900 Brushwood Avenue
  16677.           Redmond, WA 98052
  16678.  
  16679.      Compress Blank Lines NO
  16680.  
  16681.  
  16682.           Janet Ratite
  16683.           438 Savannah Way
  16684.           Seattle, WA 98103
  16685.  
  16686.  
  16687.           Robert T. Hare
  16688.           Rapid Flo Corp.
  16689.           8900 Brushwood Avenue
  16690.           Redmond, WA 98052
  16691.  
  16692.  
  16693.      To set the line compression option:
  16694.  
  16695.      1.Highlight the Compress blank lines field.
  16696.  
  16697.      2.Press ENTER to toggle between YES and NO The default is YES
  16698.        (line compression is on).
  16699.  
  16700.      Centering
  16701.  
  16702.      This option lets you center each record vertically and
  16703.      horizontally on the label, based on the longest line and the
  16704.      number of lines within each record. If you leave centering
  16705.      off, PC-Label starts each label at the same place on the same
  16706.      line.
  16707.  
  16708.      Centering overrides the fixed placement of fields which you
  16709.      establish when you lay out a label. Label layout is covered
  16710.      later in this chapter.
  16711.  
  16712.      However, centering does not mean centering each line of an
  16713.      address on the label. PC-Label doesn't do that. Each record is
  16714.      centered as a whole.
  16715.  
  16716.  
  16717.  
  16718.      PC-File Version 7 Users Guide                            286
  16719.  
  16720.  
  16721.  
  16722.      Whether or not you center is largely an aesthetic decision.
  16723.      However, centering can sometimes cause problems with alignment
  16724.      of multi-column labels. If you want to center multi-column
  16725.      labels, leave the centering option off until you make sure the
  16726.      labels are aligned, then turn the centering option on.
  16727.  
  16728.      To set the centering option:
  16729.  
  16730.      1.Highlight the Centering field.
  16731.  
  16732.      2.Press ENTER to toggle between YES and NO. The default is
  16733.        YES.
  16734.  
  16735.      Pause If Truncation
  16736.  
  16737.      Data that doesn't fit within the space you have defined on a
  16738.      label will be truncated (cut off). You can ask PC-Label to
  16739.      alert you every time that occurs while you are printing.
  16740.  
  16741.      You may want to set this option ON the first time you run a
  16742.      set of labels in order to check for any field length problems.
  16743.      Truncated addresses can result in mail being returned because
  16744.      of incomplete addresses. Once you are satisfied that all your
  16745.      data fits, turn this option OFF.
  16746.  
  16747.      To set the Pause if truncation option:
  16748.  
  16749.      1.Highlight the Pause if truncation field.
  16750.  
  16751.      2.Press ENTER to toggle between YES and NO. The default is NO.
  16752.  
  16753.      Escape Code Toggle
  16754.  
  16755.      You may want to print the first line of your mailing labels in
  16756.      bold face, or perhaps include a return address in italics. To
  16757.      use a type style other than regular type, follow these steps:
  16758.  
  16759.      1.Toggle the Escape Code Toggle ON.
  16760.  
  16761.      2.Set the escape codes for your printer.
  16762.  
  16763.      3.Place the codes on the label when you lay it out.
  16764.  
  16765.      Setting the escape codes is explained in the following section
  16766.      (Print Escape Code) and placing the codes on the label is
  16767.      explained in the section on Label Layout later in this
  16768.      chapter.
  16769.  
  16770.      To set the Escape code toggle:
  16771.  
  16772.      1.Highlight the Escape code toggle field.
  16773.  
  16774.      2.Press ENTER to toggle the Escape codes ON and OFF. The
  16775.        default is ON.
  16776.  
  16777.  
  16778.  
  16779.      PC-File Version 7 Users Guide                            287
  16780.  
  16781.  
  16782.      If you don't use any escape codes in your label format, this
  16783.      feature is ignored, whether it is on or off.
  16784.  
  16785.      NOTE: If you print to a file, escape codes appear as garbled
  16786.      text. If you have used escape codes in your label, turn the
  16787.      toggle OFF when printing to a file, unless you will be
  16788.      printing the file later and wish to retain the escape codes.
  16789.  
  16790.      Print Escape Code
  16791.  
  16792.      Printers print in normal typeface unless they are told
  16793.      otherwise. To tell a printer to use bold face, you must send
  16794.      the printer an escape code. Then you must send another escape
  16795.      code to tell it to return to normal type. Each printer
  16796.      understands specific escape codes for each of the various
  16797.      character formats (bold, italic, underline, subscript, etc.)
  16798.      and different printers understand different codes. If you want
  16799.      to use various character formats in your labels, you must tell
  16800.      PC- Label what codes
  16801.      your printer understands. To do that, you use the Print Escape
  16802.      Code option on the Setup menu.
  16803.  
  16804.      NOTE: Any print codes set in the configuration profile don't
  16805.      apply to PC-Label.
  16806.  
  16807.      Highlight the Print Escape Code field and press ENTER. A
  16808.      dialog box appears.
  16809.  
  16810.      The Print Escape Code Menu displays escape codes for all Epson
  16811.      dot matrix printers and any other printers set to an Epson
  16812.      mode. If you are using this type of printer, your work is
  16813.      probably done. If you are using a different printer, consult
  16814.      the printer manual for the printer escape codes.
  16815.  
  16816.      The menu has two parts. At the top is the setup code. This is
  16817.      the field that is highlighted when the menu first appears.
  16818.      Below that is a listing of five individual character formats
  16819.      and the printer escape codes that turn them on and off. The
  16820.      two parts are discussed separately.
  16821.  
  16822.      Setup Code
  16823.  
  16824.      The setup code field lets you enter an all-encompassing escape
  16825.      code for your labels. If you wanted to print your entire label
  16826.      in italics or condensed type, for example, you would enter the
  16827.      appropriate escape code here. You would not have to place a
  16828.      code on the label definition itself.
  16829.  
  16830.      Character Formats
  16831.  
  16832.      You can access and change the information in any of the three
  16833.      columns on the menu. The center column lists the character
  16834.      format, the left column indicates the printer escape code that
  16835.      turns that character format on and the right column indicates
  16836.      the printer escape code that turns it off.
  16837.  
  16838.  
  16839.  
  16840.      PC-File Version 7 Users Guide                            288
  16841.  
  16842.  
  16843.      To make changes to the formats and codes, highlight the
  16844.      appropriate entry and type your change into the edit window
  16845.      that appears. Press ENTER to replace the previous entry with
  16846.      your change.
  16847.  
  16848.      You only need to correct those codes that you plan to use. If
  16849.      your printer reads different codes than the ones shown, but
  16850.      you only plan to use the bold format in your labels, you need
  16851.      only change the escape codes for bold. The other formats and
  16852.      their escape codes will be ignored.
  16853.  
  16854.      If you want to use a format that is not listed, such as small
  16855.      capitals or double wide letters (available on some dot matrix
  16856.      printers), enter the format name in the center column over one
  16857.      of the current formats. Then enter the escape codes listed in
  16858.      your printer manual that turn the format on and off.
  16859.  
  16860.      Escape codes normally consist of two or three characters.
  16861.      These characters can be entered as decimal values between
  16862.      braces, or the actual character can be entered using ALT and
  16863.      the numeric keypad. For example, the Epson dot matrix code to
  16864.      turn off bold face is {27}{65} in decimal and _A using the ALT
  16865.      key and keypad. You can also mix the two ({27}A), as the
  16866.      default values indicate.
  16867.  
  16868.      Label Sheet Definition
  16869.  
  16870.      PC-Label provides 14 templates from which you can choose the
  16871.      one that matches your label stock. If none of them match, you
  16872.      can design a layout that will.
  16873.  
  16874.      To select a template:
  16875.  
  16876.      1.Highlight the Label Sheet definition field and press ENTER.
  16877.        A window listing the label template options appears.
  16878.  
  16879.      2.Highlight the template that matches your label stock. The
  16880.        dimensions of your label stock should be listed on the side
  16881.        of the box containing the labels. Choose User-defined if
  16882.        none of the templates match your label stock.
  16883.  
  16884.      3.Press ENTER to close the window.
  16885.  
  16886.      If you selected a template, you return to the Setup menu. The
  16887.      template you selected is now listed on the screen.
  16888.  
  16889.      If you selected User-defined, a label definition screen
  16890.      displays on which you can create your own template.
  16891.  
  16892.      NOTE: If your labels are 1" high, use the 15/16" equivalent.
  16893.      The other sixteenth of an inch is the space between each
  16894.      label.
  16895.  
  16896.      Creating your Own Template
  16897.  
  16898.  
  16899.  
  16900.      PC-File Version 7 Users Guide                            289
  16901.  
  16902.  
  16903.      To create your own template, first choose the template that
  16904.      most closely resembles the template you have in mind. Then,
  16905.      when you choose User-defined, the values for that template
  16906.      display as the defaults.
  16907.  
  16908.      For example, if you are working with labels that are 4 x 1 1/3
  16909.      (2- up), choose a template like 4 x 1 7/16 (2-up). That way
  16910.      you have to change fewer values when you define the template.
  16911.  
  16912.      The procedures for creating a user-defined template are
  16913.      explained below, followed by a description of the Label Sheet
  16914.      Format Definition screen.
  16915.  
  16916.      To create a User-defined label template:
  16917.  
  16918.      1.Highlight the option Label Sheet definition and press ENTER.
  16919.  
  16920.      2.Choose the template that most closely resembles the template
  16921.        you want to design.
  16922.  
  16923.      3.Press ENTER to display the list of template options again.
  16924.  
  16925.      4.Choose User-defined from the menu of templates. The Label
  16926.        Sheet Format Definition screen appears. It is here you
  16927.        create a template.
  16928.  
  16929.      5.Highlight each option you want to change and press ENTER to
  16930.        activate it.
  16931.  
  16932.      6.Fill in the proper dimension in the edit window that appears
  16933.        at the bottom of the screen for each option.
  16934.  
  16935.      7.Test your answers by printing out a test sheet of labels.
  16936.  
  16937.      8.Make any necessary changes to the label dimensions.
  16938.  
  16939.      9.Press F10 when you finish to return to the setup screen.
  16940.  
  16941.      The User-defined Template Options
  16942.  
  16943.      Each of the options on the template is described below.
  16944.  
  16945.      Number of labels across
  16946.  
  16947.      Indicate the number of labels printed across your label sheet.
  16948.      The minimum is one, the maximum is 25.
  16949.  
  16950.      Width of label and space between
  16951.  
  16952.      Enter the number of characters from the left edge of one label
  16953.      to the left edge of the next label. This field is ignored with
  16954.      single column labels.
  16955.  
  16956.      Label width
  16957.  
  16958.  
  16959.  
  16960.      PC-File Version 7 Users Guide                            290
  16961.  
  16962.  
  16963.      Enter the number of characters that represent the width of a
  16964.      label. Most printers are set up to print 10 characters per
  16965.      inch, but this is not always the case, particularly if you are
  16966.      using condensed or elite type. Check your printer fonts if you
  16967.      have problems with this dimension.
  16968.  
  16969.      Top margin
  16970.  
  16971.      Enter the number of lines at the top of each sheet of labels.
  16972.      This option is only in effect when you feed sheets of labels
  16973.      manually and have set the Feed method (the next option on the
  16974.      setup menu) to By Sheet. Continuous feeding ignores this
  16975.      option.
  16976.  
  16977.      Number of labels down
  16978.  
  16979.      Enter the number contained in one column of one page of
  16980.      labels.
  16981.  
  16982.      Height of label and space between
  16983.  
  16984.      Enter the number of lines from the top of one label to the top
  16985.      of the next label. This is normally one line more than the
  16986.      label height.
  16987.  
  16988.      Label height
  16989.  
  16990.      Enter the number of lines on one label.
  16991.  
  16992.      Run a test
  16993.  
  16994.      Press ENTER with the Make template field highlighted to print
  16995.      a test sheet. Follow the directions on the screen to check
  16996.      your dimensions. If they are not correct, make the necessary
  16997.      changes and run another test.
  16998.  
  16999.  
  17000.      Feed Method
  17001.  
  17002.      PC-Label lets you choose between two methods of paper feed:
  17003.      Continuous and By Sheet. The default is Continuous, as this is
  17004.      the normal method for most printers, including laser printers.
  17005.      However, if you must feed each sheet of labels manually, or
  17006.      want a pause between each page, choose the By Sheet method.
  17007.  
  17008.      To set the feed method:
  17009.  
  17010.      Highlight the Feed method field Press ENTER to toggle between
  17011.      Continuous and By Sheet.
  17012.  
  17013.      Formfeed
  17014.  
  17015.  
  17016.  
  17017.      PC-File Version 7 Users Guide                            291
  17018.  
  17019.  
  17020.      This option lets you add an extra form feed for specific
  17021.      instances where it might be necessary. There are three
  17022.      settings: None, End of each sheet, and End of each set. Which
  17023.      setting you choose depends partly on the feed method you
  17024.      selected in the previous option.
  17025.  
  17026.      None
  17027.  
  17028.      In most cases you want to leave the formfeed off (set to
  17029.      None). More than likely your printer will formfeed
  17030.      automatically after each sheet and at the end of the printing.
  17031.  
  17032.      End of each sheet
  17033.  
  17034.      Choose this option only if you are using the By Sheet feed
  17035.      method. This forces the last page or any other pages that are
  17036.      not fully printed to kick out of the printer.
  17037.  
  17038.      End of each set
  17039.  
  17040.      Choose this option if you are using continuous feed and are
  17041.      printing more than one set (copy) of labels. This option will
  17042.      kick out a page at the end of each set, thus forcing the next
  17043.      set to start on a new page. A set consists of one "print" of
  17044.      labels, whether printed By Group or By Label (see Copies
  17045.      Definition above).
  17046.  
  17047.      To set the formfeed:
  17048.  
  17049.      1.Highlight the Formfeed field.
  17050.  
  17051.      2.Press ENTER to toggle between None, End of each sheet, and
  17052.        End of each set. The default is None.
  17053.  
  17054.      Label Layout
  17055.  
  17056.      Use the Label Layout option to design how your labels will
  17057.      look. Designing a label encompasses locating the fields,
  17058.      adding text, defining the borders, and adding character
  17059.      formatting.
  17060.  
  17061.      There is no default layout or template for the design of an
  17062.      individual label, so you must define this option. Your labels
  17063.      will not print unless you do.
  17064.  
  17065.      To layout a label, highlight the option and press ENTER.
  17066.  
  17067.      The edit window in the center of the screen is sized according
  17068.      to the dimensions you selected under the Label Sheet
  17069.      Definition option. It is within this window that you define
  17070.      your label. This operation is explained below.
  17071.  
  17072.      Locating Fields and Text
  17073.  
  17074.  
  17075.  
  17076.      PC-File Version 7 Users Guide                            292
  17077.  
  17078.  
  17079.      All the fields in the database are listed at the top of the
  17080.      screen. Each field is numbered; use the numbers to locate the
  17081.      fields on the label rather than the names.
  17082.  
  17083.      The last four fields listed are system fields. These fields
  17084.      can be used for all labels. They are explained in detail
  17085.      later.
  17086.  
  17087.      Text intended to appear on all labels can be entered directly
  17088.      onto the label definition. For example, if your labels are
  17089.      large enough, you could enter a return address in the top left
  17090.      corner.
  17091.  
  17092.      All fields, including system fields, and text must be preceded
  17093.      by either of two location markers: the at sign (@) or the
  17094.      question mark (?). These markers are used as follows:
  17095.  
  17096.      At sign (@)
  17097.  
  17098.      Fix the data or text at a specific location by preceding it
  17099.      with the @. The field or text that follows the @ will always
  17100.      start in the spot where you have placed it on the label. The @
  17101.      itself marks the beginning of the field.
  17102.  
  17103.      Question mark (?)
  17104.  
  17105.      Precede fields or text with a ? when you want the data to
  17106.      slide to the left until it encounters other data, the left
  17107.      margin of the label as defined by the left bracket ( [ ), or
  17108.      the left edge of the label. The use of brackets is explained
  17109.      later in this section.
  17110.  
  17111.  
  17112.      I
  17113.      Using System Fields
  17114.  
  17115.      The four system fields provide extra features that can be
  17116.      added to your labels. The system fields are located on a label
  17117.      definition in the same way as a data field, using the number
  17118.      in place of the field name and preceding the field number with
  17119.      an @ or ?.
  17120.  
  17121.      Recno
  17122.  
  17123.      This field lets you print the current record number on each
  17124.      label, based on the current index.
  17125.  
  17126.      Date
  17127.  
  17128.      Use this field to print the current date, taken from the
  17129.      system calendar.
  17130.  
  17131.      Time
  17132.  
  17133.      Use this field to print the current time, taken from the
  17134.      system clock.
  17135.  
  17136.  
  17137.  
  17138.      PC-File Version 7 Users Guide                            293
  17139.  
  17140.  
  17141.  
  17142.      Keyin
  17143.  
  17144.      Use this field to enable you to enter data from the keyboard
  17145.      onto each label. The printer pauses when it encounters this
  17146.      field in each label. Press ENTER when you finish keying in
  17147.      data to continue printing.
  17148.  
  17149.      Unlike other fields, you must define the size of a keyin
  17150.      field. You do this by following the keyin field number with
  17151.      any character from the keyboard, repeated until the end of the
  17152.      field. For example, if you want to define a keyin field eight
  17153.      characters long, you might enter
  17154.  
  17155.      @18aaaaaa
  17156.  
  17157.      Note that the "18" is considered part of the eight character
  17158.      spaces following the @ or ?. You can replace the a's with any
  17159.      other keyboard characters, other than those reserved for other
  17160.      use on the label, such as the @, ?, and the brackets used
  17161.      around field names.
  17162.  
  17163.      Centering the Label and Compressing Lines
  17164.  
  17165.      Use square brackets [ ] to define specific areas within a
  17166.      label for centering and line compression. Follow these
  17167.      guidelines for using brackets.
  17168.  
  17169.        If Centering and Line compression are turned off, brackets
  17170.        have no effect.
  17171.  
  17172.        If either centering or line compression, or both, are turned
  17173.        on, the entire label is affected if you do not use brackets.
  17174.  
  17175.        If either or both functions are turned on, and you do use
  17176.        brackets, only the part of the label enclosed by brackets is
  17177.        affected.
  17178.  
  17179.      Thus, not using brackets is the same as using brackets around
  17180.      the entire label (if centering or line compression is turned
  17181.      on).
  17182.  
  17183.      Adding Character Formatting
  17184.  
  17185.      You can add character formatting to a label if you have
  17186.      toggled the Escape code ON and defined the printer escapes
  17187.      codes for your printer. If so, the character formats for which
  17188.      you have defined escape codes are displayed at the bottom of
  17189.      your screen, below the edit window. Each one is indicated by a
  17190.      print marker, such as <<1>> or <<4>>. Use these print markers
  17191.      to indicate character format changes on the label.
  17192.  
  17193.      To indicate a change in character formatting, place the print
  17194.      marker at the spot where the change occurs. For example, to
  17195.      make a particular field bold, you might locate a field like
  17196.      this:
  17197.  
  17198.  
  17199.  
  17200.      PC-File Version 7 Users Guide                            294
  17201.  
  17202.  
  17203.  
  17204.           ?<<1>>9<<2>>
  17205.  
  17206.      Note that the print marker follows the ? or @ for the field it
  17207.      affects.
  17208.  
  17209.      Use no more than 16 different print markers in one label
  17210.      definition, and only one for each field or text entry. In
  17211.      other words, you cannot combine bold and italic formatting for
  17212.      a particular field or text entry. Also, do not change the type
  17213.      size when printing multi-column labels.
  17214.  
  17215.      Workspace Drive
  17216.  
  17217.      PC-Label uses a small amount of temporary work space when
  17218.      printing labels. This work space, amounting to eight bytes per
  17219.      label, is placed in a temporary file. Use this option to
  17220.      indicate the drive on which that file is placed.
  17221.  
  17222.      To set the workspace drive:
  17223.  
  17224.      1.Highlight the Workspace drive field and press ENTER.
  17225.  
  17226.      2.Enter the drive in the edit window that appears. The default
  17227.        is C.
  17228.  
  17229.      NOTE: The temporary file is removed from your disk when PC-
  17230.      Label has finished processing. However, be sure you have
  17231.      enough space to accommodate the temporary file when printing
  17232.      labels.
  17233.  
  17234.  
  17235.      Printing Labels
  17236.  
  17237.      When you first start printing a set of labels, you need to
  17238.      make sure the label stock is correctly aligned in the printer
  17239.      and that the parameters you have defined for the label
  17240.      definition are correct. PC- Label lets you check these by
  17241.      providing a test option at the start of printing. Use this
  17242.      option to make sure everything is lined up correctly.
  17243.  
  17244.      When you choose Print labels on the PC-Label Main Menu, your
  17245.      labels are printed to the printer or to a file, depending on
  17246.      the output destination you chose on the Setup screen. The two
  17247.      operations are handled in different ways by the program and
  17248.      are covered separately below.
  17249.  
  17250.      To print labels to a printer:
  17251.  
  17252.      1.Choose Print labels from the PC-Label Main Menu.
  17253.  
  17254.  
  17255.  
  17256.      PC-File Version 7 Users Guide                            295
  17257.  
  17258.  
  17259.      2.Choose Yes or No to position your label sheet in the
  17260.        printer. Choose Yes if you are unsure of the placement of
  17261.        the label stock in your printer. PC-Label goes through a set
  17262.        of screens that will help you position the first sheet
  17263.        properly. Choose No if you are familiar with placing the
  17264.        label stock in the printer.
  17265.  
  17266.      3.If you chose Yes to the previous step, choose Yes or No when
  17267.        the program prompts you to align the labels again. Choose
  17268.        Yes to test the alignment again. Choose No if you feel
  17269.        certain the alignment is correct.
  17270.  
  17271.      4.Choose Yes, No, or Yes & don't ask, or press ESC, when PC-
  17272.        Label displays the first label and asks if you want to print
  17273.        it. Choose Yes to print it. Choose No to skip this label and
  17274.        continue to next label. Choose Yes & don't ask to print all
  17275.        the labels without reviewing them on the screen. Press ESC
  17276.        to display the following prompts: Abort-to abort the
  17277.        printing process (to return to the main menu) Backup-to
  17278.        backup to the previous label Continue-continue the printing
  17279.        process Choose the appropriate response.
  17280.  
  17281.      To print labels to a file:
  17282.  
  17283.      1.Choose Print labels on the PC-Label Main Menu.
  17284.  
  17285.      2.Enter the extension, then the path and file name to which
  17286.        you want to print the labels.
  17287.  
  17288.      3.Choose Yes, No, or Yes & don't ask when PC-Label displays
  17289.        the first label and asks if you want to print it. Choose Yes
  17290.        to print the label to the file. Choose No to abort the
  17291.        process. Choose Yes & don't ask to print all the labels
  17292.        without reviewing them on the screen. Press ESC to display
  17293.        the following prompts: Abort-to abort the printing process
  17294.        (to return to the main menu) Backup-to backup to the
  17295.        previous label Continue-continue the printing process Choose
  17296.        the appropriate response.
  17297.  
  17298.      Saving the Current Setup
  17299.  
  17300.      Once you have defined a label setup, you should save it for
  17301.      future use. You can save it before or after you print labels
  17302.      with it, but be sure to save it before you exit from PC-Label
  17303.      or it will be lost.
  17304.  
  17305.      A label setup is saved in a file with an .LBL extension. PC-
  17306.      Label adds this extension automatically when you name the
  17307.      file.
  17308.  
  17309.      To save the current setup:
  17310.  
  17311.      1.Choose Save current setup on the PC-Label Main Menu.
  17312.  
  17313.  
  17314.  
  17315.      PC-File Version 7 Users Guide                            296
  17316.  
  17317.  
  17318.      2.Enter the path (drive and directory) where you want the file
  17319.        to be stored. Do NOT include the file name. If you want to
  17320.        store the file on the current directory, press ENTER to
  17321.        bypass this box.
  17322.  
  17323.      3.Choose New File.LBL from the list that displays to save the
  17324.        setup with a new name. Choose another file name if you want
  17325.        to save the setup to a current file, overwriting that file
  17326.        in the process.
  17327.  
  17328.      4.Enter the name of the file if you chose New File.LBL. Follow
  17329.        DOS filename rules in naming the file. You don't need to
  17330.        enter the extension, as PC-Label adds it automatically.
  17331.  
  17332.  
  17333.  
  17334.      PC-File Version 7 Users Guide                            297
  17335.  
  17336.  
  17337.  
  17338.      CHAPTER 15 TOOLS
  17339.  
  17340.      PC-File includes four small utilities, all easily accessible
  17341.      from the Tools menu or with a hot key. You can have PC-File
  17342.      dial a phone number for you, drop to the DOS prompt, print a
  17343.      single label, or perform a calculation. PC-File also has a
  17344.      spell checking utility for correcting spelling errors in
  17345.      fields and letters. This chapter explains how to use these
  17346.      features.
  17347.  
  17348.  
  17349.      Overview
  17350.  
  17351.      PC-File provides several options on the Tools menu that
  17352.      perform small but very useful tasks. For example, you can
  17353.      temporarily drop out of PC- File, grab almost all of the
  17354.      memory used by the program, run another program, then return
  17355.      to the same spot without losing a step.
  17356.  
  17357.      PC-File also treats you like a CEO. Display a record on the
  17358.      screen and the program will dial the phone for you and tell
  17359.      you when to pick up the receiver.
  17360.  
  17361.      The Tools options are explained briefly below and in more
  17362.      detail in the sections that follow.
  17363.  
  17364.      Option Hot key Action
  17365.  
  17366.      Drop to DOS CTRL-D Lets you issue DOS commands and run other
  17367.      programs Telephone Dialer CTRL-J Dials the phone number
  17368.      selected on the current record Snapshot Label CTRL-L Prints a
  17369.      mailing label for the current record Calculator CTRL-C Lets
  17370.      you enter and memorize a calculation
  17371.  
  17372.  
  17373.      Dropping to DOS
  17374.  
  17375.      The Drop to DOS option lets you exit from PC-File temporarily.
  17376.      You can then issue DOS commands or even run another program.
  17377.      When you return to PC-File, you are in the same place you left
  17378.      off.
  17379.  
  17380.      You may want to copy a file or group of files to another
  17381.      directory, or perhaps delete files to make more room for data.
  17382.      Or you may want to open another program, such as a
  17383.      spreadsheet, and look at a file from which you are about to
  17384.      import data.
  17385.  
  17386.      Before you drop to DOS, determine what action you intend to
  17387.      take. There are two forks in the road as you drop to DOS, and
  17388.      the action you intend to take determines the forks you should
  17389.      follow. The two forks involve:
  17390.  
  17391.      Issuing single or multiple DOS commands Deciding whether you
  17392.      need to free up memory
  17393.  
  17394.  
  17395.  
  17396.      PC-File Version 7 Users Guide                            298
  17397.  
  17398.  
  17399.  
  17400.      Single or Multiple DOS Commands?
  17401.  
  17402.      When you choose Drop to DOS from the Tools menu (or press
  17403.      CTRL-D), PC- File displays a dialog box.
  17404.  
  17405.      To issue a single DOS command, type the command in the dialog
  17406.      box. Once DOS completes the command, press any key to return
  17407.      to PC-File.
  17408.  
  17409.      To issue multiple commands, leave the text box empty and
  17410.      choose OK. PC- File takes you to the DOS prompt, from which
  17411.      you can enter multiple commands. When you are ready to return
  17412.      to PC-File, type exit at the DOS prompt and press ENTER.
  17413.  
  17414.      If you want to open another program, you can do it either from
  17415.      the dialog box or from the DOS prompt. If you have to change
  17416.      directories first, you need to move to the DOS prompt, as
  17417.      multiple commands are needed.
  17418.  
  17419.      Free Up Memory?
  17420.  
  17421.      Once you enter a command in the dialog box, PC-File asks if
  17422.      you want to free up memory. In most cases, answer Yes if you
  17423.      plan to run another program, or answer No if you are just
  17424.      issuing DOS commands.
  17425.  
  17426.      In rare cases, the opposite may be true. If your computer has
  17427.      a lot of memory, you may not have to free up memory to run
  17428.      some programs. If you have a minimum of memory, you may have
  17429.      to free up some just to run a series of DOS commands.
  17430.  
  17431.      PC-File frees up memory by writing a temporary file to disk.
  17432.      The temporary file contains the actions you have taken in PC-
  17433.      File, so you can return to where you left off. All but just
  17434.      over 20K of memory that PC-File normally uses is freed up.
  17435.  
  17436.      NOTE: Be sure you don't delete the temporary file written by
  17437.      PC-File. Temporary files are named TEMPxxxx.PCF, with the x's
  17438.      being any combination of characters.
  17439.  
  17440.      NOTE: Though dropping to DOS should not interfere with PC-
  17441.      File, it is recommended that you save whatever you are
  17442.      currently working on. For example, if you are creating a
  17443.      report, save the report, then drop to DOS. While unlikely, it
  17444.      is possible you could run out of memory and have to reboot.
  17445.  
  17446.  
  17447.      Autodialing a Phone Number
  17448.  
  17449.      Along with its main function as a database program, PC-File
  17450.      includes several important features of a communications
  17451.      program. If you have a modem, you can display records that
  17452.      include phone numbers and use PC- File to dial the phone.
  17453.  
  17454.  
  17455.  
  17456.      PC-File Version 7 Users Guide                            299
  17457.  
  17458.  
  17459.      As an added bonus, PC-File keeps track of your phone calls.
  17460.      After a call ends, an entry is made in a telephone log file,
  17461.      which you can later use to verify the charges on your phone
  17462.      bill.
  17463.  
  17464.      NOTE: You can't use PC-File to "talk" to another computer,
  17465.      such as a bulletin board, or to a fax machine. It's only
  17466.      useful for talking to another person (or listening to an
  17467.      answering machine or voice mail).
  17468.  
  17469.      Autodialing Requirements
  17470.  
  17471.      To make use of the autodialing feature, you need the following
  17472.      equipment and data:
  17473.  
  17474.      Communications port
  17475.  
  17476.      You must have a serial communications port on your computer.
  17477.      This can be COM1, COM2, COM3, or COM4.
  17478.  
  17479.      Modem
  17480.  
  17481.      You must have a "Hayes compatible" modem connected to your
  17482.      communications port. It doesn't have to actually be a Hayes
  17483.      modem. It just has to be able to recognize a few of the Hayes
  17484.      modem commands. Most modems can do this.
  17485.  
  17486.      The modem is essential because PC-File uses it to actually
  17487.      place the phone call. After the phone number has been dialed,
  17488.      the modem is no longer needed. PC-File bypasses the modem so
  17489.      you can talk on your handset.
  17490.  
  17491.      Handset
  17492.  
  17493.      This is the actual telephone. Plug the telephone into the
  17494.      modem. There's usually a connector on the modem that says "to
  17495.      phone" or "handset", or something similar.
  17496.  
  17497.      You can use a dial (pulse) or touch-tone phone. PC-File
  17498.      assumes you have a dial phone unless you specify you have a
  17499.      touch-tone phone by changing the modem dialing command in your
  17500.      configuration profile. See Chapter 13, "Utilities," for
  17501.      information.
  17502.  
  17503.      Database
  17504.  
  17505.      You must have some phone numbers that PC-File can use to place
  17506.      the call. The phone numbers come from a field in a database.
  17507.      The database might be a "customer" database, or a "sales
  17508.      leads" database, or any type of database that contains phone
  17509.      numbers. The phone number must be in a field named "phone", or
  17510.      have "phone" as part of the name. You can have multiple phone
  17511.      fields in a database, as PC-File prompts you for the number
  17512.      you want to call if it detects more than one phone number
  17513.      field.
  17514.  
  17515.  
  17516.  
  17517.      PC-File Version 7 Users Guide                            300
  17518.  
  17519.  
  17520.  
  17521.      Setting Up a Database for Autodialing
  17522.  
  17523.      If you intend to use the autodialing features of PC-File,
  17524.      check your configuration profile to make sure the modem port
  17525.      and dialer settings are correct. (See the section on
  17526.      configuration in Chapter 13, "Utilities," for information.)
  17527.      Then follow these guidelines when defining your database:
  17528.  
  17529.      The phone field
  17530.  
  17531.      When the telephone dialer is activated, it looks at each of
  17532.      the field names in the database. If any field name includes
  17533.      the characters "phone", that field is assumed to contain a
  17534.      phone number. Be sure to use the word "phone" in the
  17535.      appropriate field(s).
  17536.  
  17537.      If you have multiple phone fields, PC-File will prompt you to
  17538.      select one of them when you make a call.
  17539.  
  17540.      The phone number
  17541.  
  17542.      The phone numbers should normally be entered as numeric digits
  17543.      (though the field should be a character-type field). Some
  17544.      modems can translate characters to digits, but many can't.
  17545.      Thus, it is recommended that you enter (800)J-BUTTON as
  17546.      (800)528-8866. You can include spaces, parentheses, or hyphens
  17547.      for clarity, although they aren't required.
  17548.  
  17549.      Embedded commands
  17550.  
  17551.      You can include Hayes modem commands in the phone number
  17552.      field, though they are normally unnecessary. PC-File
  17553.      automatically sends the ATD command to alert the modem that
  17554.      you are about to use it. Other commands, such as including a 9
  17555.      before the number to dial out of an office, should be included
  17556.      in the phone access commands in the configuration profile. See
  17557.      Chapter 13, "Utilities," for information on setting up your
  17558.      phone profile. See your modem manual for information on Hayes
  17559.      modem commands.
  17560.  
  17561.      Comments
  17562.  
  17563.      If you want to include a comment (information that will not be
  17564.      sent to the modem) in a phone number field, precede the
  17565.      comment with a semicolon. For example, you might type 528-
  17566.      8866; ask for Janet.
  17567.  
  17568.      Long distance codes
  17569.  
  17570.      For long distance calls outside of your area code, don't
  17571.      include the "1" (long distance access code) with the phone
  17572.      number. You do need to include the area code, however. PC-File
  17573.      automatically adds the 1 for all phone numbers that are 10
  17574.      digits or longer, unless the number starts with a zero (calls
  17575.      outside the U.S. and Canada).
  17576.  
  17577.  
  17578.  
  17579.      PC-File Version 7 Users Guide                            301
  17580.  
  17581.  
  17582.  
  17583.      For long distance calls within your area code, you must
  17584.      include the "1," unless your local phone company requires you
  17585.      to dial the area code for long distance calls within your area
  17586.      code. In that case, treat it like any other long distance
  17587.      number and enter the area code into your phone field.
  17588.  
  17589.      Here are some valid phone numbers:
  17590.  
  17591.      528-8866 a local call
  17592.  
  17593.      1-528-8866 long distance within the area code
  17594.  
  17595.      1 528 8866 same as above
  17596.  
  17597.      (206) 528-8866 long distance to a different area code
  17598.  
  17599.      206-528-8866 same as above
  17600.  
  17601.      011-312-322-1 foreign call (PC-File doesn't send a 1)
  17602.  
  17603.  
  17604.  
  17605.      Placing a Call
  17606.  
  17607.      Be sure the modem and telephone are hooked up correctly and
  17608.      the port and access codes are properly configured in the
  17609.      database configuration profile.
  17610.  
  17611.      To place a call:
  17612.  
  17613.      1.Display the record containing the phone number you wish to
  17614.        call. You can be in either Modify mode or Read-only mode. If
  17615.        you are in a Table view, highlight the record. You do not
  17616.        have to highlight the phone field itself. You must have the
  17617.        record itself displayed. You can't place a call from a
  17618.        letter or report that contains phone number data.
  17619.  
  17620.      2.Choose Tools from the menu bar.
  17621.  
  17622.      3.Choose Telephone dialer from the Tools menu. As an
  17623.        alternative to steps 2 and 3, press CTRL-J to activate
  17624.        autodial. To recall this hot key, remember that the J stands
  17625.        for Jingle.
  17626.  
  17627.      4.Choose the phone number to call if there is more than one
  17628.        phone field in the record. PC-File displays a dialog box
  17629.        listing the phone numbers when multiple phone fields are
  17630.        defined in a record.
  17631.  
  17632.      5.Wait while the call is being made. Normally you can hear the
  17633.        modem dialing and the rings or busy signal that follow.
  17634.  
  17635.  
  17636.  
  17637.      PC-File Version 7 Users Guide                            302
  17638.  
  17639.  
  17640.      6.Pick up the handset and press ENTER as instructed on the
  17641.        screen. Pressing ENTER starts the timer that records the
  17642.        length of the call. Picking up the handset releases the
  17643.        modem from the phone line. Do NOT pick up the handset until
  17644.        the dialing is completed, as it interrupts the dialing
  17645.        process.
  17646.  
  17647.      7.Press ENTER again when you finish the call to stop the
  17648.        timer, then replace the handset. If you need to use your
  17649.        computer while you're talking on the phone, you can stop the
  17650.        timer whenever you want. This removes the timing message
  17651.        from the screen, but allows you to continue the phone
  17652.        conversation. Of course, the entry in your phone log will
  17653.        reflect a shorter call duration due to the early stoppage of
  17654.        the call timer.
  17655.  
  17656.      The Phone Log
  17657.  
  17658.      A different phone log is kept for each database. The log is
  17659.      called databasename.CDS.
  17660.  
  17661.      PC-File adds a new entry in the .CDS file for each call. The
  17662.      entry always includes the current date, phone number dialed,
  17663.      starting time and call duration, and the port to which the
  17664.      modem is connected. The program also picks up information from
  17665.      any fields which include the characters "name", "company",
  17666.      "city", "state", and "country".
  17667.  
  17668.      Printing and Displaying a Phone Log
  17669.  
  17670.      All of the information in the phone log is in ASCII character
  17671.      format. Thus, you can display or print out your phone log
  17672.      using any program that reads ASCII files. This includes most
  17673.      text editors and word processing programs.
  17674.  
  17675.      NOTE: If you have to change the extension .CDS to a different
  17676.      extension in order to display the file in a word processing
  17677.      program, be sure to save it back as a text file if you want to
  17678.      continue adding phone calls to it.
  17679.  
  17680.      You can also print the log directly by using the DOS PRINT
  17681.      command. At the DOS prompt, type print databasename.cds and
  17682.      press ENTER. Be sure you are in the same directory as the
  17683.      file. The log prints to the default printer.
  17684.  
  17685.      Deleting a Phone Log
  17686.  
  17687.      Each phone call made is added to the end of the current
  17688.      database phone log. If you want to clean out the phone log and
  17689.      start a fresh one, just delete the file using the DOS DELETE
  17690.      or ERASE command. For example, type del databasename.cds at
  17691.      the DOS prompt and press ENTER.
  17692.  
  17693.      PC-File automatically creates a new log for the database the
  17694.      next time you make a call.
  17695.  
  17696.  
  17697.  
  17698.      PC-File Version 7 Users Guide                            303
  17699.  
  17700.  
  17701.  
  17702.      Taking Snapshot Labels
  17703.  
  17704.      Snapshot labels let you print a single mailing label for the
  17705.      currently displayed record. This can be a handy feature,
  17706.      particularly for those users that take phone orders or for one
  17707.      reason or another want to print out labels one at a time.
  17708.  
  17709.      You can also print snapshot labels to a file, then print them
  17710.      out all at once at a later time. That might be a better way to
  17711.      do it, if you are not set up for printing single labels.
  17712.  
  17713.      You can also use this feature to save snippets of information
  17714.      other than mailing labels. In fact, the snapshot label feature
  17715.      can be used for a wide variety of possibilities. For example,
  17716.      you can set up a phone log format to remember who called. You
  17717.      can format envelopes with both a mailing and return address,
  17718.      using the Free form format in Reports. You can format a COD
  17719.      label or invoicing form for quick printing. You can even print
  17720.      snapshot letters if you want.
  17721.  
  17722.      Snapshot Label Procedures
  17723.  
  17724.      "Snapping" a snapshot label is a simple process, but there are
  17725.      several preliminary steps before you can actually take the
  17726.      snapshot.
  17727.  
  17728.      To define and take a snapshot label:
  17729.  
  17730.      1.Define a report structure for your snapshot label. Reports
  17731.        are normally defined using the Mail label format of the
  17732.        Report generator, though you can use any format. See
  17733.        "Defining the Snapshot Structure" below for more
  17734.        information.
  17735.  
  17736.      2.Assign a report to a snapshot number. You do that in your
  17737.        configuration profile. See Chapter 13, "Utilities," for
  17738.        information.
  17739.  
  17740.      3.Select the output for the snapshot. You can print to a
  17741.        printer or to a file. This decision is also entered in your
  17742.        configuration profile.
  17743.  
  17744.      4.Display a record on the screen. You can be in Record view or
  17745.        Table view. In Table view, the record currently highlighted
  17746.        is used.
  17747.  
  17748.      5.Take the snapshot. Choose Tools from the menu bar and
  17749.        Snapshot label from the Tools menu. As an alternative, press
  17750.        CTRL-L. If you have multiple snapshot label formats attached
  17751.        to the current database, PC-File prompts you to choose one.
  17752.        If printing to a printer, be sure it is properly hooked up
  17753.        and turned on.
  17754.  
  17755.      Defining the Snapshot Structure
  17756.  
  17757.  
  17758.  
  17759.      PC-File Version 7 Users Guide                            304
  17760.  
  17761.  
  17762.      A snapshot label is a report incorporating just one record
  17763.      from your database. Like a report, you must first outline the
  17764.      structure of the snapshot before you can print it.
  17765.  
  17766.      You can use any of the report formats for defining a snapshot
  17767.      report, though for actual mailing labels, the Mail label
  17768.      format is probably the easiest. If you use the Free form or
  17769.      Language formats, you can only use the Detail section. A
  17770.      snapshot does not read any other section in a report.
  17771.  
  17772.      You can use a report for snapshots that you also use for
  17773.      printing a regular report. For example, if you have created a
  17774.      report for printing mailing labels, you can use the same
  17775.      structure for snapshots. You can also create reports for just
  17776.      using with snapshots.
  17777.  
  17778.      Once you have defined the report structure, you must assign it
  17779.      to a snapshot. You can define up to five snapshot reports in
  17780.      each database. At the same time, you must tell PC-File whether
  17781.      you want to print that snapshot to a file or to the printer.
  17782.      Both operations are handled in the configuration profile. See
  17783.      Chapter 13, "Utilities," for information on these operations.
  17784.  
  17785.      NOTE: You can't use a mailing label defined in the PC-Label
  17786.      utility for a snapshot.
  17787.  
  17788.      Using the Calculator
  17789.  
  17790.      The Calculator option on the Tools menu emulates a standard 4-
  17791.      function calculator which responds to either the mouse or the
  17792.      keyboard (including the keypad). You can perform any type of
  17793.      calculation that is functional within PC-File, including
  17794.      arithmetic and date calculations, string calculations, and
  17795.      relational lookups. See Chapter 17, "Calculations," for more
  17796.      details on performing calculations.
  17797.  
  17798.      If a calculation includes one or more field names, the data
  17799.      from the currently displayed or highlighted record is used in
  17800.      the calculation.
  17801.  
  17802.      Choosing the Calculator option on the Tools menu, or pressing
  17803.      CTRL-C displays the calculator dialog box.
  17804.  
  17805.      The text box at the top of the window displays the calculation
  17806.      as a formula reading left to right, for example, 123.4 + 567.8
  17807.      - 901. If the calculation exceeds the length of the text box,
  17808.      the display will scroll up to a total of 120 characters. You
  17809.      can enter any valid PC-File calculation containing numbers,
  17810.      field names, and all supported functions:
  17811.  
  17812.      Date calculations (@TODAY#), (@DAY#,mask), and (@DATE,mask)
  17813.  
  17814.      Relational lookups (@shared field in current db, lookup
  17815.      database, shared field in lookup db, lookup field)
  17816.  
  17817.  
  17818.  
  17819.      PC-File Version 7 Users Guide                            305
  17820.  
  17821.  
  17822.      Logical expressions Comparisons using any of the following
  17823.      operators:
  17824.  
  17825.      < Less than
  17826.  
  17827.      > Greater than
  17828.  
  17829.      & And
  17830.  
  17831.      | Or
  17832.  
  17833.      ( ) Parentheses
  17834.  
  17835.      NOTE: Logical operators which use the = sign cannot be typed
  17836.      in directly because pressing the = key causes the calculator
  17837.      to display its result. It is possible to copy a logical
  17838.      expression from an editing window or text box in another area
  17839.      of PC-File with CTRL-INS and paste it into the calculation
  17840.      text box with SHIFT-INS.
  17841.  
  17842.      Math functions + Addition
  17843.  
  17844.      - Subtraction
  17845.  
  17846.      * Multiplication
  17847.  
  17848.      / Division
  17849.  
  17850.      ^ Exponentiation
  17851.  
  17852.      % Modulo (Remainder)
  17853.  
  17854.  
  17855.      String functions UPCASE( ), LOWCASE( ), MIXCASE( ), LASTWORD(
  17856.      ), FIRSTWORD( ), TRIM( ), and ; (semicolon) the concatenation
  17857.      operator.
  17858.  
  17859.      The result of your calculation is not displayed until you
  17860.      click = on the calculator, press the = key, or press ENTER.
  17861.      The result does not automatically clear, allowing you to
  17862.      display an intermediate result and continue, incorporating the
  17863.      result into subsequent calculations, if you want.
  17864.  
  17865.      In addition to standard number, decimal, add, subtract,
  17866.      multiply, divide and equals keys, there are seven other keys :
  17867.  
  17868.      clr
  17869.  
  17870.      The Clear key clears the calculation text box. Also, if the
  17871.      contents of the text box has been memorized with the Store
  17872.      (sto) key, pressing it a second time after clearing the text
  17873.      box clears the memorized contents.
  17874.  
  17875.      sto
  17876.  
  17877.  
  17878.  
  17879.      PC-File Version 7 Users Guide                            306
  17880.  
  17881.  
  17882.      The Store key memorizes the full contents of the calculation
  17883.      text box. This can be the result of a calculation (after
  17884.      pressing =) or a calculation formula itself (before pressing
  17885.      =). As much of the memorized contents as possible displays
  17886.      above the calculation text box. Choosing Store with something
  17887.      already memorized replaces the previously memorized value.
  17888.  
  17889.      rcl
  17890.  
  17891.      The Recall key retrieves the value or calculation stored with
  17892.      the Store key.
  17893.  
  17894.      cpy
  17895.  
  17896.      The Copy key copies the full contents of the calculation text
  17897.      box to a memory buffer allowing you to "paste" it with SHIFT-
  17898.      INS. This is generally used to copy the result of a
  17899.      calculation into a field after exiting the calculator window.
  17900.  
  17901.      exit
  17902.  
  17903.      The Exit key removes the calculator window.
  17904.  
  17905.      fld
  17906.  
  17907.      The Field key displays a dialog box that allows you to choose
  17908.      data from any field and copies it to the end of the contents
  17909.      of the calculation text box. This key does not appear when the
  17910.      Calculator is invoked with no database open.
  17911.  
  17912.      LU
  17913.  
  17914.      The Lookup key displays two dialog boxes that allows you to
  17915.      retrieve data from a field in a related database. See Defining
  17916.      Relational Lookups, below, for details on how to use the
  17917.      Lookup dialog boxes. This key does not appear when the
  17918.      Calculator is invoked when no database is open.
  17919.  
  17920.      NOTE: The Store key and the Copy key differ slightly in
  17921.      function. Each stores its memorized information to a separate
  17922.      memory buffer. The Store key can only be used to memorize and
  17923.      copy information within the Calculator window, and must be
  17924.      used in conjunction with the Recall key. The Copy key copies
  17925.      the current contents of the calculaton text box to the same
  17926.      buffer used for the CTRL-INS, SHIFT-DEL, and SHIFT-INS edit
  17927.      keys, and is used to copy the memorized information to any
  17928.      active field or text
  17929.      box used in PC-File.
  17930.  
  17931.      Additionally, both the Store and Copy keys only copy the
  17932.      entire contents of the calculation text box, to copy a portion
  17933.      of the text box: highlight the desired portion, press CTRL-
  17934.      INS, move the cursor to the location you want to copy to and
  17935.      press SHIFT-INS.
  17936.  
  17937.      To perform a calculation:
  17938.  
  17939.  
  17940.  
  17941.      PC-File Version 7 Users Guide                            307
  17942.  
  17943.  
  17944.  
  17945.      1.Choose Tools from the menu bar.
  17946.  
  17947.      2.Choose Calculator from the Tools menu. As an alternative to
  17948.        steps 1 and 2, press CTRL-C.
  17949.  
  17950.      3.Enter the calculation into the text box using any of the
  17951.        following methods:
  17952.  
  17953.           Using the keyboard
  17954.  
  17955.           Using the numeric keypad
  17956.  
  17957.           Clicking the key buttons on the Calculator window with
  17958.           the mouse.
  17959.  
  17960.      4.Press ENTER or click = to display the answer.
  17961.  
  17962.      5.Choose the Copy key or press CTRL-P if you want to save the
  17963.        answer to the cut-and-paste buffer.
  17964.  
  17965.      6.Choose Exit to remove the Calculator window.
  17966.  
  17967.      To write an answer saved to the cut-and-paste buffer to a
  17968.      field or text box, move the cursor to the desired location and
  17969.      press SHIFT-INS.
  17970.  
  17971.      The cut-and-paste buffer is shared by the Copy key and the
  17972.      edit keys: CTRL-INS and SHIFT-DEL. The cut-and-paste buffer
  17973.      only holds one memorized item at a time. Subsequent uses of
  17974.      the Copy key, CTRL-INS, or SHIFT-DEL replaces whatever was
  17975.      previously in the cut-and-paste buffer.
  17976.  
  17977.  
  17978.      Using the Spell Checker
  17979.  
  17980.      The Spell Checker is available in many areas of the program.
  17981.      You can check data in memo fields or the text of letters used
  17982.      in a mail merge. The Spell Checker is accessed as a tool on
  17983.      the button bar or by pressing CTRL-Q. You cannot access the
  17984.      spell checker from the Tools menu, but it is included in this
  17985.      part of the documentation because it is used like a tool.
  17986.  
  17987.      There are two ways to invoke the spell checker.
  17988.  
  17989.        Press CTRL-Q.
  17990.  
  17991.        Click on the Spell Button with the mouse.
  17992.  
  17993.      When a misspelled word is encountered a dialog box displays.
  17994.  
  17995.      The spell checker in PC-File is similar to any spell checker
  17996.      you may have used in a word processor. When you spell check
  17997.      text in PC-File, it pauses and displays any misspelled word.
  17998.      You then have four options:
  17999.  
  18000.  
  18001.  
  18002.      PC-File Version 7 Users Guide                            308
  18003.  
  18004.  
  18005.      Option: Function
  18006.  
  18007.      Ignore :  Ignore the misspelled word and continue the spell
  18008.      checking.
  18009.  
  18010.      Suggest:  Suggest options for the misspelled word.
  18011.  
  18012.      Add:  Add the current word to the user dictionary.
  18013.  
  18014.      Re-type:  Re-type the current word in the edit box, making the
  18015.      proper corrections.
  18016.  
  18017.      Ignore
  18018.  
  18019.      Use this option when you use a word or acronym such as NASA.
  18020.      You might want to include NASA in a memo, but not add it to
  18021.      the user dictionary. Choose Ignore to skip the current word
  18022.      and continue spell checking.
  18023.  
  18024.      Suggest
  18025.  
  18026.      Use this option when you want to see various options for
  18027.      corrected spellings. After using the Suggest option, you can
  18028.      select one of the suggestions from the list and then choose
  18029.      Replace to replace the misspelled word with that selection. If
  18030.      the correct word is not among the suggestions, you can re-type
  18031.      the word, making any changes necessary. You can then Replace
  18032.      the word or Add the word. Adding the word will both replace
  18033.      the word and add it to the user dictionary.
  18034.  
  18035.      Add
  18036.  
  18037.      This is used to add frequently used words to the user
  18038.      dictionary that are not found in a common dictionary. Proper
  18039.      names are common additions to the user dictionary. The name
  18040.      "Frankie Angelosi" is not in the dictionary. "Frankie
  18041.      Angelosi" could be added to the user dictionary so that PC-
  18042.      File will not stop each time it found the name. Choose Add to
  18043.      add the current word to the user dictionary.
  18044.  
  18045.      Re-typing
  18046.  
  18047.      You can also edit the current word, making the correction by
  18048.      hand as opposed to having PC-File make any suggestions. For
  18049.      example, PC- file would stop on the word "aftr." It may be
  18050.      easier to simply add "e" to the current word in the edit box
  18051.      and make "after" instead of pressing Suggest and then Replace.
  18052.      Re-type the current word in the edit box to make changes by
  18053.      hand.
  18054.  
  18055.      After you have made changes to a word, you can replace the
  18056.      original word with the changed word by choosing Replace. You
  18057.      can also choose Add to add the changed word to the user
  18058.      dictionary and replace the original word with the newly added
  18059.      word.
  18060.  
  18061.  
  18062.  
  18063.      PC-File Version 7 Users Guide                            309
  18064.  
  18065.  
  18066.      You can stop the spell checker at anytime by choosing CANCEL.
  18067.  
  18068.      Spell Checking Memo Fields
  18069.  
  18070.      You can use the spell checker in memo fields. You can use it
  18071.      at anytime: when you first enter the data or later, when
  18072.      examining your data.
  18073.  
  18074.      To use the spell checker in a memo field:
  18075.  
  18076.      1.Expand the memo field by pressing CTRL-E or clicking on the
  18077.        up arrow button to the right of the memo field.
  18078.  
  18079.      2.Choose Spell. PC-File begins spell checking the entire memo
  18080.        field. When a misspelled word is encountered the Spell Check
  18081.        dialog box displays.
  18082.  
  18083.      3.Make the appropriate corrections using: Ignore, Suggest, Add
  18084.        or re- typing for all misspelled words.
  18085.  
  18086.      Spell Checking in the Letter Writer
  18087.  
  18088.      The Spell Checker is available in the Letter Writing part of
  18089.      PC-File. You can check the spelling at any point in the
  18090.      document. The Spell Checker always starts at the point of the
  18091.      cursor and moves through the document to the end. To check an
  18092.      entire document, move the cursor the top of the document and
  18093.      choose Spell.
  18094.  
  18095.      To use the spell checker in a letter:
  18096.  
  18097.      1.Move the cursor to the first word to spell check, or move
  18098.        the cursor to the beginning of the letter to spell check the
  18099.        whole letter.
  18100.  
  18101.      2.Choose Spell. PC-File begins spell checking the letter. When
  18102.        a misspelled word is encountered the Spell Check dialog box
  18103.        displays.
  18104.  
  18105.      3.Make the appropriate corrections using: Ignore, Suggest, Add
  18106.        or re- typing for all misspelled words.
  18107.  
  18108.      Spell Checking Other Fields or Text
  18109.  
  18110.      You can invoke the spell checker in other fields or anywhere
  18111.      the "I- beam" text cursor is active. For example, the spell
  18112.      checker will check the contents of any text box including
  18113.      fields.
  18114.  
  18115.      To spell check other fields or text:
  18116.  
  18117.      1.Place the cursor in any field or area the text cursor is
  18118.        active.
  18119.  
  18120.  
  18121.  
  18122.      PC-File Version 7 Users Guide                            310
  18123.  
  18124.  
  18125.      2.Press CTRL-Q. PC-File begins spell checking the letter. When
  18126.        a misspelled word is encountered, the Spell Check dialog box
  18127.        displays.
  18128.  
  18129.      3.Make the appropriate corrections using: Ignore, Suggest, Add
  18130.        or re- typing for all misspelled words.
  18131.  
  18132.  
  18133.  
  18134.      PC-File Version 7 Users Guide                            311
  18135.  
  18136.  
  18137.  
  18138.      CHAPTER 16 USING MACROS
  18139.  
  18140.      A macro is a shortcut around repetitive work. Instead of
  18141.      typing out the name of your company repeatedly, you can record
  18142.      a macro and enter it with just two keystrokes. Or you could
  18143.      set up a macro to run out a weekly report. Macros are easy to
  18144.      set up and easy to use. This chapter explains how.
  18145.  
  18146.  
  18147.  
  18148.      Why Use Macros?
  18149.  
  18150.      Recording a macro is similar to using a tape recorder. You
  18151.      turn on the record option, make the recording, then turn it
  18152.      off. Later you can play it back just as it was recorded.
  18153.  
  18154.      Macros are essentially a tool to help you cut down on
  18155.      repetitive tasks. Any PC-File operation that you perform often
  18156.      is a good candidate to become a macro.
  18157.  
  18158.      For example, if you find yourself typing out your name and
  18159.      address repeatedly while using PC-File's letter writing
  18160.      feature, record the operation as a macro. You won't have to
  18161.      ever type it again.
  18162.  
  18163.      You could also set up a macro to print out a weekly or monthly
  18164.      report. Record every step, from opening the appropriate
  18165.      database to printing. You can even record a printer setup
  18166.      change, switching from a default dot matrix printer to the
  18167.      laser printer, then switching back again when the printing is
  18168.      completed.
  18169.  
  18170.      PC-File also lets you insert a pause in a macro that allows
  18171.      user input from the keyboard. Thus, you could enter a new
  18172.      title for a report from the keyboard in the middle of
  18173.      executing a macro.
  18174.  
  18175.      A macro can also be useful for making changes to your records.
  18176.      If you have imported a database, for example, and want to
  18177.      divide the information in a particular field into two fields,
  18178.      a recursive macro can save you a lot of time and effort. With
  18179.      a recursive macro, PC-File loops through every record, making
  18180.      the requested changes.
  18181.  
  18182.      Macro Guidelines
  18183.  
  18184.      A macro is a single command that represents a sequence of
  18185.      previously- recorded commands and keystrokes. Executing the
  18186.      macro results in the entire sequence of commands being played
  18187.      back.
  18188.  
  18189.      PC-File makes it easy to record and execute macros. Follow
  18190.      these guidelines when creating and using macros:
  18191.  
  18192.      Macro identifiers
  18193.  
  18194.  
  18195.  
  18196.      PC-File Version 7 Users Guide                            312
  18197.  
  18198.  
  18199.  
  18200.      In PC-File, macros are identified by one of the 26 letters of
  18201.      the alphabet. You can also create a special startup macro and
  18202.      identify with an asterisk (*).
  18203.  
  18204.      Macro descriptions
  18205.  
  18206.      Along with choosing an identifier, you can enter a macro
  18207.      description. Enter a description that will remind you what
  18208.      operation the macro performs. Descriptions can be up to 30
  18209.      characters long.
  18210.  
  18211.      Macro window
  18212.  
  18213.      PC-File lists all macros in a window. The window displays
  18214.      after you record a macro, allowing you to choose an
  18215.      identifier. You also display the window to execute, modify, or
  18216.      delete a macro.
  18217.  
  18218.      Macro files
  18219.  
  18220.      Each window of macros is stored in a separate file. Macros
  18221.      created with no database open are stored in PCFILE.MAC. This
  18222.      file loads automatically when you start PC-File. Macros
  18223.      created within a database are stored in a file called
  18224.      databasename.MAC. A different file is created for each
  18225.      database. The file loads when you open the database. If you
  18226.      need more than the 26 macros allowed within one file, you can
  18227.      set up an additional file and load it into the database
  18228.      whenever it's needed.
  18229.  
  18230.      Macro limits
  18231.  
  18232.      A macro can contain up to 1000 characters. Some keystrokes,
  18233.      such as entering a single letter, require only one character.
  18234.      Others, such as pressing ENTER, require up to seven or eight
  18235.      characters. Thus, it is impossible to say how many commands
  18236.      can be entered in a single macro, but the limit of 1000
  18237.      characters is large enough to include most operations. If you
  18238.      suspect that an operation will need more than the limit
  18239.      allows, you can divide the operation between two macros,
  18240.      starting the second macro as part of the operation in the
  18241.      first macro.
  18242.  
  18243.      Planning a Macro
  18244.  
  18245.      Before you record a macro, plan out what you want to do. You
  18246.      might want to list the steps involved and run through them
  18247.      once. This can save you from having to edit or re-record the
  18248.      macro later on.
  18249.  
  18250.      Among the points to consider before you record a macro:
  18251.  
  18252.      Consider the starting point
  18253.  
  18254.  
  18255.  
  18256.      PC-File Version 7 Users Guide                            313
  18257.  
  18258.  
  18259.      Think about where you will be in PC-File when you run the
  18260.      macro in the future. For example, if you set up a macro to run
  18261.      a weekly report, do you start the macro with the database open
  18262.      or do you include the opening of the database in the macro?
  18263.  
  18264.      Mouse commands are ignored
  18265.  
  18266.      Macros do not record mouse commands. Thus, if you use a mouse
  18267.      with PC-File, learn the keyboard commands for those steps that
  18268.      you normally perform with a mouse. Then, when you record the
  18269.      macro, record only keyboard commands. Mouse commands are
  18270.      ignored during recording and skipped over when playing back
  18271.      the macro.
  18272.  
  18273.      Mistakes are recorded
  18274.  
  18275.      If you make a mistake while recording a macro, the mistake and
  18276.      your correction become part of the macro. For example, if you
  18277.      spell a word wrong while typing it in, the mistake, the
  18278.      deletion, and the correction all become part of the macro.
  18279.      Though the end result is correct, you may want to edit the
  18280.      macro after you finish recording it to remove the mistake.
  18281.  
  18282.      Arrow keys can be dangerous in macros
  18283.  
  18284.      When possible, avoid using the arrow keys to make selections
  18285.      from lists. After all, lists change. Whether it is a list of
  18286.      files or a list of fields, the options are variable and can
  18287.      change from week to week. For example, you can create a new
  18288.      report or delete an old one, changing the lineup of report
  18289.      files. Or you could redefine the fields in a database.
  18290.  
  18291.      Thus, instead of using the arrow keys to highlight a field or
  18292.      file, type the field or file name in the text box within the
  18293.      respective dialog box. That ensures that any changes to the
  18294.      order of the options on the list don't affect the macro.
  18295.  
  18296.      Menu option availability can also change, as the result of
  18297.      some options being grayed out. It is recommended that you
  18298.      press the underlined letter of an option rather than using
  18299.      arrow keys to choose it.
  18300.  
  18301.      The Macro Options
  18302.  
  18303.      Use the options on the Macros menu (or the hot keys, if
  18304.      available) to create and use Macros.
  18305.  
  18306.      Option: Explanation
  18307.  
  18308.      Execute: (CTRL-M or right Display macro window to select and
  18309.      run a mouse button) macro
  18310.  
  18311.      Begin recording: (CTRL-Y) Start recording a macro
  18312.  
  18313.      End recording: (CTRL-Y) Stop recording a macro
  18314.  
  18315.  
  18316.  
  18317.      PC-File Version 7 Users Guide                            314
  18318.  
  18319.  
  18320.      Modify: Edit a macro description or definition
  18321.  
  18322.      Delete: Erase a macro
  18323.  
  18324.      Load new set: Create or load a macro file
  18325.  
  18326.  
  18327.  
  18328.      Recording a Macro
  18329.  
  18330.      You must use the keyboard when recording a macro. Mouse
  18331.      commands are ignored during the recording and skipped over
  18332.      during execution of the macro.
  18333.  
  18334.      PC-File indicates that a macro is being recorded by making an
  18335.      audible sound every time you depress a key.
  18336.  
  18337.      To record a macro:
  18338.  
  18339.      1.Choose Macros from the menu bar.
  18340.  
  18341.      2.Choose Begin recording from the Macros menu. As an
  18342.        alternative to steps above, press CTRL-Y.
  18343.  
  18344.      3.Press ENTER to remove the message window and begin
  18345.        recording.
  18346.  
  18347.      4.Perform the operation you want to record.
  18348.  
  18349.      5.Choose End recording from the Macros menu, or press CTRL-Y
  18350.        again.
  18351.  
  18352.      6.Identify the macro by choosing a letter from the window that
  18353.        displays.
  18354.  
  18355.      7.Enter a description of the macro. The description is
  18356.        optional, but recommended. You can enter a description of up
  18357.        to 30 characters.
  18358.  
  18359.      8.Edit the macro contents if necessary. The macro contents
  18360.        display the keystrokes you made during the recording of the
  18361.        macro in a written format. You can edit the macro by editing
  18362.        the written definition. See the section on modifying a macro
  18363.        below.
  18364.  
  18365.      9.Choose OK when you have finished.
  18366.  
  18367.      Pausing for User Input
  18368.  
  18369.      You can force a macro to pause and accept keyboard input from
  18370.      an operator during execution. This can be handy for entering a
  18371.      new title for a report each time you run it, or to include
  18372.      specific criteria as part of a formula search.
  18373.  
  18374.      To include a pause in a macro:
  18375.  
  18376.  
  18377.  
  18378.      PC-File Version 7 Users Guide                            315
  18379.  
  18380.  
  18381.      Type {INPUT} at the point where you want keyboard input.
  18382.  
  18383.      In most cases, you should be able to insert the pause while
  18384.      recording the macro. For example, to force a pause allowing
  18385.      the user to enter a report title, you could enter {INPUT} as
  18386.      the report title when recording the macro. Obviously, the
  18387.      report you print out during the macro recording process would
  18388.      have a rather unusual title, but presumably the main purpose
  18389.      is to record the macro for future use. As an alternative, you
  18390.      could enter a legitimate title, then edit the macro afterwards
  18391.      and replace the title keystrokes with {INPUT}.
  18392.  
  18393.      The following example illustrates a macro that allows the user
  18394.      to enter a new page number on which to start printing after a
  18395.      paper jam:
  18396.  
  18397.      plrdonation{ENTER}{TAB}{TAB}{TAB}{TAB}{INPUT}{ENTER}{ENTER}
  18398.  
  18399.      The macro assumes the sample database Member is open. In the
  18400.      first part of the macro, plrdonation, PC-File chooses Print
  18401.      from the menu bar (p), Letters from the Print menu (l), and
  18402.      Run from the dialog box (r), then types in the name of the
  18403.      letter (donation) in the text box of the file selection dialog
  18404.      box. {ENTER} closes the file selection dialog box and opens
  18405.      the Print options dialog box. The four {TAB}s move the cursor
  18406.      to the Start at page # text box, where the user can enter a
  18407.      new page number over the default of 1. {ENTER} pressed twice
  18408.      resumes the printing.
  18409.  
  18410.      During execution of a macro, PC-File beeps twice to indicate
  18411.      that information is requested from the user. The message
  18412.      "Pausing" displays on the information line when the {INPUT}
  18413.      command is in effect. Pressing ENTER causes the macro to
  18414.      resume playing.
  18415.  
  18416.      Slowing Down a Macro
  18417.  
  18418.      If you have a problem when running a macro, it can be
  18419.      difficult to see where the problem is occurring when the macro
  18420.      is playing back at normal speed. PC-File has a command to slow
  18421.      down macro execution to allow you to more easily "debug"
  18422.      macros. This command can also be useful to slow down a macro
  18423.      for demonstration purposes, so that your audience can see more
  18424.      clearly what operations the macro is performing.
  18425.  
  18426.      The format of the delay command is:
  18427.  
  18428.           {DELAY-nn}
  18429.  
  18430.      where "nn" is approximately the number of tenths of seconds
  18431.      you want PC-File to delay the execution of each step in the
  18432.      macro.
  18433.  
  18434.  
  18435.  
  18436.      PC-File Version 7 Users Guide                            316
  18437.  
  18438.  
  18439.      Like the INPUT command, in many cases you can insert a DELAY
  18440.      command while recording a macro, but more typically you would
  18441.      edit a macro and insert it. See "Modifying a Macro" for
  18442.      details on editing macros.
  18443.  
  18444.      Once issued, a DELAY command continues to take effect for the
  18445.      rest of the program session, or until a DELAY command to reset
  18446.      macro speed to normal is issued. For this reason, you would
  18447.      typically insert or record a DELAY command at the point you
  18448.      want the macro to slow down, and then add another DELAY
  18449.      command at the end of the macro to reset macro speed to
  18450.      normal. For example:
  18451.  
  18452.      {DELAY-10} macro commands {DELAY-0}
  18453.  
  18454.      where "macro commands" is your macro definition.
  18455.  
  18456.      To slow down a macro while recording a macro:
  18457.  
  18458.      1.Type {DELAY-nn} (where "nn" is the number of tenths of
  18459.        seconds you want to delay each macro step) at the point you
  18460.        want PC-File to slow down your macro.
  18461.  
  18462.      2.Type {DELAY-0} at the point you want normal macro execution
  18463.        speed to resume.
  18464.  
  18465.      NOTE: If you do not include a {DELAY-0} command following a
  18466.      DELAY command to slow down macro execution, the execution of
  18467.      all other macros during that session will be slowed down.
  18468.  
  18469.      Defining a Startup Macro
  18470.  
  18471.      You can define a startup macro to run automatically when you
  18472.      start PC- File or open a database. A startup macro is useful
  18473.      for those procedures that you find yourself repeating at the
  18474.      beginning of each session. For example, you could use the
  18475.      startup macro to make sure a particular index is in effect
  18476.      when you open the database, or to print the daily report.
  18477.  
  18478.      The startup macro is identified by the asterisk (*). You can
  18479.      define a separate startup macro for each database.
  18480.  
  18481.      To record a startup macro:
  18482.  
  18483.      1.Follow the procedures described above for recording any
  18484.        other macro.
  18485.  
  18486.      2.When you choose the identifier, choose * instead of a
  18487.        letter.
  18488.  
  18489.      Only use the startup identifier for a macro that you want to
  18490.      run EVERY time you open the database. Otherwise, leave it
  18491.      unused.
  18492.  
  18493.  
  18494.  
  18495.      PC-File Version 7 Users Guide                            317
  18496.  
  18497.  
  18498.      If you do create a startup macro, you can also choose that
  18499.      macro from the window, just as you would any other macro, if
  18500.      you want to perform the actions that it executes.
  18501.  
  18502.      NOTE: Startup macros only run when you open a database. They
  18503.      are NOT programmed to run when you load a new macro file into
  18504.      memory that includes a startup macro. Loading macro files is
  18505.      covered at the end of the chapter.
  18506.  
  18507.      Nesting Macros
  18508.  
  18509.      You can nest a macro within another macro. You do that by
  18510.      recording a macro, then including the execution of that macro
  18511.      in the recording of another macro. When you run the parent
  18512.      macro, the nested macro plays out as part of the operation.
  18513.  
  18514.      Use nested macros to:
  18515.  
  18516.        Run a macro as part of the operation of several other macros
  18517.  
  18518.        Run a recursive macro (used to loop through records) as part
  18519.        of a larger process
  18520.  
  18521.        Handle long operations that stretch beyond the limits of a
  18522.        single macro
  18523.  
  18524.      Nested macros can be used anywhere within their parent macros:
  18525.      at the start, in the middle, or at the end. You can nest
  18526.      macros down to several levels if you want.
  18527.  
  18528.      To include one macro within another, just run the child macro
  18529.      as one of the steps while recording the parent macro. A child
  18530.      macro takes this format: {CTRL-M}x. The keystroke {CTRL-M}
  18531.      displays the macro window. The letter x represents the
  18532.      identifier (A through Z or the *) of the nested macro. Thus a
  18533.      nested macro looks something like this:
  18534.  
  18535.      ...{ENTER}{CTRL-M}B{ALT-E}...
  18536.  
  18537.      In this example, the nested macro listed as B in the current
  18538.      macro file is executed between the macro keystrokes {ENTER}
  18539.      and {ALT-E}.
  18540.  
  18541.      Recursive Macros
  18542.  
  18543.      A recursive macro is a macro that loops back on itself. It
  18544.      works on the same principle as a nested macro, except that
  18545.      instead of calling another macro, the macro calls itself. In
  18546.      that way, it repeats itself over and over.
  18547.  
  18548.      A recursive macro is most useful for modifying records,
  18549.      repeating the same change over and over. You define the macro
  18550.      so that it modifies a record, then repeats itself, in the
  18551.      process moving on to the next record.
  18552.  
  18553.  
  18554.  
  18555.      PC-File Version 7 Users Guide                            318
  18556.  
  18557.  
  18558.      You can use recursive macros to add or delete data from
  18559.      records or move data after splitting or combining fields. For
  18560.      example, if you split a name field into first name and last
  18561.      name fields, you could use a recursive macro to move data to
  18562.      the appropriate fields for each record in the database.
  18563.  
  18564.      Recursive macros can be used with all the records in a
  18565.      database, or just some of the records.
  18566.  
  18567.      Defining a Recursive Macro
  18568.  
  18569.      In creating a macro that loops over and over, you want to
  18570.      repeat only those steps that are necessary. Therefore, start
  18571.      recording a recursive macro with the first record on the
  18572.      screen. Don't record those steps involved with searching or
  18573.      defining the records you want to see, as the program will loop
  18574.      through that process every time it repeats.
  18575.  
  18576.      You can, however, create a recursive macro and then nest it
  18577.      into another macro that performs the operations necessary to
  18578.      bring up the first record, or perhaps into a macro that
  18579.      defines the current index.
  18580.  
  18581.      To define a recursive macro:
  18582.  
  18583.      1.Decide whether you are going to modify all records or some
  18584.        records. If modifying all records, display the beginning
  18585.        record on the screen. If modifying some records, conduct a
  18586.        simple or formula search for the records you want to modify.
  18587.        Display the first selected record on the screen.
  18588.  
  18589.      2.Make sure you are in Modify mode.
  18590.  
  18591.      3.Press CTRL-Y or choose Begin recording from the Macros menu.
  18592.  
  18593.      4.Choose OK to remove the message window from the screen and
  18594.        begin recording.
  18595.  
  18596.      5.Modify the first record. If necessary, use  TAB to move to
  18597.        the field or fields you want to modify. Don't use the mouse.
  18598.  
  18599.      6.Display the next record, either by pressing CTRL-N (if you
  18600.        chose all records) or CTRL-S (if you chose some records).
  18601.  
  18602.      7.Type {CTRL-M}x (where "x" is the letter you want to save the
  18603.        macro under in step 9).
  18604.  
  18605.      8.Press CTRL-Y to stop recording.
  18606.  
  18607.      9.Identify the macro by choosing a letter typed for "x" in
  18608.        step 7.
  18609.  
  18610.      10.  Enter a description of the macro.
  18611.  
  18612.      Executing a Macro
  18613.  
  18614.  
  18615.  
  18616.      PC-File Version 7 Users Guide                            319
  18617.  
  18618.  
  18619.      Before running a macro, make sure you are at the same place in
  18620.      the program as you were when you started recording the macro.
  18621.  
  18622.      To execute a macro:
  18623.  
  18624.      1.Press CTRL-M. As an alternative, choose Execute from the
  18625.        Macros menu or press the right mouse button.
  18626.  
  18627.      2.Choose the macro from the window. You can choose the macro
  18628.        by pressing the letter key that identifies it, by
  18629.        highlighting the macro and pressing ENTER, or by clicking on
  18630.        it. The macro plays out the recorded steps of the operation
  18631.        as you watch.
  18632.  
  18633.      If you decide to stop a macro during operation, press ESC.
  18634.      However, you can't continue the macro once you stop it. You
  18635.      must start over again from the beginning.
  18636.  
  18637.      Modifying a Macro
  18638.  
  18639.      Each keystroke in a macro is recorded by PC-File in written
  18640.      form. You can edit the macro definition to modify or fix a
  18641.      macro, thus saving yourself the trouble of having to re-record
  18642.      it.
  18643.  
  18644.      You can edit the macro description at the same time as you
  18645.      edit the macro definition.
  18646.  
  18647.      To edit a macro:
  18648.  
  18649.      1.Choose Macros from the menu bar.
  18650.  
  18651.      2.Choose Modify from the Macros menu.
  18652.  
  18653.      3.Choose the macro you want to edit from the macro window. A
  18654.        dialog box displays, showing both the macro description and
  18655.        the definition.
  18656.  
  18657.      4.Make your changes. You can change both the description and
  18658.        the definition in this dialog box.
  18659.  
  18660.      5.Choose OK when you finish.
  18661.  
  18662.      Letters, numbers, and punctuation marks are displayed as you
  18663.      type them. As illustrated in the above screen, letters appear
  18664.      in lowercase, just as they are typed. For example, if you
  18665.      press o to choose the option Open from the File menu, it
  18666.      displays in the macro definition as o. Other keys are
  18667.      indicated by their name enclosed in braces. For example, ENTER
  18668.      is indicated like this: {ENTER}. Operations such as choosing
  18669.      menu options and using dialog boxes are indicated by the
  18670.      keystrokes used to perform them.
  18671.  
  18672.      The following table lists many of the keys and how they appear
  18673.      in a macro:
  18674.  
  18675.  
  18676.  
  18677.      PC-File Version 7 Users Guide                            320
  18678.  
  18679.  
  18680.      KEY             MACRO DEFINITION
  18681.  
  18682.      ENTER                {ENTER}
  18683.  
  18684.      ESC             {ESC}
  18685.  
  18686.      BACKSPACE       {BKSP}
  18687.  
  18688.      DELETE          {DEL}
  18689.  
  18690.      INSERT          {INS}
  18691.  
  18692.      Down arrow           {DOWN}
  18693.  
  18694.      Up arrow        {UP}
  18695.  
  18696.      Right arrow          {RIGHT}
  18697.  
  18698.      Left arrow           {LEFT}
  18699.  
  18700.      HOME            {HOME}
  18701.  
  18702.      END             {END}
  18703.  
  18704.      Function key    {Fn}
  18705.       where n = number
  18706.  
  18707.      PAGE UP         {PGUP}
  18708.  
  18709.      PAGE DOWN       {PGDN}
  18710.  
  18711.      TAB             {TAB}
  18712.  
  18713.  
  18714.  
  18715.      Though key names appear in uppercase letters, you can enter
  18716.      them in lowercase or mixed-case letters when editing the macro
  18717.      definition.
  18718.  
  18719.      Key combinations that include the SHIFT, CTRL, and ALT keys
  18720.      appear as follows:
  18721.  
  18722.      {ALT-F}{CTRL-D}{SHIFT-TAB}
  18723.  
  18724.      However, when you edit key combinations, you can enter them in
  18725.      any of the following formats:
  18726.  
  18727.      {c D}{CTRL-D}{CNTL+D}{CONTROL D}
  18728.  
  18729.      You can use a space, hyphen, or plus as a separator between
  18730.      the keys. For ALT, CTRL, and SHIFT, you can spell the word
  18731.      out, use just the initial letter, or use an acceptable
  18732.      shortened form (like CTRL and CNTL).
  18733.  
  18734.  
  18735.  
  18736.      PC-File Version 7 Users Guide                            321
  18737.  
  18738.  
  18739.      NOTE: Though a key combination like SHIFT-TAB displays the
  18740.      entire combination, uppercase letters and punctuation that
  18741.      require you to use the SHIFT key don't display the SHIFT in
  18742.      the macro definition. For example, $ displays as $, not as
  18743.      {SHIFT-4}, and T displays as T, not as SHIFT-t.
  18744.  
  18745.      Macro files are ASCII files, so you can also edit them with
  18746.      any text editor. Maintain the same formatting as displayed.
  18747.      You might want to make a backup copy of your file before you
  18748.      make too many changes.
  18749.  
  18750.      Deleting a Macro
  18751.  
  18752.      If you decide you no longer need a macro, you can delete the
  18753.      macro. You can then reuse the macro identifier for another
  18754.      macro.
  18755.  
  18756.      To delete a macro:
  18757.  
  18758.      1.Choose Macros from the menu bar.
  18759.  
  18760.      2.Choose Delete from the Macros menu.
  18761.  
  18762.      3.Choose the macro you want to delete from the macro window.
  18763.  
  18764.      4.Choose Y when asked to confirm the deletion.
  18765.  
  18766.        The macro and its description is deleted.
  18767.  
  18768.      Macro Files
  18769.  
  18770.      There are three types of macro files:
  18771.  
  18772.        PCFILE.MAC
  18773.  
  18774.        Database macro files
  18775.  
  18776.        Auxiliary macro files
  18777.  
  18778.      Each macro file can contain up to 26 macros labeled A through
  18779.      Z, plus a startup macro (*). The macro file name is displayed
  18780.      on the title bar of the macro window.
  18781.  
  18782.      PC-FILE.MAC loads into memory automatically when you start PC-
  18783.      File. It remains in memory until you open a database. You can
  18784.      define separate macros in PCFILE.MAC to start each database,
  18785.      and even use it as a menu for novice users. If you create a
  18786.      startup macro in PCFILE.MAC, it executes automatically when
  18787.      you start PC-File. If you want to use it as a menu for novice
  18788.      users, define the startup macro as {CTRL-M}, which would open
  18789.      the macro window.
  18790.  
  18791.  
  18792.  
  18793.      PC-File Version 7 Users Guide                            322
  18794.  
  18795.  
  18796.      Once you open a database, PC-File replaces PCFILE.MAC in
  18797.      memory with a file named databasename.MAC. Any macro you
  18798.      create with a database open is saved to the macro file named
  18799.      after the database. Macros saved to this file perform
  18800.      operations within the database.
  18801.  
  18802.      You can create auxiliary macro files, as well. Once created,
  18803.      you can load auxiliary files into memory whenever you need
  18804.      them.
  18805.  
  18806.      Creating an Auxiliary Macro File
  18807.  
  18808.      There are several reasons for defining additional macro files:
  18809.  
  18810.        You define more than the maximum number of macros in a
  18811.        particular database
  18812.  
  18813.        You want to use certain macros in more than one database
  18814.  
  18815.        You want to create macros for operations that occur prior to
  18816.        opening a database, or that include the opening of a
  18817.        database as part of the macro.
  18818.  
  18819.      To create a new macro file:
  18820.  
  18821.      1.Choose Macros from the menu bar.
  18822.  
  18823.      2.Choose Load new set from the Macros menu. A file selection
  18824.        dialog box displays.
  18825.  
  18826.      3.Enter a name for the new macro file in the file selection
  18827.        dialog box. Be sure the new name doesn't conflict with a
  18828.        current macro file. You can locate the new macro file in the
  18829.        current directory or in another directory if you want.
  18830.  
  18831.      4.Choose OK.
  18832.  
  18833.      You have created a new macro file with a new name. It is
  18834.      currently empty of macros, but is loaded into memory. Any
  18835.      macros you define now are stored in this file.
  18836.  
  18837.      Loading a Macro File
  18838.  
  18839.      To use macros located in a file other than the current file,
  18840.      you need to load that file into memory. When you load another
  18841.      macro file, the current macro file closes. Only one macro file
  18842.      can be open at a time.
  18843.  
  18844.      1.To load another macro file:
  18845.  
  18846.      2.Choose Macros from the menu bar.
  18847.  
  18848.      3.Choose Load new set from the Macros menu. The file selection
  18849.        dialog box displays.
  18850.  
  18851.  
  18852.  
  18853.      PC-File Version 7 Users Guide                            323
  18854.  
  18855.  
  18856.      4.Choose the macro file you want to load. All macro files use
  18857.        the extension .MAC.
  18858.  
  18859.      The new macro file is loaded into memory. The macros in that
  18860.      file are now available to you.
  18861.  
  18862.  
  18863.  
  18864.      PC-File Version 7 Users Guide                            324
  18865.  
  18866.  
  18867.  
  18868.      CHAPTER 17 CALCULATIONS
  18869.  
  18870.      One way to create data in a database is through a calculation.
  18871.      This chapter covers the different types of calculations you
  18872.      can use in PC-File.
  18873.  
  18874.  
  18875.  
  18876.      Introduction
  18877.  
  18878.      Calculations and lookups are a fundamental and important part
  18879.      of database management. In PC-File, they can be used during
  18880.      any of several operations, including:
  18881.  
  18882.        Defining a database
  18883.  
  18884.        Searching for a record
  18885.  
  18886.        Creating Formula Indexes
  18887.  
  18888.        Creating a report
  18889.  
  18890.        Creating a letter
  18891.  
  18892.        Using the calculator (from the Tools menu or by pressing
  18893.        CTRL-C)
  18894.  
  18895.      This chapter takes an overall look at calculations and
  18896.      lookups. An attempt is made to give you a fairly complete look
  18897.      at the various types of calculations and some of the ways they
  18898.      are used in PC-File. The types of calculations that are
  18899.      functional for any particular operation within PC-File are
  18900.      described in the section on that operation.
  18901.  
  18902.      Calculations include mathematical, date, conditional, and
  18903.      random number calculations, string functions and relational
  18904.      lookups. They are defined as follows:
  18905.  
  18906.      Mathematical calculations let you add, subtract, multiply,
  18907.      divide, exponentiate, and find the modulo.
  18908.  
  18909.      Date calculations let you perform calculations on dates to
  18910.      determine the number of days between dates or a future date.
  18911.  
  18912.      Conditional calculations let you make decisions based on the
  18913.      contents of a field.
  18914.  
  18915.      Random number calculations let you create random numbers and
  18916.      use them in further calculations.
  18917.  
  18918.      String functions let you convert letters to different cases,
  18919.      and manipulate strings of alphanumeric characters.
  18920.  
  18921.      Relational lookups let you retrieve data from other databases.
  18922.  
  18923.  
  18924.  
  18925.      PC-File Version 7 Users Guide                            325
  18926.  
  18927.  
  18928.      Each type of calculation is covered separately in this
  18929.      chapter.
  18930.  
  18931.      Calculation Guidelines
  18932.  
  18933.      Calculations can include field data, system fields, constants,
  18934.      functions, and, in reports only, buckets. Normally you use
  18935.      only numeric and date fields in calculations, but you can use
  18936.      character and logical fields.
  18937.  
  18938.      Follow these basic guidelines when using a calculation:
  18939.  
  18940.      Punctuation
  18941.  
  18942.      With one exception, always start a calculation with a left
  18943.      parenthesis and end it with a right parenthesis, like this:
  18944.  
  18945.      (Total - Balance)
  18946.  
  18947.      The only exception to this rule is with the calculator, which
  18948.      you can display by choosing Calculator from the Tools menu or
  18949.      pressing CTRL- C. Outside parentheses are not necessary in
  18950.      that case, but are permitted.
  18951.  
  18952.      Parentheses should always be matched. This means the number of
  18953.      left parentheses should equal the number of right parentheses.
  18954.      However, if they are not matched, PC-File will still perform
  18955.      the calculation. The results may or may not be correct.
  18956.  
  18957.      Normally, you must enclose constants within quotation marks.
  18958.      Constants can be enclosed in the scan across (~) or sounds-
  18959.      like (?) characters in place of quotation marks in searches
  18960.      and comparisons. For example, to search for all names that
  18961.      sound like Riley, you might enter the expression
  18962.  
  18963.           Name = ?Riley?
  18964.  
  18965.      Spaces
  18966.  
  18967.      You can use spaces freely within a calculation to make the
  18968.      formula more readable. For example, each of the following will
  18969.      produce the same result:
  18970.  
  18971.           (Total-Balance)
  18972.           (Total - Balance)
  18973.           ( Total - Balance )
  18974.  
  18975.      Field Names
  18976.  
  18977.      Field names used in calculations only have to contain enough
  18978.      of the name to uniquely identify the field. Each of these
  18979.      calculations is functionally the same:
  18980.  
  18981.           (Total - Balance)
  18982.           (Tot - Bal)
  18983.  
  18984.  
  18985.  
  18986.      PC-File Version 7 Users Guide                            326
  18987.  
  18988.  
  18989.      Sequence Order
  18990.  
  18991.      Actions enclosed within parentheses are performed first within
  18992.      a calculation, starting with the innermost nested action. For
  18993.      example, in the calculation
  18994.  
  18995.      ((Washington + Oregon) * 128.25)
  18996.  
  18997.      the addition within the inner parentheses (Washington +
  18998.      Oregon) is performed first, followed by the multiplication.
  18999.  
  19000.      Within a pair of parentheses, the sequence of calculation
  19001.      follows this order:
  19002.  
  19003.      1.Exponentiation (^)
  19004.  
  19005.      2.Multiplication (*), division (/), and modulo (%), each with
  19006.        equal priority
  19007.  
  19008.      3.Addition (+) and subtraction (-), each with equal priority
  19009.  
  19010.      For example, in the calculation
  19011.  
  19012.      (1 + 2 * 3 ^ 2 + 1)
  19013.  
  19014.      You first square the 3 (3 ^ 2) to produce 9, then multiply by
  19015.      2 to get 18, and finally add 1 twice to equal 20.
  19016.  
  19017.  
  19018.  
  19019.      Operators
  19020.  
  19021.      There are three types of operators: mathematical operators,
  19022.      comparison operators, and connecting operators.
  19023.  
  19024.      Mathematical operators are used to compute values. They
  19025.      include:
  19026.  
  19027.      +     Addition
  19028.  
  19029.      -     Subtraction
  19030.  
  19031.      *     Multiplication
  19032.  
  19033.      /     Division
  19034.  
  19035.      ^     Exponentiation
  19036.  
  19037.      %     Modulo
  19038.  
  19039.  
  19040.      The ^ character is SHIFT-6 on most keyboards.
  19041.  
  19042.      Exponentiation and modulo are explained in the section on
  19043.      mathematical calculations below.
  19044.  
  19045.  
  19046.  
  19047.      PC-File Version 7 Users Guide                            327
  19048.  
  19049.  
  19050.      Comparison operators determine whether a relationship exists
  19051.      between two values. They include:
  19052.  
  19053.      =     Equal to
  19054.  
  19055.      !=    Not equal to
  19056.  
  19057.      >     Greater than
  19058.  
  19059.      <     Less than
  19060.  
  19061.      >=    Greater than or equal to
  19062.  
  19063.      <=    Less than or equal to
  19064.  
  19065.  
  19066.  
  19067.      The connecting operators link multiple conditions within a
  19068.      calculation. There are two connecting operators defined in PC-
  19069.      File:
  19070.  
  19071.      &     And
  19072.  
  19073.      |     Or
  19074.  
  19075.  
  19076.      The symbol for Or is called the pipe character and is SHIFT-\
  19077.      on most keyboards. It is not a colon.
  19078.  
  19079.      Mathematical Calculations
  19080.  
  19081.      The most common type of calculations used in databases are
  19082.      basic mathematical computations. These involve the arithmetic
  19083.      operations of addition, subtraction, multiplication, and
  19084.      division, as well as exponentiation and modulo.
  19085.  
  19086.      Mathematical calculations can include fields and/or constants.
  19087.      Normally you will use numeric fields in your calculations, but
  19088.      you can use character fields as well.
  19089.  
  19090.      The following are examples of basic mathematical calculations:
  19091.  
  19092.           (Gross - Cost)
  19093.           (Price * Tax)
  19094.           (Yr_income / 12)
  19095.           (Sales * Commission)
  19096.  
  19097.      Modulo is the process of determining the remainder after
  19098.      dividing one number by another. For example, if you divide 5
  19099.      by 2, you get 2 with 1 left over. The 1 left over is the
  19100.      modulo. If you divide 2 by 3, you get 0 with 2 left over. The
  19101.      modulo is 2. Divide 18 by 6 and you get 3 with 0 left over.
  19102.      The modulo is 0. You can use a modulo for a number of
  19103.      different purposes. The following example illustrates a modulo
  19104.      used in a calculation to skip a line in a report every five
  19105.      records during printing:
  19106.  
  19107.  
  19108.  
  19109.      PC-File Version 7 Users Guide                            328
  19110.  
  19111.  
  19112.  
  19113.           .IF([COUNT*]%5 = 0)
  19114.           /1
  19115.           .ENDIF
  19116.  
  19117.      In this conditional calculation, a line feed (/1) is entered
  19118.      whenever the count of records is evenly divisible by 5.
  19119.  
  19120.      Exponentiation is used to raise a number to a certain power.
  19121.      Use the carot (SHIFT-6 on most keyboards) to indicate an
  19122.      exponential calculation. For example, 4 ^ 3 means 4 to the
  19123.      third power, or 4 * 4 * 4. The calculation 10 ^ 4 means 10 *
  19124.      10 * 10 * 10. You can use n ^ .5 to find the square root for
  19125.      any number (n).
  19126.  
  19127.      Date and Time Calculations
  19128.  
  19129.      Use date calculations to compute the number of days between
  19130.      two dates and to generate new dates by adding and subtracting
  19131.      days from a given date. Date calculations are performed by
  19132.      figuring out the "day number" of a date, which is the number
  19133.      of days between January 1, 1901 and the date in question.
  19134.  
  19135.      Date calculations can be performed on both date and character
  19136.      type fields.
  19137.  
  19138.      PC-File also has a time function to return the current system
  19139.      time.
  19140.  
  19141.      Date Functions
  19142.  
  19143.      PC-File supports three date functions to help you perform date
  19144.      calculations. The functions carry out the work of converting
  19145.      dates to day numbers and day numbers to dates. They are
  19146.      explained below and their use illustrated in a number of
  19147.      sample calculations that follow.
  19148.  
  19149.      (@TODAY#)
  19150.  
  19151.      Creates today's day number based on the date provided by your
  19152.      computer or network. That number could then be used as part of
  19153.      a calculation.
  19154.  
  19155.      For example, the day number for July 4, 1992 is 33,423, which
  19156.      means that is the number of days between 1/1/1901 and
  19157.      7/4/1992.
  19158.  
  19159.      (@DAY#,mask)
  19160.  
  19161.      This function is similar to the previous function, but
  19162.      converts any given date to a day number. The date to be
  19163.      converted always appears before the function, either as a
  19164.      constant or as a field containing dates.
  19165.  
  19166.  
  19167.  
  19168.      PC-File Version 7 Users Guide                            329
  19169.  
  19170.  
  19171.      The mask indicates the format of the date that is to be
  19172.      converted. Without it the program could get confused in the
  19173.      process of converting to a day number. Valid masks are:
  19174.  
  19175.           ymd
  19176.           ydm
  19177.           mdy
  19178.           myd
  19179.           dmy
  19180.           dym
  19181.           yymmdd
  19182.           yyyymmdd
  19183.  
  19184.      The letter y represents year, m represents month, and d
  19185.      represents day.
  19186.  
  19187.      The three-character masks assume that your dates have at least
  19188.      one separator character between month, day, and year. It
  19189.      doesn't matter what the separator is. The date conversion
  19190.      capabilities are very flexible. Here are some examples of
  19191.      dates that will be handled correctly by 3-character masks:
  19192.  
  19193.           10/16/91
  19194.           10.16.91
  19195.           10-16-1991
  19196.           Oct. 16, '91
  19197.           October 16, 1991
  19198.           16 Oct 1991
  19199.  
  19200.      The six-character mask yymmdd is used for character type
  19201.      fields in which the date has no separator characters. These
  19202.      fields are assumed to contain six adjacent digits, two each
  19203.      for year, month, and day. For example: 911016.
  19204.  
  19205.      The eight-character mask is used for character type fields in
  19206.      which the date is entered without separator characters in the
  19207.      yyyymmdd format. For example: 19911016.
  19208.  
  19209.      (@DATE,mask)
  19210.  
  19211.      Converts a day number to a date. This function is normally
  19212.      used when you want the calculation to result in an actual
  19213.      date.
  19214.  
  19215.      The mask indicates the format in which you want the date
  19216.      output. You can use any of the three-, six-, or eight-
  19217.      character masks used with the previous function, but you must
  19218.      include a separator character after the three-character masks.
  19219.      For example, use mdy/ to produce a date like 10/16/91 or dmy-
  19220.      to produce a date like 16- 10-91. You can also use periods as
  19221.      the separator.
  19222.  
  19223.  
  19224.  
  19225.      PC-File Version 7 Users Guide                            330
  19226.  
  19227.  
  19228.      You can also replace the y with the number 4 to print a four-
  19229.      digit year, such as 1992 or 2001. This is especially handy for
  19230.      dates that run into the next century. Enter the mask in the
  19231.      format md4/ or md4- to produce dates like this: 09/18/1992 or
  19232.      09-18-1992.
  19233.  
  19234.      Follow the three-character mask with any letter to produce a
  19235.      date that includes the month abbreviated to three letters. For
  19236.      example, the mask mdyX produces a date like OCT 16, 1991 and
  19237.      the mask dmyX produces 16 OCT 91.
  19238.  
  19239.      The date functions must be surrounded by parentheses, as shown
  19240.      above. TODAY, DATE and DAY must be uppercase and the mask must
  19241.      be lowercase. All the functions must be preceded by the at (@)
  19242.      sign and the functions TODAY and DAY must be followed by the
  19243.      pound (#) sign.
  19244.  
  19245.      NOTE: The system field [DATE*] can be used in reports and
  19246.      letters to print today's date as determined by your computer.
  19247.      [DATE*] is not a function in the same sense as those listed
  19248.      above and cannot be used in calculations, as it does not
  19249.      produce a day number.
  19250.  
  19251.      Sample Date Calculations
  19252.  
  19253.      Several date calculations illustrate the use of date
  19254.      functions.
  19255.  
  19256.      Finding Elapsed Number of Days
  19257.  
  19258.      You can determine the number of days that have gone by since a
  19259.      certain day, or the number of days between two dates.
  19260.  
  19261.      For example, you can determine how many days have elapsed
  19262.      since Buy_date. Assume that Buy_date is in the format "mdy".
  19263.  
  19264.      ((@TODAY#) - (Buy_date (@DAY#,mdy)))
  19265.  
  19266.      The function (@TODAY#) determines the day number for the
  19267.      current date. A day number is also calculated for the date
  19268.      held in the Buy_date field. The second day number is then
  19269.      subtracted from the first to compute the number of days
  19270.      elapsed.
  19271.  
  19272.      You can also find out how many days it took a customer to pay
  19273.      his bill by subtracting Buy_date from Pay_date. Assume that
  19274.      both dates are in "mdy" format.
  19275.  
  19276.      ((Pay_date (@DAY#,mdy)) - (Buy_date (@DAY#,mdy)))
  19277.  
  19278.      First, the date in Pay_date is retrieved and converted to a
  19279.      day number. Then, the date in Buy_date is retrieved and
  19280.      converted to a day number. Finally, the Buy_date day number is
  19281.      subtracted from the Pay_date day number to produce the
  19282.      difference in days between the two dates.
  19283.  
  19284.  
  19285.  
  19286.      PC-File Version 7 Users Guide                            331
  19287.  
  19288.  
  19289.      Comparing dates
  19290.  
  19291.      The following two examples show you how to compare one date to
  19292.      another date. These examples can be used for searching and
  19293.      selecting records.
  19294.  
  19295.      The first example selects records where Due_date is later than
  19296.      today's date.
  19297.  
  19298.      ((Due_date(@DAY#,mdy)) > (@TODAY#))
  19299.  
  19300.      The second example selects records where Due_date is earlier
  19301.      than the constant of 01/02/91.
  19302.  
  19303.      ((Due_date(@DAY#,mdy)) < ("01/02/91"(@DAY#,mdy)))
  19304.  
  19305.      Always enclose dates used as constants within quotation marks
  19306.      when performing calculations.
  19307.  
  19308.      Calculating a future date
  19309.  
  19310.      The following example calculates a new date 60 days after the
  19311.      CONTACT date.
  19312.  
  19313.      (((Contact(@DAY#,mdy))+60) (@DATE,mdy/))
  19314.  
  19315.      First, the date in the Contact field is converted to a day
  19316.      number. Then 60 is added to the day number. Finally, the day
  19317.      number is converted back to a date in the "mdy" format. If
  19318.      Contact contained the date 1/2/91, the result would be
  19319.      03/03/91.
  19320.  
  19321.      The Time Function
  19322.  
  19323.      PC-File also provides a time function that returns the current
  19324.      system time in military time format (24-hour) for hours and
  19325.      minutes (HH:MM). The time function is (@TIMENOW). You can use
  19326.      (@TIMENOW) as a calculation in a character field to return the
  19327.      current time. Or you can use it in the pop-up calculator
  19328.      (CTRL-C) to produce an on-demand time stamp.
  19329.  
  19330.      The time function only returns a character result and cannot
  19331.      be used in mathematical calculations.
  19332.  
  19333.      Conditional Calculations
  19334.  
  19335.      You often have situations where you want to perform an
  19336.      operation, but only under certain conditions. For example, you
  19337.      may want to add sales tax to a price only when the customer
  19338.      lives in the state of Washington. Or you may want to issue a
  19339.      refund, but only if an item is returned within 10 days. For
  19340.      these types of situations, use conditional calculations.
  19341.  
  19342.      Conditional calculations use IF commands in reports and
  19343.      letters, but elsewhere they must be set up to work without
  19344.      them. IF commands always follow a set format:
  19345.  
  19346.  
  19347.  
  19348.      PC-File Version 7 Users Guide                            332
  19349.  
  19350.  
  19351.  
  19352.           .IF (comparison statement)
  19353.           Things to do if true
  19354.           .ELSE
  19355.           Things to do if false
  19356.           .ENDIF
  19357.  
  19358.      You can use IF commands in reports or letters only. Every .IF
  19359.      statement must have a matching .ENDIF statement. The .ELSE
  19360.      statement is optional. Place each part of the command on a
  19361.      separate line by itself.
  19362.  
  19363.      To determine the price of items in which some items are
  19364.      taxable and some are not, you might set up a conditional
  19365.      calculation like this:
  19366.  
  19367.           .IF (Taxable = "Y")
  19368.           (Qty * Amt * 1.06)
  19369.           .ELSE
  19370.           (Qty * Amt)
  19371.           .ENDIF
  19372.  
  19373.      This calculation assumes you have a field called Taxable in
  19374.      which you can enter Y or N, as well as fields Qty and Amt. If
  19375.      the data in the field Taxable is Y, the calculation determines
  19376.      the total price including the tax of 6 percent. (If you just
  19377.      multiply the amount by the quantity by .06, you determine only
  19378.      the tax; multiplying the amount by the quantity by 1.06 gives
  19379.      you the total price.) If the data in the field Taxable is not
  19380.      Y, the tax is not multiplied in.
  19381.  
  19382.      You can simulate an IF command for use in defining a field. To
  19383.      simulate the above example in a field, you might enter this
  19384.      calculation to define a field:
  19385.  
  19386.      (((Tax ="Y")*Qty*Amt*1.06)+((Tax ="N")*Qty*Amt))
  19387.  
  19388.      This calculation works because PC-File assigns a value of 1 to
  19389.      true statements and a value of 0 to false statements. Thus, if
  19390.      the data in the field called Tax is Y, the first half of the
  19391.      equation is true and the second half of the equation is false.
  19392.      In that case the tax is applied, because the first half of the
  19393.      equation is multiplied by 1 and the second half by 0.
  19394.      Multiplying a number by 0 results in 0. If the data in the
  19395.      field called Tax is N, then the first half of the equation is
  19396.      false and
  19397.      no tax is included.
  19398.  
  19399.      Random Number Calculations
  19400.  
  19401.      Use random number calculations to pull records from your
  19402.      database at random. Random record searches are particularly
  19403.      handy for market research or to pull up a random selection of
  19404.      your members, say to set up a tennis tournament.
  19405.  
  19406.  
  19407.  
  19408.      PC-File Version 7 Users Guide                            333
  19409.  
  19410.  
  19411.      PC-File provides the function (@RANDOM#) to do much of the
  19412.      work for you. This function creates a random number between 0
  19413.      and 1.
  19414.  
  19415.      The easiest way to use the Random number function is to define
  19416.      a separate random number field within your database. Then
  19417.      enter the function as a calculation in the field
  19418.      characteristics dialog box. The field should be numeric and
  19419.      contain several characters to the right of the decimal. The
  19420.      data in the field displays as a random number, like .05324 and
  19421.      .00812. You can then sort on this field and choose the first
  19422.      so many records to give yourself a random selection.
  19423.  
  19424.      Though you can sort on a field that contains random numbers,
  19425.      random number calculations can't be used in a Formula index.
  19426.  
  19427.      String Functions
  19428.  
  19429.      The term string is used as shorthand for the phrase "string of
  19430.      characters"-a group or row of alphanumeric characters
  19431.      (letters, numbers, spaces, and punctuation characters). For
  19432.      example, anything you might enter into a field can be
  19433.      considered a string, such as: names, part numbers, phone
  19434.      numbers, prices, dates, or zip codes. The plural, "strings",
  19435.      refers to separate groups of characters from more than one
  19436.      source. In PC-File, sources of strings are:
  19437.  
  19438.        The contents of a field
  19439.  
  19440.        A "substring" or portion of a field, such as [DATE,7,2]
  19441.  
  19442.        A string of characters surrounded by quotes, such as "ab"
  19443.  
  19444.        A report command language system field, such as [DATE*]
  19445.  
  19446.        A report command language total or string bucket, such as
  19447.        [`ABC] or [`$ABC]
  19448.  
  19449.        The result of a calculation that produces a string, such as
  19450.        some date calculations, or the string calculations described
  19451.        below
  19452.  
  19453.      The term "string" also implies processing data solely as a
  19454.      series characters-not as numeric values, dates, or logical
  19455.      values. For example, the string "123" is processed differently
  19456.      from the numeric value "123." The string "123" is processed as
  19457.      the character "one" followed by the characters "two" and
  19458.      "three." Whereas, the numeric value "123" is processed as the
  19459.      value "one hundred and twenty-three." This does not mean that
  19460.      the source of a string can only be a character- type field or
  19461.      the result
  19462.      of an operation on characters. PC-File can process the
  19463.      contents of any field type as a string, even the results of
  19464.      numeric calculations can be treated as strings.
  19465.  
  19466.      PC-File's string functions let you:
  19467.  
  19468.  
  19469.  
  19470.      PC-File Version 7 Users Guide                            334
  19471.  
  19472.  
  19473.  
  19474.        Convert letters to upper-, lower-, or mixed case
  19475.  
  19476.        Isolate the first or last word in a string of words
  19477.  
  19478.        Trim spaces in a string
  19479.  
  19480.        Join strings of characters
  19481.  
  19482.      String functions can be used wherever PC-File calculations can
  19483.      be entered: field calculations, report calculations, .IF
  19484.      statement conditions, formula searches, with the pop-up
  19485.      calculator, and when redefining databases. Except, string
  19486.      functions cannot be used when defining a formula index, use
  19487.      dBASE equivalents-such as UPPER( ) or LOWER( )-instead. String
  19488.      function names must be entered in uppercase.
  19489.  
  19490.      "Argument" in following information refers to any of the
  19491.      following:
  19492.  
  19493.        A field name
  19494.  
  19495.        A "substring" or portion of a field, such as [DATE,7,2]
  19496.  
  19497.        A string of characters surrounded by quotation marks, for
  19498.        example: "This is a string of characters"
  19499.  
  19500.        A report language system field, such as [DATE*]
  19501.  
  19502.        A report language total bucket or string bucket, such as
  19503.        [`total] or [`$string]
  19504.  
  19505.        A nested calculation, such as (UPCASE(LAST(field1)))
  19506.  
  19507.      System field names must be in uppercase letters and surrounded
  19508.      with square [ ] brackets. Bucket names must be surrounded with
  19509.      square [ ] brackets. Nested calculations must have properly
  19510.      balanced parentheses.
  19511.  
  19512.      When using a report Language format, the entire string
  19513.      calculation must be contained on one line (which is true of
  19514.      any calculation in a report format). When using PC-File's
  19515.      Language Editor, this limits your calculations to 78
  19516.      characters, the maximum width the Language Editor can handle.
  19517.      However, you can edit a report .REP file with an editor or
  19518.      word processor outside of PC-File that allows for longer lines
  19519.      as long as that program can save unformatted files (sometimes
  19520.      referred to as "ASCII
  19521.      files" or "DOS text files").
  19522.  
  19523.      UPCASE(argument)
  19524.  
  19525.      This function converts all letter characters in a string to
  19526.      uppercase. Numbers and punctuation are not affected.
  19527.  
  19528.  
  19529.  
  19530.      PC-File Version 7 Users Guide                            335
  19531.  
  19532.  
  19533.      For example, if a field COMPANY contained the entry "Zippy-
  19534.      Cleen-2u," the calculation
  19535.  
  19536.      (UPCASE(COMPANY))
  19537.  
  19538.      would return "ZIPPY-CLEEN-2U."
  19539.  
  19540.      LOWCASE(argument)
  19541.  
  19542.      This function converts all letter characters in a string to
  19543.      lowercase. Numbers and punctuation are not affected.
  19544.  
  19545.      For example, if a field COMPANY contained the entry "Zippy-
  19546.      Cleen-2U," the calculation
  19547.  
  19548.      (LOWCASE(COMPANY))
  19549.  
  19550.      would return "zippy-cleen-2u."
  19551.  
  19552.      MIXCASE(argument)
  19553.  
  19554.      This function converts the first letter in each word in a
  19555.      string into uppercase and all following letters in each word
  19556.      to lowercase. For this purpose, a word is defined as a string
  19557.      of letters separated by anything other than a letter. Numbers
  19558.      and punctuation are not affected. This function is commonly
  19559.      used to change a name field with all upper case letters into
  19560.      mixed case.
  19561.  
  19562.      For example, if a field NAME contained the entry "JANE SMITH-
  19563.      JONES," the calculation
  19564.  
  19565.      (MIXCASE(NAME))
  19566.  
  19567.      would return "Jane Smith-Jones." Note that "Jones" in the
  19568.      hyphenated last name is left as an uppercase letter. If the
  19569.      result from the previous example, "zippy-cleen-2u" were used:
  19570.  
  19571.      (MIXCASE(COMPANY))
  19572.  
  19573.      would return "Zippy-Cleen-2U." Note that the "u" following "2"
  19574.      is made uppercase, because both the hyphen and "2" are treated
  19575.      as space between words.
  19576.  
  19577.      LASTWORD(argument)
  19578.  
  19579.      This function isolates the last word in a string. For this
  19580.      purpose, unlike MIXCASE, a word is defined as any string of
  19581.      characters separated by at least one space.
  19582.  
  19583.      For example, if a field NAME contained the entry "Jane Smith-
  19584.      Jones," the calculation
  19585.  
  19586.      (LASTWORD(NAME))
  19587.  
  19588.  
  19589.  
  19590.      PC-File Version 7 Users Guide                            336
  19591.  
  19592.  
  19593.      would return "Smith-Jones." Note that in this case the full
  19594.      hyphenated name is treated as one word, where the MIXCASE
  19595.      function would treat it as two separate words.
  19596.  
  19597.      FIRSTWORD(argument)
  19598.  
  19599.      This function isolates the first word in a string. For this
  19600.      purpose, a word is defined as any string of characters
  19601.      separated by at least one space.
  19602.  
  19603.      For example, if a field COMPANY contained the entry "Wilton-
  19604.      Smythe & Barney," the calculation
  19605.  
  19606.      (FIRSTWORD(COMPANY))
  19607.  
  19608.      would return "Wilton-Smythe." Note that in this case the full
  19609.      hyphenated name is treated as one word, where the MIXCASE
  19610.      function would treat it as two separate words.
  19611.  
  19612.      TRIM(argument)
  19613.  
  19614.      This function removes all space characters from the right end
  19615.      of a string. Most commonly this function is used to remove
  19616.      trailing spaces from the contents of a field when joining two
  19617.      or more strings together (see below).
  19618.  
  19619.      Concatenation or Joining of Strings
  19620.  
  19621.      "Concatenation" in programming and application languages
  19622.      refers to joining strings of characters together. PC-File
  19623.      symbolizes this operation with the semicolon (;), which is
  19624.      used like plus or minus signs in arithmetic calculations by
  19625.      placing the semicolon between strings or string calculations
  19626.      you want joined.
  19627.  
  19628.      For example, to join the two fields FIRST and LAST with a
  19629.      space between them, trimming any trailing spaces from FIRST,
  19630.      you would use the calculation
  19631.  
  19632.      (TRIM(FIRST);" ";LAST)
  19633.  
  19634.      which for a record containing "John" in FIRST and "Jones" in
  19635.      LAST would return "John Jones."
  19636.  
  19637.      Note that " " is used to put a space between the two fields
  19638.      because TRIM removes all trailing spaces from FIRST.
  19639.  
  19640.      Without using the TRIM function and " ", the full field length
  19641.      of FIRST (including trailing spaces) would appear before LAST.
  19642.      For example, if FIRST is a 10-character long field, the
  19643.      calculation:
  19644.  
  19645.      (FIRST;LAST)
  19646.  
  19647.      using the same data returns "John Jones."
  19648.  
  19649.  
  19650.  
  19651.      PC-File Version 7 Users Guide                            337
  19652.  
  19653.  
  19654.      You can use any of the string functions listed above as
  19655.      arguments. For example, the calculation:
  19656.  
  19657.      ("MR. ";UPPER(TRIM(FIRST));" ";UPPER(LAST))
  19658.  
  19659.      returns "MR. JOHN JONES."
  19660.  
  19661.      NOTE: You do not have to use the outermost set of parentheses
  19662.      when entering a string calculation into a field, when using
  19663.      the pop-up calculator, or when entering a calculation in a
  19664.      Free Form report. A set of parentheses is assumed in these
  19665.      areas of the program. For example, in any of the
  19666.      aforementioned areas you could type:
  19667.  
  19668.      TRIM(FIRST);" ";LAST
  19669.  
  19670.      However, you must use an outermost set of parentheses when
  19671.      entering string calculations into a report command format with
  19672.      the Language Editor. When using the Language Editor, the same
  19673.      calculation would have to be entered:
  19674.  
  19675.      (TRIM(FIRST);" ";LAST)
  19676.  
  19677.      Also, using square brackets around field names is optional in
  19678.      the Language editor. For example,
  19679.  
  19680.      (TRIM([FIRST]);" ";[LAST])
  19681.  
  19682.      is accepted by PC-File. However, do not use angle brackets
  19683.      around field names in any calculations.
  19684.  
  19685.      Relational Lookups
  19686.  
  19687.      Relational lookups are calculations only in the broadest sense
  19688.      of the word. They don't involve the mathematics associated
  19689.      with other calculations, but they do go through some
  19690.      contortions to provide an answer for you.
  19691.  
  19692.      Relational lookups establish a link between two databases and
  19693.      allow you to copy data from one database into another. For
  19694.      example, you could look up a company name and address in a
  19695.      database and copy it into another database to print out with
  19696.      each invoice.
  19697.  
  19698.      Relational lookups require that the two databases share common
  19699.      data. In other words, both databases must have a field with
  19700.      the same field type and contain records that have matching
  19701.      data. You can only perform a lookup for matching data in one
  19702.      shared field.
  19703.  
  19704.      For example, to copy a name and address from a database, you
  19705.      might use a customer number field shared by both databases. Or
  19706.      you could have a shared company name field, and copy the
  19707.      address from the second database.
  19708.  
  19709.  
  19710.  
  19711.      PC-File Version 7 Users Guide                            338
  19712.  
  19713.  
  19714.      NOTE: If a relational lookup field calculation finds no
  19715.      matching record, spaces are returned. This will write over,
  19716.      that is, "blank out" any current field entry and prevent you
  19717.      from overriding the lookup. If you need to prevent this from
  19718.      happening, choose Only When Field is Empty when prompted "When
  19719.      to apply this operation?" when entering the lookup. Also, if
  19720.      more than one record matches, only data from the first record
  19721.      found is returned.
  19722.  
  19723.      There are two types of lookups in PC-File: a basic lookup and
  19724.      a fast lookup. You can use the fast lookup only after you have
  19725.      used a basic lookup.
  19726.  
  19727.      Defining Basic Lookups
  19728.  
  19729.      You can define basic lookups using either of two methods:
  19730.  
  19731.        The dialog box method
  19732.  
  19733.        The formula method
  19734.  
  19735.      The simplest and most reliable way of defining a basic lookup
  19736.      is using the dialog box method. The main reason to enter
  19737.      relational lookups using the formula method is to enter
  19738.      specialized forms of lookups such as a fast lookup.
  19739.  
  19740.      Using the Dialog Box Method
  19741.  
  19742.      You can define basic lookups using the dialog box method
  19743.      throughout PC- File in most places lookups can be used:
  19744.  
  19745.        When creating and redefining databases
  19746.  
  19747.        When defining Free Form and Language format reports
  19748.  
  19749.        When writing Letters
  19750.  
  19751.        When using the pop-up calculator (CTRL-C)
  19752.  
  19753.      Depending on what area of the PC-File you are in, you either
  19754.      press a command button (the Lookup button when defining,
  19755.      redefining, or using the Language format; the LU button on the
  19756.      pop-up calculator; and the L button after choosing the Insert
  19757.      button when writing a letter) or make a menu selection (when
  19758.      using the Free Form format) to invoke the first lookup dialog
  19759.      box. The rest of the defining process works identically for
  19760.      all program areas.
  19761.  
  19762.      Choosing the Lookup Database
  19763.  
  19764.  
  19765.  
  19766.      PC-File Version 7 Users Guide                            339
  19767.  
  19768.  
  19769.      Relational lookups are defined using two dialog boxes. The
  19770.      first dialog box is used to pick which database you want to
  19771.      copy data from. This database is called the lookup database.
  19772.      The dialog box used to choose the lookup database looks and
  19773.      works same as the file selection boxes used throughout PC-File
  19774.      to open databases and other files. See Chapter 1, "Selecting a
  19775.      File" for details on how to use the features of a file
  19776.      selection dialog box.
  19777.  
  19778.      Defining the Fields to Match With and Copy From
  19779.  
  19780.      Once you chose the database to copy from, a second dialog box
  19781.      displays.
  19782.  
  19783.      The top two lines of the dialog box list the two databases
  19784.      affected by the lookup. The Current file is the database
  19785.      currently open into which the lookup data will be copied. The
  19786.      Lookup file is the database selected with the previous dialog
  19787.      box from which the lookup data will be copied.
  19788.  
  19789.      The two list boxes on either side of "MATCH WITH" determine
  19790.      which fields link the two databases. Generally this is a field
  19791.      that contains something that is uniquely in common between the
  19792.      two databases, such as a part number, ID number, or social
  19793.      security number. The two fields don't have to have the same
  19794.      name, but they do have to be of the same field type and
  19795.      length. Choose the field to match with from the current
  19796.      database with the left "Field" list box. Choose the field to
  19797.      match with from the lookup database with the right "Lookup
  19798.      field" list box.
  19799.  
  19800.      Choose which field to retrieve the lookup data from with the
  19801.      "Retrieve field" list box in the lower right corner of the
  19802.      Define Lookup dialog box.
  19803.  
  19804.      What appears below the heading "Current Field" in the lower
  19805.      left corner depends on what area of the program you are in:
  19806.  
  19807.        The field that the lookup data will be copied into displays,
  19808.        if you are entering a calculation when defining or
  19809.        redefining a database.
  19810.  
  19811.        "Calculator" displays when using the LU button on the pop-up
  19812.        calculator.
  19813.  
  19814.        "Report" displays when defining a relational lookup for a
  19815.        report.
  19816.  
  19817.      Choosing OK either defines the relational lookup formula for
  19818.      the field or report, or displays the result when using the
  19819.      pop-up calculator.
  19820.  
  19821.      To define a basic lookup using the dialog box method:
  19822.  
  19823.  
  19824.  
  19825.      PC-File Version 7 Users Guide                            340
  19826.  
  19827.  
  19828.      1.Depending on what area of the PC-File you are in, either
  19829.        choose the Lookup command button or choose the Lookup menu
  19830.        selection to invoke the first lookup dialog box.
  19831.  
  19832.      2.Choose the Lookup database from the Files list box. Use the
  19833.        directories list box or the Search buttons if the database
  19834.        you want to copy from is not in the current directory.
  19835.  
  19836.      3.Choose the field in the current database to match with from
  19837.        the upper left-hand list box.
  19838.  
  19839.      4.Choose the field in the lookup database to match with from
  19840.        the upper right-hand list box.
  19841.  
  19842.      5.Choose the field to copy from using the lower right-hand
  19843.        list box.
  19844.  
  19845.      6.Choose OK to continue.
  19846.  
  19847.  
  19848.      Using the Formula Method
  19849.  
  19850.      You can define basic lookups using the formula method wherever
  19851.      you can type other PC-File calculations, such as: in field
  19852.      calculations, in reports and letters, and when using the pop-
  19853.      up calculator. You can even use relational lookups as part of
  19854.      a formula search or an .IF statement condition.
  19855.  
  19856.      To perform a lookup, you need to know four things:
  19857.  
  19858.        the name of the shared field in the current database
  19859.  
  19860.        the name of the lookup database
  19861.  
  19862.        the name of the shared field in the lookup database
  19863.  
  19864.        the name of the lookup field in the lookup database
  19865.  
  19866.      The lookup field is the field from which you want to pull data
  19867.      into the current database.
  19868.  
  19869.      To use a lookup, follow this format:
  19870.  
  19871.           (@shared field in current database,lookup database,shared
  19872.           field in lookup database,lookup field)
  19873.  
  19874.      Enclose relational lookups in parentheses, and always use the
  19875.      at (@) sign at the beginning of the lookup expression. Then
  19876.      list the shared field in the current database, the lookup
  19877.      database, the shared field in the lookup database, and finally
  19878.      the lookup field.
  19879.  
  19880.      A relational lookup might look something like this:
  19881.  
  19882.           (@member_no,member,member_no,firstname)
  19883.  
  19884.  
  19885.  
  19886.      PC-File Version 7 Users Guide                            341
  19887.  
  19888.  
  19889.      You could read that lookup like this:
  19890.  
  19891.      "Using the Member_no field in the current database, go to the
  19892.      Members database and find the record with the same data in the
  19893.      Member_no field in that database. Then retrieve the data from
  19894.      the Firstname field."
  19895.  
  19896.      The shared fields don't have to have the same name, though
  19897.      they do have to be of the same field type and length. The
  19898.      lookup could look like this instead:
  19899.  
  19900.      (@member_no,member,number,firstname)
  19901.  
  19902.      The Member_no and Number fields contain the same data.
  19903.  
  19904.      The lookup database name can include a path if necessary. For
  19905.      example, if the Members database were on a different
  19906.      directory, you could enter the lookup like this:
  19907.  
  19908.      (@member_no,\pcfile\member,member_no,firstname)
  19909.  
  19910.      You can include a drive name if necessary, but do NOT include
  19911.      a file extension.
  19912.  
  19913.      Fast Lookups
  19914.  
  19915.      When you want to retrieve two or more fields from the same
  19916.      record of the same database, you can use a fast lookup for all
  19917.      fields after the first lookup. For the first lookup, use a
  19918.      basic lookup defined with either method outlined above. For
  19919.      all subsequent lookups from that database use the format:
  19920.  
  19921.      (@*,lookup data)
  19922.  
  19923.      With the Member database, subsequent lookups might look like
  19924.      this:
  19925.  
  19926.           (@*,lastname)
  19927.           (@*,address1)
  19928.           (@*,city)
  19929.  
  19930.      The fast lookup assumes that you are looking in the same
  19931.      database and the same record as you used in the first lookup.
  19932.      Each time PC-File performs a basic lookup, it memorizes the
  19933.      entire matching record. Subsequent fast lookups can pull any
  19934.      fields from that memorized record without having to search the
  19935.      lookup database. In that way you could pull in the complete
  19936.      name and address contained in another database quickly and
  19937.      easily.
  19938.  
  19939.  
  19940.  
  19941.      PC-File Version 7 Users Guide                            342
  19942.  
  19943.  
  19944.      NOTE: Fast lookups will only work correctly if a basic lookup
  19945.      has been performed as the first lookup within the same record.
  19946.      PC-File performs field calculations in the same order fields
  19947.      are accessed. For this reason, you must make sure that the
  19948.      field that you entered the basic lookup into is accessed
  19949.      before any fields containing fast lookups. See Chapter 3,
  19950.      "Modifying a Database Structure" if you need to change this.
  19951.      For the same reason, when entering the lookups make sure that
  19952.      all lookups are
  19953.      performed at the same time. If you have any doubts about any
  19954.      of these requirements, do not use Fast lookups.
  19955.  
  19956.      Troubleshooting Calculations
  19957.  
  19958.      If the calculations in your database don't give you the
  19959.      correct results, investigate the following:
  19960.  
  19961.        Check field names to make sure they are spelled correctly.
  19962.        If you have abbreviated field names, make sure PC-File can
  19963.        tell which fields you mean.
  19964.  
  19965.        Make sure you have used the correct operator. Use the
  19966.        asterisk for multiplication, not an x. Use != for "not equal
  19967.        to" and the pipe character, which is SHIFT-backslash on most
  19968.        keyboards, for "or."
  19969.  
  19970.        Check your expression to see that you have an equal number
  19971.        of left and right parentheses.
  19972.  
  19973.        Make sure date, time, and random number functions are
  19974.        entered in uppercase letters and that the functions are
  19975.        preceded by the at (@) sign. The mask following an @DAY#
  19976.        function, e.g. mdy/, must be in lowercase. All but the
  19977.        (@DATE) and (@TIMENOW) functions must be followed by the
  19978.        pound (#) sign.
  19979.  
  19980.        For relational lookups, make sure the lookup database
  19981.        contains the data you think it does. If necessary, conduct a
  19982.        search in the lookup database to confirm that it does in
  19983.        fact contain the data.
  19984.  
  19985.        Lookup data may not be returned if the index in the lookup
  19986.        database is damaged. Rebuild the indexes if necessary.
  19987.  
  19988.      For explanations of error messages, see Appendix D.
  19989.  
  19990.  
  19991.  
  19992.      PC-File Version 7 Users Guide                            343
  19993.  
  19994.  
  19995.  
  19996.      CHAPTER 18 BATCH POSTING
  19997.  
  19998.      The Batch Post command on the Utilities menu is a powerful
  19999.      feature that lets you to update a remote or "destination"
  20000.      database with information from the current or "source"
  20001.      database. This operation is referred to as "posting." Also,
  20002.      for added security, PC-File has a Batch Post "undo" feature
  20003.      that allows you to restore data changed by your last posting.
  20004.  
  20005.      What is Batch Posting?
  20006.  
  20007.      Batch posting sends data from the current or source database
  20008.      to a remote or destination database. Most typically, the
  20009.      source database is a database used to keep track of
  20010.      transactions liking billing or invoicing. Likewise, the
  20011.      destination database is a "master" database used to track
  20012.      items such as account balances or inventory. In order for
  20013.      systems like this to work properly, you must have a field
  20014.      containing data held in common between both databases that can
  20015.      be used to establish the desired
  20016.      link-such as an account number, social security number, ID
  20017.      number, part number, or SKU number.
  20018.  
  20019.      Just like a relational lookup, PC-File establishes the link
  20020.      between the two databases by matching the data held in common
  20021.      between the two databases. Only one field in each database can
  20022.      be used to establish the link. For example, an account number
  20023.      field in one database can be used as a link to post to any
  20024.      other database with a field containing matching account
  20025.      numbers.
  20026.  
  20027.      Unlike a relational lookup, posting cannot be used like a
  20028.      field calculation that is performed whenever a record is added
  20029.      or modified. Posting must be performed as a "batch" operation
  20030.      by running a post definition on demand using the Run option on
  20031.      the Batch Post dialog box. You are also given the option to
  20032.      run a posting immediately after you define it. This batch mode
  20033.      of operation distinguishes PC-File's Batch Post from "fully
  20034.      relational" programs that will automatically post data
  20035.      whenever the
  20036.      linked data in the source database is changed.
  20037.  
  20038.      You must run a Batch Post from the source database-the
  20039.      database in which the posting was originally defined. When
  20040.      running a Batch Post you have the option to post from all or
  20041.      selected records in the source database.
  20042.  
  20043.      A Batch Post definition can only post from one source database
  20044.      to one destination database. However, you can define as many
  20045.      Batch Post definitions as you want to allow you to post from
  20046.      one database to any number of destination databases. And, if
  20047.      you wish, you could automate the process by defining a macro
  20048.      to run each Batch Post definition in succession.
  20049.  
  20050.      Which Records Are Affected?
  20051.  
  20052.  
  20053.  
  20054.      PC-File Version 7 Users Guide                            344
  20055.  
  20056.  
  20057.  
  20058.      When posting, the relationship between records in the source
  20059.      and destination databases can be:
  20060.  
  20061.      One to One
  20062.  
  20063.      One matching record from the source database posts to one
  20064.      record in the destination database. This assumes each matching
  20065.      record is unique in its respective database, or that you have
  20066.      selected to post only records from the source database that
  20067.      have a unique match in the destination database.
  20068.  
  20069.      One to Many
  20070.  
  20071.      One record from the source database posts to one or more
  20072.      matching records in the destination database. This assumes
  20073.      that each record in the source database matches one or more
  20074.      records in the destination database. Or, that you have
  20075.      selected a set of non- duplicate records that have one or more
  20076.      matches each in the destination database.
  20077.  
  20078.      Many to One
  20079.  
  20080.      Many matching records from the source database post to one
  20081.      matching record in the destination database. This assumes that
  20082.      there is at least one set of records with duplicate match
  20083.      fields in the source database that match a unique record in
  20084.      the source database.
  20085.  
  20086.      The form the relationship between the databases involved in a
  20087.      Batch Post operation takes depends on either how the data is
  20088.      entered, or which records you select when posting. For
  20089.      example, let's say you want to post only last month's receipts
  20090.      from database A to database B. Either database A must contain
  20091.      only last month's records-you deleted or archived any previous
  20092.      month's records-or you must choose Some when running the
  20093.      posting and search on a date field to select only last month's
  20094.      records.
  20095.  
  20096.  
  20097.      NOTE: When performing a One to Many posting, make sure that
  20098.      the matching field in the destination database is indexed.
  20099.      Otherwise, all matches won't be found and posted. This is a
  20100.      good idea as a general rule, as this will also speed up the
  20101.      searches performed when posting.
  20102.  
  20103.  
  20104.      Post Actions
  20105.  
  20106.      A Batch Post operation can consist of one or more post
  20107.      actions. A post action is a transaction between one field in
  20108.      the source database and one field in the destination database.
  20109.      Each post action can perform one of the following operations
  20110.      on the designated destination database field:
  20111.  
  20112.      Replace
  20113.  
  20114.  
  20115.  
  20116.      PC-File Version 7 Users Guide                            345
  20117.  
  20118.  
  20119.      Replaces with data from the source database
  20120.  
  20121.      Add
  20122.      Adds the value from the source database
  20123.  
  20124.      Subtract From
  20125.      Subtracts the value from the source database
  20126.  
  20127.      Multiply
  20128.      Multiplies by the value from the source database
  20129.  
  20130.      Divide Into
  20131.      Divides by the value from the source database
  20132.  
  20133.      The last four options are mathematical operations, which are
  20134.      only appropriate for numeric values.
  20135.  
  20136.      For example, you could update an Inventory database from a
  20137.      Transactions database by choosing to match on the part number
  20138.      field, then define your post action to subtract the Quantity
  20139.      field in the Transactions database from the Quantity field in
  20140.      the Inventory database.
  20141.  
  20142.      Likewise, an Accounts database can be updated by using Add,
  20143.      for credits, or Subtract From, for debits, as post actions
  20144.      from a Transactions database.
  20145.  
  20146.  
  20147.      Defining a Batch Post
  20148.  
  20149.      To define a Batch Post operation, you must first open the
  20150.      database you want to post from. Then choose the Batch Post
  20151.      option from the Utilities menu which displays the Destination
  20152.      File dialog box. This dialog box works identically to the Open
  20153.      dialog box that you use to open a database. See "Selecting a
  20154.      File" in Chapter 1 for details on how to use a file selection
  20155.      dialog box. The database you choose with the Destination File
  20156.      dialog box is the destination database-the database the source
  20157.      database (the database currently open) posts to.
  20158.  
  20159.      Once you have chosen the destination database, the Define
  20160.      Posting dialog is displayed.
  20161.  
  20162.      This dialog box is organized into two columns of list boxes to
  20163.      define post actions, with a large list box at the bottom that
  20164.      summarizes the post actions defined. The two list boxes in the
  20165.      left column list fields from the source database and the two
  20166.      list boxes in the right column lists fields from the
  20167.      destination database.
  20168.  
  20169.      Choosing the "Match to" Fields
  20170.  
  20171.  
  20172.  
  20173.      PC-File Version 7 Users Guide                            346
  20174.  
  20175.  
  20176.      The first list box in each column (the "match to" list boxes)
  20177.      defines which field from each database to match on. You can
  20178.      only choose one field from the source database to match on one
  20179.      field from the destination database. Choose a field from each
  20180.      "match to" list box by clicking on the desired field, or
  20181.      highlighting the field and pressing ENTER. A checkmark appears
  20182.      to the left indicating the field is selected.
  20183.  
  20184.      Defining Post Actions
  20185.  
  20186.      The second list box in each column (the "post to" list boxes)
  20187.      and the radio buttons between them define how each post action
  20188.      is performed. Defining a post action is a four-step process:
  20189.  
  20190.      1.Choosing the source field from the left list box.
  20191.  
  20192.      2.Choosing the radio button to determine how to post the
  20193.        source data: Replace, Add, Subtract, Multiply, or Divide.
  20194.  
  20195.      3.Choosing the destination field to post to from the right
  20196.        list box.
  20197.  
  20198.      4.Choosing the Accept command button to define the post
  20199.        action.
  20200.  
  20201.      After you choose the Accept command button, the defined post
  20202.      action appears in the Post Actions list box. Continue this
  20203.      four-step process to define as many post actions as you
  20204.      desire. If you define more post actions than can be displayed
  20205.      at once in the list box, use the scroll bar to the right of
  20206.      the post actions list box to review your post actions. If you
  20207.      make a mistake when defining a post action, highlight its
  20208.      description in the post actions list box and choose Undo 1.
  20209.  
  20210.      Choose OK to complete the posting definition. You are then
  20211.      asked if you want to save the post definition. Choose Yes and
  20212.      save the file, if you intend to run this post operation more
  20213.      than once, or if you will not being running it immediately
  20214.      after it is defined. Choose No if you want to run this post
  20215.      operation immediately after defining it and do not need to
  20216.      save it.
  20217.  
  20218.  
  20219.      To define a Batch Post:
  20220.  
  20221.      1.Choose Utilities from the menu bar.
  20222.  
  20223.      2.Choose Batch Post.
  20224.  
  20225.      3.Choose Define a New Posting.
  20226.  
  20227.      4.Choose the destination database using the file selection
  20228.        dialog box. Choose OK to continue.
  20229.  
  20230.      5.Choose the Match to field for the source database from the
  20231.        first list box on the left.
  20232.  
  20233.  
  20234.  
  20235.      PC-File Version 7 Users Guide                            347
  20236.  
  20237.  
  20238.  
  20239.      6.Choose the Match to field for the destination database from
  20240.        the first list box on the right.
  20241.  
  20242.      7.Perform the following four steps using the Post to list
  20243.        boxes and radio buttons between them for each post action
  20244.        you want to define:
  20245.  
  20246.        Choose the source field from the left-hand list box.
  20247.  
  20248.        Choose the radio button to determine how to post the source
  20249.        data.
  20250.  
  20251.        Choose the destination field to post to from the right-hand
  20252.        list box.
  20253.  
  20254.        Choose the Accept command button to define the post action.
  20255.        Repeat these steps for every post action you want to define.
  20256.  
  20257.      8.Choose OK to proceed.
  20258.  
  20259.      9.Save your posting definition, if you want to use it again in
  20260.        the future.
  20261.  
  20262.      10.  Choose to run the post definition, if desired.
  20263.  
  20264.      Running a Batch Post
  20265.  
  20266.      You can run your post operation either immediately after
  20267.      defining it, or if you have saved the post definition, by
  20268.      choosing the Run option on the Batch Post dialog box. You must
  20269.      be in the source database you originally defined the posting
  20270.      from to run a previously defined posting.
  20271.  
  20272.      When running a posting you can post from all or some records.
  20273.      If you choose All records, every record in the source database
  20274.      is checked for a match or matches in the destination database-
  20275.      when a match is found the post action or actions are performed
  20276.      on that record. This continues until all records in the source
  20277.      database are processed. If you choose Some records, you enter
  20278.      a Simple, Formula, or Global search to select which records
  20279.      from the source database will be processed. Again, only
  20280.      matching records are posted.
  20281.  
  20282.  
  20283.  
  20284.      PC-File Version 7 Users Guide                            348
  20285.  
  20286.  
  20287.      Regardless of whether you choose to post from All or Some
  20288.      records, the first record you are presented with displays a
  20289.      dialog box with the prompt, "Post from this record?" with Yes,
  20290.      No, All, or Quit buttons. Generally you will choose All to
  20291.      have PC-File automatically process your records. However, you
  20292.      can use the Yes and No buttons to manually choose which of the
  20293.      records to process. Choosing Yes accepts that record and
  20294.      proceeds to the next one. Answering Yes does not necessarily
  20295.      mean that the records data will be posted to the destination
  20296.      database- data will be posted only if the two "match to"
  20297.      fields' data matches. Choosing No omits that record and
  20298.      proceeds to the next one. Choosing Quit stops the posting
  20299.      process.
  20300.  
  20301.      To run a previously defined Batch Post:
  20302.  
  20303.      1.Choose Utilities.
  20304.  
  20305.      2.Choose Batch Post.
  20306.  
  20307.      3.Choose the desired post definition.
  20308.  
  20309.      4.Choose All or Some.
  20310.  
  20311.      5.If you chose All above, the first record to post from is
  20312.        displayed, prompting "Post from this record?
  20313.        Yes/No/All/Quit." Answer appropriately to post data.
  20314.  
  20315.      6.If you chose Some proceed to next step.
  20316.  
  20317.      7.If you chose Some above, choose the method to select records
  20318.        with and enter your selection criteria. Refer to the
  20319.        appropriate section under "Conducting a Search" for details.
  20320.  
  20321.      8.Answer the "Post from this Record?" prompt appropriately to
  20322.        post data.
  20323.  
  20324.      UnPost-Undoing a Batch Post
  20325.  
  20326.      The UnPost option on the Batch Post dialog box allows you to
  20327.      "undo" the last posting you performed on a database. PC-File
  20328.      maintains a log file of all data that is changed by a post
  20329.      operation. This log file is saved under the same name as the
  20330.      affected database with a .LOG extension. For example, a
  20331.      database named BALANCE would have an UnPost log file named
  20332.      BALANCE.LOG. To undo the most recent posting to a database,
  20333.      you must be in the database that was posted to (not the
  20334.      database the posting was defined from) and choose the UnPost
  20335.      option on the Batch Post dialog box.
  20336.  
  20337.      The UnPost log file only keeps track of the changes made by
  20338.      the last posting. Therefore, if you perform a posting in error
  20339.      you must immediately restore changes before performing any
  20340.      other posting operation on that database.
  20341.  
  20342.  
  20343.  
  20344.      PC-File Version 7 Users Guide                            349
  20345.  
  20346.  
  20347.      For additional security, you can make backup copies of .LOG
  20348.      files before performing additional postings to a database.
  20349.      Then, if you need to restore changed data, you can copy the
  20350.      backup copy of the .LOG file into the same directory as the
  20351.      affected database and use the UnPost option to restore data.
  20352.      Note that the .LOG file only keeps track of data changed in a
  20353.      single post operation. If you have made several postings and
  20354.      wish to restore all data changed across all those postings,
  20355.      you must have backed up .LOG files between every posting
  20356.      (either to separate floppies or by renaming each .LOG file to
  20357.      a unique name). Then you must UnPost each .LOG file in order
  20358.      from the most recent posting back to the earliest posting you
  20359.      want to undo.
  20360.  
  20361.      For the greatest level of security, back up the entire
  20362.      database before any posting.
  20363.  
  20364.      To undo a Batch Post:
  20365.  
  20366.      1.Open the database that you want to UnPost.
  20367.  
  20368.      2.Choose Utilities.
  20369.  
  20370.      3.Choose UnPost. A dialog box displays showing the date the
  20371.        database was last changed. If this date later than the time
  20372.        of the posting you want to undo, proceeding probably will
  20373.        not restore the desired data. You must either copy the
  20374.        appropriate databasename.LOG file into your data directory
  20375.        and repeat steps 1-3, or restore a backup of the database
  20376.        itself.
  20377.  
  20378.      4.Choose Yes to continue.
  20379.  
  20380.      When the UnPost operation is finished an information box
  20381.      displays showing the number of records restored.
  20382.  
  20383.  
  20384.  
  20385.      PC-File Version 7 Users Guide                            350
  20386.  
  20387.  
  20388.  
  20389.      CHAPTER 19 MEMORY USAGE AND PERFORMANCE
  20390.  
  20391.      PC-File performance has been sped up using a number of
  20392.      different methods. Some improvements relate to specifically to
  20393.      the program's internal workings: reworking and optimization of
  20394.      the way the program displays screen images and improvements in
  20395.      the compiler technology. Other improvements have been made in
  20396.      the way PC-File exploits your system's memory and disk
  20397.      resources.
  20398.  
  20399.  
  20400.  
  20401.      Kinds of Memory
  20402.  
  20403.      Before discussing how PC-File uses memory, let's briefly cover
  20404.      the various kinds of memory available on PC systems.
  20405.  
  20406.      A PC system can have up to 3 kinds of RAM memory storage:
  20407.  
  20408.      Conventional memory
  20409.  
  20410.      The memory that standard DOS programs can use, up to a maximum
  20411.      of 640K. DOS COMMAND.COM uses some conventional memory, any
  20412.      device drivers or memory-resident programs (TSR's) listed in
  20413.      your CONFIG.SYS and AUTOEXEC.BAT files use additional memory.
  20414.      The amount of conventional memory you have available to run
  20415.      programs in after booting your computer is displayed on the
  20416.      last line of the report listed by running the DOS CHKDSK
  20417.      command.
  20418.  
  20419.      Extended memory (XMS)
  20420.  
  20421.      Memory in addition to conventional memory, not available on
  20422.      8086/88 computers, only on 80286 or higher models. Available
  20423.      through the use of add-on hardware cards, and directly on the
  20424.      motherboard on many newer model computers.
  20425.  
  20426.      Expanded memory (EMS)
  20427.  
  20428.      Memory in addition to conventional memory, so-called "paged"
  20429.      memory based on standards established by Lotus, Intel and
  20430.      Microsoft (LIM EMS). Generally available through the use of an
  20431.      add-on hardware card. 386 and 486 computers can make extended
  20432.      memory act as expanded memory using device drivers such as
  20433.      EMM386.EXE (which is included with MS-DOS 5.0).
  20434.  
  20435.      How PC-File Uses Memory
  20436.  
  20437.      When PC-File is running, pressing CTRL-Z displays an
  20438.      information window.
  20439.  
  20440.      Each number listed has the following significance:
  20441.  
  20442.      Available RAM
  20443.  
  20444.  
  20445.  
  20446.      PC-File Version 7 Users Guide                            351
  20447.  
  20448.  
  20449.      The total amount of conventional memory currently available
  20450.      within PC-File, not counting memory for Overlay Buffer or Disk
  20451.      Buffer (if any).
  20452.  
  20453.      Minimum RAM
  20454.  
  20455.      The lowest amount of conventional memory available at any
  20456.      point within a session.
  20457.  
  20458.      Overlay Buffer
  20459.  
  20460.      The amount of conventional memory set aside to swap "overlays"
  20461.      in and out of memory. Overlays are portions of the program
  20462.      that are ordinarily loaded from disk whenever they are
  20463.      required. When the overlay buffer is active, the first time
  20464.      PC-File requires an overlay it copies the overlay from disk
  20465.      into the overlay buffer. Once an overlay has been copied to
  20466.      memory, PC-File can make subsequent accesses much more
  20467.      quickly.
  20468.  
  20469.      Disk Buffer
  20470.  
  20471.      The amount of conventional memory set aside to cache data
  20472.      records and index entries for faster database access. This
  20473.      number will vary from 0 to 16000 depending on how much
  20474.      conventional memory is available when PC-File is started.
  20475.  
  20476.      Using Extended (or Expanded) Memory
  20477.  
  20478.      If PC-File has detected either extended or expanded memory on
  20479.      your system, the last line in the box will read either "Using
  20480.      extended memory" or "Using expanded memory." PC-File will not
  20481.      use both kinds of memory at the same time. If your machine has
  20482.      both kinds of memory, PC-File will use expanded memory because
  20483.      it is less likely to conflict with other programs. PC-File
  20484.      does not list the amount of extended or expanded memory in
  20485.      use. It uses as much as it needs, typically not more than
  20486.      500K.
  20487.  
  20488.      PC-File can use this additional memory to swap overlays in the
  20489.      same fashion described under "Overlay Buffer." Additionally,
  20490.      PC-File can use expanded memory to swap the contents of
  20491.      conventional memory when using the Drop to DOS command on the
  20492.      Tools menu and choosing to free memory, when using the Labels
  20493.      command on the Utilities menu, or when graphing.
  20494.  
  20495.      Memory Usage Configuration Commands
  20496.  
  20497.  
  20498.  
  20499.      PC-File Version 7 Users Guide                            352
  20500.  
  20501.  
  20502.      Two configuration commands have been added to PC-File to allow
  20503.      you to control whether or not PC-File will use expanded or
  20504.      extended memory: /NOXMS and /NOEMS. These can be used like all
  20505.      configuration commands, either directly from the DOS prompt
  20506.      when starting PC-File, or by editing your .PRO file with any
  20507.      editor or word processor that can save unformatted ASCII
  20508.      files. See Chapter 13, "Advanced Profile Parameters" for
  20509.      details on editing a profile or using configuration commands
  20510.      at the DOS prompt.
  20511.  
  20512.      /NOXMS
  20513.      Prevents PC-File from using extended memory
  20514.  
  20515.      /NOEMS
  20516.      Prevents PC-File from using expanded memory
  20517.  
  20518.      You might need to use these commands if PC-File's use of
  20519.      extended or expanded memory appears to be in conflict with
  20520.      other programs. Also, if your systems has both kinds of
  20521.      memory, PC-File will use expanded (EMS) memory by default.
  20522.      Using just the /NOEMS configuration command forces PC-File to
  20523.      use extended memory instead.
  20524.  
  20525.      APPENDIX A
  20526.  
  20527.      IF YOU NEED TECHNICAL SUPPORT
  20528.  
  20529.  
  20530.  
  20531.      If you are unable to find the answers to your questions in the
  20532.      manuals or help windows, we invite you to call our Technical
  20533.      Support department. They will be happy to answer any technical
  20534.      questions you have about PC-File.
  20535.  
  20536.      To receive technical support, call 1-900-454-8000 Monday
  20537.      through Friday. If you are unable to use the 900 number for
  20538.      technical support or would prefer a prepaid support plan that
  20539.      provides for unlimited technical support on an annual basis,
  20540.      please contact us at 1-800-528-8866 for information on
  20541.      purchasing a Product Support Plan.
  20542.  
  20543.      If you have a modem, you can also contact our Technical
  20544.      Support department on our bulletin board or on CompuServe. Our
  20545.      bulletin board operates 24 hours a day, 7 days a week. The
  20546.      bulletin board phone number is 206-454-7875. There is no
  20547.      charge to use our bulletin board, other than your long
  20548.      distance charge. You can reach our Technical Support
  20549.      department on CompuServe in Section 1 of the PCVENA forum.
  20550.      Type go pcvena at the CompuServe ! prompt to access the PCVENA
  20551.      forum. Regular connect charges apply when using CompuServe.
  20552.  
  20553.      To help us help you, please be prepared to provide the
  20554.      following information when you call.
  20555.  
  20556.        Computer brand and model
  20557.  
  20558.  
  20559.  
  20560.      PC-File Version 7 Users Guide                            353
  20561.  
  20562.  
  20563.        Available RAM (as reported by DOS CHKDSK or MEM)
  20564.  
  20565.        DOS version being used
  20566.  
  20567.        Memory resident programs installed
  20568.  
  20569.        Printer brand and model
  20570.  
  20571.        Monitor brand and model
  20572.  
  20573.        Exact wording of any error message(s)
  20574.  
  20575.      If possible, be at your computer when you call, with your
  20576.      computer on. Also, it often helps if you have available the
  20577.      database description printout (produced using Database
  20578.      Description on the Utilities menu) for the database in
  20579.      question, as well as a printout of any report format you are
  20580.      having problems with.
  20581.  
  20582.  
  20583.  
  20584.      PC-File Version 7 Users Guide                            354
  20585.  
  20586.  
  20587.  
  20588.      APPENDIX B
  20589.  
  20590.  
  20591.      PROGRAM AND DATABASE FILES
  20592.  
  20593.  
  20594.  
  20595.      PC-File consists of over a dozen program files. All of these
  20596.      files are loaded when you install the program. Two of the
  20597.      files--PCF.EXE and PCF.HLP--are absolutely essential for
  20598.      running PC-File. The other program files can be erased if
  20599.      necessary. Refer to the list below to see what you lose if you
  20600.      delete a file.
  20601.  
  20602.      PC-File creates a variety of files for each database that you
  20603.      define. Some of these, such as the header and data files, are
  20604.      an integral part of the database. Others, like report and
  20605.      letter files, are added as you define those features in the
  20606.      database.
  20607.  
  20608.      Your PC-File disks also contain several dozen sample files.
  20609.      The examples in the manuals refer to these sample files.
  20610.  
  20611.      All of the program files and each type of database file are
  20612.      explained below.
  20613.  
  20614.  
  20615.  
  20616.      PROGRAM FILES
  20617.  
  20618.      FCONVERT.COM
  20619.  
  20620.      This is a standalone program that converts PC-File III, PC-
  20621.      File/R, and PC-File+ databases into the new PC-File (dBASE III
  20622.      PLUS) format. You can delete this program after you have no
  20623.      further use for it.
  20624.  
  20625.      INSTALL.EXE
  20626.  
  20627.      The PC-File install program. It comes on Disk One, but is not
  20628.      copied onto your hard disk.
  20629.  
  20630.      MSHERC.COM
  20631.  
  20632.      This program must be run before you can produce graphs on a
  20633.      Hercules monitor. If you have a VGA, EGA, or CGA monitor, you
  20634.      can delete this file.
  20635.  
  20636.      PCF.DIC
  20637.  
  20638.      This file contains the 100,000 word dictionary used by PC-
  20639.      File's spell checker. You can delete this file if you will not
  20640.      be using the spell checker.
  20641.  
  20642.      PCF.EXE
  20643.  
  20644.  
  20645.  
  20646.      PC-File Version 7 Users Guide                            355
  20647.  
  20648.  
  20649.  
  20650.      The main program module of PC-File. Don't impinge the
  20651.      integrity of this file at all. You must start PC-File from the
  20652.      directory that contains this file or place PC-File on your DOS
  20653.      path.
  20654.  
  20655.      PCF.HLP
  20656.  
  20657.      This is another main file, without which PC-File will not run.
  20658.      This file contains not only the Help window text, but most of
  20659.      the other screen text as well. Place this file on the same
  20660.      drive and in the same subdirectory with PCF.EXE.
  20661.  
  20662.      PCF.PIF
  20663.  
  20664.      The Windows PIF (Program Information File) used to run PC-File
  20665.      in Graphics mode under Microsoft Windows. Run this file
  20666.      directly from the File Manager, or use New on the File menu of
  20667.      the Program Manager to define it as a Program Item.
  20668.  
  20669.      PCF.SUP
  20670.  
  20671.      The "supplemental" dictionary file that is created when you
  20672.      use the Add function in the spell checker to add words to your
  20673.      personal dictionary file.
  20674.  
  20675.      PCFCHAR.PIF
  20676.  
  20677.      The Windows PIF (Program Information File) used to run PC-File
  20678.      in Character mode under Microsoft Windows. Run this file
  20679.      directly from the File Manager, or use New on the File menu of
  20680.      the Program Manager to define it as a Program Item.
  20681.  
  20682.      PCFLOGO.IMG
  20683.  
  20684.      This file contains the PC-File "paper clip" logo that displays
  20685.      when you first start PC-File in Graphics mode. You can delete
  20686.      this file if you want.
  20687.  
  20688.      PCFILE.MAC
  20689.  
  20690.      The master macro file. You can create macros in this file to
  20691.      open your databases or perform other operations outside of
  20692.      individual databases. This file is not required to use PC-
  20693.      File.
  20694.  
  20695.      PCFILE.PRO
  20696.  
  20697.      The master configuration profile file. This file controls the
  20698.      operating environment of PC-File, including the mode of
  20699.      operation, screen colors, passwords, and telephone dialing
  20700.      codes. This file is not required to use PC-File.
  20701.  
  20702.      PCG2.EXE
  20703.  
  20704.  
  20705.  
  20706.      PC-File Version 7 Users Guide                            356
  20707.  
  20708.  
  20709.      This is the graphing display program. If you will be producing
  20710.      graphs, this program must be in the same subdirectory as your
  20711.      other PC-File programs. If you will not be producing graphs,
  20712.      you can delete this program.
  20713.  
  20714.      PCG2.ASP
  20715.  
  20716.      This file is created when you set colors or a different aspect
  20717.      ratio for graphing. This file is not required to use PC-File.
  20718.  
  20719.      PCLABEL.EXE
  20720.  
  20721.      An external/internal utility that allows you to print mailing
  20722.      labels in a one-up or multi-up format. You can delete this
  20723.      file if you have no intentions of using PC-Label.
  20724.  
  20725.      READ.ME
  20726.  
  20727.      A text file provided for additional information. You can view
  20728.      this file with any word processor that reads ASCII files, or
  20729.      print it on your printer by typing copy a:read.me prn at the
  20730.      DOS prompt. You can then delete the file.
  20731.  
  20732.      SHOWR.EXE
  20733.  
  20734.      A file viewer program used to display the READ.ME file at the
  20735.      end of installation process. You can run this program as a
  20736.      standalone DOS application to view ASCII files, if you wish.
  20737.      You can safely delete this file.
  20738.  
  20739.  
  20740.      DATABASE FILES
  20741.  
  20742.      databasename.CDS
  20743.  
  20744.      This is the telephone log that is kept whenever you tell PC-
  20745.      File to dial a telephone number. Delete this file whenever you
  20746.      want to start a new log.
  20747.  
  20748.      databasename.DBF
  20749.  
  20750.      This file contains the actual data you enter into your
  20751.      database.
  20752.  
  20753.      databasename.DBT
  20754.  
  20755.      Data entered in memo fields is contained in this file. All
  20756.      memo data within a database is stored in this file, even if
  20757.      you have two or more memo fields.
  20758.  
  20759.      databasename.DBH
  20760.  
  20761.  
  20762.  
  20763.      PC-File Version 7 Users Guide                            357
  20764.  
  20765.  
  20766.      The header file is created when you define a database. It
  20767.      contains information about the structure and contents of the
  20768.      database. This file is also created by PC-File when you open a
  20769.      dBASE-type database that was created by some other program,
  20770.      such as dBASE or FoxPRO.
  20771.  
  20772.      databasename.MAC
  20773.  
  20774.      This file is created if you define any macros for a database.
  20775.      It contains the macro definitions for use with the database.
  20776.  
  20777.      databasename.PRO
  20778.  
  20779.      This file is created if you define a separate configuration
  20780.      profile for a particular database.
  20781.  
  20782.      databasename.ND9
  20783.  
  20784.      This is the Subgroup index file for the database. You can have
  20785.      only one Subgroup index within a particular database.
  20786.  
  20787.      databasename.NDn (Where "n" is 1 through 8)
  20788.  
  20789.      Each index for a database is saved to a separate file under
  20790.      the same name as the database with an .NDn extention. For
  20791.      example, if your database has two indexes they would have .ND1
  20792.      and .ND2 extensions.
  20793.  
  20794.      filename.ANS
  20795.  
  20796.      This file stores your Print options dialog box settings for
  20797.      each report. When you reprint a report, the appropriate ANS
  20798.      file is used to set the printing defaults.
  20799.  
  20800.      filename.GR
  20801.  
  20802.      This file is created when you define a graph. It contains the
  20803.      commands that define the structure of the graph. A different
  20804.      file is created for each graph. If you change the file
  20805.      extension to .REP, you can edit this file with the Language
  20806.      editor.
  20807.  
  20808.      filename.LBL
  20809.  
  20810.      This file is created by PC-Label when you save the label
  20811.      setup. It contains the commands that define the structure and
  20812.      defaults of the label.
  20813.  
  20814.      filename.LTR
  20815.  
  20816.      This file is created when you define a mail-merge letter. It
  20817.      contains the commands that define the structure of the letter.
  20818.      A different file is created for each letter.
  20819.  
  20820.      filename.MAC
  20821.  
  20822.  
  20823.  
  20824.      PC-File Version 7 Users Guide                            358
  20825.  
  20826.  
  20827.      This file is created if you define any auxiliary macro files.
  20828.  
  20829.      filename.REP
  20830.  
  20831.      This file is created when you define a report. It contains the
  20832.      commands that define the structure of the report. A different
  20833.      file is created for each report.
  20834.  
  20835.      GRAPH.ME
  20836.  
  20837.      This file contains the data for the most-recently created
  20838.      graph. The data in the file changes every time you create a
  20839.      new graph, as the new data replaces the old data. It's an
  20840.      ASCII text file which you can edit with any text editor or
  20841.      word processing program.
  20842.  
  20843.      TMPnn.DBF, .DBH, .DBT, .PRO, and .MAC
  20844.  
  20845.      These files are created as a backup copy of your database when
  20846.      choosing to Update the current database when redefining using
  20847.      the Paint method, and when packing your database. All file
  20848.      types that existed for the original database are created:
  20849.      .DBH, .DBF, .DBT, .PRO, and .MAC. You can safely delete these
  20850.      files, after confirming that your redefine or packing
  20851.      operation was successful.
  20852.  
  20853.      TMPnn.OLD
  20854.  
  20855.      This file is created as a temporary work file when you define
  20856.      a report, letter, or graph without saving them. Ordinarily,
  20857.      you will not see these files, they will be deleted when PC-
  20858.      File is through with these operations. They might be left on
  20859.      your disk if your machine loses power or locks while the
  20860.      program is running. They can be safely deleted.
  20861.  
  20862.      TEMPnnnn.PCF
  20863.  
  20864.      This file is created when you choose to free up memory when
  20865.      dropping to DOS from within PC-File. The file allows you to
  20866.      return to where you were in PC-File. Don't delete the file
  20867.      while temporarily dropping to DOS from PC-File.
  20868.  
  20869.  
  20870.  
  20871.      PC-File Version 7 Users Guide                            359
  20872.  
  20873.  
  20874.  
  20875.      APPENDIX C
  20876.  
  20877.      ASCII TABLE
  20878.  
  20879.  
  20880.      Listed below is an ASCII table. The ASCII table includes the
  20881.      decimal and hexadecimal values for each ASCII character, as
  20882.      well as the ASCII character itself. To enter an ASCII
  20883.      character not found on your keyboard in a field, text window
  20884.      or edit window, hold down ALT while keying in the ASCII
  20885.      decimal value of the character using the numeric keypad. Then
  20886.      release the ALT key. For example, to enter u in a field, hold
  20887.      down ALT and key in the numbers 1 2 9, using the numeric
  20888.      keypad on the right side of the keyboard. Then release the ALT
  20889.      key. Note that you cannot use the number keys on the top row
  20890.      of the keyboard.
  20891.  
  20892.  
  20893.  
  20894.      PC-File Version 7 Users Guide                            360
  20895.  
  20896.  
  20897.  
  20898.      APPENDIX D
  20899.  
  20900.      ERROR/INFORMATION MESSAGES
  20901.  
  20902.  
  20903.  
  20904.      Listed below are various PC-File error and information
  20905.      messages, explanations and recommended actions. The messages
  20906.      are listed in alphabetical order.
  20907.  
  20908.      ?????
  20909.  
  20910.      Question marks printed in a report or letter indicate that PC-
  20911.      File doesn't recognize the field name(s) included in the
  20912.      report or letter. See Chapter 9,"Printing Reports and
  20913.      Letters," for more information.
  20914.  
  20915.      ?BAD ANSKEY
  20916.  
  20917.      The "lookup field" referenced in a relational lookup is not a
  20918.      valid field in the lookup database. Make sure that the field
  20919.      name is spelled correctly. The "lookup field" is the field in
  20920.      the lookup database containing the value to return, and is the
  20921.      fourth parameter in a relational lookup.
  20922.  
  20923.      ?BAD DB
  20924.  
  20925.      The "lookup database" referenced in a relational lookup is not
  20926.      a valid PC-File database. The "lookup database" is the
  20927.      database containing the data to retrieve, and is the second
  20928.      parameter in a relational lookup.
  20929.  
  20930.      ?BAD DB ID
  20931.  
  20932.      PC-File had problems opening the "lookup database" specified
  20933.      in a relational lookup. Make sure the database name is spelled
  20934.      properly and exists on the specified drive and subdirectory.
  20935.  
  20936.      ?BAD DBKEY
  20937.  
  20938.      The "shared field in lookup database" field referenced in a
  20939.      relational lookup is not a valid field in the lookup database.
  20940.      Make sure that the field name is spelled correctly. The
  20941.      "shared field in lookup database" is the field in the lookup
  20942.      database containing the lookup value, and is the third
  20943.      parameter in a relational lookup.
  20944.  
  20945.      ?BAD KEY1
  20946.  
  20947.      The "shared field in the current database" referenced in a
  20948.      relational lookup is not a valid field in the current
  20949.      database. Make sure the field name is spelled correctly. The
  20950.      "shared field in the current database" is the field in the
  20951.      current database containing the value to lookup, and is the
  20952.      first parameter in a relational lookup.
  20953.  
  20954.  
  20955.  
  20956.      PC-File Version 7 Users Guide                            361
  20957.  
  20958.  
  20959.  
  20960.      ?BAD USAGE
  20961.  
  20962.      The syntax of a relational lookup is incorrect. Relational
  20963.      lookups must be entered in the format (@shared field in
  20964.      current database, lookup database, shared field in lookup
  20965.      database, lookup field) or (*,lookup field).
  20966.  
  20967.      ?CANCELED
  20968.  
  20969.      The relational lookup operation was canceled by pressing ESC.
  20970.  
  20971.      ?NO RAM
  20972.  
  20973.      The computer does not have enough RAM memory to perform a
  20974.      relational lookup. See the error "Out of Memory."
  20975.  
  20976.      Beginning of file
  20977.  
  20978.      You are trying to display the previous record while viewing
  20979.      the first record in the database.
  20980.  
  20981.      Can't create (filename)
  20982.  
  20983.      PC-File has encountered an error when creating a new file.
  20984.      (The file name is included in the message.) This message may
  20985.      indicate that the data disk is full, that there are too many
  20986.      files on the disk, that there is a hardware or disk error,
  20987.      your network rights won't allow you to create files, or the
  20988.      FILES statement in your CONFIG.SYS file needs to be increased.
  20989.  
  20990.      Can't delete (filename or data)
  20991.  
  20992.      PC-File has encountered an error deleting a file or data in a
  20993.      file. This usually indicates a hardware error or a disk error.
  20994.      If the message refers to a file, it could mean that the file
  20995.      is marked by DOS as a read-only file.
  20996.  
  20997.      Can't get memo
  20998.  
  20999.      PC-File has encountered an error reading the memo file. This
  21000.      indicates that the memo file is missing, or there is a
  21001.      hardware error or a disk error. The memo file (.DBT) must have
  21002.      the same name as the data file (.DBF), and must be stored on
  21003.      the same drive and subdirectory as the data file.
  21004.  
  21005.      Can't open (filename)
  21006.  
  21007.      The file named in the message cannot be opened for processing.
  21008.      There could be several reasons for this:
  21009.  
  21010.        The file could not be found, because you gave the wrong name
  21011.        for it.
  21012.  
  21013.        The file could not be found, because you specified the wrong
  21014.        disk drive or subdirectory.
  21015.  
  21016.  
  21017.  
  21018.      PC-File Version 7 Users Guide                            362
  21019.  
  21020.  
  21021.  
  21022.        The file is in use by someone else on your system.
  21023.  
  21024.        You are having hardware or disk errors.
  21025.  
  21026.        The FILES= statement in your CONFIG.SYS file is too small.
  21027.        Increase it to 20 or more.
  21028.  
  21029.        The file may have been damaged in some way. See Chapter 12,
  21030.        "External/Internal Utilities," for information on repairing
  21031.        a database.
  21032.  
  21033.      Can't open .LOG file
  21034.  
  21035.      PC-File can't open the file that keeps track of changes made
  21036.      during a posting. If the destination database resides on a
  21037.      network drive, you might not have "rights" to open or create
  21038.      the files. There may be an insufficient number of file handles
  21039.      available to open a file--try increasing the number after
  21040.      FILES= in your CONFIG.SYS file, reboot and try running the
  21041.      posting again. Also, there may be insufficient disk space to
  21042.      open the .LOG file.
  21043.  
  21044.      Can't open .PST file
  21045.  
  21046.      The batch post definition file can't be opened. The file might
  21047.      be damaged. If the file resides on a network drive, you might
  21048.      not have "rights" to open the file. There may be an
  21049.      insufficient number of file handles available to open a file--
  21050.      try increasing the number after FILES= in your CONFIG.SYS
  21051.      file, reboot and try opening the .PST file again.
  21052.  
  21053.      Can't run DOS
  21054.  
  21055.      You've tried to run a DOS command from within PC-File and the
  21056.      DOS command cannot be processed. There could be several
  21057.      reasons for this:
  21058.  
  21059.      COMMAND.COM cannot be found on the disk, or is damaged.
  21060.  
  21061.      If you told PC-File to free up all memory, PC-File requires
  21062.      about 700K of disk space. The disk may be too full.
  21063.  
  21064.      Not enough RAM is available to execute the command; or the
  21065.      available memory has been corrupted.
  21066.  
  21067.      Can't write (filename)
  21068.  
  21069.      PC-File has encountered an error writing to a file. This
  21070.      usually indicates a full disk, hardware error, a disk error,
  21071.      or that the file is marked by DOS as a read-only file.
  21072.  
  21073.      Cancel changes to this record?
  21074.  
  21075.  
  21076.  
  21077.      PC-File Version 7 Users Guide                            363
  21078.  
  21079.  
  21080.      You selected the Cancel Changes option from the Edit menu, or
  21081.      pressed ESC after modifying a records. If you answer Yes to
  21082.      the question, PC-File ignores all changes made to the current
  21083.      record and restores the record to the original data before you
  21084.      began editing the record.
  21085.  
  21086.      Contains reference to unknown field
  21087.  
  21088.      When you select a report or letter to print, PC-File compares
  21089.      the field names referenced in the report or letter with those
  21090.      in the current database. If the report or letter contains a
  21091.      reference to a field name that doesn't exist in the current
  21092.      database, PC-File displays this message. You should modify the
  21093.      report or letter to include the correct field name references.
  21094.      If you don't, PC-File prints question marks where the field
  21095.      data is to be printed.
  21096.  
  21097.      Creation error
  21098.  
  21099.      PC-File has encountered an error trying to create a new file.
  21100.      This error usually indicates a full disk or a hardware or disk
  21101.      error. If PC-File displays this message when defining a
  21102.      database, make sure that the database definition is valid,
  21103.      i.e., make sure field names, types, and lengths are valid.
  21104.  
  21105.      Data length wrong
  21106.  
  21107.      The record length indicated in the .DBF header does not match
  21108.      the calculated record length (the sum of field lengths). The
  21109.      Repair command cannot correct this type of damage. Try using
  21110.      Pack on the Utilities menu to correct this.
  21111.  
  21112.      DBH doesn't match DBF
  21113.  
  21114.      Both the .DBH and .DBF files store the number of fields, and
  21115.      each field's length and type. There is a discrepancy between
  21116.      the number of fields or one or more fields' length or type.
  21117.      You can redefine the database to create a new database with
  21118.      matching .DBH and .DBF files. Alternatively, you can delete
  21119.      the .DBH file and let PC-File adopt to the database. If you
  21120.      change the database structure with a program other than PC-
  21121.      File, you must delete the .DBH file and let PC-File adopt it.
  21122.  
  21123.      Decimals must be less than number
  21124.  
  21125.      When defining or redefining a database, you can provide the
  21126.      number of decimal places for each numeric field. The maximum
  21127.      number of decimal places is the field length minus 2. For
  21128.      example, if you have a numeric field of length 8, the maximum
  21129.      number of decimal positions is 6.
  21130.  
  21131.      Drive not available or drive door is open
  21132.  
  21133.  
  21134.  
  21135.      PC-File Version 7 Users Guide                            364
  21136.  
  21137.  
  21138.      You are attempting to access an unavailable drive. If the
  21139.      drive you are trying to access is a floppy drive, make sure
  21140.      that the drive contains a formatted disk and that the drive
  21141.      door is closed.
  21142.  
  21143.      End of file
  21144.  
  21145.      You are attempting to display the next record while viewing
  21146.      the last record in the database. If you receive this message
  21147.      unexpectedly, it may mean that one or more of the indexes is
  21148.      damaged. You should rebuild all indexes using the Index option
  21149.      on the File menu.
  21150.  
  21151.      Error 0
  21152.  
  21153.      PC-File has encountered an error reading or writing to a file.
  21154.      This usually indicates a full disk or invalid path. It can
  21155.      also indicate a hardware error or a disk error.
  21156.  
  21157.      Error adopting dBASE file
  21158.  
  21159.      You selected a data file (.DBF) that doesn't have a
  21160.      corresponding header file (.DBH) and there is a problem
  21161.      creating the header file. PC-File reads dBASE III Plus
  21162.      compatible data files. If your data file is not dBase III Plus
  21163.      compatible, PC-File can't adopt it.
  21164.  
  21165.      Error deleting database record
  21166.  
  21167.      PC-File has encountered an error deleting a record. This
  21168.      usually indicates a damaged index, hardware error, or a disk
  21169.      error.
  21170.  
  21171.      Error during posting
  21172.  
  21173.      An error has occurred while PC-File was trying to post
  21174.      information to the destination file. This might indicate
  21175.      insufficient disk space, a disk error, or if the destination
  21176.      database resides on a network drive, you might not have
  21177.      "rights" to open and write to the files.
  21178.  
  21179.      Error making index (16386)
  21180.  
  21181.      This error will occur if you are attempting to define a
  21182.      Formula Index using a logical field without converting its
  21183.      data to a string using the TOSTR function. For example:
  21184.  
  21185.      UPPER(fieldname) **Incorrect**
  21186.  
  21187.      TOSTR(fieldname) **Correct**
  21188.  
  21189.      See "Defining a Formula Index" in Chapter 8 for details.
  21190.  
  21191.      Error reading (filename)
  21192.  
  21193.  
  21194.  
  21195.      PC-File Version 7 Users Guide                            365
  21196.  
  21197.  
  21198.      PC-File can't read the named file. The message can indicate
  21199.      that the file has been damaged in some way. You may be having
  21200.      difficulties with the disk itself. Either the data disk has a
  21201.      bad sector, or errors are occurring in the disk controller
  21202.      card.
  21203.  
  21204.      Error reading DBF field table
  21205.  
  21206.      The .DBF header can't be read, or the .DBF can't be opened.
  21207.      The file might be damaged. If the file resides on a network
  21208.      drive, you might not have "rights" to open the file. There may
  21209.      be an insufficient number of file handles available to open a
  21210.      file. Increase the number after FILES= in your CONFIG.SYS file
  21211.      and reboot.
  21212.  
  21213.      Error reading DBF header
  21214.  
  21215.      The .DBF header can't be read, or the .DBF can't be opened.
  21216.      The file might be damaged. If the file resides on a network
  21217.      drive, you might not have "rights" to open the file. There may
  21218.      be an insufficient number of file handles available to open a
  21219.      file--try increasing the number after FILES= in your
  21220.      CONFIG.SYS file, reboot and try repair again.
  21221.  
  21222.      Error reading memo (fieldname)
  21223.  
  21224.      This error will occur if PC-File encounters a memo field that
  21225.      it can't read:
  21226.  
  21227.      In "interactive" situations like viewing and editing in Record
  21228.      view and Table view, PC-File leaves the unavailable memo blank
  21229.      and displays an error message in this format:
  21230.  
  21231.      ----------------------------
  21232.  
  21233.      Error reading memo (fieldname)
  21234.  
  21235.      This database may be damaged
  21236.  
  21237.      [ OK ] [CANCEL]
  21238.  
  21239.      ----------------------------
  21240.  
  21241.      In "batch" situations like reports and export, PC-File prints
  21242.      or exports:
  21243.  
  21244.      Memo data not available
  21245.  
  21246.      in place of the damaged memo information. An error message in
  21247.      the following format will also display on the screen for 2
  21248.      seconds:
  21249.  
  21250.      ----------------------------
  21251.  
  21252.      Error reading memo (fieldname)
  21253.  
  21254.  
  21255.  
  21256.      PC-File Version 7 Users Guide                            366
  21257.  
  21258.  
  21259.      This database may be damaged
  21260.  
  21261.      -----------------------------
  21262.  
  21263.      You might be able to correct this problem using either the
  21264.      Repair or the Pack options on the Utilities menu. See
  21265.      "Repairing a Database" and "Packing a Database" for details.
  21266.  
  21267.      Error writing on (filename)
  21268.  
  21269.      PC-File can't write to the named file. Also, make sure that
  21270.      the disk isn't already full. If it is full, no more data can
  21271.      be written to it. You may be having difficulties with the disk
  21272.      itself. Either the data disk has a bad sector, or errors are
  21273.      occurring in the disk controller card. If writing to a floppy
  21274.      disk, make sure the disk doesn't have a write-protect tab on
  21275.      it.
  21276.  
  21277.      Exit memo without saving changes?
  21278.  
  21279.      When editing a memo field, PC-File displays this message when
  21280.      you choose Cancel. If you exit without saving, PC-File ignores
  21281.      all changes made to the memo field during the current editing
  21282.      session.
  21283.  
  21284.      Field display length exceeds 65 characters
  21285.  
  21286.      The maximum number of characters you can display for any field
  21287.      on one line is 65. However, the actual data length for
  21288.      character and memo fields can be much longer. Character fields
  21289.      can contain up to 254 characters. Memo fields can contain up
  21290.      to 5000 characters. When creating or modifying a View, you
  21291.      cannot use more than 65 characters for a field's display
  21292.      length.
  21293.  
  21294.      Field type (type) invalid for field length (length)
  21295.  
  21296.      You are defining or redefining a database and have provided an
  21297.      invalid field length. Character fields must be 1 to 254
  21298.      characters long. Numeric fields must be 1 to 19 characters
  21299.      long. Date fields must be 8 or 10 characters long. Logical
  21300.      fields must be 1 character long. Memo fields must be 5000
  21301.      characters long. Before you can proceed with the database
  21302.      definition or redefinition, you must either change the field
  21303.      type or field length.
  21304.  
  21305.      In the output database (databasename), The "Match to" field
  21306.      (fieldname) is not indexed. Posting may be slow. Continue?
  21307.  
  21308.      For PC-File to perform posting as quickly as possible, the
  21309.      field to match on in the database you are posting to should be
  21310.      indexed, so PC-File can perform a fast search on the index. If
  21311.      the match field is not indexed, PC-File performs a much slower
  21312.      sequential search.
  21313.  
  21314.      Incompatible memo format
  21315.  
  21316.  
  21317.  
  21318.      PC-File Version 7 Users Guide                            367
  21319.  
  21320.  
  21321.  
  21322.      The .DBF file has memo fields that are stored in dBASE IV
  21323.      format--PC-File can only use dBASE III or III+ format memos.
  21324.  
  21325.      Index expression too long. Ignoring excess.
  21326.  
  21327.      This error message can occur when you are defining a Simple
  21328.      Index (see "Creating an Index" for details) and you choose too
  21329.      many fields to index. All fields indexed up to the point you
  21330.      receive this message will be used if you continue. PC-File
  21331.      generates a dBase index expression which cannot be more than
  21332.      100 characters long. The total number of fields you can index
  21333.      will vary depending on the lengths of the field names, the
  21334.      types of fields indexed, and how many fields are indexed in
  21335.      descending or
  21336.      ascending sequence. Depending on the situation, you may be
  21337.      able to produce the index you want by defining a Formula Index
  21338.      (see "Creating an Index" for details).
  21339.  
  21340.      Index key exceeded 100 characters
  21341.  
  21342.      Due to limitations of the dBASE index structure, PC-File can't
  21343.      index on more than 100 characters of data. For example, PC-
  21344.      File can't sort five fields of 30 characters each, because the
  21345.      total length would be 150 characters. You need to specify
  21346.      fewer fields to index, or index on portions of fields. See
  21347.      Chapter 6, "Sorting and Indexing Data" for information on
  21348.      indexing portions of fields.
  21349.  
  21350.      Invalid field name (name)
  21351.  
  21352.      When defining a database, you included invalid characters in a
  21353.      field name, or you selected a field and typed a field name
  21354.      that doesn't exist. Field names can contain only letters,
  21355.      numbers and the underscore ( _ ) character. No punctuation,
  21356.      spaces, or other characters are allowed. Field names must
  21357.      start with a letter.
  21358.  
  21359.      Invalid key expression
  21360.  
  21361.      There is an error in the expression you entered for a formula
  21362.      index. It could be a misspelled field name or function name,
  21363.      or a missing parenthesis.
  21364.  
  21365.      Invalid PST file (1st record bad)
  21366.  
  21367.      The first line in the .PST file is not in a valid format. The
  21368.      .PST might be damaged or has been incorrectly edited. This
  21369.      line in the .PST file indicates the "post from" (source)
  21370.      database, and should be in this format:
  21371.  
  21372.      PCF6,D:\path\databasename
  21373.  
  21374.  
  21375.  
  21376.      PC-File Version 7 Users Guide                            368
  21377.  
  21378.  
  21379.      where "D" is the drive and "path" is the subdirectory where
  21380.      the source database resides, and "databasename" is the name of
  21381.      the source database with no extension. For example, posting
  21382.      from a database named SALES on drive C in the \PCFILE\DATA
  21383.      subdirectory the first line of the .PST file would read:
  21384.  
  21385.      PCF6,C:\PCFILE\DATA\SALES
  21386.  
  21387.      To correct this problem: Edit the first line of the .PST file
  21388.      to the format above, restore a backup copy of the .PST file,
  21389.      or redefine the posting from scratch.
  21390.  
  21391.      Invalid PST file (2nd rcd bad)
  21392.  
  21393.      The second line in the .PST file is not in a valid format. The
  21394.      .PST might be damaged or has been incorrectly edited. This
  21395.      line in the .PST file indicates the "post to" (destination)
  21396.      database, and should be in this format:
  21397.  
  21398.      TO:D:\path\databasename.DBH
  21399.  
  21400.      where "D" is the drive and "path" is the subdirectory where
  21401.      the destination database resides, and "databasename" is the
  21402.      name of the destination database. For example, posting to a
  21403.      database named INVENTORY on drive C in the \PCFILE\DATA
  21404.      subdirectory, the second line of the .PST file would read:
  21405.  
  21406.      TO:C:\PCFILE\DATA\INVENTORY.DBH
  21407.  
  21408.      To correct this problem: Edit the second line of the .PST file
  21409.      to the format above, restore a backup copy of the .PST file,
  21410.      or redefine the posting from scratch.
  21411.  
  21412.      Invalid PST file (MATCH command expected)
  21413.  
  21414.      The third line in the .PST file is not in a valid format. The
  21415.      .PST might be damaged or has been incorrectly edited. This
  21416.      line in the .PST file indicates which fields to match on, and
  21417.      should be in this format:
  21418.  
  21419.      MATCH sourcefield to destinationfield
  21420.  
  21421.      where "sourcefield" is the match field from the source
  21422.      database and "destinationfield" is the match field from
  21423.      destination database. For example, matching on a field named
  21424.      PART_NO in both databases the third line of the .PST file
  21425.      would read:
  21426.  
  21427.      MATCH PART_NO to PART_NO
  21428.  
  21429.      To correct this problem: Edit the third line of the .PST file
  21430.      to the format above, restore a backup copy of the .PST file,
  21431.      or redefine the posting from scratch.
  21432.  
  21433.      Line length >>80. Truncate the line?
  21434.  
  21435.  
  21436.  
  21437.      PC-File Version 7 Users Guide                            369
  21438.  
  21439.  
  21440.      You are printing a list of duplicate records and the length of
  21441.      the line of data to be printed is greater than 80 characters.
  21442.      If you are printing to a wide carriage printer or are using a
  21443.      condensed font, you may not want to truncate the line.
  21444.      However, if your printer can only print 80 characters per
  21445.      line, you do want to truncate the data so that your printer
  21446.      doesn't wrap the data from one line to the next.
  21447.  
  21448.      LOG file missing: (filename)
  21449.  
  21450.      This message appears when using the UnPost command on the
  21451.      Batch Post dialog box. Either the .LOG file for the database
  21452.      was deleted, or you may be in the wrong database when trying
  21453.      to UnPost--you must be in the database that was posted to, not
  21454.      the database that was posted from.
  21455.  
  21456.      Match To Field isn't indexed
  21457.  
  21458.      This message indicates that the field to match on in the
  21459.      destination database is not indexed. This does not prevent the
  21460.      posting from being performed, but posting will be slower.
  21461.      Index the "match to" field for better performance.
  21462.  
  21463.      Memo N/A
  21464.  
  21465.      You can't use a memo field in a relational lookup.
  21466.  
  21467.      Name invalid
  21468.  
  21469.      When saving files, you must specify a valid DOS file name.
  21470.      Refer to your DOS manual for the valid file name characters.
  21471.      Also make sure that you don't have a default drive, path and
  21472.      file in the database.PRO file.
  21473.  
  21474.      Need a Match Destination field
  21475.  
  21476.      You need to choose a field from the "post to" (destination)
  21477.      database to match with before you can proceed with your Batch
  21478.      post definition.
  21479.  
  21480.      Need a Match field from Lookup file
  21481.  
  21482.      You need to choose a "match with" field from the Lookup
  21483.      database (the database you are retrieving data from) before
  21484.      you can proceed.
  21485.  
  21486.      Need a Match Source field
  21487.  
  21488.      You need to choose a field from the current (source) database
  21489.      to match with before you can proceed with your Batch post
  21490.      definition.
  21491.  
  21492.      Need a POST action
  21493.  
  21494.  
  21495.  
  21496.      PC-File Version 7 Users Guide                            370
  21497.  
  21498.  
  21499.      You need to define a post action before you can proceed with
  21500.      your Batch post definition. See "Defining Post Actions" for
  21501.      details.
  21502.  
  21503.      Need a Post Destination field
  21504.  
  21505.      You need to choose a field from the "post to" (destination)
  21506.      database to post to before you can proceed with your Post
  21507.      action definition.
  21508.  
  21509.      Need a Post Source field
  21510.  
  21511.      You need to choose a field from the current (source) database
  21512.      to post from before you can proceed with your Post action
  21513.      definition.
  21514.  
  21515.      Need a Source field
  21516.  
  21517.      You need to choose a "match with" field from the current
  21518.      (source) database before you can proceed.
  21519.  
  21520.      Need an Answer field from Lookup file
  21521.  
  21522.      You need to choose the field to retrieve data from in the
  21523.      Lookup database before you can proceed.
  21524.  
  21525.      No phone number
  21526.  
  21527.      To use the telephone dialer option, you must have a field name
  21528.      containing the word "phone." You can use the Redefine option
  21529.      on the File menu to change the name of the field(s) containing
  21530.      your phone number(s) to include the word "phone". See Chapter
  21531.      13, "Tools," for more information on the telephone dialer.
  21532.  
  21533.      No repairs were performed
  21534.  
  21535.      PC-File found no errors that it could correct, or the user has
  21536.      answered No to a repair message.
  21537.  
  21538.      No snapshot defined
  21539.  
  21540.      To use the snapshot label option, you must have a snapshot
  21541.      label defined in the current profile. See Chapter 13, "Tools,"
  21542.      for more information on snapshot labels.
  21543.  
  21544.      Not a compatible DBF file
  21545.  
  21546.      The file you are trying to repair is probably a dBASE II file.
  21547.      PC-File only uses dBASE III and dBASE III+ .DBF files.
  21548.  
  21549.      Not a valid extension
  21550.  
  21551.  
  21552.  
  21553.      PC-File Version 7 Users Guide                            371
  21554.  
  21555.  
  21556.      You have added an invalid file extension in the file selection
  21557.      dialog box. For example, when opening a database, if you
  21558.      provide an extension other than DBF, PC-File displays this
  21559.      message. In most cases, PC-File adds the extension
  21560.      automatically, so you don't have to.
  21561.  
  21562.      Not a valid path or file name
  21563.  
  21564.      The path or file name you have entered in the file selection
  21565.      dialog box doesn't exist or is incorrectly spelled. Also, make
  21566.      sure you select the appropriate drive.
  21567.  
  21568.      Not found
  21569.  
  21570.      PC-File can't find a record matching the search criteria.
  21571.  
  21572.      Numeric field exceeds 19
  21573.  
  21574.      The maximum field length for numeric fields is 19. You need to
  21575.      reduce the size of the numeric field to 19 characters or less.
  21576.  
  21577.      Out of Memory
  21578.  
  21579.      PC-File has run out of RAM memory (not disk space). To
  21580.      determine how much RAM memory is available on your machine,
  21581.      refer to the "Getting Started" section.
  21582.  
  21583.      PC-File may display an "Out of Memory" message when performing
  21584.      an operation which worked earlier in the current session.
  21585.      While you are in PC-File, memory can become fragmented, such
  21586.      that a large enough block of memory can't be found to perform
  21587.      an operation. There are two ways to work around this problem.
  21588.      First, quit all the way out of PC-File, then restart PC-File
  21589.      and immediately retry the operation that failed. This frees
  21590.      all memory, eliminating fragmentation. Second, make more
  21591.      memory available by either installing more conventional memory
  21592.      in your machine (if you don't have 640K) or by disabling
  21593.      memory resident programs. Extended and expanded memory will
  21594.      not help avoid this error.
  21595.  
  21596.      Another, less common cause of this message is an invalid
  21597.      calculation, complex search criteria or .IF statement in a
  21598.      report or letter. Examples include angle brackets around field
  21599.      names, missing or extra parentheses, and missing or illegal
  21600.      operators such as $, << or =. See Chapter 5,"Finding and
  21601.      Modifying Data," and Chapter 15, "Calculations," for more
  21602.      information.
  21603.  
  21604.      Output (post to) file doesn't exist
  21605.  
  21606.      PC-File can't find the destination database indicated in the
  21607.      .PST file. Either the database has been moved, deleted or
  21608.      renamed; or the .PST has been incorrectly edited.
  21609.  
  21610.  
  21611.  
  21612.      PC-File Version 7 Users Guide                            372
  21613.  
  21614.  
  21615.      To correct this problem: Redefine the posting from scratch, or
  21616.      edit the first line in the .PST file to the format described
  21617.      under "Invalid PST file (1st record bad)."
  21618.  
  21619.      Overwrite data. Are you sure?
  21620.  
  21621.      When importing data, you can append the imported records to
  21622.      the database without affecting the existing data or you can
  21623.      overwrite the existing data. Overwriting deletes the original
  21624.      data and replaces it with the imported data. Confirm or cancel
  21625.      your decision to overwrite all records in the current database
  21626.      to continue.
  21627.  
  21628.      Overwrite existing (filename)
  21629.  
  21630.      If you are saving a file to an existing file name, PC-File
  21631.      asks if you want to overwrite the existing file. If you answer
  21632.      Yes, PC-File deletes the existing file and saves the current
  21633.      file with the same name.
  21634.  
  21635.      Repaired (number)
  21636.  
  21637.      This message is displayed at the end of the repair process to
  21638.      indicate how many records have been repaired.
  21639.  
  21640.      Should be memos, but there aren't
  21641.  
  21642.      The .DBF header has a "flag" that indicates if a database has
  21643.      memo fields. This message is displayed if the flag indicates
  21644.      memos, but there are no fields that show memo type. PC-File
  21645.      gives you the option to attempt to repair this problem, if you
  21646.      answer Yes to repair, PC-File turns off the flag. The .DBT
  21647.      file, if any, is not affected.
  21648.  
  21649.      Shouldn't be memos, but there are
  21650.  
  21651.      The .DBF header has a "flag" that indicates if a database has
  21652.      a memo file (.DBT). This message is displayed if the flag
  21653.      indicates no memos, but there are fields that show memo type.
  21654.      PC-File gives you the option to attempt to repair this
  21655.      problem, if you answer Yes to repair, PC-File resets the
  21656.      "flag" to indicate the presence of memos and creates a new
  21657.      empty memo file (.DBT), if it is missing.
  21658.  
  21659.      The "Match From" Field doesn't exist.
  21660.  
  21661.      PC-File can't find the match field for the source database
  21662.      indicated in the .PST file. The .PST file might be damaged or
  21663.      incorrectly edited, or the field's name might have been
  21664.      changed. Redefining the Batch post definition should correct
  21665.      this problem.
  21666.  
  21667.      The disk is full.
  21668.  
  21669.  
  21670.  
  21671.      PC-File Version 7 Users Guide                            373
  21672.  
  21673.  
  21674.      There is insufficient space on the destination drive PC-File
  21675.      is attempting to write the redefined database on. Either
  21676.      eliminate unnecessary files, or try redefining to a higher
  21677.      capacity disk, if possible.
  21678.  
  21679.      The UNDO file is dated: date Are you sure you want to undo the
  21680.      posting?
  21681.  
  21682.      This is to inform you the date of the last posting to this
  21683.      database. Only records posted to at that time will be
  21684.      restored.
  21685.  
  21686.      There were (number) transactions for which no matching records
  21687.      were found.
  21688.  
  21689.      "Number" is the number of records posted from that have no
  21690.      matches in the database you are posting to.
  21691.  
  21692.      This Post file is incompatible with the current database.
  21693.  
  21694.      The .PST file was probably defined for another database, or
  21695.      field names might have been changed. Redefining the posting
  21696.      should correct the problem.
  21697.  
  21698.      Too many fields
  21699.  
  21700.      PC-File allows up to 128 fields per database. You are trying
  21701.      to define a database with more than 128 fields. If your
  21702.      database has more than 128 fields, you should consider
  21703.      reorganizing your database structure, or linking multiple
  21704.      databases together using relational lookups.
  21705.  
  21706.      Unsuccessful ADD operation
  21707.  
  21708.      This message usually indicates a damaged index. Rebuild all
  21709.      indexes for the database using the Index Maintenance option on
  21710.      the File menu. The message could also indicate a damaged data
  21711.      file, full disk, or disk error.
  21712.  
  21713.      User Canceled
  21714.  
  21715.      The user pressed ESC or chose Cancel while running a Batch
  21716.      post.
  21717.  
  21718.      WARNING: correcting field decimal places
  21719.  
  21720.      This message displays when PC-File finds a discrepancy between
  21721.      the decimal places for numeric fields indicated in the .DBH
  21722.      file and .DBF header. PC-File assumes the .DBF header is
  21723.      correct and updates the .DBH's values for decimal places to
  21724.      the .DBF header's values.
  21725.  
  21726.      WARNING: correcting field length
  21727.  
  21728.  
  21729.  
  21730.      PC-File Version 7 Users Guide                            374
  21731.  
  21732.  
  21733.      This message displays when PC-File finds a discrepancy between
  21734.      the field lengths indicated in the .DBH file and .DBF header.
  21735.      PC-File assumes the .DBF header is correct and updates the
  21736.      .DBH's field lengths to the .DBF header's values.
  21737.  
  21738.      WARNING: correcting field type
  21739.  
  21740.      This message displays when PC-File finds a discrepancy between
  21741.      the field types indicated in the .DBH file and .DBF header.
  21742.      PC-File assumes the .DBF header is correct and the .DBH's
  21743.      field types are updated to the .DBF header's values.
  21744.  
  21745.      WARNING: correcting number of records
  21746.  
  21747.      This message displays when PC-File finds a discrepancy between
  21748.      the number of records indicated in the .DBF header and the
  21749.      calculated number of records (DBF Length divided by Record
  21750.      Length). PC-File assumes the calculated value is correct and
  21751.      updates the number of records indicated in the .DBF header to
  21752.      the calculated value.
  21753.  
  21754.      WARNING: Database may be damaged
  21755.  
  21756.      PC-File has detected an error with the data file. You should
  21757.      first rebuild all indexes using the Index option on the File
  21758.      menu. If the problem persists, repair the database using the
  21759.      Repair option on the Utilities menu.
  21760.  
  21761.      WARNING: No DBF header termination; continuing
  21762.  
  21763.      The end of the .DBF header does not have an end marker. The
  21764.      .DBF file is probably from a third-party program. This should
  21765.      not affect PC-File's ability to repair and use the file. PC-
  21766.      File does not add an end marker, and continues the repair
  21767.      process.
  21768.  
  21769.      WARNING: PCF.EXE failed integrity check
  21770.  
  21771.      PC-File detects a discrepancy while performing an integrity
  21772.      check. To correct the problem, you should ensure that your
  21773.      data disk(s) are not infected with any viruses, and that there
  21774.      are no errors with your data disk(s), then reinstall PC-File.
  21775.  
  21776.      WARNING: This index may be damaged
  21777.  
  21778.      The index file does not match the data file. You should
  21779.      rebuild the index. Make sure you haven't used the same index
  21780.      file name for more than one index field. See Chapter 6,
  21781.      "Sorting and Indexing Data," for more information on
  21782.      rebuilding indexes and naming index files.
  21783.  
  21784.      What to print in place of ???????
  21785.  
  21786.      PC-File wants to know what field or system data you want to
  21787.      print at the current data location in your Free form report.
  21788.  
  21789.  
  21790.  
  21791.      PC-File Version 7 Users Guide                            375
  21792.  
  21793.  
  21794.      Writing corrected DBF header
  21795.  
  21796.      This message displays when a discrepancy is found between the
  21797.      number of records indicated in the .DBF header and the
  21798.      calculated number of records (DBF Length divided by Record
  21799.      Length). The calculated value is assumed to be correct and the
  21800.      number of records indicated in the .DBF header is updated to
  21801.      that value.
  21802.  
  21803.      Writing corrected DBH file
  21804.  
  21805.      This message displays when a discrepancy is found between
  21806.      field types, field lengths, and numeric field decimal places
  21807.      stored in the .DBH file and .DBF header. The .DBF header is
  21808.      assumed to be correct and its field definitions are used to
  21809.      update the .DBH file.
  21810.  
  21811.      Wrong password
  21812.  
  21813.      A password is required before you can perform the operation
  21814.      you attempted. You provided the wrong password.
  21815.  
  21816.      You can't have more than 9 indexes
  21817.  
  21818.      PC-File allows up to 9 indexes per database. You already have
  21819.      9 indexes. You must delete at least one index before you can
  21820.      build another one.
  21821.  
  21822.      You must define at least 1 field
  21823.  
  21824.      You are telling PC-File you have finished defining or
  21825.      redefining a database, but have not defined any fields. Before
  21826.      you can proceed with the database definition or redefinition,
  21827.      you must define at least one field.
  21828.  
  21829.      Your new database has been created. The indexes will be built
  21830.      the first time you use the new database.
  21831.  
  21832.      This message appears after choosing Build New at the end of
  21833.      the Redefine process.
  21834.  
  21835.      Your old database had been renamed to: TMPnnnn Your new
  21836.      (redefined) database keeps the name that it was redefined
  21837.      from. The indexes for your new database will now be created.
  21838.  
  21839.      This message appears after choosing Update Current at end of
  21840.      the Redefine process. TMPnnnn (where "nnnn" is some number) is
  21841.      the name PC-File assigns to the backup copy of the database
  21842.      before redefining it.
  21843.  
  21844.  
  21845.      ABOUT THE AUTHOR
  21846.  
  21847.  
  21848.  
  21849.      PC-File Version 7 Users Guide                            376
  21850.  
  21851.  
  21852.      In 1982, Jim Button started a revolution. He wrote a software
  21853.      program that was so easy to use, even beginners could master
  21854.      it. Yet it was powerful enough to manage information for the
  21855.      largest corporations. Its price was less than half its
  21856.      competition. Jim was so certain that people would love his
  21857.      product, he gave it away for free-requesting payment only if
  21858.      they were completely satisfied. He called it PC-File.
  21859.  
  21860.      Today, 750,000 copies later, Jim's revolutionary software is
  21861.      managing data nationwide. From IBM to the local PTA. Kodak to
  21862.      the cub scouts. Nike to your neighborhood sporting goods
  21863.      store. And it's not alone. PC-File shares the spotlight with a
  21864.      family of powerful products. All are backed by a team
  21865.      committed to quality software, personal service and features
  21866.      that fit the need.