home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / DATABASE / PCF70D.ZIP / PCF3.EXE / PCF7.MAN
Encoding:
Text File  |  1993-06-14  |  783.8 KB  |  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.  
  104.      PC-File Version 7 Users Guide                              2
  105.  
  106.  
  107.  
  108.  
  109.      NOTES ON THE ON-DISK MANUAL
  110.  
  111.      The retail (printed) manuals were written using Microsoft Word
  112.      for Windows and formatted with Ventura Publisher 4.1. Screens
  113.      were captured using HiJaak by Inset Systems. Text is in
  114.      Garamond, headings in Helvetica Condensed, and callouts in
  115.      Tekton. The manuals were printed by R.R. Donnelley & Sons
  116.      Company.
  117.  
  118.      We have tried to provide you with everything necessary to
  119.      evaluate PC-File. The program uses clear, informative menus.
  120.      Help screens are always available.  Also, the file "CARD" can
  121.      be printed to create a quick reference card with a summary of
  122.      the program commands.  The file "STARTUP" gives answers to the
  123.      most common start-up problems. This is sufficient for most
  124.      people to evaluate the program. However,  some people prefer
  125.      to have a copy of the printed manual.
  126.  
  127.      In prior shareware versions of PC-File our manual was over 500
  128.      pages long and many people complained.  Therefore this time we
  129.      have shortened the manual so as to give you complete
  130.      information about each feature but to avoid repetition and the
  131.      obvious. PLEASE NOTE  YOU CAN ALWAYS GET CONTEXT SENSITIVE
  132.      HELP BY PRESSING F1.
  133.  
  134.  
  135.      Note that there are no pretty screen pictures in the disk
  136.      manual, and the tabbing in some of the tables isn't perfect.
  137.      This is because much of the pictorial information is lost when
  138.      we translate from our typeset document to a a text file on the
  139.      disk. This isn't possible in a text file that will print on
  140.      all printers.
  141.  
  142.      To keep costs down, the on-disk documentation is not included
  143.      with purchased copies of PC-File.  Purchased copies include a
  144.      complete printed User's Manual, typeset and bound, which 
  145.      includes screen shots and more examples, a Tutorial for beginners, 
  146.      and an Index.It's 681 pages long.
  147.  
  148.      ButtonWare, Inc. 325 118th Ave. SE, Suite 200 Bellevue, WA
  149.      98005 ISBN 0-922692-38-6
  150.  
  151.  
  152.  
  153.  
  154.      PC-File Version 7 Users Guide                              3
  155.  
  156.  
  157.  
  158.      GETTING STARTED WITH PC-FILE
  159.  
  160.      This section is designed to help you get up and running with
  161.      PC-File. This section contains information on your PC-File
  162.      package, PC-File requirements, and installation instructions.
  163.  
  164.  
  165.      WELCOME TO PC-FILE
  166.  
  167.      Congratulations! You've made an excellent choice for your file
  168.      management needs. PC-File is a perfect fit for everyone
  169.      needing to manage their data-beginners and advanced users-
  170.      corporate, small business, and home users.
  171.  
  172.      PC-File does just what you need a database to do-store,
  173.      organize, retrieve, manipulate, and update information.
  174.      Whether it's your mailing list or your membership list. Your
  175.      clients, your customers, or your contacts. Sales, inventory,
  176.      expenses, payables and receivables, even your hobby collection
  177.      . . . PC-File can keep a record of it.
  178.  
  179.      About the Getting Started Section
  180.  
  181.      This section is intended for all users of PC-File Version 7,
  182.      including users of previous versions of PC-File. Whether PC-
  183.      File is your first software program or you're an experienced
  184.      computer user, we highly recommend you read and follow the
  185.      instructions in this section.
  186.  
  187.      This section is intended to:
  188.  
  189.        Familiarize you with the PC-File package
  190.  
  191.        Inform you of PC-File Version 7 requirements
  192.  
  193.        Guide you in installing PC-File
  194.  
  195.        Tell you how to register your copy of PC-File
  196.  
  197.      In addition to this section, the User Guide contains the PC-
  198.      File Tutorial section and the PC-File Reference section. The
  199.      PC-File Tutorial provides hands-on exercises to help you learn
  200.      PC-File. The PC- File Reference section provides information
  201.      and instructions on using PC-File.
  202.  
  203.  
  204.      REQUESTING TECHNICAL SUPPORT
  205.  
  206.  
  207.  
  208.  
  209.      PC-File Version 7 Users Guide                              4
  210.  
  211.  
  212.      The Technical Support Information card included with this
  213.      package contains up-to-date phone numbers, operating hours,
  214.      and other information to assist you in obtaining technical
  215.      support. We provide 30 days of free phone support after you
  216.      register PC-File. The 30-day free support period begins on the
  217.      date of your first call and ends 30 days following. To receive
  218.      technical support during your 30-day free support period, call
  219.      (206) 454-0479.
  220.  
  221.      Options for obtaining technical support after your 30-day free
  222.      support period ends, include:
  223.  
  224.        Pay-as-you-go Phone Support: 1-900-454-8000
  225.  
  226.        Yearly Support Plan: call (206) 454-0479 for information
  227.  
  228.        CompuServe Information Service: ButtonWare is located in
  229.        Section 1 of the PCVENA forum
  230.  
  231.        Electronic Bulletin Board Support: (206) 454-7875
  232.  
  233.      Refer to the Technical Support Information card included with
  234.      this package for further details on any of the technical
  235.      support options listed above.
  236.  
  237.  
  238.      REQUESTING CUSTOMER SERVICE
  239.  
  240.      ButtonWare's Customer Service department exists to serve you.
  241.      If you have any billing, shipping, non-technical questions or
  242.      comments about your package or registration, please contact
  243.      us. To reach our Customer Service department, call 206-454-
  244.      0479 Monday through Friday between 8:00 a.m. and 5:00 p.m.
  245.      (Pacific time). If you prefer, you can write a letter and mail
  246.      it to ButtonWare Customer Service, P.O. Box 96058, Bellevue,
  247.      WA 98009-9818 or fax it to us at 206-454-1838.
  248.  
  249.  
  250.      BEFORE YOU BEGIN
  251.  
  252.      Before you begin working with PC-File, you need to:
  253.  
  254.        Check the contents of your package
  255.  
  256.        Make sure you have the correct equipment to run PC-File
  257.  
  258.        Install PC-File
  259.  
  260.        Register your copy of PC-File (Unless you purchased this
  261.        package directly from ButtonWare, in which case you are
  262.        automatically registered.)
  263.  
  264.      This section discusses each of these procedures. After you've
  265.      completed these procedures you'll be ready to put PC-File to
  266.      work.
  267.  
  268.  
  269.  
  270.  
  271.      PC-File Version 7 Users Guide                              5
  272.  
  273.  
  274.      Checking the Contents of Your Package
  275.  
  276.      Before installing PC-File, we recommend you check the contents
  277.      of your package. Your package should contain the following
  278.      materials:
  279.  
  280.        PC-File User Guide
  281.  
  282.        Technical Support Information card
  283.  
  284.        Licence Agreement envelope containing: One set of 5 1/4"
  285.        disks (Disk One, Disk Two, and Disk Three); and one set of 3
  286.        1/2" disks (Disk One and Disk Two)
  287.  
  288.      NOTE: Upgrade packages purchased from ButtonWare contain one
  289.      set of the requested disk size, unless you requested both
  290.      sizes. "Retail" upgrade packages contain one set of the size
  291.      indicated on the package, and contain a Disk Exchange Card
  292.      that you can return to ButtonWare, if you require the other
  293.      disk size.
  294.  
  295.        Registration card (Unless you purchased this package
  296.        directly from ButtonWare.)
  297.  
  298.      If any item is missing or damaged, contact your PC-File dealer
  299.      immediately. Or, if you purchased this product from
  300.      ButtonWare, call our Customer Service department at 206-454-
  301.      0479.
  302.  
  303.  
  304.      Requirements for Using PC-File 7
  305.  
  306.      PC-File is designed to work on IBM PC, XT, AT, PS/2, and 100%
  307.      compatible computers. In order to use PC-File, your computer
  308.      must have the following:
  309.  
  310.      MS-DOS or PC-DOS 3.0 or higher 450K available RAM (more is
  311.      recommended) A hard drive with a minimum of 1.5 megabytes
  312.      available disk storage.
  313.  
  314.      To determine the version of DOS installed on your computer,
  315.      use the DOS VER command. At the DOS prompt, type ver and press
  316.      ENTER. To determine how much RAM and disk storage space are
  317.      available, use the DOS CHKDSK command. At the DOS prompt, type
  318.      chkdsk and press ENTER. The last line should indicate at least
  319.      460,800 bytes free, if you have the minimum 450K available
  320.      RAM. For more information on these commands, please refer to
  321.      your DOS manual.
  322.  
  323.      Listed below are additional hardware items which are not
  324.      required to use PC-File, but are highly recommended:
  325.  
  326.        A printer (dot matrix, daisy wheel, laser, or PostScript)
  327.  
  328.        A mouse
  329.  
  330.  
  331.  
  332.  
  333.      PC-File Version 7 Users Guide                              6
  334.  
  335.  
  336.        A CGA, EGA, VGA, or Hercules graphics card and compatible
  337.        monitor (only required to display graphs; EGA or VGA
  338.        required to run in graphics mode)
  339.  
  340.        A Hayes compatible modem (only required to dial phone
  341.        numbers stored in your databases)
  342.  
  343.  
  344.  
  345.      INSTALLING PC-FILE
  346.  
  347.      Before you begin using PC-File, you must install it to a hard
  348.      drive. PC-File includes an installation program designed to
  349.      make this step quick and easy. The installation process
  350.      normally takes less than 5 minutes.
  351.  
  352.      To install PC-File:
  353.  
  354.      1.Turn on your computer.
  355.  
  356.      2.Insert PC-File Disk One in drive A.
  357.  
  358.      3.At the DOS prompt, type a:install and press ENTER. If you
  359.        insert the disk into a different drive, substitute the
  360.        appropriate letter for a.  The installation program begins.
  361.        A screen appears asking you to choose whether to install in
  362.        color or in black and white.
  363.  
  364.      4.Choose C to run the install program in color, or choose B to
  365.        run the install program in black & white. Choose the option
  366.        which contains the most readable text on your screen. The
  367.        main installation menu appears.
  368.  
  369.      5.Press F10 to continue and do a complete installation. If you
  370.        do not want to install certain types of files, use the arrow
  371.        keys to move the highlight bar, and press ENTER to toggle
  372.        the checkmark on the highlighted item.  PC-File asks you to
  373.        "Enter the Source Drive". This is usually the drive you
  374.        inserted Disk One into.
  375.  
  376.      6.Press ENTER to accept the default drive letter. To choose a
  377.        different drive, press the key of the letter of that drive.
  378.        PC-File asks you to "Enter
  379.      7.the Destination Drive". This is the drive you want to
  380.        install PC-File on to.
  381.  
  382.      8.Press ENTER to accept the default answer. To choose a
  383.        different destination drive, choose the letter for the
  384.        destination drive you want to install PC-File to.
  385.  
  386.      9.PC-File asks you to "Enter the Destination Directory". This
  387.        is the directory path on the destination drive where PC-File
  388.        will be installed. The default destination directory is
  389.        \PCF7.
  390.  
  391.  
  392.  
  393.  
  394.      PC-File Version 7 Users Guide                              7
  395.  
  396.  
  397.      10.  Press ENTER to accept the default answer. To install PC-
  398.        File to a differentdirectory, type in that full directory
  399.        path. If the directory you choose does not exist, PC-File
  400.        will create it. PC-File begins copying files to your hard
  401.        drive. Each file is listed as it is being installed.
  402.        Depending on the type of disks you are installing from, PC-
  403.        File may ask you to insert DISK TWO and DISK THREE. After
  404.        PC-File has installed all the files, you are asked about
  405.        changes to you CONFIG.SYS file. Your CONFIG.SYS file may
  406.        require changes so that PC-File runs properly on your
  407.        computer. You can let the installation program make the
  408.        changes for you, or you can bypass these changes.
  409.  
  410.      11.  Choose Y to let the Install program make changes to your
  411.        CONFIG.SYS file.
  412.  
  413.      12.  Choose N, to bypass making changes to your CONFIG.SYS
  414.        file.
  415.  
  416.      13.  The last step of the Installation process is reading the
  417.        READ.ME file. The READ.ME file is automatically displayed.
  418.        Use the arrow keys to scroll through the entire file. It is
  419.        important to read the READ.ME file before you begin using
  420.        PC-File. It may contain important information added after
  421.        the PC-File manuals were printed.
  422.  
  423.      14.  After you're finished reading the READ.ME file, press ESC
  424.        to quit and return to the DOS prompt.
  425.  
  426.      The Install program puts you into the directory where you
  427.      installed PC-File.
  428.  
  429.      Checking the Installation Process
  430.  
  431.      After the Installation program is finished, start PC-File to
  432.      ensure that the installation process was successful.
  433.  
  434.      To start PC-File, at the DOS prompt, type pcf and press ENTER.
  435.      The PC- File screen and logo are displayed. To exit PC-File
  436.      using a mouse, click on File to display the File menu, then
  437.      click on the Exit menu option. When the exit window displays,
  438.      click on the Exit button. To exit PC-File using the keyboard,
  439.      press ALT-F to display the File menu, then press X to select
  440.      the Exit option. When the exit window displays, press X to
  441.      select the Exit button.
  442.  
  443.      If the PC-File screen and logo are not displayed, first check
  444.      to make sure your computer has the minimum requirements to run
  445.      PC-File. Then re-install the program following the
  446.      instructions above. If after re- installing the program, you
  447.      still cannot successfully start and exit PC-File, please call
  448.      our Technical Support department at 206-454-2629.
  449.  
  450.  
  451.      INSTALLING YOUR MOUSE
  452.  
  453.  
  454.  
  455.  
  456.      PC-File Version 7 Users Guide                              8
  457.  
  458.  
  459.      Although a mouse is not required to use PC-File, it allows you
  460.      to perform a variety of PC-File functions without having to
  461.      use the keyboard.
  462.  
  463.      To use your mouse with PC-File, you must install it before you
  464.      start PC-File. Refer to the manual included with your mouse
  465.      for specific instructions on installing your mouse. If a mouse
  466.      is connected to your computer and PC-File does not recognize
  467.      it, refer to the manual included with your mouse for
  468.      troubleshooting information.
  469.  
  470.  
  471.      REGISTERING YOUR COPY OF PC-FILE
  472.  
  473.      Before you start using PC-File, there is one final thing to
  474.      do-register your copy. (NOTE: You do not need to register PC-
  475.      File if you purchased this package directly from ButtonWare-
  476.      you are automatically registered at that time.) When you
  477.      register your copy of PC-File, you are placed on our mailing
  478.      list and will receive notifications of updates, new products,
  479.      and special offers available only to registered users. In
  480.      addition, when you register your copy of PC-File, you receive
  481.      30 days of free
  482.      product support.
  483.  
  484.      To register your copy of PC-File, simply fill out the
  485.      registration card included in your package and mail it to us.
  486.      Or, if you prefer, you can register by fax or phone. To
  487.      register by fax, fill out the registration card and fax it to
  488.      ButtonWare at 206-454-1838. To register by phone, call 1-800-
  489.      JBUTTON (1-800-528-8866) or 206-454-0479.
  490.  
  491.  
  492.  
  493.      UPGRADING FROM PREVIOUS VERSIONS OF PC-FILE
  494.  
  495.      What Needs To Be Updated
  496.  
  497.      Data Files
  498.  
  499.      PC-File 6.5, PC-File 6.0, PC-File 5.0, and PC-File:dB
  500.      databases are compatible with PC-File 7. No conversion is
  501.      necessary.
  502.  
  503.      PC-File+, PC-File/R, and PC-File III databases are not
  504.      directly compatible with PC-File 7. However, the data can be
  505.      easily converted to a PC-File 7 database using the conversion
  506.      program, FCONVERT, included with PC-File 7.
  507.  
  508.      Report, Letter, and Graph Files
  509.  
  510.      PC-File, 6.5, PC-File 6.0, PC-File:dB, and PC-File+ reports,
  511.      letters, and graph files are compatible with PC-File 7. No
  512.      conversion is necessary.
  513.  
  514.  
  515.  
  516.  
  517.      PC-File Version 7 Users Guide                              9
  518.  
  519.  
  520.      PC-File/R and PC-File III reports and letters are not
  521.      compatible and must be redefined using PC-File 7-there is no
  522.      way to convert them.
  523.  
  524.      Macros (Smart Keys)
  525.  
  526.      Some menus have changed from PC-File 6.0 and 6.5 to PC-File 7,
  527.      which may require you to redefine or edit some macros.
  528.  
  529.      Because the menus and keystrokes have changed, macros from PC-
  530.      File 5.0 and earlier versions are not compatible with PC-File
  531.      7-you must redefine them.
  532.  
  533.      Redefining macros is an easy task using the Recording option
  534.      on the Macros menu.
  535.  
  536.      Snapshot Labels
  537.  
  538.      Snapshot labels defined with PC-File 6.0 and 6.5 are
  539.      compatible with PC-File 7.
  540.  
  541.      You must redefine snapshot labels defined with PC-File 5.0 and
  542.      previous versions. In PC-File 7, simply define a Mailing Label
  543.      using the Report menu, then "attach" the report to a snapshot
  544.      definition using the Configuration option on the Utilities
  545.      menu. See Chapter 15, "Taking Snapshot Labels" for details.
  546.  
  547.  
  548.      CONVERTING YOUR DATABASES
  549.  
  550.      FCONVERT converts existing PC-File+, PC-File/R, and PC-File
  551.      III databases to the PC-File 7 format. You DO NOT have to run
  552.      FCONVERT on PC-File 5.0, 6.0 and 6.5 databases.
  553.  
  554.      FCONVERT is easy to use. You answer a few questions, and
  555.      FCONVERT does the rest of the work. FCONVERT only converts one
  556.      database at a time, so if you have more than one database to
  557.      convert, you need to run FCONVERT on each database separately.
  558.  
  559.      FCONVERT reads the old format database and writes a new copy
  560.      in the PC-File 7 format. The original database files are not
  561.      deleted, overwritten, or altered in any way by FCONVERT. You
  562.      should back up your old database files (.HDR, .DTA, and .INX
  563.      files) either before or after running FCONVERT. After running
  564.      FCONVERT, you will probably want to delete the old database
  565.      files to free up disk space.
  566.  
  567.      Before you start FCONVERT, you must locate the database you
  568.      want to convert. If the database is in a different directory
  569.      than FCONVERT, you must use the complete path name of the
  570.      database when prompted. For example, if you are converting a
  571.      PC-File+ database called PEOPLE which is stored in the PCF
  572.      subdirectory on drive C, the database's full path name is
  573.      C:\PCF\PEOPLE.
  574.  
  575.      To run FCONVERT:
  576.  
  577.  
  578.  
  579.  
  580.      PC-File Version 7 Users Guide                             10
  581.  
  582.  
  583.  
  584.      1.Change to the drive and directory containing FCONVERT (the
  585.        drive and directory where PC-File 7 is installed). You can
  586.        skip this step if this drive and directory is referenced in
  587.        your DOS PATH.
  588.  
  589.      2.Type fconvert and press ENTER.
  590.  
  591.      3.FCONVERT prompts you for the full path name of the database
  592.        you want to convert. Type it in and press ENTER. The
  593.        extension isn't required. Using the PC-File+ example above,
  594.        you would type c:\pcf\people and press ENTER.
  595.  
  596.      4.FCONVERT prompts you for the full path name of your new
  597.        database. The extension isn't required. For example, to name
  598.        your new PEOPLE database PEOPLE2 and put it into the DATA
  599.        subdirectory on the D drive, type d:\data\people2 and press
  600.        ENTER.
  601.  
  602.      5.For each numeric field (a field name ending with a # sign),
  603.        FCONVERT asks you how many decimal positions you want. The #
  604.        sign at the end of the field name is eliminated. Any # or
  605.        other "illegal" characters (punctuation characters, and
  606.        first character must be a letter) within the field name are
  607.        replaced with underscore characters. You may need to edit
  608.        reports, letters, and graph files to reflect these field
  609.        name changes.
  610.  
  611.      6.If the database contains a superfield less than 254
  612.        characters long, you must indicate whether you want the
  613.        field converted to a memo field or a scrollable character
  614.        (window) field. A superfield greater than 254 characters is
  615.        automatically converted to a memo field.
  616.  
  617.      See the Reference Section, Chapter 2, "What is a Database
  618.      Structure" for more information on memo fields. When FCONVERT
  619.      completes the conversion, your database is ready to use in PC-
  620.      File 7.
  621.  
  622.  
  623.      BACKWARD COMPATIBILITY
  624.  
  625.      Databases originally created in PC-File:dB, PC-File 5.0, PC-
  626.      File 6.0, and PC-File 6.5 can be opened by PC-File 7 without
  627.      conversion. These versions and PC-File 7 all use the dBASE
  628.      data file format (.DBF and .DBT (for memos) files). When PC-
  629.      File 7 opens databases created with these versions of PC-File,
  630.      it creates its own "header file" for the database that is
  631.      saved under the same name as the database with a .DBH
  632.      extension. For example, opening a database created under an
  633.      earlier dBASE version called ACCOUNTS with PC-File 7 creates
  634.      an ACCOUNTS.DBH file. This does not overwrite the "header
  635.      file" used by the earlier versions (.HDB files), which allows
  636.      you to continue to open the database under the earlier
  637.      versions.
  638.  
  639.  
  640.  
  641.  
  642.      PC-File Version 7 Users Guide                             11
  643.  
  644.  
  645.      As long as you do not change the structure of the database
  646.      using Redefine from the File menu in PC-File 7, you can
  647.      continue to open the database using the earlier dBASE versions
  648.      of PC-File. However, PC-File 7 will not update any indexes
  649.      used by the earlier versions-you must rebuild indexes with the
  650.      earlier version to access any new information added under PC-
  651.      File 7.
  652.  
  653.      Redefining a database originally created in a earlier dBASE
  654.      version of PC-File using PC-File 7 does not update the old
  655.      .HDB file. To be able to open the database with the earlier
  656.      version, you must delete the database's .HDB file which will
  657.      allow you to "adopt" the redefined database. Any new databases
  658.      created with PC-File 7 can also be "adopted" by previous dBASE
  659.      versions of PC-File.
  660.  
  661.      To open databases from pre-dBASE versions of PC-File (PC-
  662.      File/R, PC- File III, and PC-File+) with PC-File 7, you must
  663.      convert them to the dBASE format using FCONVERT. If the
  664.      database's structure was not changed using Redefine from the
  665.      File menu in PC-File 7, you can open the database by importing
  666.      the data from the PC-File 7 database's .DBF file back into the
  667.      older version database. Any old database that has been
  668.      redefined in PC-File 7, and any new database created in PC-
  669.      File 7, can be opened using a pre-dBASE version of PC-File by
  670.      first creating a new database that matches the structure
  671.      exactly (use Database Description from the Utilities menu in
  672.      PC-File 7 to see the stucture). Then import the data from the
  673.      PC-File 7 database's .DBF file.
  674.  
  675.  
  676.      WHAT TO DO NEXT
  677.  
  678.      Congratulations! You are now ready to begin learning and using
  679.      PC-File. If you are new to PC-File, you will find the PC-File
  680.      Tutorial that follows this section very helpful. The tutorial
  681.      includes a variety of informative exercises to teach you the
  682.      basic skills for using PC-File. For detailed information and
  683.      instructions on using PC-File, refer to the PC-File Reference
  684.      Section.
  685.  
  686.  
  687.  
  688.  
  689.      PC-File Version 7 Users Guide                             12
  690.  
  691.  
  692.  
  693.      CHAPTER 1 NAVIGATING IN PC-FILE
  694.  
  695.      This chapter introduces you to some of the concepts and
  696.      features of PC- File. It describes how to start and exit from
  697.      PC-File, and how to navigate through the menus and screens.
  698.      The chapter also lists the keys used in PC-File, and explains
  699.      how to back up your databases.
  700.  
  701.      Starting PC-File
  702.  
  703.      Before you can begin using PC-File, you must install it. See
  704.      the Getting Started section for information on installing PC-
  705.      File.
  706.  
  707.      To start PC-File:
  708.  
  709.      1.Change to the drive and directory containing the PC-File
  710.        program files. If you have accepted the installation
  711.        defaults, this will be the \PCFILE directory on your C
  712.        drive. If you have included that drive and directory in your
  713.        DOS PATH statement, you can skip this step.
  714.  
  715.      2.At the DOS prompt, type pcf and press ENTER. If you are
  716.        using Microsoft Windows and have added PC-File as a non-
  717.        Windows application, choose the PC-File icon.
  718.  
  719.      The PC-File menu bar displays once you start the program.
  720.  
  721.      NOTE: You can load a database automatically when starting PC-
  722.      File by following the PCF command with the database file
  723.      specification. For example, to start PC-File 7 and load the
  724.      database called CONTACTS in your \DATA directory on your D
  725.      drive, you would type:
  726.  
  727.           pcf d:\data\contacts
  728.  
  729.      and press ENTER.
  730.  
  731.      Note that you do not include an extension following the
  732.      database name.
  733.  
  734.      You can also change the parameters for the current session of
  735.      PC-File by adding switches to the start command. See Chapter
  736.      13, "Adding Commands at the DOS Prompt" for details on command
  737.      line switches.
  738.  
  739.      Exiting PC-File
  740.  
  741.      When you exit PC-File, the program displays an exit window.
  742.      The window provides brief information on the number of records
  743.      processed during the current session.
  744.  
  745.      To quit PC-File:
  746.  
  747.      1.Choose File from the menu bar.
  748.  
  749.  
  750.  
  751.  
  752.      PC-File Version 7 Users Guide                             13
  753.  
  754.  
  755.  
  756.      2.Choose Exit from the File menu.
  757.  
  758.      3.Choose Exit from the exit window.  If you change your mind,
  759.        choose Resume to return to PC-File.
  760.  
  761.      Graphic and Character Modes
  762.  
  763.      PC-File operates in one of two modes:
  764.  
  765.        Graphics mode
  766.  
  767.        Character mode
  768.  
  769.      PC-File performs the same functions in both modes. Graphics
  770.      mode presents a crisper, more modern appearance than Character
  771.      mode, but Character mode offers somewhat more speed when PC-
  772.      File is writing data to the screen and uses about 10K less
  773.      memory.
  774.  
  775.      Graphics mode is designed for use with VGA, EGA, and Hercules-
  776.      compatible monochrome monitors. Even with one of these
  777.      monitors, however, you can switch to Character mode to speed
  778.      up an operation.
  779.  
  780.      On the other hand, if you have a CGA monitor (monochrome or
  781.      color), you can only use Character mode.
  782.  
  783.      PC-File defaults to operating in Graphics mode. You can switch
  784.      from Graphics to Character mode, but you can do so only by
  785.      restarting PC- File. There are two ways:
  786.  
  787.        When you start PC-File, add /CHARMODE to your starting
  788.        command to switch to Character mode for the current session.
  789.        For example, type pcf /charmode at the DOS prompt. PC-File
  790.        reverts to the default (Graphics mode) the next time you
  791.        start the program.
  792.  
  793.        Turn off Graphics mode in your configuration profile by
  794.        removing the X from the Graphics mode check box. After
  795.        saving the change, exit from PC-File and restart it. You
  796.        remain in Character mode until you change the profile again
  797.        or load another profile. See Chapter 13, "Utilities," for
  798.        information on configuration profiles.
  799.  
  800.      Using the Mouse
  801.  
  802.      If you have a mouse, you can use it throughout most of PC-File
  803.      to make your work easier and quicker. The only major area of
  804.      the program where the mouse is not functional is the PC-Label
  805.      utility.
  806.  
  807.      You must have the mouse driver that came with your mouse
  808.      installed and loaded before starting PC-File. Refer to the
  809.      documentation that came with your mouse for details on driver
  810.      installation.
  811.  
  812.  
  813.  
  814.  
  815.      PC-File Version 7 Users Guide                             14
  816.  
  817.  
  818.  
  819.      Use the left button of the mouse for almost every action in
  820.      PC-File.
  821.  
  822.      The right button is only used to call up the list of macros
  823.      for invoking execution of a macro. If you have a three-button
  824.      mouse, the center button is not functional in PC-File.
  825.  
  826.      The mouse cursor changes shape in Graphics mode in PC-File,
  827.      depending on what you are pointing at:
  828.  
  829.        The basic mouse cursor is an arrow or pointer, which you can
  830.        use to choose options and buttons.
  831.  
  832.        An I-beam appears when you move the cursor into a text box,
  833.        field, or edit window, where you can enter text.
  834.  
  835.        The cursor takes the shape of a hand when you move it over
  836.        the title bar of a dialog box or Help window that can be
  837.        moved about the screen.
  838.  
  839.        An hourglass appears when PC-File is performing a task that
  840.        requires that you wait for it to finish before going on to
  841.        the next step.
  842.  
  843.      NOTE: In Character mode, the cursor appears as a rectangular
  844.      block at all times.
  845.  
  846.      You can block a section of text with the mouse in order to
  847.      delete it or move it. To block the text, place the cursor at
  848.      one end of the block and press the left mouse button. Holding
  849.      the button down, drag the cursor to the other end of the
  850.      block. Release the button. The block appears in reverse type.
  851.      Use DEL to delete the text; SHIFT-DEL to delete the text and
  852.      copy it to the buffer; CTRL-INS to copy the text to the buffer
  853.      without deleting it; and use SHIFT-INS to copy the text from
  854.      the buffer to another location on the screen. See Chapter 7,
  855.      "Finding and Modifying Data," for more information on using
  856.      the buffer.
  857.  
  858.      Using the Keyboard
  859.  
  860.      With its pull-down menus, buttons, and other features, PC-File
  861.      is designed to be used with a mouse. If you have a mouse
  862.      installed, you will undoubtedly find the mouse often makes it
  863.      easier to navigate through PC-File. But any action you take in
  864.      PC-File with a mouse can also be taken with a keystroke or
  865.      series of keystrokes.
  866.  
  867.      Sometimes, in fact, you will find the keyboard quicker than
  868.      the mouse. Some hot keys, for example, often prove to be
  869.      quicker than their menu or button equivalent.
  870.  
  871.      When recording macros, you must use the keyboard instead of
  872.      the mouse- mouse actions are not recorded.
  873.  
  874.  
  875.  
  876.  
  877.      PC-File Version 7 Users Guide                             15
  878.  
  879.  
  880.      Keys specific to a particular area or operation of PC-File are
  881.      pointed out throughout this manual. However, a complete list
  882.      of the keys is given below as reference.
  883.  
  884.      Navigation Keys
  885.  
  886.      Navigation keys allow you to move around on the screen. They
  887.      normally operate in a similar fashion no matter where you are
  888.      in PC-File. If they have multiple uses, each is explained
  889.      below.
  890.  
  891.      Keys: Function
  892.  
  893.        ENTER:  Activate the current entry; move on to the next
  894.        step.
  895.  
  896.        ESC:  Cancel the current operation; move back one step.
  897.  
  898.        ALT: Switch the cursor between the menu bar and the work
  899.        area (the current record, or editing windows and dialog
  900.        boxes with menu bars). For example, when editing a record,
  901.        press ALT to move the cursor to the menu bar. Press ALT
  902.        again to move the cursor back into the record. ALT-letter
  903.        Hold down ALT and press the underlined or highlighted letter
  904.        of a menu bar option to display the pull-down menu for that
  905.        option. In dialog boxes, press ALT and the underlined or
  906.        highlighted letter to choose buttons or check boxes.
  907.  
  908.        HOME: Move the cursor to the leftmost position or choice.
  909.  
  910.        END: Move the cursor to the rightmost position or choice.
  911.  
  912.        CTRL-RIGHT ARROW: Move the cursor to the first character of
  913.        the next word.
  914.  
  915.        CTRL-LEFT ARROW: Move the cursor to the first character of
  916.        the previous word.
  917.  
  918.        CTRL-HOME: Move the cursor to the top-leftmost position in a
  919.        memo field or edit window.
  920.  
  921.        CTRL-END: Move the cursor to the bottom-rightmost position
  922.        in a memo field or edit window.
  923.  
  924.        PGUP: Scrolls one window full of information above the
  925.        currently visible window area.
  926.  
  927.        PGDN: Scrolls one window full of information below the
  928.        currently visible window area.
  929.  
  930.        CTRL-PGUP: Move the cursor to the first field on the screen,
  931.        when viewing records.
  932.  
  933.        CTRL-PGDN: Move the cursor to the last field on the screen,
  934.        when viewing records.
  935.  
  936.  
  937.  
  938.  
  939.      PC-File Version 7 Users Guide                             16
  940.  
  941.  
  942.        TAB: Move the cursor to the next field, button, or option.
  943.        The cursor moves from left to right and top to bottom. At
  944.        the bottom-rightmost position, the cursor "wraps around"
  945.        back to the top-leftmost position.
  946.  
  947.        SHIFT-TAB: The opposite of TAB: move the cursor to the
  948.        previous field, button, or option. The cursor moves from
  949.        right to left and bottom to top. At the top-leftmost
  950.        position, the cursor "wraps around" back to the bottom-
  951.        rightmost position.
  952.  
  953.        CTRL-TAB: Move to the right in a Table view, Modify mode.
  954.  
  955.        CTRL-SHIFT-TAB: Move to the left in a Table view, Modify
  956.        mode.
  957.  
  958.        LEFT ARROW: Move the cursor one position or option to the
  959.        left. On menus, at the leftmost position, cursor "wraps
  960.        around" to the rightmost position.
  961.  
  962.        RIGHT ARROW: Move the cursor one position or option to the
  963.        right. On menus, at the rightmost position, the cursor
  964.        "wraps around" to the leftmost position.
  965.  
  966.        UP ARROW: Move cursor up one position, field, or option. At
  967.        the top position, the cursor "wraps around" to the bottom.
  968.  
  969.        DOWN ARROW: Move cursor down one position, field, or option.
  970.        At the bottom position, cursor "wraps around" to the top.
  971.  
  972.  
  973.      Editing Keys
  974.  
  975.      Use editing keys in edit windows and within fields and text
  976.      boxes to make changes to the text.
  977.  
  978.      To select or block a section of text using the keyboard, place
  979.      the cursor at one end of the block. Then, hold SHIFT down
  980.      while you move the cursor to the other end of the block with
  981.      the ARROW keys or other key combinations listed below. You can
  982.      then delete or move the block of text. Use DEL or BACKSPACE to
  983.      delete the text. See the section on reading to and writing
  984.      from the buffer in Chapter 7, "Finding and Modifying Data,"
  985.      for information on moving blocks of text.
  986.  
  987.      Keys: Function
  988.  
  989.        BACKSPACE: Move the cursor one position to the left,
  990.        deleting the character in that position or the selected
  991.        block
  992.  
  993.        DEL: Delete the character to the right of the cursor, or the
  994.        blocked text
  995.  
  996.        CTRL-DEL: Deletes the word the cursor is currently on.
  997.  
  998.  
  999.  
  1000.  
  1001.      PC-File Version 7 Users Guide                             17
  1002.  
  1003.  
  1004.        INS: Toggle between insert and replace mode; the mode is
  1005.        indicated by the size of the cursor
  1006.  
  1007.        SHIFT-RIGHT ARROW: Start or extend the selection one
  1008.        character position to the right
  1009.  
  1010.        SHIFT-LEFT ARROW: Start or extend the selection one
  1011.        character position to the left
  1012.  
  1013.        SHIFT-UP ARROW: Start or extend the selection up one line
  1014.  
  1015.        SHIFT-DOWN ARROW: Start or extend the selection down one
  1016.        line
  1017.  
  1018.        SHIFT-END: Select all characters from the cursor to the end
  1019.        of the line
  1020.  
  1021.        SHIFT-HOME: Select all characters from the cursor to the
  1022.        beginning of the line
  1023.  
  1024.        CTRL-SHIFT-RIGHT ARROW: Start or extend the selection one
  1025.        word to the right
  1026.  
  1027.        CTRL-SHIFT-LEFT ARROW: Start or extend the selection one
  1028.        word to the left
  1029.  
  1030.  
  1031.      Hot Keys
  1032.  
  1033.      Hot keys are key combinations designed specifically for often-
  1034.      used actions in PC-File. If you don't have a mouse, you must
  1035.      use hot keys for some of the buttons on the button bar. Other
  1036.      hot keys replicate menu options. For example, you can choose
  1037.      Drop to DOS from the Tools menu, or you can press CTRL-D.
  1038.      Several of the hot keys provide editing functions.
  1039.  
  1040.      Hot key Function
  1041.  
  1042.        CTRL-A Continue search
  1043.  
  1044.        CTRL-B Blank from cursor to end of field or line
  1045.  
  1046.        CTRL-C Bring up the calculator (Tools/Calculator)
  1047.  
  1048.        CTRL-D Drop to DOS (Tools/Drop to DOS)
  1049.  
  1050.        CTRL-E Expand memo field to a window
  1051.  
  1052.        CTRL-F Duplicate field from previously-viewed record
  1053.  
  1054.        CTRL-H Forces insert mode; not a "toggle" like INS key (for
  1055.        macros)
  1056.  
  1057.        CTRL-I Switch to another index
  1058.  
  1059.        CTRL-J Dial phone number (Tools/Telephone dialer)
  1060.  
  1061.  
  1062.  
  1063.  
  1064.      PC-File Version 7 Users Guide                             18
  1065.  
  1066.  
  1067.  
  1068.        CTRL-L Print snapshot label (Tools/Snapshot)
  1069.  
  1070.        CTRL-M Display macro menu to invoke macro (Macro/Execute)
  1071.  
  1072.        CTRL-N Display next record (in Record view)
  1073.  
  1074.        CTRL-O Toggle between flip data and insert tilde, and flip
  1075.        data and remove tilde
  1076.  
  1077.        CTRL-P Display previous record (in Record view)
  1078.  
  1079.        CTRL-Q Spell check current selection
  1080.  
  1081.        CTRL-R Duplicate previously viewed record when adding
  1082.  
  1083.        CTRL-S Simple search
  1084.  
  1085.        CTRL-T Toggle between current and most recent view
  1086.  
  1087.        CTRL-V View memo window
  1088.  
  1089.        CTRL-W Display cursor location box (letters, Free form, and
  1090.        Language reports only)
  1091.  
  1092.        CTRL-Y Begin and end recording macro (Macro/Begin recording
  1093.        and Macro/End recording)
  1094.  
  1095.        ALT-O Choose OK in dialog boxes and windows
  1096.  
  1097.        ALT-C Choose Cancel in dialog boxes and windows
  1098.  
  1099.        ALT-F7 Use with ARROW keys to move dialog boxes and windows
  1100.  
  1101.        ALT-F8 Use with ARROW keys to resize memo window
  1102.  
  1103.        ALT-F10 Resize memo window to full screen
  1104.  
  1105.        SHIFT-DEL Delete selected text and copy to buffer
  1106.  
  1107.        CTRL-INS Copy selected text to buffer
  1108.  
  1109.        SHIFT-INS Paste selected text from buffer
  1110.  
  1111.  
  1112.  
  1113.  
  1114.      PC-File Version 7 Users Guide                             19
  1115.  
  1116.  
  1117.  
  1118.      Elements of the PC-File Screen
  1119.  
  1120.      PC-File features easy-to-use pull-down menus and dialog boxes
  1121.      throughout the program. This section explains the various
  1122.      features of the program and how to navigate in them, using a
  1123.      mouse or the keyboard.
  1124.  
  1125.      The Basic Screen
  1126.  
  1127.      When you open a database, PC-File displays the first record on
  1128.      the screen, based on the current index.
  1129.  
  1130.      The title bar displays the name and description (if there is
  1131.      one) of the open database. If no database is open, only the
  1132.      program name displays.
  1133.  
  1134.      The menu bar is the main menu for PC-File. Choosing any of the
  1135.      options on the menu bar displays a pull-down menu, from which
  1136.      you choose the actions you want to take. In some parts of PC-
  1137.      File, a small menu bar serves the current screen.
  1138.  
  1139.      The work area varies, depending on where you are in PC-File.
  1140.      It may be a displayed record, or an edit window for defining a
  1141.      database, report, or letter.
  1142.  
  1143.      Dialog boxes display to request information from you.
  1144.  
  1145.      Command buttons appear on the button bar for commonly used
  1146.      functions when they are appropriate. Use hot key equivalents
  1147.      if you don't have a mouse, or prefer using the keyboard.
  1148.  
  1149.      The status line displays the description of the current index
  1150.      and the number of records in the open database. This line is
  1151.      for information only and is not accessible with the cursor.
  1152.  
  1153.  
  1154.      Moving Between Elements with a Mouse
  1155.  
  1156.      If you use a mouse, you can move between the menus, work area,
  1157.      and buttons by moving the cursor to the appropriate location
  1158.      and clicking. For example, if you are modifying a record in
  1159.      the work area and want to move to the next record, you can
  1160.      click on the Next button at the bottom of the screen. If you
  1161.      want to move to the menu, click on the menu option.
  1162.  
  1163.      Moving Between Elements with the Keyboard
  1164.  
  1165.      Press ALT to toggle between the menu bar and the work area. If
  1166.      the cursor is in the work area, press ALT to move to the File
  1167.      menu. If you are on the menu, pressing ALT takes you to the
  1168.      first field in the work area.
  1169.  
  1170.  
  1171.  
  1172.  
  1173.      PC-File Version 7 Users Guide                             20
  1174.  
  1175.  
  1176.      Press ALT-letter, where "letter" equals the underlined or
  1177.      highlighted letter of the menu bar option, to move from the
  1178.      work area to a specific menu. For example, press ALT-S to
  1179.      display the Search menu.
  1180.  
  1181.      To access the buttons on the button bar, use the appropriate
  1182.      hot keys. For example, to display the next record, press CTRL-
  1183.      N. The hot keys are listed above and in Chapter 7, "Finding
  1184.      and Modifying Data."
  1185.  
  1186.  
  1187.      The Menu Bar
  1188.  
  1189.      Each option on the menu bar serves as the heading for the menu
  1190.      that pulls down below it. Thus, Edit is an option on the menu
  1191.      bar and is also the name of the menu that displays when you
  1192.      choose it.
  1193.  
  1194.      Some features about menu options should be pointed out:
  1195.  
  1196.      A grayed-out option is not currently active. Most options
  1197.      become active once you open a database.
  1198.  
  1199.      An ellipsis (three dots) following an option indicates that
  1200.      more information is needed before the action specified is
  1201.      taken. Normally a dialog box displays when you choose the
  1202.      option.
  1203.  
  1204.      A check-mark indicates that one of two options is chosen. For
  1205.      example, on the Edit menu, you can toggle between Modify mode
  1206.      and Read-only mode. Only one of these options can be chosen at
  1207.      a time. Choose the unchecked option to change options.
  1208.  
  1209.      Choosing Menu Options with a Mouse
  1210.  
  1211.      To display a pull-down menu, click once on the menu bar
  1212.      option. To choose an option on a pull-down menu, click once on
  1213.      that option. For example, to open a database, click on the
  1214.      word File to open the File menu, then click on Open to display
  1215.      a dialog box.
  1216.  
  1217.      Choosing Menu Options with the Keyboard
  1218.  
  1219.      Use the left and right arrows, or TAB and SHIFT-TAB, to move
  1220.      along the menu bar. Highlight an option and press ENTER or the
  1221.      DOWN ARROW to display the pull-down menu. If no menu is pulled
  1222.      down, you can also press the first letter of the menu bar
  1223.      option to highlight it and display its pull-down menu. If you
  1224.      are elsewhere on the screen, press ALT and the underlined or
  1225.      highlighted letter of the menu bar option to display the pull-
  1226.      down menu. For example, press ALT-S to display the Search
  1227.      menu.
  1228.  
  1229.  
  1230.  
  1231.  
  1232.      PC-File Version 7 Users Guide                             21
  1233.  
  1234.  
  1235.      Once a pull-down menu is displayed, press the underlined or
  1236.      highlighted letter of an option to choose that option. You can
  1237.      also use the UP and DOWN ARROWS to highlight an option, then
  1238.      press ENTER to choose it.
  1239.  
  1240.      Dialog Boxes
  1241.  
  1242.      PC-File uses dialog boxes to request information. You may be
  1243.      asked to choose an option from a list, menu, or group of
  1244.      buttons, or enter a name or description. Dialog boxes take on
  1245.      a wide variety of shapes and forms in PC-File, but they are
  1246.      simple to use.
  1247.  
  1248.      Moving Dialog Boxes
  1249.  
  1250.      Most dialog boxes can be moved if they cover something you
  1251.      want to see while the box is on the screen.
  1252.  
  1253.      With a mouse, point at the title bar, hold the left button
  1254.      down and drag the dialog box where you want it. The cursor
  1255.      changes to the shape of a hand (in Graphics mode only) when
  1256.      you move it onto a title bar.
  1257.  
  1258.      With the keyboard, press ALT-F7, then use the ARROW keys to
  1259.      reposition the box. Press ENTER once the box outline is
  1260.      located where you want it.
  1261.  
  1262.      Moving Within Dialog Boxes
  1263.  
  1264.      Dialog boxes normally contain one or more elements, including
  1265.      buttons, boxes, and lists. Use the following techniques to
  1266.      move within and between these elements.
  1267.  
  1268.      With a mouse, click on the element of the dialog box you want
  1269.      to move to or change. If it is a command or option button,
  1270.      clicking once activates the button.
  1271.  
  1272.      With the keyboard, use ALT-letter, where "letter" is the
  1273.      underlined or highlighted letter of the appropriate element,
  1274.      to move the cursor to that element. For option buttons and
  1275.      check boxes, ALT-letter is the only access if you don't have a
  1276.      mouse. For other elements, you can also use TAB and SHIFT-TAB
  1277.      to move within and between elements. Use TAB to move to the
  1278.      right or down, SHIFT-TAB to move up or to the left.
  1279.  
  1280.      To accept the current options, choose the OK button or press
  1281.      ALT-O.
  1282.  
  1283.      Choose the Cancel button (you can press ALT-C) or press ESC to
  1284.      cancel the operation and move back one step.
  1285.  
  1286.  
  1287.      Elements of a Dialog Box
  1288.  
  1289.      Dialog boxes can contain command and option buttons, text and
  1290.      list boxes, and check boxes.
  1291.  
  1292.  
  1293.  
  1294.  
  1295.      PC-File Version 7 Users Guide                             22
  1296.  
  1297.  
  1298.  
  1299.  
  1300.      Command Buttons
  1301.  
  1302.      Command buttons are the rectangular buttons used to initiate
  1303.      an action. They appear on the button bar as well as in dialog
  1304.      boxes. The OK and Cancel buttons found in most dialog boxes
  1305.      are command buttons.
  1306.  
  1307.      With a mouse, click once on a command button to initiate the
  1308.      action.
  1309.  
  1310.      With the keyboard, press the underlined or highlighted letter
  1311.      on the button to initiate the action. If the dialog box
  1312.      includes a text box, press ALT and the underlined or
  1313.      highlighted letter. For the OK and Cancel buttons, press ALT-O
  1314.      or ALT-C respectively to initiate the action. You can also
  1315.      move the cursor to the command button and press ENTER.
  1316.  
  1317.  
  1318.      Text Boxes
  1319.  
  1320.      Text boxes allow you to type in information. When you move the
  1321.      mouse cursor to a text box, the mouse cursor changes from an
  1322.      arrow to an I- beam.
  1323.  
  1324.      Type the appropriate text in the highlighted box. In some
  1325.      cases, default text may be shown, in which case you can leave
  1326.      the default or type over it.
  1327.  
  1328.      All text boxes have a limit to the number of characters you
  1329.      can enter. Some text boxes are scrollable, allowing you to
  1330.      enter more information than the displayed area indicates. In
  1331.      those cases, the text scrolls to the left. Either way, PC-File
  1332.      beeps when you reach the character limit of the box.
  1333.  
  1334.  
  1335.      List Boxes
  1336.  
  1337.      A list box provides a menu of options to choose from. Some
  1338.      list boxes permit just one choice; others, called check-off
  1339.      lists, allow for multiple selections.
  1340.  
  1341.      List boxes often include scroll bars, indicating there may be
  1342.      more options than are shown.
  1343.  
  1344.      With a mouse, click above or below the scroll box or on the
  1345.      scroll arrows to scroll up or down the list of options. You
  1346.      can also drag the scroll box. To do so, click on the scroll
  1347.      box, hold the mouse button down, and drag the box up or down
  1348.      the scroll bar. Click on an option to choose it.
  1349.  
  1350.      With the keyboard, use the UP and DOWN ARROWS to scroll. To
  1351.      choose an option, move the highlight to the desired option
  1352.      with TAB and SHIFT-TAB or UP and DOWN ARROWS and press ENTER.
  1353.  
  1354.  
  1355.  
  1356.  
  1357.      PC-File Version 7 Users Guide                             23
  1358.  
  1359.  
  1360.  
  1361.      When you may need to make more that one selection from a list,
  1362.      PC-File uses a field selection list box. Check-off list boxes
  1363.      display a checkmark next to each option you select. If the
  1364.      order of selection is important, a number indicating the order
  1365.      also displays.
  1366.  
  1367.      With a mouse, click on an option to select it. Repeat for each
  1368.      additional selection you want to make.
  1369.  
  1370.      With the keyboard, use the UP and DOWN ARROWS to highlight an
  1371.      option. Press ENTER to select the option. Repeat for each
  1372.      additional selection you want to make.
  1373.  
  1374.      You cannot undo individual selections. If you make a selection
  1375.      in error, you must undo all of your selections and make them
  1376.      over again. Choose the Reset button to remove all checkmarks
  1377.      and numbers.
  1378.  
  1379.      Once you have finished making all of your selections, choose
  1380.      OK to initiate the action.
  1381.  
  1382.  
  1383.      Option Buttons
  1384.  
  1385.      PC-File uses option buttons to indicate available program
  1386.      options. You can only choose one option at a time.
  1387.  
  1388.      With a mouse, click on the button to choose it.
  1389.  
  1390.      With the keyboard, press ALT-letter, where "letter" is the
  1391.      underlined or highlighted letter of the button label, to
  1392.      choose the appropriate button.
  1393.  
  1394.  
  1395.      Check Boxes
  1396.  
  1397.      Check boxes allow you to turn individual options ON and OFF.
  1398.      An X in the box indicates the option is turned ON.
  1399.  
  1400.      A check box is a toggle. Choose it once to turn the option ON;
  1401.      choose it again to turn the option OFF.
  1402.  
  1403.      With a mouse, click within the box itself to choose it. Don't
  1404.      click on the label.
  1405.  
  1406.      With the keyboard, press ALT-letter, where "letter" is the
  1407.      underlined or highlighted letter of the box label, to choose
  1408.      it.
  1409.  
  1410.  
  1411.      The Work Area
  1412.  
  1413.      The work area in PC-File is of three types:
  1414.  
  1415.        The main screen
  1416.  
  1417.  
  1418.  
  1419.  
  1420.      PC-File Version 7 Users Guide                             24
  1421.  
  1422.  
  1423.        The edit window
  1424.        The view designer
  1425.  
  1426.  
  1427.      The main screen is the screen you are looking at when you are
  1428.      adding, modifying, or viewing your records. When modifying or
  1429.      viewing records, you can be in either of two formats: a Record
  1430.      view or a Table view.
  1431.  
  1432.      The edit window is a specialized word processor which displays
  1433.      when you write a letter, or create a report using the Free
  1434.      form and Language formats. Within the edit window you can
  1435.      enter text
  1436.  
  1437.      The view designer is used to create and modify database views.
  1438.      The view designer lets you manipulate text and fields as
  1439.      objects you can move within a view using the mouse or
  1440.      keyboard.
  1441.  
  1442.      Editing keys used on both the main screen (in Modify mode
  1443.      only) and in the edit window are described later in this
  1444.      chapter.
  1445.  
  1446.  
  1447.      Drawing Lines and Boxes
  1448.  
  1449.      Within the edit window only, PC-File lets you draw lines and
  1450.      boxes as part of a structure. Lines and boxes can add clarity
  1451.      to the structure by enclosing and sectioning off related
  1452.      fields.
  1453.  
  1454.      You can create lines and boxes by using characters from the
  1455.      ASCII table. To use these characters, hold down ALT while
  1456.      keying in the decimal value of the character. Then release the
  1457.      ALT key. For example, to enter +, hold down ALT and key in the
  1458.      numbers 2 1 8, using the numeric keypad on the right side of
  1459.      the keyboard.
  1460.  
  1461.      The complete ASCII Table is found in Appendix D.
  1462.  
  1463.      Other ASCII characters, such as letters from other languages,
  1464.      can be entered in the same way.
  1465.  
  1466.  
  1467.      Status Windows
  1468.  
  1469.      Printing a report or checking for duplicate records in a large
  1470.      database can often take several minutes. PC-File provides a
  1471.      handy feature that lets you know how the operation is
  1472.      progressing.
  1473.  
  1474.      This feature, called a Status window, appears in the lower
  1475.      right corner of your screen. It displays during all record
  1476.      processing, except when you are printing a report, letter, or
  1477.      graph to the screen. In those cases, the window could block
  1478.      your view, so it is not displayed.
  1479.  
  1480.  
  1481.  
  1482.  
  1483.      PC-File Version 7 Users Guide                             25
  1484.  
  1485.  
  1486.  
  1487.      The fields and status bars in the window are described below:
  1488.  
  1489.        Records: Shows total number of records in the database,
  1490.        including any deleted records whose space has not been
  1491.        reused.
  1492.  
  1493.        Scanned: Indicates the number of records read.
  1494.  
  1495.        Selected: Indicates number of records selected.
  1496.  
  1497.        Percent selected: Indicates the percentage of records read
  1498.        that have been selected. If you choose All records, this
  1499.        always shows 100 percent. If you choose Some records, it
  1500.        indicates what percentage have been selected from those read
  1501.        so far.
  1502.  
  1503.        Percent complete: Indicates what percentage of the total
  1504.        records in the database have been read.
  1505.  
  1506.  
  1507.      Selecting Files and Fields
  1508.  
  1509.      Two operations show up repeatedly in PC-File. To ensure that
  1510.      you understand how to perform these operations, the procedures
  1511.      are detailed here in full.
  1512.  
  1513.      Selecting a File
  1514.  
  1515.      File selection dialog boxes appear when you want to open a
  1516.      database or a feature of the database, such as a report or
  1517.      letter, that PC-File maintains in a separate file. Use this
  1518.      dialog box to choose the file you want.
  1519.  
  1520.      There are two ways to select a file:
  1521.  
  1522.        Choose the path and file from the directory and file list
  1523.        boxes
  1524.  
  1525.        Enter the path and file in the text box
  1526.  
  1527.      The path is the drive and directory where the file is located.
  1528.      Directories can be nested within other directories down to
  1529.      many levels.
  1530.  
  1531.  
  1532.      To choose the file from the list boxes:
  1533.  
  1534.      1.Choose the path first, using the directory list box.
  1535.  
  1536.        Choose (..) to move up the hierarchy of directories, if
  1537.        necessary. Choose a drive letter to change drives. Choose a
  1538.        directory to list the files in that directory. The current
  1539.        path is displayed above the directory list box.
  1540.  
  1541.      2.Choose the file from the file list box.
  1542.  
  1543.  
  1544.  
  1545.  
  1546.      PC-File Version 7 Users Guide                             26
  1547.  
  1548.  
  1549.  
  1550.        All the files in the current directory with the file
  1551.        extension appropriate to the current file selection dialog
  1552.        box are listed. For example, if you are selecting a
  1553.        database, all files with the extension .DBF located in the
  1554.        current directory are listed.
  1555.  
  1556.  
  1557.      To enter the file in the text box:
  1558.  
  1559.      1.Place the cursor at the start of the text box.
  1560.  
  1561.      2.Type in the path and file name. The file extension is
  1562.        usually unnecessary. For example, to select the MEMBERS
  1563.        database, type c:\pcfile\sample\members
  1564.        If the drive listed is already correct, you can just enter
  1565.        the directory and filename. For example, type
  1566.        \pcfile\sample\members If the path is already correct, you
  1567.        can just enter the file name. For example, type members
  1568.  
  1569.      3.Press ENTER or choose OK.
  1570.  
  1571.      If you can't remember where your file is located, use the
  1572.      command buttons labeled "This drive" or "All drives." Choose
  1573.      "This drive" to display all the appropriate files on the
  1574.      current drive. Choose "All drives" to display the appropriate
  1575.      files in drives C through Z. PC- File searches up to 10
  1576.      subdirectories deep and displays the first 100 appropriate
  1577.      files it finds.
  1578.  
  1579.  
  1580.      Selecting a Field or Partial Field
  1581.  
  1582.      Many PC-File operations require that you choose one or more
  1583.      fields from the database. When that step arises, PC-File
  1584.      displays a field selection dialog box.
  1585.  
  1586.      In some cases, you can select just a single field. To do so,
  1587.      click on the field with the mouse or use the arrow keys to
  1588.      highlight the field and press ENTER.
  1589.  
  1590.      In other cases, you can select multiple fields. Choose the
  1591.      fields in the order of importance. A check mark and a number
  1592.      representing the order appears next to each field as you
  1593.      select it. When you have chosen all the fields you want,
  1594.      choose OK.
  1595.  
  1596.      In rare cases, you may want to choose the same field twice. If
  1597.      you choose a field a second time, only the second number
  1598.      appears next to the field. However, the field is used twice in
  1599.      the operation, in the order selected.
  1600.  
  1601.      If you make a mistake while choosing multiple fields, choose
  1602.      Reset. The check marks and numbers disappear, allowing you to
  1603.      start over.
  1604.  
  1605.  
  1606.  
  1607.  
  1608.      PC-File Version 7 Users Guide                             27
  1609.  
  1610.  
  1611.      You can also choose a partial field. For example, if you want
  1612.      to use the first five digits of a nine-digit zip code field,
  1613.      you can designate those character positions in the field.
  1614.  
  1615.      To select a partial field, use the text box in the field
  1616.      selection dialog box. Enter the partial field in the following
  1617.      format:
  1618.  
  1619.           Field name,starting position,number of positions
  1620.  
  1621.      The starting position is the position of the first character
  1622.      you want to choose from the field. The number of positions is
  1623.      the total number of characters in your selected partial field,
  1624.      beginning with that first character. Use commas between the
  1625.      three parts of the command. Do NOT use spaces.
  1626.  
  1627.      As an example, consider a field called Phone that contains
  1628.      numbers in the following format: 206-454-0479. To print just
  1629.      the phone number without the area code, you would designate a
  1630.      partial field of just the last eight characters. In the text
  1631.      box, you would type
  1632.  
  1633.           Phone,5,8
  1634.  
  1635.      The example shows a partial field selection starting at the
  1636.      fifth position and selecting eight characters.
  1637.  
  1638.      In the example of the nine-digit zip code field, enter the
  1639.      partial field like this:
  1640.  
  1641.           Zipcode,1,5
  1642.  
  1643.      This prints five characters of the field, starting with the
  1644.      first character.
  1645.  
  1646.      You can use the text box for entering whole fields, as well as
  1647.      partial fields. If you want to select a whole field in this
  1648.      way, you only need to enter the field name.
  1649.  
  1650.      The text box can be handy for recording macros as well. To
  1651.      choose a field while recording a macro, type the field name in
  1652.      the text box. This avoids possible problems with any changes
  1653.      in the order of the fields in the list box.
  1654.  
  1655.  
  1656.      Using Help
  1657.  
  1658.      PC-File provides an on-line Help system throughout the
  1659.      program. This Help system is context-sensitive, providing
  1660.      instant information about the current screen or dialog box.
  1661.  
  1662.      Help takes several forms in PC-File. The following chart
  1663.      illustrates the available options:
  1664.  
  1665.      Menu option: Key: Purpose
  1666.  
  1667.  
  1668.  
  1669.  
  1670.      PC-File Version 7 Users Guide                             28
  1671.  
  1672.  
  1673.      Help now: F1: Context-sensitive Help about current     option,
  1674.      dialog box, or screen
  1675.  
  1676.      General Help: ALT-F1: Reference help (a list of   keys,
  1677.      navigation tips, and menu information)
  1678.  
  1679.      Choose OK or press ESC to remove a Help window from the
  1680.      screen.
  1681.  
  1682.      Help windows work like dialog boxes in that you can move them
  1683.      around the screen if they are covering something you want to
  1684.      see. With a mouse, place the cursor on the title bar, press
  1685.      the left button, and drag the window. With the keyboard, press
  1686.      ALT-F7, then use the arrow keys to move the window.
  1687.  
  1688.  
  1689.      Backing Up Your Databases
  1690.  
  1691.      Back up your databases frequently. Your databases are the
  1692.      result of your time and effort and, perhaps, money. You can
  1693.      never predict when a database may be damaged. You or other
  1694.      users might erase data by mistake, your hard disk may crash,
  1695.      or the electricity may go out. If you have no backup, all
  1696.      could be lost.
  1697.  
  1698.      Keep at least two copies of each database on separate floppy
  1699.      disks in addition to the copy you use regularly. You might
  1700.      want to get into a routine of backing up one copy one day and
  1701.      the other copy the following day. Some users maintain a copy
  1702.      for each day of the week, with the day clearly marked on the
  1703.      floppy disk.
  1704.  
  1705.      Back up all the database files when you first create a
  1706.      database. Once you have done that, you only need to back up
  1707.      those files you make changes to. For example, when you add or
  1708.      modify data, back up the data file. If you create or modify a
  1709.      report, back up the report file.
  1710.  
  1711.      There are several ways to back up a database:
  1712.  
  1713.        Use the DOS BACKUP command
  1714.  
  1715.        Use a special backup program or tape software
  1716.  
  1717.        Use the DOS COPY command
  1718.  
  1719.        Use the Copy option in PC-File (choose File Management from
  1720.        the Utilities menu)
  1721.  
  1722.      Each method is explained below.
  1723.  
  1724.      NOTE: You can't back up an open database. If you use the Copy
  1725.      option in PC-File to back up a database, close the current
  1726.      database first. If you backup from the DOS prompt, exit from
  1727.      PC-File and then issue the BACKUP command.
  1728.  
  1729.  
  1730.  
  1731.  
  1732.      PC-File Version 7 Users Guide                             29
  1733.  
  1734.  
  1735.      Using the DOS BACKUP Command
  1736.  
  1737.      If a database is too large to fit on a single floppy disk, use
  1738.      the DOS BACKUP command. This command lets you copy the entire
  1739.      database onto several floppy disks. You must use the DOS
  1740.      RESTORE command to copy the database back onto a hard disk, if
  1741.      that need arises. See your DOS manual for more information on
  1742.      the use of these commands.
  1743.  
  1744.      To back up a database using the DOS BACKUP command:
  1745.  
  1746.      1.At the DOS prompt, enter the command to back up the
  1747.        database. For example, to back up the MEMBERS database to
  1748.        floppy disks in drive A, you would type the command
  1749.  
  1750.           backup c:\pcfile\sample\members.* a:
  1751.  
  1752.           and press ENTER.
  1753.  
  1754.      Using Special Backup Programs
  1755.  
  1756.      You can back up databases with programs specifically designed
  1757.      for that purpose. You can also use tape backups for databases.
  1758.      If you have a special backup program, see the manual that
  1759.      comes with it for instructions.
  1760.  
  1761.      Using the DOS COPY Command
  1762.  
  1763.      If your database is small enough to fit on a single disk, you
  1764.      can use the DOS COPY command. See your DOS manual for more
  1765.      details on using this command.
  1766.  
  1767.      To back up files using the DOS COPY command:
  1768.  
  1769.      1.At the DOS prompt, enter the command to copy the database.
  1770.        For example, to copy the MEMBERS database to a floppy disk
  1771.        in drive A, you would type the command
  1772.  
  1773.           copy c:\pcfile\sample\members.* a:
  1774.  
  1775.           and press ENTER.
  1776.  
  1777.      Using PC-File's Copy Option
  1778.  
  1779.      PC-File makes it easy to back up files from within the
  1780.      program. The procedure is not quite as fast as the DOS
  1781.      commands, but you don't have to exit from the program to do
  1782.      it. And PC-File groups the files in such a way that backing up
  1783.      is easier.
  1784.  
  1785.      NOTE: If copying to a floppy disk, the database files (files
  1786.      with extensions .DBF, .DBT, and .HDB) must fit on one disk. If
  1787.      your database files don't fit on a single disk, you must use
  1788.      the DOS BACKUP command or a special backup program instead.
  1789.  
  1790.  
  1791.  
  1792.  
  1793.      PC-File Version 7 Users Guide                             30
  1794.  
  1795.  
  1796.      To back up files using the PC-File copy option:
  1797.  
  1798.      1.Choose Utilities from the menu bar.
  1799.  
  1800.      2.Choose File management from the Utilities menu. PC-File
  1801.        prompts you to choose one of three options: Copy, Delete or
  1802.        Rename.
  1803.  
  1804.      3.Choose Copy.
  1805.  
  1806.      4.Choose the type of file to copy. Choose Database to back up
  1807.        the structure and data in a database. All database files
  1808.        with the listed file extensions will be copied. The other
  1809.        options copy files with the indicated file extensions.
  1810.  
  1811.      5.Choose or enter the drive, path, and file name you are
  1812.        copying from.
  1813.  
  1814.      6.Choose or enter the drive, path, and file name you are
  1815.        copying to. If you are copying to a floppy disk, you
  1816.        normally just need to enter the drive and file name.
  1817.  
  1818.      NOTE: For information about PC-File files and file extensions,
  1819.      see Appendix C, "Program and Database Files."
  1820.  
  1821.  
  1822.  
  1823.  
  1824.      PC-File Version 7 Users Guide                             31
  1825.  
  1826.  
  1827.  
  1828.  
  1829.      CHAPTER 2 CREATING A DATABASE STRUCTURE
  1830.  
  1831.      The first step in defining a database is defining the database
  1832.      structure. You "tell" PC-File what your fields will be named,
  1833.      what type of data will be stored in them, and how long each
  1834.      field will be. This chapter covers the details of this
  1835.      process, plus other database design considerations. Opening
  1836.      and closing an existing database is also described.
  1837.  
  1838.      Opening and Closing a Database
  1839.  
  1840.      Some menu options, such as Configuration, are accessible
  1841.      without an open database. However, unless you are creating a
  1842.      new database, you will generally want to open a database once
  1843.      you start PC-File. You can then begin working with the
  1844.      database. Alternatively, you can open a database when starting
  1845.      PC-File from DOS.
  1846.  
  1847.      Opening a Database
  1848.  
  1849.      To open a database:
  1850.  
  1851.      1.Choose File from the menu bar.
  1852.  
  1853.      2.Choose Open from the File menu. A file selection dialog box
  1854.        appears, with the databases in the current directory listed.
  1855.  
  1856.      3.Choose the database you want to open by clicking on it and
  1857.        choosing OK, or highlight the text box and type in the
  1858.        database name. If the database is located in another
  1859.        directory, use the Directory list box to move to that
  1860.        directory. You can open only one database at a time. If you
  1861.        open a second database, PC-File automatically closes the
  1862.        first database.
  1863.  
  1864.      NOTE: You can open any database that uses dBASE-format files.
  1865.      These are files created with a program such as dBASE or FoxPRO
  1866.      and which use the extension .DBF. PC-File creates a header
  1867.      file automatically, which allows you to use certain features
  1868.      specific to PC-File. You are also prompted to enter a database
  1869.      description. The description is optional.
  1870.  
  1871.      To load a database automatically when starting PC-File from
  1872.      DOS type pcf followed by the database file specification. You
  1873.      do not need to include the database file extension. For
  1874.      example, to start PC-File and load a database called CONTACTS
  1875.      in the \DATA directory on drive D, you would type the
  1876.      following at the DOS command prompt:
  1877.  
  1878.           pcf d:\data\contacts
  1879.  
  1880.      and press ENTER.
  1881.  
  1882.      To open a database when starting PC-File:
  1883.  
  1884.  
  1885.  
  1886.  
  1887.      PC-File Version 7 Users Guide                             32
  1888.  
  1889.  
  1890.  
  1891.      1.Type PCF at the DOS prompt followed by the desired
  1892.        database's file specification in the following format:
  1893.        pcf d:\subdirectory\databasename
  1894.  
  1895.      2.Press ENTER
  1896.  
  1897.      Closing a Database
  1898.  
  1899.      To close a database:
  1900.  
  1901.      1.Choose File from the menu bar.
  1902.  
  1903.      2.Choose Close from the File menu. If you are ready to quit
  1904.        PC-File, you can choose Exit instead. The program closes the
  1905.        database automatically.
  1906.  
  1907.      If you want to open another database, choose Open from the
  1908.      File menu. PC-File closes the current database before opening
  1909.      a new one.
  1910.  
  1911.  
  1912.      The Database Structure
  1913.  
  1914.      PC-File allows you to create a database easily by defining a
  1915.      basic database structure. The database structure defines what
  1916.      fields you will have for each record in your database. (See
  1917.      Lesson 1, "Understanding Databases," in the Tutorial section
  1918.      if you are not familiar with database terminology and
  1919.      concepts.)
  1920.  
  1921.      After you have created the basic database structure, you can
  1922.      add additional features if you want. You can:
  1923.  
  1924.        Change field attributes, such as calculations, special
  1925.        formatting, or data validation rules, using the Field
  1926.        Attributes option on the File menu.
  1927.  
  1928.        Create different views to change the way the data is
  1929.        displayed in the work area using the Create option on the
  1930.        Views menu.
  1931.  
  1932.        Define indexes to sort your data different ways using the
  1933.        Index Maintenance option on the File menu.
  1934.  
  1935.      This section explains how to create the basic database
  1936.      structure. See Chapter 4, "Adding and Modifying Field
  1937.      Attributes" for details on how to change field attributes. See
  1938.      Chapter 5, "Database Views" for details on how to change the
  1939.      view of the data. See Chapter 8, "Indexing Data" for details
  1940.      on how to create indexes.
  1941.  
  1942.  
  1943.      There are three ways to create a new database structure:
  1944.  
  1945.        Create a database structure from scratch
  1946.  
  1947.  
  1948.  
  1949.  
  1950.      PC-File Version 7 Users Guide                             33
  1951.  
  1952.  
  1953.  
  1954.        Create a database structure by patterning after an existing
  1955.        database
  1956.  
  1957.        Redefine an existing database and build a new file
  1958.  
  1959.      Patterning after a database copies only the original
  1960.      database's structure: field names, lengths, and types. If you
  1961.      also want to copy a database's field attributes and custom
  1962.      views, you must redefine an existing database. Redefining also
  1963.      gives you the option to transfer some, all, or none of the
  1964.      records to the new database.
  1965.  
  1966.      This chapter explains how to create a database structure from
  1967.      scratch or by patterning after another database. See Chapter
  1968.      3, "Modifying a Database Structure," for information on how to
  1969.      redefine an existing database.
  1970.  
  1971.      What is a Database Structure?
  1972.  
  1973.      The single most important element of a database is its
  1974.      structure. The database structure consists of the fields you
  1975.      want for each record in your database. Each field represents a
  1976.      different category within the set of pieces of information
  1977.      that make up a record.
  1978.  
  1979.      Each field has a field name that uniquely identifies it within
  1980.      the database structure. The field name appears on the entry
  1981.      screen when entering records, and is also used to access a
  1982.      field's data for many other database operations such as
  1983.      calculations, printing reports, defining indexes, relational
  1984.      operations, and exporting.
  1985.  
  1986.      Each field has a field type that is determined by the kind of
  1987.      information you will be storing in the field. A field in PC-
  1988.      File can be one of five field types: Character, Numeric, Date,
  1989.      Logical, or Memo.
  1990.  
  1991.      Lastly, each field has a field length that determines how many
  1992.      chararacters you can enter and store in the field.
  1993.  
  1994.      A simple example of a database base structure would be a
  1995.      database to store names and phone numbers. To create such a
  1996.      database, you might define a database structure with 3 fields
  1997.      named: FIRST_NAME, LAST_NAME, and PHONE.
  1998.  
  1999.      After naming the fields, you need to determine what field
  2000.      types to use. The FIRST_NAME and LAST_NAME fields will only
  2001.      contain letters and possibly punctuation, so they both would
  2002.      be designated as character type fields. The PHONE field will
  2003.      contain numbers, so you might think it should be a numeric
  2004.      field type. But a phone number field will also contain dashes
  2005.      between numbers and possibly parentheses around area codes. A
  2006.      numeric field will only store numeric values, therefore you
  2007.      must also
  2008.      designate PHONE as a character field.
  2009.  
  2010.  
  2011.  
  2012.  
  2013.      PC-File Version 7 Users Guide                             34
  2014.  
  2015.  
  2016.  
  2017.      You also need to determine how long to make your fields.
  2018.      Choose lengths that are appropriate for the data you will be
  2019.      working with, keeping in mind that even empty fields and
  2020.      spaces at the end of a field entry take up disk space. You
  2021.      might make FIRST_NAME 10 characters long, LAST_NAME 15
  2022.      characters long, and PHONE 14 characters long (assuming you
  2023.      are formatting your phone numbers like: (555) 555-1234).
  2024.  
  2025.      See the "Fields and Field Characteristics" section later in
  2026.      this chapter for more details on field names, types, and
  2027.      lengths.
  2028.  
  2029.  
  2030.      Maximum Record Size
  2031.  
  2032.      The overall size of each record is determined by the sum of
  2033.      the lengths of all fields, except memo fields each of which
  2034.      account for 10 characters of the record size. The maximum
  2035.      number of characters PC-File allows per record is 4,000. And,
  2036.      you can have no more than 128 fields per record.
  2037.  
  2038.      To calculate the record size of your database strucuture, add
  2039.      the lengths of each character and numeric field, plus 8 for
  2040.      each date field, 1 for each logical field, and 10 for each
  2041.      memo field. This number must total 4,000 or less.
  2042.  
  2043.      (Note: Memo field data is stored in a separate file-the number
  2044.      10 used for memo fields when calculating record size accounts
  2045.      for the information stored in the main data file that "points"
  2046.      to data stored in the memo file.)
  2047.  
  2048.      Here is an sample calculation to determine the record size for
  2049.      a simple database:
  2050.  
  2051.      FIELD          Type           Length
  2052.  
  2053.      FIRST_NAME     Character      15
  2054.      LAST_NAME      Character      15
  2055.      PHONE          Character      15
  2056.      ENROLL_DATE    Date           8
  2057.      MEMBER_YN      Logical        1
  2058.      DUES_PAID      Numeric        6
  2059.      NOTES          Memo           10
  2060.  
  2061.      Total Size 70
  2062.  
  2063.  
  2064.      Fields and Field Elements
  2065.  
  2066.      The building blocks of a database structure are the fields.
  2067.      Creating a database basically involves defining the elements
  2068.      of each field. The field elements that you can define in PC-
  2069.      File are listed below.
  2070.  
  2071.      Elements: Purpose
  2072.  
  2073.  
  2074.  
  2075.  
  2076.      PC-File Version 7 Users Guide                             35
  2077.  
  2078.  
  2079.  
  2080.      Field Name: Uniquely identifies a field.
  2081.  
  2082.      Field Type: Defines the kind of data a field contains. The
  2083.      field type may limit what characters are allowed, the format
  2084.      that is accepted, and how the data is handled for sorting,
  2085.      searching, or calculations.
  2086.  
  2087.      Length: Defines the number of characters allowed in a field.
  2088.      The lengths allowed vary for each field type. For character
  2089.      fields, you can select a length that exceeds 65 characters,
  2090.      but only 65 characaters will display in the work area at once.
  2091.  
  2092.      Decimals: Applies only to numeric data. This determines how
  2093.      many places to the right of the decimal to display.
  2094.      Calculations in numeric fields are rounded to this number of
  2095.      places.
  2096.  
  2097.      Physical Order: The order in which you enter the fields is the
  2098.      physical order of the data base. Fields will initially be
  2099.      accessed in this order. However, you can provide different
  2100.      access orders by defining custom views (see Chapter 5).
  2101.  
  2102.      The field name, field type and length are required elements
  2103.      for all fields. Decimals are only required for numeric fields
  2104.      and can be set to zero. At zero, any data entered on the right
  2105.      side of the decimal is rounded and is not stored in the
  2106.      database.
  2107.  
  2108.  
  2109.      Field Names
  2110.  
  2111.      Field names can be up to 10 characters long and can contain
  2112.      letters, numbers, or the underscore ( _ ) character. Field
  2113.      names must start with a letter. Spaces are not allowed.
  2114.  
  2115.      All field names in the same database must be unique. PC-File
  2116.      treats both uppercase and lowercase letters in field names the
  2117.      same. Thus, you couldn't name two separate fields PHONE and
  2118.      Phone in the same database.
  2119.  
  2120.      NOTE: By default, PC-File puts the field names on the screen
  2121.      next to the fields. This shows you which fields correspond to
  2122.      which field names. You can change this text or put additional
  2123.      text on the screen by defining a custom view. Custom views
  2124.      allow you to put nearly any text on the screen-you don't have
  2125.      to follow the rules for field names mentioned above. See
  2126.      Chapter 5, "Views" for details on how to define custom views.
  2127.  
  2128.  
  2129.      Field Types
  2130.  
  2131.      Field type determines the kind of information that can be
  2132.      entered into a field. It can also determine the length of a
  2133.      field, or a range of lengths. Field type must be defined for
  2134.      every field.
  2135.  
  2136.  
  2137.  
  2138.  
  2139.      PC-File Version 7 Users Guide                             36
  2140.  
  2141.  
  2142.  
  2143.      The table below lists each of the five field types supported
  2144.      by PC- File, their length or range of lengths, and their
  2145.      allowable characters. Additional information about each field
  2146.      type follows the table.
  2147.  
  2148.      Field type: Field length: Allowable characters
  2149.  
  2150.        Character: 1 to 254: All letters, numbers, and other
  2151.        characters found on a typical keyboard (all ASCII characters
  2152.        with a decimal value over 31)
  2153.  
  2154.        Numeric: 1 to 19: All numbers, and optionally: the decimal
  2155.        point (period), leading minus sign (hyphen), or leading plus
  2156.        sign
  2157.  
  2158.        Date: 8: All numbers, plus the slash, hyphen, or period
  2159.  
  2160.        Logical: 1: T or F, Y or N
  2161.  
  2162.        Memo: 5000: Same as Character fields, except for _ which is
  2163.        reserved as a control character.
  2164.  
  2165.      Character Fields
  2166.  
  2167.      Most fields you define are of this type. Character fields can
  2168.      include letters, numbers, and most other characters found on a
  2169.      typical keyboard. Additionally, you can enter extended
  2170.      characters by pressing the ALT key and entering the
  2171.      character's ASCII decimal value on the numeric keypad. You can
  2172.      also enter extended characters directly from the keyboard if
  2173.      your system is configured to use character sets for languages
  2174.      other than United States English with the DOS KEYB program-
  2175.      see your DOS manual for details.
  2176.  
  2177.      Numeric Fields
  2178.  
  2179.      Numeric fields contain arithmetic values. They are precise up
  2180.      to eight decimal positions.
  2181.  
  2182.      Just because a field contains numbers does not mean it should
  2183.      be a numeric field. As a general rule, if using the data in a
  2184.      calculation would be meaningless, define the field as a
  2185.      character field. For example, you would not use phone numbers
  2186.      in a calculation, so a phone number field should be defined as
  2187.      a character field.
  2188.  
  2189.      Additionally, PC-File discards everything to the right of the
  2190.      first non-numeric character it encounters in a numeric field.
  2191.      If you enter data that contains both numbers and other
  2192.      characters into a numeric field, some of your data will be
  2193.      lost. For example, if you enter the phone number 206-555-1212
  2194.      into a numeric field, PC-File converts and stores this as a
  2195.      value of 206. Zip codes, social security numbers, or part
  2196.      numbers are other good examples of data that contain numbers
  2197.      but should be stored
  2198.  
  2199.  
  2200.  
  2201.  
  2202.      PC-File Version 7 Users Guide                             37
  2203.  
  2204.  
  2205.      in character fields.
  2206.  
  2207.      Fields that you define to number records consecutively should
  2208.      be numeric fields. These fields are often used to sort records
  2209.      and defining them as character fields will result in the
  2210.      following sort: 1, 10, 101, 11, 2, 21-PC-File essentially
  2211.      "alphabetizes" numbers entered into character type fields. The
  2212.      same set of numbers entered in a numeric field would be sorted
  2213.      properly: 1, 2, 10, 11, 21, 101.
  2214.  
  2215.      Numeric fields are never displayed or stored as blank. PC-File
  2216.      displays and stores 0 in any numeric fields left blank when
  2217.      adding records.
  2218.  
  2219.      Date Fields
  2220.  
  2221.      Typical date fields are birth dates, expiration dates, and due
  2222.      dates. Unless you want to use a non-standard date format, you
  2223.      should define any field you want to enter dates into as a date
  2224.      type field. This allows PC-File to properly sort and search
  2225.      the field.
  2226.  
  2227.      Internally date fields are always stored as 8 characters of
  2228.      data in a YYYYMMDD format. When defining date type fields for
  2229.      your database structure, the only length allowed is 8.
  2230.      However, date fields can be displayed using either 8- or 10-
  2231.      character formatting (using either a 2- digit or 4-digit
  2232.      year). Date formatting is set using the Default Date Format
  2233.      options on the Configuration dialog, or by setting Date format
  2234.      as a field attribute. See Chapter 13, "Default Date Format"
  2235.      and Chapter 4 "Date
  2236.      Format" for details on how to change date display formatting.
  2237.      If you do not set date display formatting, PC-File defaults to
  2238.      displaying dates in 10-character MM/DD/YYYY format.
  2239.  
  2240.  
  2241.      NOTE: The following information assumes you are using PC-
  2242.      File's default Month/Day/Year formatting. You can reconfigure
  2243.      PC-File to use other date formats using the Configure option
  2244.      on the Utilities menu. See Chapter 13, "Default Date Format"
  2245.      for details.
  2246.  
  2247.      Date fields will only accept entries made in valid formats.
  2248.      Regardless of how dates are configured to display, PC-File
  2249.      only accepts date entries in two formats:
  2250.  
  2251.      MM/DD/YY-"March 1, 1993" would be typed in as: 03/01/93 or
  2252.      3/1/93. Internally, PC-File converts and stores this as
  2253.      19930301. PC-File assumes the date is in the 20th century and
  2254.      adds 19 at the beginning of the stored data for all dates
  2255.      entered in the MM/DD/YY format.
  2256.  
  2257.  
  2258.  
  2259.  
  2260.      PC-File Version 7 Users Guide                             38
  2261.  
  2262.  
  2263.      MM/DD/YYYY-"March 1, 2001" would be typed in as: 03/01/2001 or
  2264.      3/1/2001. Internally, PC-File converts and stores this as
  2265.      20010301. Because the full year is provided when entering
  2266.      dates in this format, no century is assumed. This allows you
  2267.      to enter dates from any century.
  2268.  
  2269.      PC-File will display dates entered using either format as
  2270.      MM/DD/YYYY, unless date display formatting was changed using
  2271.      Configuration or Field Attribute settings.
  2272.  
  2273.  
  2274.      NOTE: While date fields formatted to display 8-character date
  2275.      formats also accept entries in either MM/DD/YYYY format, and
  2276.      internally store the full year so entered, PC-File converts
  2277.      the dates to display in MM/DD/YY format. PC-File sorts
  2278.      properly if this field is indexed, but you cannot visually
  2279.      distinguish between dates from different centuries. For
  2280.      example, MM/DD/YYYY formatted data entered for "January 1,
  2281.      1901" and "January 1, 2001" display identically: 01/01/01.
  2282.      Therefore, you should always
  2283.      use a 10-character date display formatting for entering dates
  2284.      before 1900 or after 1999.
  2285.  
  2286.      Also, PC-File date type fields convert any year entered as
  2287.      less than 100 to a 20th century year. Therefore, PC-File date
  2288.      fields can only be used to store dates from the years 100 AD
  2289.      to 9999 AD.
  2290.  
  2291.      Logical Fields
  2292.  
  2293.      Logical fields are used for either/or situations. You can
  2294.      enter only one character: T (True), F (False), Y (Yes), or N
  2295.      (No), using either upper- or lowercase letters.
  2296.  
  2297.      Memo Fields
  2298.  
  2299.      Memo fields are a type of character field, but with a much
  2300.      longer maximum field length (5000 characters). Use them to
  2301.      store large amounts of text. Memo fields can't be indexed.
  2302.  
  2303.      Use memo fields sparingly, as memo text requires an additional
  2304.      file that can take up large amounts of disk space. Also, each
  2305.      memo field requires additional system memory. As a general
  2306.      rule, you should limit the number of memo fields in your
  2307.      database to preferably no more than 2.
  2308.  
  2309.      NOTE: However, you may not be able to use a database defined
  2310.      with the maximum of 10 memo fields. PC-File has to set aside
  2311.      memory to manage each memo field when it opens the database.
  2312.      How much memory PC-File can use may vary depending on how the
  2313.      system it is running on is configured.
  2314.  
  2315.  
  2316.  
  2317.  
  2318.      PC-File Version 7 Users Guide                             39
  2319.  
  2320.  
  2321.      Memo text is stored in a file called databasename.DBT, where
  2322.      "databasename" is the name of the database. Within that file,
  2323.      memo text is stored in blocks of 512 characters. In other
  2324.      words, at least 512 bytes of space are used up even if the
  2325.      field only contains a single character. On the other hand, if
  2326.      the field is left blank, no space is taken up in the memo
  2327.      file. Once the amount of data in a memo field exceeds 512
  2328.      characters, an additional 512 bytes is added to the .DBT file,
  2329.      and so on up to the 5000 character size limit. Choose the
  2330.      character field type unless: you will need more than 254
  2331.      characters for the field; if the field will be used
  2332.      infrequently; or if you don't need to worry about disk space.
  2333.  
  2334.  
  2335.  
  2336.      NOTE: When you edit a memo field, PC-File attempts to reuse
  2337.      the blocks previously used in the .DBT file. If PC-File is not
  2338.      able to reuse the blocks, they are set aside (but still remain
  2339.      as part of the .DBT) and new blocks are used. For this reason,
  2340.      if you edit your memo fields frequently, the .DBT file may
  2341.      grow larger than you expect it should be relative to the size
  2342.      of the rest of the database. Packing the database using Pack
  2343.      on the Utilities menu will remove unused information from the
  2344.      .DBT.
  2345.  
  2346.      Length
  2347.  
  2348.      The field length is the maximum number of characters available
  2349.      for data entry. Defining a field length of 15 characters for a
  2350.      LASTNAME field, for example, would allow the entry of any last
  2351.      name up to 15 characters in length.
  2352.  
  2353.      Field length is determined by field type. Some field types
  2354.      allow you to set the field length within a range, while others
  2355.      are predetermined. For example, character fields can be from 1
  2356.      to 254 characters long, but date fields must be 8 characters
  2357.      long. The field lengths allowed for each field type are
  2358.      described in the table at the beginning of the "Field Type"
  2359.      section.
  2360.  
  2361.      Decimal Places
  2362.  
  2363.      Numeric fields require that you specify the number of
  2364.      positions to the right of the decimal. PC-File provides
  2365.      precision for up to eight places to the right of the decimal.
  2366.  
  2367.      The number you enter for the field length specifies the total
  2368.      length of the numeric field. If you are defining decimal
  2369.      places, the total length includes a position for the decimal
  2370.      point plus any positions to the right of the decimal point.
  2371.      The maximum number of decimal places you can define is the
  2372.      field length minus two, keeping in mind that the decimal point
  2373.      itself is part of the total length. In other words, if you
  2374.      define a numeric field as 10 positions long, you can place up
  2375.      to eight of
  2376.  
  2377.  
  2378.  
  2379.  
  2380.      PC-File Version 7 Users Guide                             40
  2381.  
  2382.  
  2383.      those positions to the right of the decimal. The largest
  2384.      number you could enter into a field with a length of 10 and 8
  2385.      decimal places would be: 9.99999999.
  2386.  
  2387.      Data Length vs. Display Length
  2388.  
  2389.      PC-File distinguishes between data lengths and display
  2390.      lengths. The data length is the maximum number of characters
  2391.      the field can contain. The display length is the number of
  2392.      characters that show on the data entry screen at one time. For
  2393.      character and memo fields, the data length can exceed the
  2394.      display length. You are specifying the data length when you
  2395.      define or redefine a database structure.
  2396.  
  2397.      The maximum data length for character fields is 254
  2398.      characters. If you want to store more than 65 characters in a
  2399.      character field, you should specify that when you create the
  2400.      database. If you forget to do this or change your mind later,
  2401.      you can use the Redefine option on the File menu to change a
  2402.      field's data length.
  2403.  
  2404.      PC-File defaults to using display lengths of 65 for all memo
  2405.      fields and for character fields with data lengths longer than
  2406.      65. For character fields with data lengths 65 or less, PC-File
  2407.      defaults to using a display width that matches the data
  2408.      length. You can set the display width to be less than the data
  2409.      length for character fields and memo fields using the View
  2410.      designer as explained in Chapter 5.
  2411.  
  2412.      You can scroll within a field that has a data length larger
  2413.      than its display length. It's as if you were looking at the
  2414.      field through a window, only able to see part of the data at
  2415.      any one time. To see other portions of the field, you move the
  2416.      cursor left or right, which moves the visual window across the
  2417.      data.
  2418.  
  2419.      A memo field always has a data length larger than than its
  2420.      display length. You can scroll through the memo as described
  2421.      above, or you can pop up an editing window to view or edit the
  2422.      memo's contents. See Chapter 4, "Entering Data in a Memo
  2423.      Field" and Chapter 5, "Viewing a Memo Field" for more details.
  2424.  
  2425.      Numeric and logical type fields display lengths must be the
  2426.      same as their data lengths-you cannot change their display
  2427.      widths. Date fields' default display lengths are 10.
  2428.  
  2429.  
  2430.  
  2431.  
  2432.      PC-File Version 7 Users Guide                             41
  2433.  
  2434.  
  2435.  
  2436.  
  2437.      Creating a New Database Structure
  2438.  
  2439.      The process of creating a new database structure brings
  2440.      together all the elements discussed above. If you have any
  2441.      questions about specific elements while defining your new
  2442.      database structure, refer to the preceding sections for
  2443.      details on each element in the database structure: Field Name,
  2444.      Field Type, Field Length, and Decimals.
  2445.  
  2446.      Defining by Patterning After an Existing Database
  2447.  
  2448.      If you want, you can start the database definition process by
  2449.      patterning after the structure of an existing database. This
  2450.      is useful if you want to create a copy of a database, or to
  2451.      start from another database's definition.
  2452.  
  2453.      Starting by "patterning after" only copies the existing
  2454.      database's structure: the field's names, their types, and
  2455.      lengths-calculations and other field attributes are not
  2456.      copied. If you also want to copy the database's field
  2457.      attributes and custom views, you must open the database you
  2458.      want to copy and use the Redefine option on the File menu,
  2459.      choosing to build a new file. See Chapter 3 for details on
  2460.      redefining.
  2461.  
  2462.      When you choose New from the File Menu, you will be asked
  2463.  
  2464.      Pattern after Existing Database?
  2465.  
  2466.      Answering Yes to this dialog displays a file selection dialog
  2467.      box so you can choose the database structure to copy. After
  2468.      you choose the database to copy, the Define screen displays
  2469.      with the copied database's field definitions. You can then
  2470.      continue with the definition process: adding, modifying, or
  2471.      deleting fields as necessary.
  2472.  
  2473.      Answering No to this dialog proceeds to an empty Define screen
  2474.      to allow you to define a database from scratch.
  2475.  
  2476.  
  2477.      To start defining a database by patterning after an existing
  2478.      database:
  2479.  
  2480.      1.Choose New from the File menu.
  2481.  
  2482.      2.Choose Yes. The file selection dialog displays. See Chapter
  2483.        1, "Selecting a File" for more information on how to use a
  2484.        file selection dialog box.
  2485.  
  2486.      3.Choose the database to pattern after. The Define screen
  2487.        displays with the selected database's field characteristics
  2488.        filled in. Continue the definition process as described
  2489.        below.
  2490.  
  2491.  
  2492.  
  2493.  
  2494.      PC-File Version 7 Users Guide                             42
  2495.  
  2496.  
  2497.  
  2498.      The Define Screen
  2499.  
  2500.      After you answer the "pattern after" prompt, the Database
  2501.      Structure Screen appears.
  2502.  
  2503.      The Define screen consists of 5 columns of information: Field
  2504.      Number, Field Name, Type, Length, and Decimals. PC-File
  2505.      determines the field number and you enter the rest of the
  2506.      information for each field's definition.
  2507.  
  2508.      PC-File will start with one blank field definition line for
  2509.      you to enter information. A new field definition line is added
  2510.      whenever you advance below the last line in the Define screen,
  2511.      up to the maximum of 128 fields.
  2512.  
  2513.      The scroll bar to the right of the field definition lines is
  2514.      used to scroll the field list when defining more fields than
  2515.      will fit on the screen.
  2516.  
  2517.      The left end of the button bar of the Define screen has three
  2518.      buttons: Add, Insert, and Delete. These buttons can be used to
  2519.      edit your field list, if necessary.
  2520.  
  2521.      The OK button on the right end of the button bar lets you
  2522.      continue the definition process when you are done specifying
  2523.      all the field details on the Define Screen.
  2524.  
  2525.  
  2526.      Navigating in the Define Screen
  2527.  
  2528.      Once you start adding fields, PC-File displays as many field
  2529.      definition lines as will fit on the screen. If you define more
  2530.      fields than fit on the screen at once, you can scroll up and
  2531.      down to view additional lines.
  2532.  
  2533.      You can navigate within the field definition lines on the
  2534.      Define screen using either the keyboard or the mouse. Whenever
  2535.      you advance below the current definition line, a new line is
  2536.      created up to a maximum of 128 lines.
  2537.  
  2538.      Navigating with the Mouse in the Define Screen
  2539.  
  2540.      To move to a field element:
  2541.  
  2542.        Point to the desired field element and click the left mouse
  2543.        button. The cursor becomes active in the selected field
  2544.        element.
  2545.  
  2546.      To scroll one field line:
  2547.  
  2548.        Click on the up or down arrow on the scroll bar.
  2549.  
  2550.      To scroll one screen full of lines:
  2551.  
  2552.        Click above or below the scroll box.
  2553.  
  2554.  
  2555.  
  2556.  
  2557.      PC-File Version 7 Users Guide                             43
  2558.  
  2559.  
  2560.  
  2561.      Navigating with the Keyboard in the Define Screen
  2562.  
  2563.      To move to a field element:
  2564.  
  2565.        Press TAB and SHIFT-TAB or the ARROW keys to move between
  2566.        field elements.
  2567.  
  2568.      You can also advance to the next element by pressing ENTER.
  2569.      The UP and DOWN ARROWS are particularly useful when moving up
  2570.      and down in the list.
  2571.  
  2572.      To scroll one line:
  2573.  
  2574.        Press UP ARROW or DOWN ARROW.
  2575.  
  2576.      To scroll one screen full of lines:
  2577.  
  2578.        Press PAGE UP or PAGE DOWN.
  2579.  
  2580.      Entering a Field Name
  2581.  
  2582.      A field name can be no longer than 10 characters, and must
  2583.      start with a letter, and can only contain letters, digits, or
  2584.      the underscore character (_).
  2585.  
  2586.  
  2587.      To enter a field name:
  2588.  
  2589.      1.Move the cursor to the Field name column in the line you
  2590.        want to define.
  2591.  
  2592.      2.Type the field name.
  2593.  
  2594.      Choosing a Field Type
  2595.  
  2596.      To specify a field type:
  2597.  
  2598.      1.Click on Type button.
  2599.  
  2600.      2.Choose the field type.
  2601.  
  2602.      Or...
  2603.  
  2604.      1.Move the cursor to the Type column in the line you want to
  2605.        define.
  2606.  
  2607.      2.Type the letter for the field type you want to define:
  2608.        C=Character, N=Numeric, D=Date, L=Logical, and M=Memo.
  2609.  
  2610.      Defining a Field Length
  2611.  
  2612.      You can define the lengths for Character and Numeric fields
  2613.      within the limits described above under "Field Types." Other
  2614.      field types are pre- defined.
  2615.  
  2616.  
  2617.  
  2618.  
  2619.      PC-File Version 7 Users Guide                             44
  2620.  
  2621.  
  2622.  
  2623.      To define a field's length:
  2624.  
  2625.      1.Move the cursor to the Length column in the line you want to
  2626.        define.
  2627.  
  2628.      2.Type the number for the desired field length.
  2629.  
  2630.      Defining Decimal Places
  2631.  
  2632.      You can define the number of decimal places for numeric
  2633.      fields. The maximum number of decimal places you can define is
  2634.      two less than the total length of the field.
  2635.  
  2636.      To define the number of decimal places (for numeric fields
  2637.      only):
  2638.  
  2639.      1.Move the cursor to the Decimals column in the line you want
  2640.        to define.
  2641.  
  2642.      2.Type the number of decimal places.
  2643.  
  2644.      Inserting, Deleting, and Adding Field Lines
  2645.  
  2646.      After you have started specifying field details, you may need
  2647.      to edit your field list. The three tools buttons in the lower
  2648.      left corner of the Define screen allow you to edit your field
  2649.      definition list to insert or delete lines, and to add new
  2650.      lines at the end of the list.
  2651.  
  2652.      The Insert button allows you to insert a field definition line
  2653.      above the line the cursor is on. This allows you to add a
  2654.      field somewhere other than the end of the list, in the event
  2655.      that you forgot to define it when initially entering field
  2656.      definitions.
  2657.  
  2658.      The Delete button allows you delete the field definition line
  2659.      the cursor is currently on, if you decide that you don't need
  2660.      it or if you need to move its definition to a different
  2661.      location.
  2662.  
  2663.      The Add button allows you to add a blank field definition line
  2664.      to the end of the list. You can also add new definition lines
  2665.      by navigating with TAB or ENTER below the last definition
  2666.      line.
  2667.  
  2668.  
  2669.      To insert a new field definition line:
  2670.  
  2671.      1.Move the cursor to the line that you want to insert a field
  2672.        above.
  2673.  
  2674.      2.Choose the Insert button on the tool bar. A new field entry
  2675.        line is inserted above the cursor.
  2676.  
  2677.      To delete a field definition line:
  2678.  
  2679.  
  2680.  
  2681.  
  2682.      PC-File Version 7 Users Guide                             45
  2683.  
  2684.  
  2685.  
  2686.      1.Move the cursor to the field definition line you want to
  2687.        delete.
  2688.  
  2689.      2.Choose the Delete button on the tool bar.
  2690.  
  2691.      3.Choose Yes to delete the line. The current field definition
  2692.        line is deleted.
  2693.  
  2694.  
  2695.      To add a field definition line at the bottom:
  2696.  
  2697.      1.Choose the Add button on the tool bar. A new field
  2698.        definition line is added at the bottom of the define screen.
  2699.  
  2700.      Or...
  2701.  
  2702.      1.Navigate below the last line of the current definition. A
  2703.        new definition line is created for each line you advance.
  2704.  
  2705.      Moving Field Definition Lines
  2706.  
  2707.      To move a current field line to re-order fields, you must add
  2708.      or insert a new blank definition line at the location you want
  2709.      to move the field to, re-enter the definition at the new
  2710.      location, then delete the field from its old location.
  2711.  
  2712.      There is no way to cut, copy, or paste an entire field
  2713.      definition line in one operation to make this process simpler.
  2714.      However, you can cut, copy, or paste one element of a field
  2715.      definition at a time by highlighting it and then using the
  2716.      edit keys: SHIFT-DEL (to cut), CTRL- INS (to copy), or SHIFT-
  2717.      INS (to paste).
  2718.  
  2719.      NOTE: You can not copy or paste the field type letter. You
  2720.      must re- enter the field type using the Type button. Also, you
  2721.      cannot copy the Length for Date, Logical, and Memo fields,
  2722.      because their lengths are automatically supplied when you use
  2723.      the Type button.
  2724.  
  2725.      To move a field definition:
  2726.  
  2727.      1.Add or insert a blank line at the location you want to move
  2728.        the field to.
  2729.  
  2730.      2.Re-enter or copy and paste the "old" field definition to the
  2731.        new location.
  2732.  
  2733.      3.Delete the old field definition line.
  2734.  
  2735.  
  2736.      Naming the Database
  2737.  
  2738.  
  2739.  
  2740.  
  2741.      PC-File Version 7 Users Guide                             46
  2742.  
  2743.  
  2744.      Once you finish defining the database structure, choose OK to
  2745.      continue with the definition process. PC-File will prompt you
  2746.      to name your database. Give your database a name that
  2747.      describes its content and is easily identifiable to you and
  2748.      any other users. If you maintain several databases, it is
  2749.      helpful to use names that clearly indicate which is which.
  2750.  
  2751.      PC-File uses the database name to name several files that
  2752.      contain the data and structure of the database; therefore, you
  2753.      must follow DOS filename rules when naming the database. Use
  2754.      no more than eight characters in the name, using letters,
  2755.      numbers, and valid punctuation marks. You cannot use spaces.
  2756.      See your DOS manual for specifics. Each database within a
  2757.      directory must have a unique name.
  2758.  
  2759.  
  2760.      To name a database:
  2761.  
  2762.      1.Use the directory list box in the file selection dialog box
  2763.        to move to the drive and directory in which you want to
  2764.        locate the database. See the instructions in Chapter 1,
  2765.        "Navigating in PC-File," if you have questions about using
  2766.        the file selection dialog box.
  2767.  
  2768.      2.Enter the database name in the text box. You do not have to
  2769.        include a file extension.
  2770.  
  2771.      3.Choose OK when you finish.
  2772.  
  2773.      You can overwrite an existing database by giving a new
  2774.      database the same name. Be aware, though, that all data in the
  2775.      original database will be lost.
  2776.  
  2777.  
  2778.      Describing the Database
  2779.  
  2780.      After you finish naming your new database, PC-File will prompt
  2781.      you to enter a database description.
  2782.  
  2783.      The database description provides additional information about
  2784.      a database. It is displayed in the field selection dialog box
  2785.      when you highlight the database name, and in the title bar
  2786.      once the database is open. The description can be particularly
  2787.      useful when you have a number of databases that are similar
  2788.      and need more than the eight-character limit allowed in a
  2789.      database name to describe them clearly. However, the
  2790.      description is optional.
  2791.  
  2792.  
  2793.      To describe a database:
  2794.  
  2795.      1.Enter the description in the box when prompted by the
  2796.        program. The description can be up to 50 characters in
  2797.        length.
  2798.  
  2799.      2.Choose OK when you finish.
  2800.  
  2801.  
  2802.  
  2803.  
  2804.      PC-File Version 7 Users Guide                             47
  2805.  
  2806.  
  2807.  
  2808.      3.Choose OK to bypass the description if you choose not to
  2809.        enter one.
  2810.  
  2811.  
  2812.      Overview of Creating a Database Structure
  2813.  
  2814.      The following procedure provides an overview to bring together
  2815.      all of the elements of the database structure creation
  2816.      process.
  2817.  
  2818.      To create a Database Structure:
  2819.  
  2820.      1.Choose New from the File menu. The "Pattern After" dialog
  2821.        box displays.
  2822.  
  2823.      2.Choose whether to pattern after an existing database. See
  2824.        "Defining by Patterning After" for details on how to choose
  2825.        a database to pattern after. The Define Screen displays.
  2826.  
  2827.      3.Enter or edit the Field Names, Types, Lengths and Decimals
  2828.        for each field you want to define. Any field definition
  2829.        lines left blank will be ignored. Use the tool bar buttons
  2830.        to insert, delete or to add new field definition lines, if
  2831.        necessary.
  2832.  
  2833.      4.Choose OK when you have finished entering all of your field
  2834.        definitions. The file selection dialog box displays.
  2835.  
  2836.      5.Use the directory list box in the file to move to the drive
  2837.        and directory you want to save the database in.
  2838.  
  2839.      6.Type the database name in the text box. You do not have to
  2840.        include a file extension.
  2841.  
  2842.      7.Choose OK to continue. The database description dialog box
  2843.        displays.
  2844.  
  2845.      8.Type a description up to 50 characters long in the text box.
  2846.  
  2847.      9.Choose OK. An information box displays indicating additional
  2848.        database features you may want to define. See Chapter 4 for
  2849.        information on adding Field Attributes, and see Chapter 5
  2850.        for information on how to define custom Views.
  2851.  
  2852.      10.  Choose OK to clear the information box. The work area
  2853.        displays an empty record ready for you to start adding data.
  2854.  
  2855.  
  2856.  
  2857.  
  2858.      PC-File Version 7 Users Guide                             48
  2859.  
  2860.  
  2861.  
  2862.  
  2863.      CHAPTER 3 MODIFYING A DATABASE STRUCTURE
  2864.  
  2865.  
  2866.      This chapter explains how to redefine a database structure.
  2867.      Redefine a database to make any changes to the structure:
  2868.      adding, removing, or re- ordering fields; changing field
  2869.      types; and changing field lengths (and decimal places for
  2870.      numeric fields). You can also redefine a database to create a
  2871.      copy or a subset of the original database. Or you can redefine
  2872.      as a way of defining a new database starting from a current
  2873.      database's definition.
  2874.  
  2875.      What Does Redefine Mean?
  2876.  
  2877.      Once you have defined and used a database, you may find a need
  2878.      to change it. For example, you might decide to add a phone
  2879.      field to a database of names and addresses. Or you could
  2880.      discover that some addresses are longer than the space you
  2881.      allotted for them, and decide to lengthen the field.
  2882.  
  2883.      You can add fields and delete fields. You can add fields at
  2884.      the end of your existing fields, or you can insert them in the
  2885.      middle of your list of fields to keep your fields in a
  2886.      particular order.
  2887.  
  2888.      PC-File allows you to change each of the four elements of your
  2889.      database structure. These elements are the same as those used
  2890.      in creating a new database: field name, field type, length,
  2891.      and decimals. You can change the names of your fields with
  2892.      redefine. If it is appropriate, you can change the type of
  2893.      field you are using. You can increase or decrease the length
  2894.      of a field to accommodate your information. And you can add or
  2895.      shorten the amount of information to store after the decimal
  2896.      place for
  2897.      numeric fields.
  2898.  
  2899.      After you modify your structure, PC-File transfers all of your
  2900.      data into the new structure. Most commonly this is simply a
  2901.      matter of copying any data from "old" fields into the "new"
  2902.      fields-PC-File automatically matches the field names and
  2903.      transfers the data. However, it is also possible to split or
  2904.      join "old" fields during the transfer process using special
  2905.      procedures.
  2906.  
  2907.      You can change the database structure whether or not the
  2908.      database contains data. If there is data, you can also use
  2909.      Redefine to copy all or selected groups of records to new
  2910.      databases to produce new copies or subsets of the current
  2911.      database. You can also choose to copy none of the original
  2912.      database's records to produce an empty database.
  2913.  
  2914.  
  2915.  
  2916.  
  2917.      PC-File Version 7 Users Guide                             49
  2918.  
  2919.  
  2920.      NOTE: The Redefine option on the File menu ONLY changes the
  2921.      database structure, that is the specifics of the field
  2922.      definitions. To rearrange fields on the entry screen, you must
  2923.      use the Create option on the Views menu to create a custom
  2924.      view. Or, if you already have custom views, use the Modify
  2925.      option on the Views menu.
  2926.  
  2927.  
  2928.      Overview of Changes to Database Structure
  2929.  
  2930.      PC-File allows you to perform the following operations with
  2931.      Redefine:
  2932.  
  2933.        Add new fields by inserting or adding to end of list
  2934.        Delete any field from list
  2935.        Change field order (by deleting and re-inserting)
  2936.        Change field names
  2937.        Change field types
  2938.        Change field lengths (within the limitations of the field
  2939.        type)
  2940.        Change number decimal places in numeric fields
  2941.        Split or join field contents
  2942.        Create a new copy or subset of a database
  2943.  
  2944.      Each of these operations will be covered in more detail in the
  2945.      sections that follow.
  2946.  
  2947.      Internally, all these changes to the database require the
  2948.      creation of a new database data file (.DBF). However, for all
  2949.      operations except producing a subset or copy, you can retain
  2950.      the original database name when performing all redefine
  2951.      operations. You don't have to build a new database under a new
  2952.      name, delete the original, and rename the database as you did
  2953.      in previous versions of PC-File.
  2954.  
  2955.  
  2956.      Starting the Redefine Process
  2957.  
  2958.      You must open a database before you can redefine it; the
  2959.      Redefine option is grayed out otherwise. In addition, you can
  2960.      only redefine the open database. You can't make changes to one
  2961.      database from within another database.
  2962.  
  2963.      To start redefining a database:
  2964.  
  2965.      1.Open the database you want to redefine.
  2966.  
  2967.      2.Choose File from the menu bar.
  2968.  
  2969.      3.Choose Redefine from the File menu.
  2970.  
  2971.  
  2972.  
  2973.  
  2974.      PC-File Version 7 Users Guide                             50
  2975.  
  2976.  
  2977.      The Redefine screen functions exactly like the Define screen
  2978.      used to originally define the database structure except that
  2979.      it starts with the current database structure already
  2980.      displayed. You can easily move around the Redefine screen
  2981.      using either the mouse or the keyboard. See Chapter 2,
  2982.      "Navigating in the Define Screen"-the same procedures
  2983.      documented there work for navigating in the Redefine screen.
  2984.  
  2985.      The following sections describe the various operations you can
  2986.      perform on the Redefine screen, and how to complete the
  2987.      redefinition process.
  2988.  
  2989.  
  2990.      Changing Current Field Definitions
  2991.  
  2992.      You can change the four elements of the database structure on
  2993.      the Redefine screen:
  2994.  
  2995.        Field Name
  2996.        Type
  2997.        Length (for character and numeric fields)
  2998.        Decimals (for numeric fields)
  2999.  
  3000.      These are the same elements you define when you create a
  3001.      database structure from scratch. See Chapter 2, "Creating a
  3002.      New Database Structure" for more details on these elements. In
  3003.      particular, see the sections: "Entering a Field Name,"
  3004.      "Choosing a Field Type," "Defining a Field Length," and
  3005.      "Defining Decimal Places" for step-by-step procedures. Also
  3006.      see the sections "Maximum Record Size" and "Fields and Field
  3007.      Elements" for information about limitations on record size and
  3008.      field lengths, and for
  3009.      details on field types.
  3010.  
  3011.      Making changes to the structure is easy, just move the cursor
  3012.      to the element that you would like to change and edit or
  3013.      redefine it. For example, to change a field name from "FIRST"
  3014.      to "FIRSTNAME," simply move the cursor to the field name FIRST
  3015.      and type FIRSTNAME.
  3016.  
  3017.      To change a field element:
  3018.  
  3019.      1.Move the cursor to the element you want to change, e.g.
  3020.        field name, using the mouse or the keyboard.
  3021.  
  3022.      2.Edit or redefine the field element.
  3023.  
  3024.      NOTE: You can use the standard navigation and editing keys for
  3025.      all text boxes on the Redefine screen. See Chapter 1, "Editing
  3026.      Keys" for the specifics.
  3027.  
  3028.      3.Repeat steps 1 and 2 for all elements you want to change.
  3029.  
  3030.  
  3031.  
  3032.  
  3033.      PC-File Version 7 Users Guide                             51
  3034.  
  3035.  
  3036.      4.When you have completed all your changes, choose OK. Skip
  3037.        this step if you also need to insert, delete, add, or move
  3038.        fields. These procedures are described in the following
  3039.        sections.
  3040.  
  3041.      Inserting, Deleting, Adding, and Moving Fields
  3042.  
  3043.      The three tools buttons (Add, Insert, and Delete) on the left
  3044.      end of the button bar allow you to edit your field definition
  3045.      list.
  3046.  
  3047.      The Insert button allows you to insert a new field definition
  3048.      line above the line the cursor is on. This allows you to add a
  3049.      field somewhere other than the end of the list.
  3050.  
  3051.      The Delete button allows you delete the field definition line
  3052.      the cursor is currently on, to eliminate that field (or if you
  3053.      need to move its definition to a different location).
  3054.  
  3055.      The Add button allows you to add a blank field definition line
  3056.      to the end of the list. You can also add new definition lines
  3057.      by navigating below the last line with TAB, ENTER, or DOWN
  3058.      ARROW.
  3059.  
  3060.      To insert a field:
  3061.  
  3062.      1.Move the cursor to the line that you want to insert a field
  3063.        above.
  3064.  
  3065.      2.Choose the Insert button. A blank line is inserted above the
  3066.        line that was current in step 1 and the rest of the fields
  3067.        move down. The cursor is on the new blank line.
  3068.  
  3069.      3.Enter the definition for your new field.
  3070.  
  3071.      To delete a field:
  3072.  
  3073.      1.Move the cursor to the field definition line you want to
  3074.        delete.
  3075.  
  3076.      2.Choose the Delete button.
  3077.  
  3078.      3.Choose Yes. The line that was current in step 1 is removed
  3079.        and any following lines move up.
  3080.  
  3081.  
  3082.      To add a new field definition line at the bottom:
  3083.  
  3084.      1.Choose the Add button. A blank field definition is added at
  3085.        the bottom of the field list. The cursor is on the new blank
  3086.        line.
  3087.  
  3088.      2.Enter the definition for your new field.
  3089.  
  3090.      Or...
  3091.  
  3092.  
  3093.  
  3094.  
  3095.      PC-File Version 7 Users Guide                             52
  3096.  
  3097.  
  3098.      1.Navigate below the last line of the current definition using
  3099.        TAB, ENTER, or DOWN ARROW. A new definition line is created
  3100.        for each line you advance.
  3101.  
  3102.      2.Enter the definition for your new field.
  3103.  
  3104.      Moving Fields
  3105.  
  3106.      There are two "main" reasons you may need to change the field
  3107.      order:
  3108.  
  3109.        To improve the organization of your database
  3110.  
  3111.        All fields referenced in a field calculation must come
  3112.        before the field that contains the calculation for the
  3113.        calculation to work properly
  3114.  
  3115.      To move a current field line to re-order fields, you must add
  3116.      or insert a new blank definition line at the location you want
  3117.      to move the field to, re-enter the definition at the new
  3118.      location, then delete the field from its old location.
  3119.  
  3120.      There is no way to cut, copy, or paste an entire field
  3121.      definition line in one operation to make this process simpler.
  3122.      However, you can cut, copy, or paste one element of a field
  3123.      definition at a time by highlighting it and then using the
  3124.      edit keys: SHIFT-DEL (to cut), CTRL- INS (to copy), or SHIFT-
  3125.      INS (to paste).
  3126.  
  3127.      NOTE: You cannot copy or paste the field type letter. You must
  3128.      re-enter the field type using the Type button. Also, you
  3129.      cannot copy the Length for Date, Logical, and Memo fields,
  3130.      because their lengths are automatically supplied when you use
  3131.      the Type button.
  3132.  
  3133.      To move a field definition:
  3134.  
  3135.      1.Add or insert a blank line at the location you want to move
  3136.        the field to.
  3137.  
  3138.      2.Re-enter or copy and paste the "old" field definition to the
  3139.        new location.
  3140.  
  3141.      3.Delete the old field definition line.
  3142.  
  3143.  
  3144.      Mapping Field Data
  3145.  
  3146.      Once you finish making changes to the structure of your
  3147.      database as described above, PC-File gets ready to transfer
  3148.      the data from the original data file to a new data file. In
  3149.      doing so, PC-File must determine where the data for each field
  3150.      comes from. This process is called mapping.
  3151.  
  3152.      When you choose OK from the Redefine screen the Mapping screen
  3153.      displays.
  3154.  
  3155.  
  3156.  
  3157.  
  3158.      PC-File Version 7 Users Guide                             53
  3159.  
  3160.  
  3161.  
  3162.      The New Fields column shows the field names for the database
  3163.      that you have just created with the Redefine process. The
  3164.      Comes From column shows which fields from the original
  3165.      database are mapped to the fields in the New Fields column.
  3166.  
  3167.      PC-File automatically maps all field names that match. If you
  3168.      haven't changed any of your current field names, you will see
  3169.      same name in both the New Fields and the Comes From columns
  3170.      for each field. Any new fields you added in the Redefine
  3171.      process will be blank in the Comes From column. Generally, you
  3172.      don't need to map new fields because you will be entering data
  3173.      for them later. In most cases, since PC-File has done the
  3174.      mapping for you, you can simply choose OK to continue the
  3175.      redefine process.
  3176.  
  3177.      However, if you have changed a field name, PC-File will no
  3178.      longer recognize the field name and the Comes From column will
  3179.      be blank for that field-you must choose the data source for
  3180.      that field. For example, if you have changed a field name from
  3181.      FIRST to FIRSTNAME, you must tell PC-File that you want the
  3182.      information from the old FIRST field to be put into the new
  3183.      FIRSTNAME field.
  3184.  
  3185.      NOTE: If you rename many of your current fields and add
  3186.      several new fields or re-order fields, you should double-check
  3187.      to make sure that all fields are mapped properly. In this
  3188.      case, it may be less confusing to rename your current fields
  3189.      first using the Field Attributes option on the File menu. Then
  3190.      add the new fields or re-order using the Redefine option.
  3191.  
  3192.      There are two other reasons you may need to map your fields:
  3193.  
  3194.        To split portions of a current field into other fields
  3195.  
  3196.        To join two current fields into one
  3197.  
  3198.      You must type in special codes into the Comes From column to
  3199.      split or join fields.
  3200.  
  3201.      There are two ways to map your fields. You can select them by
  3202.      using the List button or by typing field names into the Comes
  3203.      From column directly.
  3204.  
  3205.      Selecting Fields Using the List Button
  3206.  
  3207.      If you changed the name of a field, you will need to map the
  3208.      old field to the new field. The List button provides a simple
  3209.      way to do this. Choosing the List button displays a list of
  3210.      the old field names on the right side of the Mapping screen.
  3211.  
  3212.  
  3213.  
  3214.  
  3215.      PC-File Version 7 Users Guide                             54
  3216.  
  3217.  
  3218.      The Old Field List Box shows all fields from your current
  3219.      database, including any fields that you deleted. All fields
  3220.      that have already been mapped by PC-File have a checkmark next
  3221.      to them. To map a field, put the cursor in the Comes From
  3222.      column next to the New Field you want to map. Then choose a
  3223.      field from the Old Field List. This inserts that field's name
  3224.      into the Comes From column.
  3225.  
  3226.      To map your fields with the List button:
  3227.  
  3228.      1.Highlight the box in the Comes From column next to the New
  3229.        Field name you want to map. The box should be empty.
  3230.  
  3231.      2.Choose the List button. The Old Fields List displays on the
  3232.        right-hand portion of the screen. The cursor is active in
  3233.        the list.
  3234.  
  3235.      3.Click on the field you want to map with the mouse, or
  3236.        navigate to the name of the field with the TAB key and press
  3237.        ENTER. The field name is inserted into the Comes From
  3238.        column.
  3239.  
  3240.      4.Repeat steps 1 through 3 for each field you want to map.
  3241.        When you have finished mapping your fields, choose OK to
  3242.        continue the redefine process.
  3243.  
  3244.      Selecting Fields by Typing Names
  3245.  
  3246.      Alternatively you can map fields by simply typing the name of
  3247.      the old field in the appropriate Comes From text box. This may
  3248.      be a faster method if you are only using the keyboard.
  3249.      However, you must type in the name exactly as it is saved in
  3250.      the database. You can press ALT-L to display the Old Field
  3251.      List for reference.
  3252.  
  3253.      To map your fields by typing the field names:
  3254.  
  3255.      1.Move the cursor to the box next to your new field name. The
  3256.        box should be empty.
  3257.  
  3258.      2.Type in the name of the field which will be mapped to your
  3259.        new field.
  3260.  
  3261.      3.Repeat steps 1 through 3 for each field you want to map.
  3262.        When you have finished mapping your fields, choose OK to
  3263.        continue the redefine process.
  3264.  
  3265.      Specifying a Portion of a Field
  3266.  
  3267.  
  3268.  
  3269.  
  3270.      PC-File Version 7 Users Guide                             55
  3271.  
  3272.  
  3273.      You can use the type in method to do more than simple mapping.
  3274.      You can use it to transfer a portion of a field using
  3275.      substring notation. Substring notation specifies the starting
  3276.      position, and length of the partial field. To use substring
  3277.      notation, type the name of the field followed by a comma, then
  3278.      type the number for the starting position, and another comma
  3279.      followed by the number of characters to transfer. For example,
  3280.      typing ZIPCODE,1,5 in the Comes From box transfers the first
  3281.      five characters of the field ZIPCODE. Likewise, typing
  3282.      ZIPCODE,7,4 transfers the last four characters starting from
  3283.      the seventh character in the field.
  3284.  
  3285.      Joining Two Fields
  3286.  
  3287.      You can also use the type in method to join two fields. To do
  3288.      so, type the field name, a semi-colon and the second field
  3289.      name. For example, type FIRSTNAME;LASTNAME to join the fields
  3290.      FIRSTNAME and LASTNAME.
  3291.  
  3292.      Saving Your Changes
  3293.  
  3294.      After you have mapped all your fields you are presented with
  3295.      the option to either update the current database or save the
  3296.      redefined database as a new file.
  3297.  
  3298.      Unless you want to make a new copy or subset of the current
  3299.      database, choose Update Current. If you choose Save As, the
  3300.      original database is not modified, and your changes will be
  3301.      saved to a new database file.
  3302.  
  3303.      Updating the Current Database
  3304.  
  3305.      If you choose Update Current at the Save Changes dialog, PC-
  3306.      File performs the update and takes you back to the menu bar.
  3307.      You are finished with the redefining operation.
  3308.  
  3309.      When updating the current database, PC-File needs to write a
  3310.      new copy of the data file. PC-File renames the original
  3311.      database file as a backup using this format:
  3312.  
  3313.           TMPnn.DBF
  3314.  
  3315.      where "nn" is a unique number. PC-File does this as a security
  3316.      measure: If you made a mistake or if something were to go
  3317.      wrong during the Redefine process, you can reclaim your
  3318.      original database by opening the TMPnn.DBF file.
  3319.  
  3320.      After PC-File creates the TMPnn backup file, it then creates
  3321.      the updated database using the original name including all
  3322.      your current records.
  3323.  
  3324.  
  3325.  
  3326.  
  3327.      PC-File Version 7 Users Guide                             56
  3328.  
  3329.  
  3330.      PC-File displays an information screen at the end of the
  3331.      updating process telling you what TMPnn name was used for the
  3332.      backup of the database files. You may want to write down the
  3333.      TMPnn file name at this point, in case you need it in the
  3334.      future. Once you are certain the Redefine operation was
  3335.      successful, you can delete the TMPnn file using the File
  3336.      Maintenance option on the Utilities menu.
  3337.  
  3338.      NOTE: If you want to copy only a selected group of records,
  3339.      you must use the Save As option. Use a new database name or
  3340.      use the same name making sure to write the redefined database
  3341.      to a different drive or directory than the original database.
  3342.  
  3343.      To update the current database:
  3344.  
  3345.      1.At the Save Changes dialog box, choose Update Current. A
  3346.        status window with a bar graph showing the rate of progress
  3347.        displays in the lower right corner. When all records have
  3348.        been transferred, an information box displays showing the
  3349.        TMPnn name for the backup of the original database.
  3350.  
  3351.      2.Choose OK to clear the information box. The redefine
  3352.        operation is complete and you are returned to the redefined
  3353.        database.
  3354.  
  3355.      Saving Changes as a New Database
  3356.  
  3357.      If you choose Save As at the Save Changes dialog box, PC-File
  3358.      first prompts you to to name and describe the new database
  3359.      file, then you choose which records you want to transfer. This
  3360.      will save the redefined database as a new file, leaving the
  3361.      original database the way it was when you started the
  3362.      redefinition process.
  3363.  
  3364.      PC-File may take some time to generate the new file after you
  3365.      choose which records to transfer. This will depend on the size
  3366.      of the database, how you select which records to copy, and the
  3367.      speed of your system. A status window with a bar graph shows
  3368.      the rate of progress.
  3369.  
  3370.      Naming the New Database
  3371.  
  3372.      Naming the new database is the first step in the Save As
  3373.      process. After you choose Save As, PC-File displays the file
  3374.      selection dialog box.
  3375.  
  3376.      When the file selection dialog box displays, you can either:
  3377.  
  3378.        Give the database a new name and save in the current
  3379.        directory
  3380.  
  3381.        Change the drive or directory using the Directories list
  3382.        box, and then save the new database with the original name
  3383.        or a new name
  3384.  
  3385.  
  3386.  
  3387.  
  3388.      PC-File Version 7 Users Guide                             57
  3389.  
  3390.  
  3391.      Enter the name of the new database in the text box of the file
  3392.      selection dialog box.
  3393.  
  3394.      Describing the New Database
  3395.  
  3396.      Once you have chosen the name and location for the new
  3397.      database, PC- File prompts you to enter a description. If the
  3398.      database being redefined had a description, it appears as the
  3399.      default. You can use the same description or enter a new one.
  3400.      The description is optional. Descriptions can be up to 50
  3401.      characters in length.
  3402.  
  3403.      Transferring Records
  3404.  
  3405.      After naming and describing the new file, PC-File asks you
  3406.      whether you want to transfer all, some, or none of the current
  3407.      records to the new file.
  3408.  
  3409.      Choose All to either transfer all the records or select which
  3410.      records to transfer one at a time.
  3411.  
  3412.      Choose Some to conduct a search to determine what records to
  3413.      transfer. (See Chapter 7, "Finding and Modifying Data," if you
  3414.      have questions about how to conduct a search.) Conducting a
  3415.      search lets you create a subset of your old database. For
  3416.      example, you could define a database containing records for
  3417.      just one year, eliminating records from previous years. Or you
  3418.      could select sales reps from just one area, setting up a
  3419.      separate database for that region.
  3420.  
  3421.      Choose None to create a new empty database-no records are
  3422.      transferred from the previous database and the redefinition
  3423.      process is finished.
  3424.  
  3425.      Approving Records
  3426.  
  3427.      After choosing All or Some, PC-File displays the first record
  3428.      to transfer overlaid with the Record approval dialog box.
  3429.  
  3430.      Choosing All clears the Record approval dialog box and
  3431.      transfers all or some records depending on the choice you made
  3432.      at the Transfer Which Records dialog box.
  3433.  
  3434.      Choosing Yes, transfers that one record and displays the next
  3435.      one with the Record approval dialog box. Choosing No skips the
  3436.      current record and displays the next one with the Record
  3437.      approval dialog box. You can continue in this fashion to
  3438.      approve records to transfer one at a time until no records
  3439.      remain to display. At any point in the record approval process
  3440.      you can choose All to stop approving records and transfer all
  3441.      remaining records. Choose Quit to stop approving records and
  3442.      complete the
  3443.      redefinition.
  3444.  
  3445.      To save the redefined database as a new file:
  3446.  
  3447.  
  3448.  
  3449.  
  3450.      PC-File Version 7 Users Guide                             58
  3451.  
  3452.  
  3453.      1.At the Save Changes dialog box, choose Save As. The Save As
  3454.        file selection dialog box displays.
  3455.  
  3456.      2.If you want to save the database in a new location, change
  3457.        the drive and directory with the Directories list box,
  3458.        otherwise skip this step.
  3459.  
  3460.      3.Type the new name in the text box.
  3461.  
  3462.      4.Choose OK.  The Database Description dialog box displays.
  3463.  
  3464.      5.Enter a file description up to 50 characters long.
  3465.  
  3466.      6.   Choose OK.
  3467.      The Transfer Which Records dialog box displays.
  3468.  
  3469.      7.Choose whether to transfer All, Some, or None of the current
  3470.        records. If you choose None, the new database is copied to
  3471.        the new name and the redefinition process is completed.
  3472.  
  3473.      8.If you chose Some, the Type of Search dialog displays.
  3474.        Choose the type of search and enter your search criteria.
  3475.        See Chapter 7, "Conducting a Search" for details on how to
  3476.        enter a search. Otherwise, skip this step.  The first record
  3477.        is displayed with the Record Approval dialog box.
  3478.  
  3479.      9.Choose All to transfer all records without interruption. To
  3480.        approve records one at a time: Choose Yes to accept a
  3481.        record; Choose No to skip a record; Choose Quit to stop the
  3482.        approval process.
  3483.  
  3484.      If you chose All in step 9, a status bar graph displays
  3485.      showing the rate of progress.
  3486.  
  3487.      When all records are transferred the redefinition is complete.
  3488.      If you use the Record Approval dialog to approve records one
  3489.      at a time, the redefinition process is completed when you run
  3490.      out of records to choose from, or if you choose Quit.
  3491.  
  3492.      Rebuilding Indexes
  3493.  
  3494.      If you defined any indexes for your database before beginning
  3495.      the redefine process, PC-File will ask if you want to rebuild
  3496.      the indexes after it has finished saving the data you selected
  3497.      to the new database structure. See Chapter 8, "Indexing Data"
  3498.      for more details.
  3499.  
  3500.      Choose No if you do not want the new database to have the same
  3501.      indexes as the original database.
  3502.  
  3503.      If you have a large database with several indexes, it could
  3504.      take a long time to rebuild them all, or you may not have the
  3505.      time right now to rebuild them. If you choose No, you can make
  3506.      indexes for you database at any time later.
  3507.  
  3508.  
  3509.  
  3510.  
  3511.      PC-File Version 7 Users Guide                             59
  3512.  
  3513.  
  3514.      Choose Yes if you want PC-File to rebuild all the indexes the
  3515.      original databases had.
  3516.  
  3517.      Rebuilding all the indexes may take a long time if you have a
  3518.      very large database and several indexes. PC-File will attempt
  3519.      to rebuild all the indexes for your database, but it may not
  3520.      be able to. If you made any changes to fields included in any
  3521.      of the index definitions, PC- File will tell you which indexes
  3522.      it was unable to rebuild.
  3523.  
  3524.  
  3525.  
  3526.  
  3527.      PC-File Version 7 Users Guide                             60
  3528.  
  3529.  
  3530.      Overview of Procedures for Redefining
  3531.  
  3532.      The following procedure presents an overview of the entire
  3533.      redefinition process from start to finish.
  3534.  
  3535.  
  3536.      To redefine a database:
  3537.  
  3538.      Open the database you want to redefine.
  3539.  
  3540.      1.Choose Redefine from the File menu. The Redefine screen
  3541.        displays.
  3542.  
  3543.      2.Make the desired changes to the field list. See the sections
  3544.        "Changing Current Field Definitions" and "Inserting,
  3545.        Deleting, Adding, and Moving Fields" for details.
  3546.  
  3547.      3.Choose OK when you have made all the changes you want to
  3548.        make to the field list. The Mapping screen displays.
  3549.  
  3550.      4.Map fields if necessary (see "Mapping Field Data" for
  3551.        details), otherwise choose OK to continue.
  3552.  
  3553.      5.Choose whether to Update or Save As. If you choose Update,
  3554.        the Status window displays to show the rate of progress. If
  3555.        you choose Save As, you must name and describe the new
  3556.        database, and then specify which records to transfer. See
  3557.        "Saving Changes as a New Database" for details.
  3558.  
  3559.      6.Choose Yes to rebuild indexes, or No to omit the current
  3560.        indexes.
  3561.  
  3562.      The Redefine process is finished.
  3563.  
  3564.  
  3565.      How Redefining Affects Other Database Characteristics
  3566.  
  3567.      Redefining only changes the characteristics of your data file
  3568.      (databasename.DBF), but there are many other areas of your
  3569.      database which may be affected by the changes you made. PC-
  3570.      File lets you define many additional attributes and
  3571.      characteristics about your database and fields including
  3572.  
  3573.        Field Attributes
  3574.  
  3575.        Custom Views
  3576.  
  3577.        Indexes
  3578.  
  3579.        Reports, Letters & Graphs
  3580.  
  3581.        Macro definitions
  3582.  
  3583.        Batch Posting definitions
  3584.  
  3585.  
  3586.  
  3587.  
  3588.      PC-File Version 7 Users Guide                             61
  3589.  
  3590.  
  3591.      These features are optional, so you might have defined only a
  3592.      few or none at all. You may not need to update any of these
  3593.      features, or you may need to update all of them-it all depends
  3594.      on the extent of the changes you made to the database
  3595.      structure. Each section below describes briefly how to know if
  3596.      you need to make additional changes.
  3597.  
  3598.      Changes to Field Attributes
  3599.  
  3600.      PC-File lets you define field attributes which control and
  3601.      automate what happens in each field. See Chapter 4, "Field
  3602.      Attributes" for more details.
  3603.  
  3604.      What to check:
  3605.  
  3606.        If you changed any field names, those field's attributes are
  3607.        retained as long as they have been properly mapped to the
  3608.        new database's field names.
  3609.  
  3610.        If you added new fields to your database structure, you may
  3611.        want to define new field attributes for them.
  3612.  
  3613.        If you deleted any fields or changed any existing field
  3614.        names when you redefined, you may also need to update
  3615.        calculation and relational lookup attributes. Additionally,
  3616.        if you have any other databases which do relational lookups
  3617.        on the database you redefined, you may need to update those
  3618.        databases' relational lookup attributes if they referenced
  3619.        any deleted field or fields whose names you changed.
  3620.  
  3621.      Changes to Custom Views
  3622.  
  3623.      PC-File lets you define additional "views" to display your
  3624.      data in different ways. See Chapter 5, "Views" for more
  3625.      details.
  3626.  
  3627.      Redefining retains any custom views you defined for the
  3628.      original database. However, because you can delete and rename
  3629.      fields when redefining, pre-existing custom views that
  3630.      contained those fields will be affected.
  3631.  
  3632.      What to check:
  3633.  
  3634.  
  3635.        Deleted fields are removed from all custom views
  3636.  
  3637.        Renamed fields will remain in the view as long as they have
  3638.        been properly mapped to the new database's field names.
  3639.  
  3640.        New fields will not appear in any of your custom views. If
  3641.        you want your new field(s) to appear in any your custom
  3642.        views you must modify the views to add the new field(s).
  3643.  
  3644.      The two Default views always reflect the current database
  3645.      structure, so they will automatically reflect any changes you
  3646.      make during when redefining.
  3647.  
  3648.  
  3649.  
  3650.  
  3651.      PC-File Version 7 Users Guide                             62
  3652.  
  3653.  
  3654.  
  3655.      Changes to Indexes
  3656.  
  3657.      PC-File lets you define indexes which allow you to customize
  3658.      the order your records are displayed in. See Chapter 8,
  3659.      "Indexing Data" for more details.
  3660.  
  3661.      If you defined any indexes for your database prior to
  3662.      redefining the structure, PC-File asks you if you want to
  3663.      rebuild the database's indexes. If you answer Yes, PC-File
  3664.      will attempt to rebuild all the indexes you had defined.
  3665.  
  3666.      Index definitions are dependent on field names, field types
  3667.      and field lengths. Deleting fields or changing field names,
  3668.      lengths, or types can cause indexes to become invalid.
  3669.  
  3670.      What to check:
  3671.  
  3672.        If an index contains a reference to field that has been
  3673.        deleted or modified in any way, PC-File will tell you it was
  3674.        unable to build the index. You may want to remake any
  3675.        indexes PC-File was unable to rebuild.
  3676.  
  3677.      Changes to Reports, Letters & Graphs
  3678.  
  3679.      Printing Reports, Letters and Graphs are some of PC-File's
  3680.      useful features. See Chapter 9, "Creating Reports," Chapter
  3681.      10, "Writing Letters," and Chapter 12 "Creating Graphs," for
  3682.      more details.
  3683.  
  3684.      Because any number of databases might be able to use the same
  3685.      reports, letters and graphs, PC-File will not attempt to make
  3686.      any changes to them when you redefine a database structure.
  3687.  
  3688.      What to check:
  3689.  
  3690.        If you deleted fields, or changed fields names, lengths or
  3691.        types, you must update any reports, letters and graphs used
  3692.        with that database to reflect those changes.
  3693.  
  3694.      Changes to Macro Definitions
  3695.  
  3696.      Macros allow you to simplify complicated or repetitive tasks
  3697.      by recording the keystrokes so you can play them back at any
  3698.      time. See Chapter 16, "Using Macros" for more details.
  3699.  
  3700.      Because you can record nearly any task in PC-File into a
  3701.      macro, it is almost impossible to list everything you should
  3702.      look at after having made changes to the database structure.
  3703.      Below is a list of the most common changes that will disrupt
  3704.      macros.
  3705.  
  3706.      What to check:
  3707.  
  3708.  
  3709.  
  3710.  
  3711.      PC-File Version 7 Users Guide                             63
  3712.  
  3713.  
  3714.        If any of your macro reference a field name and you changed
  3715.        that field's name, you will need to modify the macro to
  3716.        reflect the new name.
  3717.  
  3718.        If any of your macros are designed specifically to navigate
  3719.        to certain fields in a view and that view has changed
  3720.        because you deleted fields, you may need to modify the
  3721.        macro.
  3722.  
  3723.        If any of your macros reference a database name and you
  3724.        saved the redefined database structure to a new name, you
  3725.        will need to modify the macro to reflect the new name.
  3726.  
  3727.      Changes to Batch Posting Definitions
  3728.  
  3729.      PC-File's Batch Posting feature allows you to update
  3730.      information in other databases with information in the current
  3731.      database. See Chapter 18, "Batch Posting" for more details.
  3732.  
  3733.      What to check:
  3734.  
  3735.        If you have any databases that perform batch posting on the
  3736.        database you redefined, those databases' post definitions
  3737.        must be updated if they referenced fields you deleted or
  3738.        fields whose names you changed.
  3739.  
  3740.  
  3741.  
  3742.  
  3743.      PC-File Version 7 Users Guide                             64
  3744.  
  3745.  
  3746.  
  3747.  
  3748.      Chapter 4 FIELD ATTRIBUTES
  3749.  
  3750.      PC-File's field attributes let you control and automate what
  3751.      happens in each field. Field attributes can: supply automatic
  3752.      data, such as calculations; perform certain kinds of
  3753.      validation, such as defining the range of allowed values;
  3754.      control date, and character formatting; and can restrict when
  3755.      a field can be edited. Field attributes can be combined and
  3756.      applied selectively for each field. This chapter tells you how
  3757.      to define, modify, and delete field attributes.
  3758.  
  3759.      What are Field Attributes?
  3760.  
  3761.      PC-File's field attributes control what happens in a field in
  3762.      addition to the restrictions placed by a field's type. Field
  3763.      attributes fall under four basic categories based on how they
  3764.      affect the field: Automatic Data, Validation, Formatting, and
  3765.      Data Restriction.
  3766.  
  3767.      Automatic Data field attributes automatically supply data to a
  3768.      field from several different sources:
  3769.  
  3770.        Automatic Date-from the system date
  3771.  
  3772.        Automatic Time-from the system time
  3773.  
  3774.        Serial Number-supplies an automatically incrementing serial
  3775.        number
  3776.  
  3777.        Calculation-from a calculation based on other field's values
  3778.  
  3779.        Relational Lookup-retrieves data from other databases
  3780.  
  3781.        Default Text-from default text you define
  3782.  
  3783.        Automatic Dupe-by duplicating field data from the previous
  3784.        record
  3785.  
  3786.        Validation field attributes confirm that data has been
  3787.        correctly entered:
  3788.  
  3789.        Must Answer-confirms that something was entered
  3790.  
  3791.        Validate Range-confirms that the data entered falls within a
  3792.        defined range
  3793.  
  3794.      Formatting field attributes control formatting:
  3795.  
  3796.        Date Format-defines the display format for date-type fields
  3797.  
  3798.        Case Force-converts entered characters to either: upper-,
  3799.        lower-, or mixed case
  3800.  
  3801.      Data Restriction field attributes control what can be entered:
  3802.  
  3803.  
  3804.  
  3805.  
  3806.      PC-File Version 7 Users Guide                             65
  3807.  
  3808.  
  3809.  
  3810.        Not Editable-controls whether a field can be edited
  3811.  
  3812.        Character Restriction-controls which characters can be
  3813.        entered
  3814.  
  3815.      Each of these field attributes and how to assign them are
  3816.      discussed below.
  3817.  
  3818.      When Are Field Attributes Applied?
  3819.  
  3820.      You can control when PC-File applies Automatic Data
  3821.      attributes. For example, you can have an Automatic Date
  3822.      attribute supply the system date only when a record is first
  3823.      added. See the discussion under "When are Automatic Data
  3824.      Attributes Applied?" for more details.
  3825.  
  3826.      All other field attributes, except Not Editable, are applied
  3827.      at all times.
  3828.  
  3829.      How Many Field Attributes Per Field?
  3830.  
  3831.      To provide the greatest flexibility, PC-File lets you assign
  3832.      any number of field attributes per field. For example, for the
  3833.      same field you may assign Character Restriction to allow only
  3834.      certain characters to be entered, and assign Validate Range to
  3835.      define a range of allowed values, and assign Must Answer to
  3836.      make sure that something is always entered in the field.
  3837.  
  3838.      However, this means that it is possible to assign conflicting
  3839.      attributes to the same field. For example, PC-File will not
  3840.      prevent you from assigning both Automatic Date and Automatic
  3841.      Time attributes to the same field-the attribute assigned last
  3842.      would overwrite the other. Another example: PC-File will not
  3843.      prevent you from assigning Validate Range to limit the allowed
  3844.      range of values and then adding a Calculation that produces a
  3845.      result outside of the specified range. If you are assigning
  3846.      more
  3847.      than one attribute to a field, be careful not to assign
  3848.      attributes that will conflict with each other.
  3849.  
  3850.      Except for Calculation, Relational Lookup, and Default Data
  3851.      attributes, PC-File does prevent you from assigning more than
  3852.      one of the same attribute to a field.
  3853.  
  3854.      The Field Attribute Definition Process
  3855.  
  3856.      To start the Field Attribute definition process with the
  3857.      database you want to work with must be open. Then, choosing
  3858.      the Field Attribute option on the File menu displays a Field
  3859.      Selection dialog box.
  3860.  
  3861.      The Field Selection dialog box lets you choose which field you
  3862.      want to work with from the list. Once you choose a field, the
  3863.      Atrribute dialog box displays.
  3864.  
  3865.  
  3866.  
  3867.  
  3868.      PC-File Version 7 Users Guide                             66
  3869.  
  3870.  
  3871.      The Name text box at the top of the box lets you edit and
  3872.      change the field's name. The Available Attributes list on the
  3873.      left side shows all the field attributes you can work with.
  3874.      The Current Attributes list shows all attributes that are
  3875.      defined for the field. You can perform as many field attribute
  3876.      operations on the field as you want: add, delete, or modify
  3877.      one or more field attributes. Choosing OK returns you to the
  3878.      Field Attribute field selection dialog box to let you work
  3879.      with another
  3880.      field.
  3881.  
  3882.  
  3883.      To start working with field attributes:
  3884.  
  3885.      1.Open the database you want to work with.
  3886.  
  3887.      2.Choose Field Attribute from the File menu. The Field Section
  3888.        dialog box displays.
  3889.  
  3890.      3.Choose the field you want to work with. The Field Attribute
  3891.        Definition dialog box displays.
  3892.  
  3893.      4.Continue the Field Attribute definition process as described
  3894.        below.
  3895.  
  3896.      Adding a Field Attribute
  3897.  
  3898.      Once you have the Field Attribute Definition dialog box for
  3899.      the desired field displayed, you can add Field Attributes. The
  3900.      following procedure outlines the basic steps for adding an
  3901.      attribute. See the section for each attribute type later in
  3902.      this chapter for full details.
  3903.  
  3904.  
  3905.      To add a field attribute:
  3906.  
  3907.      1.Select the attribute you want to assign from the Available
  3908.        Attributes list.
  3909.  
  3910.      2.Choose the Add button. The dialog for the selected attribute
  3911.        displays. See the appropriate section later in this chapter
  3912.        for full details on each attribute.
  3913.  
  3914.      3.Choose OK when you are finished defining the attribute. You
  3915.        are returned to the Field Attribute Definition dialog box.
  3916.  
  3917.      Deleting a Field Attribute
  3918.  
  3919.      You can easily delete field attributes once you have the Field
  3920.      Attribute Definition dialog box displayed.
  3921.  
  3922.      To delete a field attribute:
  3923.  
  3924.      1.Select the attribute you want to delete from the Current
  3925.        Attributes list box.
  3926.  
  3927.  
  3928.  
  3929.  
  3930.      PC-File Version 7 Users Guide                             67
  3931.  
  3932.  
  3933.      2.Choose the Delete button. A confirmation dialog box
  3934.        displays.
  3935.  
  3936.      3.Choose Yes to delete the selected attribute.
  3937.  
  3938.      Modifying a Field Attribute
  3939.  
  3940.      Once you have assigned a field attribute, you may find you
  3941.      need to modify its definition. The following procedure
  3942.      outlines the basic steps for modifying an attribute. See the
  3943.      appropriate section later in this chapter for the full details
  3944.      on each attribute type.
  3945.  
  3946.      To modify a field attribute:
  3947.  
  3948.      1.Select the attribute you want to modify from the Current
  3949.        Attributes list box.
  3950.  
  3951.      2.Choose the Modify button. The appropriate dialog box for the
  3952.        selected field attribute displays. See the appropriate
  3953.        section later in this chapter for full details on the
  3954.        attribute you are working with.
  3955.  
  3956.      3.Choose OK when you are finished modifying the attribute.
  3957.  
  3958.      Completing the Field Attribute Definition Process
  3959.  
  3960.      You can perform any number of field attribute operations using
  3961.      the Field Attribute Definition dialog box. Once you are
  3962.      finished working with the field, choosing OK on the Field
  3963.      Attribute Definition dialog box returns you to the Field
  3964.      Section dialog box. You can choose to work with another field
  3965.      or choose OK on the Field Selection dialog box to return to
  3966.      the work area.
  3967.  
  3968.      Details on how to define each field attribute are covered in
  3969.      the following sections.
  3970.  
  3971.      Defining Automatic Data Attributes
  3972.  
  3973.      PC-File allows you to set up seven different types of
  3974.      automatic data attributes:
  3975.  
  3976.        Automatic Date
  3977.        Automatic Time
  3978.        Automatic Duplication
  3979.        Calculations
  3980.        Default Text
  3981.        Relational Lookups
  3982.        Serial Numbers
  3983.  
  3984.      Each of these options is described in detail later in this
  3985.      section.
  3986.  
  3987.      When are Automatic Data Attributes Applied?
  3988.  
  3989.  
  3990.  
  3991.  
  3992.      PC-File Version 7 Users Guide                             68
  3993.  
  3994.  
  3995.      Automatic Data attributes generate their data at a time that
  3996.      you specify. PC-File controls when an Automatic Data attribute
  3997.      generates its output three ways.
  3998.  
  3999.      You can determine if the attribute is applied:
  4000.  
  4001.        When adding records, when modifying records, or both
  4002.  
  4003.        When you begin editing the record, or when you exit the
  4004.        record
  4005.  
  4006.        Only when the field is empty, not empty, or at all times
  4007.  
  4008.      When you add or modify an Automatic Data attribute, a dialog
  4009.      box is displayed.
  4010.  
  4011.      There may be differences in the dialog box depending on what
  4012.      kind of Automatic Data attribute you are defining, but all
  4013.      dialog boxes have these three sets of options. In most cases,
  4014.      you can choose the default choices that PC-File provides.
  4015.      However, you may want to modify the options for different
  4016.      purposes. How each group of options affects Automatic Data
  4017.      attributes is described below.
  4018.  
  4019.      During Which Operations
  4020.  
  4021.      The When Adding Records and When Modifying Records check boxes
  4022.      determine whether the attribute is applied only when you add
  4023.      records, only when you modify records, or both.
  4024.  
  4025.      For example, you might want to assign an Automatic Date
  4026.      attribute to the ENTER_DATE field in an invoicing database.
  4027.      Turn on the When Adding Records check box to specify that the
  4028.      Automatic Date is only supplied when adding a record. Also,
  4029.      make sure that the When Modifying Records check box is turned
  4030.      off. Then each time you add a new record (invoice), PC-File
  4031.      automatically puts today's date in ENTER_DATE for you.
  4032.  
  4033.      Similarly, you might put an Automatic Date attribute in a
  4034.      MODIFYDATE field to track when a record was last modified.
  4035.      Turn on the When Modifying Records check box and make sure the
  4036.      When Adding Records check box is turned off to apply the
  4037.      attribute only when the record is modified.
  4038.  
  4039.      You can turn on both check boxes to apply an attribute when
  4040.      both adding and modifying records. Also, if you want to
  4041.      temporarily disable an attribute without having to delete and
  4042.      re-enter it, you can turn off both When Adding and When
  4043.      Modifying check boxes.
  4044.  
  4045.      At What Time During the Operation
  4046.  
  4047.      The When You Begin Editing and When You Exit The Record option
  4048.      buttons control at what time the attribute is applied while
  4049.      you are editing a record.
  4050.  
  4051.  
  4052.  
  4053.  
  4054.      PC-File Version 7 Users Guide                             69
  4055.  
  4056.  
  4057.      The When You Begin Editing option behaves slightly differently
  4058.      depending on whether the attribute is being applied when
  4059.      adding or modifying a record. When adding, this option causes
  4060.      the automatic data to be supplied as soon as you start adding
  4061.      a record-the output of this attribute will be visible as soon
  4062.      as you choose to add a record. When modifying, this option
  4063.      causes the automatic data to be supplied as soon as you access
  4064.      any field in a record and start typing.
  4065.  
  4066.      Typically, the When You Begin Editing option is used for
  4067.      information you want to show at the start of an editing
  4068.      session. Automatic Date, Automatic Time, Automatic
  4069.      Duplication, Default Text, and Serial Number would typically
  4070.      be set with the When You Begin Editing option.
  4071.  
  4072.      The When You Exit The Record option causes the automatic data
  4073.      to be supplied as soon as you are finished working with a
  4074.      record. This is typically used for the two Automatic Data
  4075.      attributes that depend on information from other fields:
  4076.      Calculations and Relational Lookups.
  4077.  
  4078.      Apply When Empty or Not Empty
  4079.  
  4080.      The Empty and Always option buttons control whether you can
  4081.      override an Automatic Data attribute when entering data.
  4082.  
  4083.      For example, if you choose the Always option button and both
  4084.      When Adding and When Modifying from the During Which
  4085.      Operations options, you cannot ever enter your own data into
  4086.      the field-the automatic data will replace anything you enter.
  4087.      However, when the attribute is set to perform only if the
  4088.      field is empty, if you type something to replace the automatic
  4089.      data, PC-File will not replace your entry.
  4090.  
  4091.      The Not Empty option button causes the Automatic Data
  4092.      attribute to perform only when there is something in the
  4093.      field. You can use this option to trigger the Automatic Data
  4094.      attribute whenever you enter something into the field.
  4095.  
  4096.      Automatic Date
  4097.  
  4098.      PC-File allows you to add a field attribute that automatically
  4099.      puts today's date in the field. PC-File gets this date from
  4100.      your computer's system date. You can use this attribute in
  4101.      Date, Character, and Memo type fields. Use the When to Apply
  4102.      options to determine when to generate the date.
  4103.  
  4104.      To add an automatic date attribute:
  4105.  
  4106.      1.With a database open, choose Field Attributes from the File
  4107.        menu. The Field selection dialog box displays.
  4108.  
  4109.      2.Choose the field to add the automatic date attribute to. The
  4110.        Field Attributes dialog box displays.
  4111.  
  4112.      3.Select Automatic Date from the Available Attributes list.
  4113.  
  4114.  
  4115.  
  4116.  
  4117.      PC-File Version 7 Users Guide                             70
  4118.  
  4119.  
  4120.  
  4121.      4.Choose Add to add the attribute. The Automatic Date dialog
  4122.        box displays with When to Apply options.
  4123.  
  4124.      5.Select when to apply the automatic date.
  4125.  
  4126.      NOTE: Selecting when to apply an automatic field attribute can
  4127.      be daunting. See the section, "When are Automatic Field
  4128.      Attributes Applied," for a detailed explanation. For example,
  4129.      you may want to have the date supplied automatically only when
  4130.      you add a record. Optionally, you may want to apply the date
  4131.      when you modify a record to see when you last updated it.
  4132.  
  4133.      6.Choose OK to apply this attribute to the field.
  4134.  
  4135.      Automatic Duplication
  4136.  
  4137.      Automatic Duplication is similar to adding Default Text to a
  4138.      field. However, while Default Text always inserts the same
  4139.      data in a field, Automatic Duplication inserts whatever data
  4140.      appeared in the same field in the previously viewed record. In
  4141.      either case, you can type over the current information. This
  4142.      attribute makes entering a series of records with the same
  4143.      data simpler. For example, you could use a duplication mask
  4144.      for a STATE field in which you entered all the WA addresses
  4145.      first, then
  4146.      moved on to the OR addresses, and from there to the CA
  4147.      addresses and so on.
  4148.  
  4149.      To add an automatic duplication attribute:
  4150.  
  4151.      1.With a database open, choose Field Attributes from the File
  4152.        menu. The Field Selection dialog box displays.
  4153.  
  4154.      2.Choose the field for Automatic Duplication. The Field
  4155.        Attributes dialog box displays.
  4156.  
  4157.      3.Select Automatic Dupe from the Available Attributes list
  4158.        box.
  4159.  
  4160.      4.Choose Add. The Automatic Duplication dialog box with When
  4161.        to Apply options displays.
  4162.  
  4163.      5.Select when to apply.
  4164.  
  4165.      6.Choose OK to apply this attribute to the field.
  4166.  
  4167.      Automatic Time
  4168.  
  4169.      PC-File allows you to add a field attribute that automatically
  4170.      generates the time from you computer's system time. Like the
  4171.      automatic date, you can generate the time when you add a new
  4172.      record or when you modify.
  4173.  
  4174.      To put in an automatic time field:
  4175.  
  4176.  
  4177.  
  4178.  
  4179.      PC-File Version 7 Users Guide                             71
  4180.  
  4181.  
  4182.      1.With a database open, choose Field Attributes from the File
  4183.        menu. The Field selection dialog box displays.
  4184.  
  4185.      2.Choose the field to add the Automatic time attribute to. The
  4186.        Field Attributes dialog box displays.
  4187.  
  4188.      3.Select Automatic Time from the Available Attributes list
  4189.        box.
  4190.  
  4191.      4.Choose Add. The Automatic Time dialog box with When to Apply
  4192.        options displays.
  4193.  
  4194.      5.Select when to apply the Automatic time attribute.
  4195.  
  4196.      6.Choose OK to apply this attribute to the field.
  4197.  
  4198.      Calculations
  4199.  
  4200.      Using the Calculation field attribute you can create a field
  4201.      that generates its own data through a calculation. For each
  4202.      record, PC-File performs the calculation at the time you
  4203.      specify and enters the results in the field.
  4204.  
  4205.      You can use any of the calculations described in Chapter 17,
  4206.      "Calculations." This includes mathematical, date, and string
  4207.      calculations as well as relational lookups. In most cases, you
  4208.      will want to define a relational lookup using the dialog boxes
  4209.      displayed when choosing the Relational Lookup field attribute
  4210.      as explained later in this chapter in the "Relational Lookup,"
  4211.      section.
  4212.  
  4213.      The outermost set of parentheses around a calculation is
  4214.      optional, as PC-File adds them automatically. Field
  4215.      calculations can include other field names, numeric constants,
  4216.      and functions. See Chapter 17, "Calculations," for information
  4217.      on using calculations in PC-File.
  4218.  
  4219.      Here are some examples of calculations:
  4220.  
  4221.           FIRST_NAME;" ";LAST_NAME
  4222.  
  4223.           ((TODAY#) - (BUY_DATE ( @DAY#,mdy)))
  4224.  
  4225.           TOTAL_AMT *1.0825
  4226.  
  4227.      To add a calculation:
  4228.  
  4229.      1.With a database open, choose Field Attributes from the File
  4230.        menu. The Field Selection dialog box displays.
  4231.  
  4232.      2.Choose the field to add the calculation to. The Field
  4233.        Attributes dialog box displays.
  4234.  
  4235.      3.Select Calculation from the Available Attributes list.
  4236.  
  4237.  
  4238.  
  4239.  
  4240.      PC-File Version 7 Users Guide                             72
  4241.  
  4242.  
  4243.      4.Choose Add. The Calculation dialog box with a text box for
  4244.        entering the calculation and the When to Apply options
  4245.        displays.
  4246.  
  4247.      5.Type the calculation in the Calculation text box.
  4248.  
  4249.      6.Select when to apply the calculation using the options below
  4250.        the Calculation text box.
  4251.  
  4252.      7.Choose OK to apply this attribute to the field.
  4253.  
  4254.      Default Text
  4255.  
  4256.      If you want the same data to appear in a field in most records
  4257.      or in every record, add a Default Text attribute to that
  4258.      field. For example, suppose that most of the addresses in a
  4259.      database are from Walla Walla. To save you from having to type
  4260.      WALLA WALLA every time a new record is added, you can insert
  4261.      WALLA WALLA as default text in the city field. You can then
  4262.      skip over that field most of the time. When a different city
  4263.      is needed, type it right over the default text.
  4264.  
  4265.      Here are some examples of default data:
  4266.  
  4267.           WALLA WALLA CA 01/22/93
  4268.  
  4269.      To add a Default Text attribute:
  4270.  
  4271.      1.With a database open, choose Field Attributes from the File
  4272.        menu. The Field Selection dialog box displays.
  4273.  
  4274.      2.Choose the field to add the Default Text attribute to. The
  4275.        Field Attributes dialog box displays.
  4276.  
  4277.      3.Select Default Data from the Available Attributes list.
  4278.  
  4279.      4.Choose Add. The Default Text dialog box with a text box for
  4280.        entering the default data displays.
  4281.  
  4282.      5.Type the text to be used as Default Text in the text box.
  4283.  
  4284.      6.Select when to apply using the When to Apply options.
  4285.  
  4286.      7.Choose OK to apply this attribute to the field.
  4287.  
  4288.      Serial Number
  4289.  
  4290.      The Serial Number attribute lets you define a field that
  4291.      contains an incrementing number for each record. Typically
  4292.      this feature is used to automatically enter a number in a
  4293.      field each time you add a record. This is useful if you need a
  4294.      unique identifier for each record, or if you need to know the
  4295.      order each record was added to the database. Sorting the
  4296.      database does not change these numbers, and numbers are never
  4297.      reused, even if a record is deleted.
  4298.  
  4299.  
  4300.  
  4301.  
  4302.      PC-File Version 7 Users Guide                             73
  4303.  
  4304.  
  4305.      You can define which number will be used as the starting
  4306.      number and what number will be used to increment by. By
  4307.      default the serial number will start at 1 and increment by 1
  4308.      so the first record added will be number 1, the second record
  4309.      number 2, and so on in a series. However, you can choose any
  4310.      starting number or interval by typing the desired values in
  4311.      the text boxes on the Serial Number dialog box.
  4312.  
  4313.      NOTE: In previous versions of PC-File, serial numbers were
  4314.      called unique numbers. Previous versions include PC-File 6.5,
  4315.      6.0, 5.01, 5.0, PC-File:dB and others.
  4316.  
  4317.      To add a Serial Number attribute:
  4318.  
  4319.      1.With a database open, choose Field Attributes from the File
  4320.        menu. The Field Selection dialog box displays.
  4321.  
  4322.      2.Choose the field to add the Serial Number attribute to. The
  4323.        Field Attributes dialog box displays.
  4324.  
  4325.      3.Select Serial Number from the Available Attributes list.
  4326.  
  4327.      4.Choose Add. The Serial Number dialog box with When to Apply
  4328.        options displays.
  4329.  
  4330.      5.Type the starting number and the number to increment by, if
  4331.        desired.
  4332.  
  4333.      6.Select when to apply the serial number.
  4334.  
  4335.      7.Choose OK to add this attribute to the field.
  4336.  
  4337.      Relational Lookups
  4338.  
  4339.      Relational lookups are a special type of calculation that
  4340.      provide you with a way to "pull" information from another
  4341.      database into the present database.
  4342.  
  4343.      You can define a lookup by either entering a formula in the
  4344.      text box on Relational Lookup dialog box, or by choosing the
  4345.      Define Lookup button and PC-File will step you through the
  4346.      lookup definition process. See Chapter 17, "Relational
  4347.      Lookups" for more details on how relational lookups work and
  4348.      how to define relational lookup formulas.
  4349.  
  4350.      To add a Relational Lookup:
  4351.  
  4352.      1.With a database open, choose Field Attributes from the File
  4353.        menu. The Field Selection dialog box displays.
  4354.  
  4355.      2.Choose the field to add Relational Lookup attribute to. The
  4356.        Field Attributes dialog box displays.
  4357.  
  4358.      3.Select Relational Lookup from the Available Attributes list.
  4359.  
  4360.  
  4361.  
  4362.  
  4363.      PC-File Version 7 Users Guide                             74
  4364.  
  4365.  
  4366.      4.Choose Add. The Relational Lookup dialog box with When to
  4367.        Apply options displays.
  4368.  
  4369.      5.Type the relational lookup formula into the text box, or
  4370.        choose the Define Lookup button. (See Chapter 17, "Defining
  4371.        Basic Lookups" for details on how to define a relational
  4372.        lookup.)
  4373.  
  4374.      6.Select when to apply the relational lookup.
  4375.  
  4376.      7.Choose OK to add this attribute to the field.
  4377.  
  4378.  
  4379.      Defining Validation Attributes
  4380.  
  4381.      Validation attributes apply data validation rules to allow you
  4382.      to control the way a user of your database enters data. The
  4383.      defined validation rules are applied as the user exits the
  4384.      field after entering data. If the data entered does not meet
  4385.      the validation criterion, a dialog box displays to inform the
  4386.      user what must be done to continue.
  4387.  
  4388.      Use the Must Answer attribute to create fields which require
  4389.      user input. Use the Validate Range attribute to limit the
  4390.      range of permissible data entered into a field. Validation
  4391.      attributes are applied at all times, when adding and modifying
  4392.      records.
  4393.  
  4394.      Must Answer
  4395.  
  4396.      Use Must Answer to require the user to enter data into a
  4397.      field. For example, you might have a database for tracking
  4398.      customer's orders. In order to keep track of every record, you
  4399.      might want to ensure that each order entered in the database
  4400.      includes the customer's identification number. Assigning the
  4401.      Must Answer attribute to the ID_NUMBER field reminds the user
  4402.      to enter data for the field whenever a new record is added.
  4403.      PC-File will not allow the user to continue until the field is
  4404.      filled.
  4405.  
  4406.      NOTE: Adding the Must Answer attribute to a numeric type field
  4407.      requires a non-zero entry. That is, entering 0 is always
  4408.      considered to be empty. Do not use the Must Answer attribute
  4409.      on numeric fields if zero is considered a valid entry for the
  4410.      field.
  4411.  
  4412.      To add a Must Answer field attribute:
  4413.  
  4414.      1.With a database open, choose Field Attributes from the File
  4415.        menu. The Field Selection dialog box displays.
  4416.  
  4417.      2.Choose the field which you would like to be Must Answer. The
  4418.        Field Attributes dialog box displays.
  4419.  
  4420.      3.Select Must Answer from the Available Attributes list.
  4421.  
  4422.  
  4423.  
  4424.  
  4425.      PC-File Version 7 Users Guide                             75
  4426.  
  4427.  
  4428.      4.Choose Add. An information dialog displays to indicate Must
  4429.        Answer has been added.
  4430.  
  4431.      5.Choose OK to add this attribute to the field.
  4432.  
  4433.      Validate Range
  4434.  
  4435.      Use Validate Range to limit the range of values a user can
  4436.      enter into a field. Setting the minimum and maximum values
  4437.      defines the range that will be allowed. Whenever the range is
  4438.      exceeded, PC-File notifies the user of the defined range and
  4439.      allows the user to continue editing to enter a correct value.
  4440.      The user cannot leave a record as long as the value exceeds
  4441.      the defined range.
  4442.  
  4443.      Generally you would use this attribute to define a numeric
  4444.      range. For example, from a minimum of 1 to a maximum of 100.
  4445.      However, you can also define a range of characters. For
  4446.      example, a minimum of A and a maximum of E to include A, B, C,
  4447.      D and E.
  4448.  
  4449.      To add a Validate Range field attribute:
  4450.  
  4451.      1.With a database open, choose Field Attributes from the File
  4452.        menu. The Field Selection dialog box displays.
  4453.  
  4454.      2.Choose the field to assign Validate Range to. The Field
  4455.        Attributes dialog box displays.
  4456.  
  4457.      3.Select Validate Range from the Available Attributes list.
  4458.  
  4459.      4.Choose Add. The Validate Range dialog box displays. It
  4460.        contains two text boxes: one for the lowest allowed value
  4461.        and one for highest allowed value.
  4462.  
  4463.      5.Type the values for the lowest and highest allowed values.
  4464.  
  4465.      6.Choose OK to accept the values.
  4466.  
  4467.      7.Choose OK to add this attribute to the field.
  4468.  
  4469.      Defining Formatting Attributes
  4470.  
  4471.      Formatting attributes determine how data displays in the
  4472.      field. PC-File gives you two Formatting Attribute options:
  4473.      Force Case and Date Format.
  4474.  
  4475.      Force Case
  4476.  
  4477.      You can specify three different case combinations with the
  4478.      force case attribute. You can force the entry into all upper
  4479.      case; all lower case; or mixed case, where the first letter of
  4480.      each word is capitalized and the rest of each word is in lower
  4481.      case. The Force Case attribute is applied as soon as the user
  4482.      exits the field.
  4483.  
  4484.  
  4485.  
  4486.  
  4487.      PC-File Version 7 Users Guide                             76
  4488.  
  4489.  
  4490.      To add a Force Case field attribute:
  4491.  
  4492.      1.With a database open, choose Field Attributes from the File
  4493.        menu. The Field Selection dialog box displays.
  4494.  
  4495.      2.Choose the field for the Force Case attribute. The Field
  4496.        Attributes dialog box displays.
  4497.  
  4498.      3.Select Force Case from the Available Attributes list.
  4499.  
  4500.      4.Choose Add to add the attribute. The Force Case dialog box
  4501.        displays. There is a set of option buttons: one for UPPER,
  4502.        one for lower, and one for Mixed Case.
  4503.  
  4504.      5.Select the button that corresponds with the desired case
  4505.        option.
  4506.  
  4507.      6.Choose OK to accept the selection.
  4508.  
  4509.      7.Choose OK to apply Force Case to the selected field.
  4510.  
  4511.      Date Format
  4512.  
  4513.      You can apply a particular date format with the date format
  4514.      attribute. This attribute allows you to change the date
  4515.      display format from MM/DD/YY to MM/DD/YYYY for example. You
  4516.      can choose a different Month- Day-Year sequence. You can also
  4517.      change the delimiter from slash (/) to hyphen (-) or period
  4518.      (.). The Data Format field attribute only applies to the field
  4519.      you select at the beginning of the field attribute definition
  4520.      process. You can assign different date formats for different
  4521.      date fields, if
  4522.      you want.
  4523.  
  4524.      NOTE: In most cases you will want to set date formatting for
  4525.      all fields at once using the Default Date Format options on
  4526.      the Configuration dialog. The Date Format field attribute only
  4527.      applies to one date field at a time and will override
  4528.      Configuration Default Date Format settings for that field
  4529.      only.
  4530.  
  4531.      To add a Date Format field attribute:
  4532.  
  4533.      1.With a database open, choose Field Attributes from the File
  4534.        menu. The Field Selection dialog box displays.
  4535.  
  4536.      2.Choose the field to apply data formatting to. The Field
  4537.        Attributes dialog box displays.
  4538.  
  4539.      3.Select Date Format from the Available Attributes list.
  4540.  
  4541.      4.Choose Add to add the attribute. The Date Format dialog box
  4542.        displays. There are option buttons for the display order of
  4543.        day, month and year; year display, two or four digits; and
  4544.        the separator: "-", "/" or ".".
  4545.  
  4546.  
  4547.  
  4548.  
  4549.      PC-File Version 7 Users Guide                             77
  4550.  
  4551.  
  4552.      5.Select the desired options for the order, year display and
  4553.        separator.
  4554.  
  4555.      6.Choose OK to accept these selections.
  4556.  
  4557.      7.Choose OK to apply the Date Format.
  4558.  
  4559.      Defining Data Restriction Attributes
  4560.  
  4561.      Data Restriction field attributes are much like Validation
  4562.      attributes except they are applied immediately, not as the
  4563.      user exits the field. PC-File gives you two options: Not
  4564.      Editable and Restrict Character.
  4565.  
  4566.      Not Editable
  4567.  
  4568.      The Not Editable field attribute to prevents data from being
  4569.      altered. This attribute prevents the cursor from entering the
  4570.      fields-pressing TAB while editing will bypass the field. You
  4571.      can prevent editing only when Adding, only when Modifying, or
  4572.      both. For example, if you have a field that has a calculated
  4573.      result that you don't want altered, configure the Not Editable
  4574.      attribute to apply when both adding and modifying records.
  4575.      However, you might want to allow user input when adding the
  4576.      record, but then prevent users from changing the field
  4577.      afterwards. In this case, you would choose to apply the Not
  4578.      Editable attribute only when modifying.
  4579.  
  4580.      To add a Not Editable field attribute:
  4581.  
  4582.      1.With a database open, choose Field Attributes from the File
  4583.        menu. The Field Selection dialog box displays.
  4584.  
  4585.      2.Choose the field. The Field Attributes dialog box displays.
  4586.  
  4587.      3.Select Not Editable from the Available Attributes list .
  4588.  
  4589.      4.Choose Add. The Not Editable dialog box with When to Apply
  4590.        options display.
  4591.  
  4592.      5.Choose when to apply the Not Editable attribute.
  4593.  
  4594.      6.Choose OK to apply this attribute to the field.
  4595.  
  4596.      Restrict Characters
  4597.  
  4598.      Use the Restrict Characters field attribute to limit the
  4599.      characters the user can type in a field. You can restrict a
  4600.      field to accept only letters or only numbers for example.
  4601.      There is no way to define a range of allowed characters when
  4602.      doing this-you must type every allowed character when defining
  4603.      the Restrict Character attribute. This restriction applies
  4604.      whenever you add or modify data.
  4605.  
  4606.      To add a Restrict Character field attribute:
  4607.  
  4608.  
  4609.  
  4610.  
  4611.      PC-File Version 7 Users Guide                             78
  4612.  
  4613.  
  4614.      1.With a database open, choose Field Attributes from the File
  4615.        menu. The Field Selection dialog box displays.
  4616.  
  4617.      2.Choose the field. The Field Attributes dialog box displays.
  4618.  
  4619.      3.Select Restrict Characters from the Available Attributes
  4620.        list.
  4621.  
  4622.      4.Choose Add. The Restrict Characters dialog box displays.
  4623.        There is a box into which you enter the characters that you
  4624.        will allow the user to enter into the field.
  4625.  
  4626.      5.Type in each character you want to permit in the field in
  4627.        the text box.
  4628.  
  4629.      6.Choose OK to accept this selection.
  4630.  
  4631.  
  4632.      7.Choose OK to apply this attribute to the field.
  4633.  
  4634.  
  4635.  
  4636.  
  4637.      PC-File Version 7 Users Guide                             79
  4638.  
  4639.  
  4640.  
  4641.      CHAPTER 5 VIEWS
  4642.  
  4643.      In this chapter, you will be introduced to database views.
  4644.      Default Record and Default Table views will be introduced. How
  4645.      to navigate within views is also discussed. In addition, you
  4646.      will learn how to switch, create, modify, and delete
  4647.      customized Record and Table views.
  4648.  
  4649.      What are Views?
  4650.  
  4651.      Views are simply the different ways that you can display your
  4652.      data while working in PC-File. PC-File provides two kinds of
  4653.      views of your data:
  4654.  
  4655.        Record views
  4656.        Table views
  4657.  
  4658.  
  4659.      Record Views
  4660.  
  4661.      A Record view displays one record at a time.
  4662.  
  4663.      There are advantages to using either kind of view. Most of the
  4664.      time, you can see more of each record's data at once in a
  4665.      Record view. This gives you more information at your finger
  4666.      tips about each record.
  4667.  
  4668.  
  4669.      Table Views
  4670.  
  4671.      A Table view displays multiple records in a column format,
  4672.      much like a spreadsheet. You can page up and down to reveal
  4673.      other records, and scroll horizontally to display fields that
  4674.      don't fit on the screen.
  4675.  
  4676.      Table views show more than one record at a time and therefore
  4677.      are a better way to compare information from one record to
  4678.      another. Generally, you can't display as much of each record's
  4679.      information at once in a Table view as you can in Record view,
  4680.      but you can scroll across the table to view additional columns
  4681.      of data.
  4682.  
  4683.      Default Views
  4684.  
  4685.      Whenever you create a database, PC-File automatically creates
  4686.      two default views which are always named: Default Record View
  4687.      and Default Table View. Default views display every field in
  4688.      your database and the fields are displayed in the "physical
  4689.      order"-the order you defined the fields when creating the
  4690.      database structure.
  4691.  
  4692.      Custom Views
  4693.  
  4694.  
  4695.  
  4696.  
  4697.      PC-File Version 7 Users Guide                             80
  4698.  
  4699.  
  4700.      In addition to the default views, you can create custom views
  4701.      of either type. A custom view contains only the fields you
  4702.      specify in the order you determine. Using custom Record views
  4703.      you can organize the screen any way you want and include
  4704.      additional text, such as a title, headings, and data entry
  4705.      instructions. Using custom Table views you can choose which
  4706.      fields to show in the table and their order.
  4707.  
  4708.      Custom views can be particularly useful if your database has a
  4709.      large number of fields and you have more than one work group
  4710.      working with the database. You can create custom views that
  4711.      display different sets of fields for each work group. For
  4712.      example, one work group may only want to see fields containing
  4713.      name and address information for maintaining a mailing list,
  4714.      but another work group may want to view accounting fields for
  4715.      billing customers.
  4716.  
  4717.      You do not have to define custom views to use your database.
  4718.      You can access any database using just the two default views
  4719.      PC-File generates when you create the database structure.
  4720.  
  4721.  
  4722.  
  4723.      The Views Menu
  4724.  
  4725.      Choosing Views on the menu bar displays this list of options:
  4726.  
  4727.        The Switch option on the Views menu displays a list of your
  4728.        views to choose from. Pressing CTRL-T toggles between the
  4729.        last two views you've selected.
  4730.  
  4731.        The Create option lets you define custom views.
  4732.  
  4733.        The Modify option lets you change any of your custom views.
  4734.  
  4735.        The Delete option lets you delete any custom views you no
  4736.        longer need.
  4737.  
  4738.      These options have no effect on default views-the two default
  4739.      views cannot be modified or deleted.
  4740.  
  4741.      Each of these options are discussed in detail later in this
  4742.      chapter.
  4743.  
  4744.      Viewing Your Data
  4745.  
  4746.      When you open a database, PC-File displays the first record or
  4747.      group of records (based on the current index) on the screen.
  4748.      The area where the record displays is called the work area.
  4749.  
  4750.  
  4751.      NOTE: PC-File always starts up with the last view that was
  4752.      active when the database was closed.
  4753.  
  4754.      Switching Views
  4755.  
  4756.  
  4757.  
  4758.  
  4759.      PC-File Version 7 Users Guide                             81
  4760.  
  4761.  
  4762.      You may switch between views so that you can better see the
  4763.      data that is important for you. For example, you can browse
  4764.      through a group of records in a Table view to find a specific
  4765.      record. Once you've found the record that you want, you could
  4766.      switch to a Record view to see more of the data for that
  4767.      particular record.
  4768.  
  4769.      To switch between views:
  4770.  
  4771.      1.Choose Switch from the Views menu. The Switch View dialog
  4772.        box will display.
  4773.  
  4774.      2.Select the view that you would like to use from the list
  4775.        box.
  4776.  
  4777.      3.Choose OK. PC-File switches to the selected view.
  4778.  
  4779.      NOTE: There will always be at least two views to select when
  4780.      switching views. If you haven't created any custom views, you
  4781.      will only see the two default record and table views. See
  4782.      "Creating and Modifying Views" later in this chapter for
  4783.      information on creating custom views.
  4784.  
  4785.      Toggling Between Two Views
  4786.  
  4787.      You can move quickly between two views using CTRL-T. Pressing
  4788.      CTRL-T switches you to the view that you most recently viewed.
  4789.      Pressing CTRL-T will move you back to your original view.
  4790.  
  4791.      For example, if you are in the Default Table view and last
  4792.      used the Default Record view, you could move back to the
  4793.      Default Record view by pressing CTRL-T. To move back to the
  4794.      Default Table view, press CTRL-T again.
  4795.  
  4796.      To toggle between the two most recent views:
  4797.  
  4798.      1.Press CTRL-T to switch to the most recently used view. PC-
  4799.        File switches to the previous view.
  4800.  
  4801.      2.Press CTRL-T again. PC-File switches back to the original
  4802.        view.
  4803.  
  4804.      Navigating Within Views
  4805.  
  4806.      The following sections describe how to navigate within Record
  4807.      and Table views to display your data. See Chapter 6 for
  4808.      details on how to add records, and see Chapter 7 for details
  4809.      on how to search for and modify records.
  4810.  
  4811.      Navigating in a Record View
  4812.  
  4813.  
  4814.      The following table describes the mouse and keyboard options
  4815.      for navigating within a Record view.
  4816.  
  4817.      Function: Mouse Action: Keyboard
  4818.  
  4819.  
  4820.  
  4821.  
  4822.      PC-File Version 7 Users Guide                             82
  4823.  
  4824.  
  4825.  
  4826.      Display next record: Click Next button: CTRL-N
  4827.  
  4828.      Display previous record: Click Previous button: CTRL-P
  4829.  
  4830.  
  4831.      Scroll down one line: Click the down arrow on the scroll bar:
  4832.      N/A
  4833.  
  4834.      Scroll up one line: Click the up arrow on the scroll bar: N/A
  4835.  
  4836.      Scroll down a page: Click below scroll box: PGDN
  4837.  
  4838.      Scroll up a page: Click above scroll box: PGUP
  4839.  
  4840.      Jump to bottom of view: Drag scroll box to bottom of scroll
  4841.      bar: CTRL-PDN
  4842.  
  4843.      Jump to top of view: Drag scroll box to top of scroll bar:
  4844.      CTRL-PGUP
  4845.  
  4846.  
  4847.      You can edit fields in a record as long as the Read-only
  4848.      option on Edit menu is not checked. Use TAB and SHIFT-TAB to
  4849.      move between fields, or click on a field with the mouse. The
  4850.      current field is highlighted with a different color or shading
  4851.      than the other fields. The cursor displays as a flashing
  4852.      underscore.
  4853.  
  4854.      Navigating in a Table View
  4855.  
  4856.      Table views let you browse through your database many records
  4857.      at a time. Columns are distinguished by color on a color
  4858.      monitor, by shades of gray on a monochrome monitor. The width
  4859.      of each column in the Default Table view reflects the field
  4860.      length you defined when you created the database structure.
  4861.      However, you can define a custom Table view with narrower
  4862.      display widths. PC-File only displays entire columns on the
  4863.      screen, not partial columns. Thus, in some cases, empty space
  4864.      may appear on the right side of your screen.
  4865.  
  4866.  
  4867.      The records display in order based on the current index. If
  4868.      you switch indexes, the records rearrange on the screen to
  4869.      match the new index.
  4870.  
  4871.      The following table describes the mouse and keyboard options
  4872.      for moving around the screen in a Table view.
  4873.  
  4874.      Function: Mouse Action: Keyboard
  4875.  
  4876.      Scroll one column to the right: Click on right arrow on
  4877.      horizontal scroll bar: CTRL-TAB
  4878.  
  4879.      Scroll one column to the left: Click on left arrow on
  4880.      horizontal scroll bar: CTRL-SHIFT-TAB
  4881.  
  4882.  
  4883.  
  4884.  
  4885.      PC-File Version 7 Users Guide                             83
  4886.  
  4887.  
  4888.  
  4889.      Scroll right one screenful of columns: Click to the right of
  4890.      the scroll box on the horizontal scroll bar: N/A
  4891.  
  4892.      Scroll left one screenful of columns: Click to the left of the
  4893.      scroll box on the horizontal scroll bar: N/A
  4894.  
  4895.      Scroll to the right most column: Drag the scroll box on the
  4896.      horizontal scroll bar to the right end: N/A
  4897.  
  4898.      Scroll to the left most column: Drag the scroll box on the
  4899.      horizontal scroll bar to the left end: N/A
  4900.  
  4901.      Scroll the screen down one row: Click the up arrow on the
  4902.      vertical scroll bar: N/A
  4903.  
  4904.      Scroll the screen up one row: Click above the scroll box on
  4905.      the vertical scroll bar: N/A
  4906.  
  4907.      Page down one screenful: Click below the scroll box on the
  4908.      vertical scroll bar: PGDN
  4909.  
  4910.      Page up one screenful: Click above the scroll box on the
  4911.      vertical scroll bar: PGUP
  4912.  
  4913.      Pressing TAB moves the highlight one column to the right
  4914.      within the current screenful. Pressing SHIFT-TAB moves the
  4915.      highlight one column to the left. Once the highlight reaches
  4916.      the rightmost or leftmost column in the current screen, the
  4917.      window scrolls one column each time you press TAB or SHIFT-
  4918.      TAB. This differs from CTRL-TAB and CTRL-SHIFT-TAB in that
  4919.      they scroll the entire screen one column regardless of which
  4920.      column the highlight is on.
  4921.  
  4922.      Similarly, UP ARROW and DOWN ARROW move the highlight up and
  4923.      down one row within the current screenful. Once the highlight
  4924.      reaches the top or bottom of the current screenful, the entire
  4925.      screen will scroll. This differs from clicking the up and down
  4926.      arrows on the vertical scroll bar in that this always scrolls
  4927.      the entire screenful up or down one line.
  4928.  
  4929.      Viewing a Memo Field
  4930.  
  4931.      Memo fields, which hold up to 5000 characters of data, can be
  4932.      expanded for viewing and modification. When you expand a memo
  4933.      field, a memo window displays. This window can be resized as
  4934.      needed.
  4935.  
  4936.      You can display a memo window in either Record or Table views.
  4937.      You can also display a memo window for viewing AND
  4938.      modification, or only for viewing. Follow these guidelines to
  4939.      display a memo window:
  4940.  
  4941.        The Read-only mode on the Edit menu must be off to display a
  4942.        memo window for viewing AND modification.
  4943.  
  4944.  
  4945.  
  4946.  
  4947.      PC-File Version 7 Users Guide                             84
  4948.  
  4949.  
  4950.        You can display a memo window, for viewing only, when Read-
  4951.        only mode is on or off.
  4952.  
  4953.      To display a memo window for viewing and modification:
  4954.  
  4955.      1.Highlight the memo field you want to display and edit.
  4956.  
  4957.      2.Press CTRL-E. You can also click on the Up arrow button at
  4958.        the end of the field. The memo field expands to a memo
  4959.        window.
  4960.  
  4961.      3.Make any changes necessary to the memo.
  4962.  
  4963.      4.Choose OK to save your changes and close the window.
  4964.  
  4965.      Choose Cancel or press ESC to close the window without saving
  4966.      any changes.
  4967.  
  4968.      To display a memo window for viewing only:
  4969.  
  4970.      1.Display the record containing the memo you want to view.
  4971.  
  4972.      2.Press CTRL-V. The memo field expands to a memo window.
  4973.  
  4974.      3.Choose OK or press ESC when you finish viewing the data.
  4975.  
  4976.      To resize the memo window with a mouse:
  4977.  
  4978.      1.Click on the maximize button in the upper right corner to
  4979.        expand the window to full size. Click on the same button to
  4980.        return the window to its original size.
  4981.  
  4982.      As an alternative, move the cursor to one of the corners of
  4983.      the window, hold down the left mouse button, and drag the
  4984.      sides of the window. In this manner, you can expand or shrink
  4985.      the window.
  4986.  
  4987.      To resize the memo window with the keyboard:
  4988.  
  4989.      1.Press ALT-F10 to expand the window to full size. Press ALT-
  4990.        F10 again to return the window to its original size.
  4991.  
  4992.      As an alternative, press ALT-F8. Then use the arrow keys to
  4993.      expand or shrink an outline of the window. When the outline
  4994.      reflects the size you want, press ENTER.
  4995.  
  4996.      You can also move the memo window in the same manner that you
  4997.      move dialog boxes or Help windows.
  4998.  
  4999.  
  5000.  
  5001.      NOTE: Character fields can't be expanded to a window, even if
  5002.      you have defined a data length longer than the display length.
  5003.      You must scroll through the text within the defined display.
  5004.  
  5005.      Creating and Modifying Custom Views
  5006.  
  5007.  
  5008.  
  5009.  
  5010.      PC-File Version 7 Users Guide                             85
  5011.  
  5012.  
  5013.  
  5014.      The View Designer is where you create or modify views. There
  5015.      is a view designer for Record views and one for Table views.
  5016.      You can create views completely from scratch, or you can
  5017.      pattern one view after another. Patterning one view after
  5018.      another will save you time if the view you would like to
  5019.      create is similar to one of the existing views, especially
  5020.      with Record views.
  5021.  
  5022.      PC-File lets you create up to 10 custom views of either type.
  5023.      For example, you could have two Table views and three Record
  5024.      views. In general, only define the views you absolutely need,
  5025.      as too many views can be confusing.
  5026.  
  5027.      A view should reflect a particular need for your data. For
  5028.      example, you may have a database that is filled with address
  5029.      information about your clients, but most of the time, you only
  5030.      need their names and phone numbers. This would be a good
  5031.      reason to have a custom view that displays only the name and
  5032.      phone number information.
  5033.  
  5034.      Starting the View Designing Process
  5035.  
  5036.      You create custom views using the Record View and Table View
  5037.      Designers. Using the View Designers you specify and lay out
  5038.      the information that you want for your custom views.
  5039.  
  5040.      To create a new view from scratch
  5041.  
  5042.      1.With a database open, choose Create from the Views menu.
  5043.  
  5044.      2.Choose No when prompted to pattern after an existing view.
  5045.  
  5046.      3.Choose whether to create a Record view or a Table view. The
  5047.        Record View Designer or the Table View Designer display
  5048.        depending on the kind of view you choose in step 3.
  5049.  
  5050.      To create a new view by patterning after an existing view:
  5051.  
  5052.      1.With a database open, choose Create from the Views menu.
  5053.  
  5054.      2.Choose Yes when prompted to pattern after an existing view.
  5055.        The View selection dialog box displays.
  5056.  
  5057.      3.Choose the view you want to pattern after.
  5058.  
  5059.      4.Choose OK.
  5060.  
  5061.      The Record View Designer or the Table View Designer displays
  5062.      depending on the kind of view you chose in step 3.
  5063.  
  5064.      The details for defining each view type are covered in the
  5065.      following sections.
  5066.  
  5067.  
  5068.      The Record View Designer
  5069.  
  5070.  
  5071.  
  5072.  
  5073.      PC-File Version 7 Users Guide                             86
  5074.  
  5075.  
  5076.  
  5077.      You customize your Record view layouts in the Record View
  5078.      Designer. Here are the parts of the Record View Designer that
  5079.      are important to understand:
  5080.  
  5081.      The Cursor
  5082.  
  5083.      The cursor can be controlled by either the mouse or the arrow
  5084.      keys in most places throughout the View designer work area. As
  5085.      long a you have a mouse installed (if you don't, see Chapter
  5086.      1, "Installing Your Mouse" for more information), the View
  5087.      designer displays both a blinking square cursor and a mouse
  5088.      pointer. In graphics display mode, the mouse pointer displays
  5089.      as an arrow. However, in character display mode, the shape of
  5090.      the mouse pointer is identical to the square cursor, but the
  5091.      mouse pointer does not blink and it is a contrasting color.
  5092.  
  5093.        Using the keyboard, move the cursor using the ARROW keys
  5094.        anywhere in the View designer.
  5095.  
  5096.        Using a mouse, move the mouse pointer to a location and then
  5097.        click the left button to move the cursor to that location.
  5098.  
  5099.      The Button Bar
  5100.  
  5101.      The button bar is the area at the bottom of the screen just
  5102.      below the View designer work area. It contains the tools you
  5103.      will use to create views. When you first enter the View
  5104.      Designer the only buttons available are Field and Text. The
  5105.      Edit, Delete and Move buttons are greyed out-they become
  5106.      available once you place and select fields or text.
  5107.  
  5108.  
  5109.      Navigating in the Record View Designer
  5110.  
  5111.      You can navigate within the Record view designer work area
  5112.      using either the mouse or the keyboard. This section describes
  5113.      the different ways to scroll the screen. The sections
  5114.      following this, describe how to place fields and text. Then
  5115.      how to select, move, modify, and delete fields and text is
  5116.      discussed.
  5117.  
  5118.      The following table describes the mouse and keyboard options
  5119.      for scrolling the Record View Designer:
  5120.  
  5121.      Function: Mouse Action: Keyboard
  5122.  
  5123.      Scroll down one line: Click the down arrow on the scroll bar:
  5124.      N/A
  5125.  
  5126.      Scroll up one line: Click the up arrow on the scroll bar: N/A
  5127.  
  5128.      Scroll down a page: Click below scroll box PGDN
  5129.  
  5130.      Scroll up a page: Click above scroll box PGUP
  5131.  
  5132.  
  5133.  
  5134.  
  5135.      PC-File Version 7 Users Guide                             87
  5136.  
  5137.  
  5138.      Jump to bottom of view: Drag scroll box to bottom of scroll
  5139.      bar: CTRL-PGDN
  5140.  
  5141.      Jump to top of view: Drag scroll box to top of scroll bar:
  5142.      CTRL-PGUP
  5143.  
  5144.  
  5145.      Placing Fields
  5146.  
  5147.      You can place a field in the work area of the Record View
  5148.      designer two ways:
  5149.  
  5150.        Using Field button on the button bar
  5151.  
  5152.        Using Insert New Item dialog box
  5153.  
  5154.      Both methods afford you the use of the keyboard or the mouse.
  5155.  
  5156.      Using the Field Button
  5157.  
  5158.      Choosing the Field button displays the Field Details dialog
  5159.      box.
  5160.  
  5161.      You choose which field to place by scrolling through the Field
  5162.      list until the desired field displays.
  5163.  
  5164.      You can also use the Field Details dialog box to specify how
  5165.      much of a field will display at once by entering that value in
  5166.      the Display Width text box. For example, you may have a field
  5167.      with a data length of 65, but you only need to see 10
  5168.      characters of the data at a time. By defining the display
  5169.      width to be 10, you create a scrolling window that displays 10
  5170.      characters of the field's data at a time.
  5171.  
  5172.      A field's display width can be no longer than the data length
  5173.      (the length you specified when defining the database
  5174.      structure) up to a maximum of 65. You cannot change the
  5175.      display width for numeric fields, they always display their
  5176.      full data length. This also holds true for logical fields
  5177.      which can only be 1 character position long.
  5178.  
  5179.      You can also check the Show Field Name option to place the
  5180.      field name immediately to the left of the field. Do not check
  5181.      this option if you want to enter your own field label that
  5182.      does not use the internal "dBASE" field name. In that case,
  5183.      place text to format the field label (see "Placing Text" later
  5184.      in this chapter for details).
  5185.  
  5186.  
  5187.      Using the Insert Item Dialog Box
  5188.  
  5189.  
  5190.  
  5191.  
  5192.      PC-File Version 7 Users Guide                             88
  5193.  
  5194.  
  5195.      You can also display the Field Details dialog box by first
  5196.      invoking the Insert Item dialog box. To do this with the
  5197.      keyboard, move the cursor to the desired location and press
  5198.      ENTER. To do this with the mouse, you must click twice in the
  5199.      same location: Click once to move the cursor to the desired
  5200.      location, then click a second time directly on the cursor.
  5201.      This is functionally very similar to "double-clicking," but
  5202.      how fast you click is not important-you must click twice in
  5203.      the same spot to display the Insert New Item dialog box.
  5204.      Either action displays the Insert dialog box.
  5205.  
  5206.      This dialog box gives you the option to place either a field
  5207.      or text. Choosing Field displays the Field Details dialog
  5208.      described earlier.
  5209.  
  5210.      Note that most fields display with the field name enclosed in
  5211.      brackets. The area enclosed in brackets shows where the data
  5212.      will display. How much space is between the brackets is
  5213.      determined by the display width you define. If the display
  5214.      width is shorter than the number of characters in the field
  5215.      name, you will not be able to see the entire field name with
  5216.      the brackets. Also, a closing bracket will not display if the
  5217.      display width is less than the number of characters in the
  5218.      field name plus two.
  5219.  
  5220.      Once a field is placed in the view, you can move, modify, or
  5221.      delete it if necessary. See "Selecting, Moving, Modifying, and
  5222.      Deleting View Objects" later in this chapter for details.
  5223.  
  5224.      To place a field using the Field button:
  5225.  
  5226.      1.Move the cursor where you want place your field.
  5227.  
  5228.      2.Click on the Field button or press ALT-F. The Field Details
  5229.        box will display. The Field box will be empty. To choose a
  5230.        field, use one of these four methods:
  5231.  
  5232.        Type the field name in the box.
  5233.  
  5234.      Or...
  5235.  
  5236.        Use the UP and DOWN ARROW keys to move through the list of
  5237.        the fields until the desired field is highlighted;
  5238.  
  5239.      Or...
  5240.  
  5241.        Press TAB to move the highlight to the down arrow button at
  5242.        the right of the field box and press ENTER to see an entire
  5243.        list of the fields. Select a field for placement and choose
  5244.        OK;
  5245.  
  5246.      Or...
  5247.  
  5248.        Using the mouse, click on the down arrow button to see an
  5249.        entire list of the fields. Select a field for placement and
  5250.        choose OK.
  5251.  
  5252.  
  5253.  
  5254.  
  5255.      PC-File Version 7 Users Guide                             89
  5256.  
  5257.  
  5258.  
  5259.      3.Change the display width if you want by typing a value in
  5260.        the Display Width text box.
  5261.  
  5262.  
  5263.      NOTE: The display width cannot exceed the data width for that
  5264.      field.
  5265.  
  5266.      4.Turn on the Show Field Name option, if desired.
  5267.  
  5268.      5.Choose OK from the Field Details box.
  5269.  
  5270.      The field is placed in the work area.
  5271.  
  5272.      To place a field using the Insert New Item dialog box:
  5273.  
  5274.      1.Move the cursor where you want to place your field.
  5275.  
  5276.      2.Click the left button on the mouse twice in the same spot,
  5277.        or press ENTER. The Insert New Item dialog box displays.
  5278.  
  5279.      3.Choose Field. The Field Details dialog box displays. The
  5280.        Field text box will be empty. Choose a field using one of
  5281.        these four methods:
  5282.  
  5283.        Type the field name in the Field text box.
  5284.  
  5285.      Or...
  5286.  
  5287.        Press DOWN ARROW to move through a list of the fields until
  5288.        the desired field is displayed.
  5289.  
  5290.      Or...
  5291.  
  5292.        Press TAB to move the highlight to the down arrow button at
  5293.        the right of the Field text box and press ENTER to see an
  5294.        entire list of the fields. Select a field for placement and
  5295.        choose OK.
  5296.  
  5297.      Or...
  5298.  
  5299.        Using the mouse, click on the down arrow button at the right
  5300.        of the Field text box to see an entire list of the fields.
  5301.        Select a field for placement and choose OK.
  5302.  
  5303.      4.Change the display width if you want by typing a value in
  5304.        the Display Width text box.
  5305.  
  5306.      5.Turn on the Show Field Name option, if desired.
  5307.  
  5308.      6.Choose OK from the Field Details box. The field is placed in
  5309.        the work area.
  5310.  
  5311.      Placing Text
  5312.  
  5313.  
  5314.  
  5315.  
  5316.      PC-File Version 7 Users Guide                             90
  5317.  
  5318.  
  5319.      There are many reasons to place text in your view. You can
  5320.      replace the "normal" field name with a text label that is
  5321.      easier to for your database users to understand. You can place
  5322.      instructions on the screen to help the user. You could list
  5323.      the choices for a given field as text in the view. Or you can
  5324.      place lines to divide the data entry screen into groups.
  5325.  
  5326.      Placing text is similar to placing fields. You can place text
  5327.      in the work area of the view designer two ways:
  5328.  
  5329.        Using Text button on the button bar
  5330.  
  5331.        Using Insert New Item dialog box
  5332.  
  5333.      You can use either method using the mouse or the keyboard.
  5334.  
  5335.      Once text is placed in the view, you can move, modify, or
  5336.      delete it if necessary. See "Selecting, Moving, Modifying, and
  5337.      Deleting View Objects" later in this chapter for details.
  5338.  
  5339.      To place text using the Text button:
  5340.  
  5341.      1.Move the cursor to where you want your text.
  5342.  
  5343.      2.Click the Text button or press ALT-T. A dialog box will
  5344.        display, prompting you to Enter Text. The Text box will be
  5345.        empty.
  5346.  
  5347.      3.Type in your text in the Enter Text box.
  5348.  
  5349.      4.Choose OK.
  5350.  
  5351.      To place text using the Insert New Item dialog box:
  5352.  
  5353.      1.Move the cursor to where you want your text.
  5354.  
  5355.      2.Click the left button on the mouse twice in the same spot,
  5356.        or press ENTER. The Insert New Item dialog box displays.
  5357.  
  5358.      3.Choose Text. A dialog box will display, prompting you to
  5359.        Enter Text.
  5360.  
  5361.      4.Type in your text in the Enter Text box.
  5362.  
  5363.      5.Choose OK.
  5364.  
  5365.      Selecting, Moving, Modifying, and Deleting View Objects
  5366.  
  5367.      Once you have fields and text (view objects) in the View
  5368.      Designer work area, you may find you need to edit them to get
  5369.      your view "just right." These options are also useful if you
  5370.      started the view definition process by patterning after
  5371.      another view.
  5372.  
  5373.  
  5374.  
  5375.  
  5376.      PC-File Version 7 Users Guide                             91
  5377.  
  5378.  
  5379.      You must first select a view object before you can work with
  5380.      it. For moving and deleting view objects, PC-File lets you
  5381.      select multiple objects at once. However, you can only select
  5382.      one object at a time when modifying the definition of a view
  5383.      object.
  5384.  
  5385.      Selecting a Single View Object
  5386.  
  5387.      You must select an object before you can make any changes to
  5388.      it. You can select an object with the keyboard or the mouse.
  5389.  
  5390.      Using the keyboard to select an object:
  5391.  
  5392.      1.Use TAB and SHIFT-TAB or the ARROW KEYS to move the cursor
  5393.        to the object.
  5394.  
  5395.      2.Press SPACEBAR.
  5396.  
  5397.      The current object displays in a different color to indicate
  5398.      that it is selected.
  5399.  
  5400.      Using the mouse to select an object:
  5401.  
  5402.      1.Move the mouse cursor over the object.
  5403.  
  5404.      2.Click the left mouse button. The current object displays in
  5405.        a different color to indicate that it is selected.
  5406.  
  5407.      Selecting Multiple View Objects
  5408.  
  5409.      You can select more than one object in the View Designer. Use
  5410.      multiple selection when there is a group of more than one
  5411.      objects that you would like to move as a group to another area
  5412.      of the work area. You can also select multiple objects to
  5413.      delete them all at once.
  5414.  
  5415.      Using the keyboard to select multiple view objects:
  5416.  
  5417.      1.Use TAB and SHIFT-TAB or the ARROW KEYS to move the cursor
  5418.        to the first object that you want to select.
  5419.  
  5420.      2.Press CTRL-SPACEBAR. The object will change color,
  5421.        signifying that it is selected.
  5422.  
  5423.      3.Move the cursor to the next object that you want to select.
  5424.  
  5425.      4.Press CTRL-SPACEBAR. Both objects display in a different
  5426.        color, signifying that they are selected.
  5427.  
  5428.      5.Continue in this fashion until all the fields you want to
  5429.        work with are selected.
  5430.  
  5431.      Using the mouse to select multiple view objects:
  5432.  
  5433.      1.Move the mouse cursor to the first object that you want to
  5434.        select.
  5435.  
  5436.  
  5437.  
  5438.  
  5439.      PC-File Version 7 Users Guide                             92
  5440.  
  5441.  
  5442.  
  5443.      2.Hold down the CTRL key and click the left mouse button. The
  5444.        object will change color, signifying that it is selected.
  5445.  
  5446.      3.Move the mouse cursor to the next object that you want to
  5447.        select.
  5448.  
  5449.      4.Hold down the CTRL key and click the left mouse button. Both
  5450.        objects display in a different color, signifying that they
  5451.        are selected.
  5452.  
  5453.      5.Continue in this fashion until all the fields you want to
  5454.        work with are selected.
  5455.  
  5456.      Moving Selected View Objects
  5457.  
  5458.      Once you have selected one or more objects, you can move them
  5459.      to another location in the work space using either the
  5460.      keyboard or mouse.
  5461.  
  5462.      Using the keyboard to move view objects:
  5463.  
  5464.      1.Select the object or group of objects that you would like to
  5465.        move.
  5466.  
  5467.      2.Choose the Move button by pressing ALT-M.
  5468.  
  5469.      3.Using the ARROW keys, move the cursor to the new location
  5470.        for the objects.
  5471.  
  5472.      4.Press SPACEBAR to de-select and "drop" the objects in the
  5473.        new location.
  5474.  
  5475.      Using the mouse to move view objects:
  5476.  
  5477.      1.Select the objects or group of objects that you would like
  5478.        to move.
  5479.  
  5480.      2.Place the mouse cursor on any one of the selected objects,
  5481.        depress the left mouse button and hold it down.
  5482.  
  5483.      3.Drag the objects to the new location and release the left
  5484.        mouse button.
  5485.  
  5486.      4.Move the mouse cursor to an unused portion of the work area
  5487.        and press the left mouse button to de-select and "drop" the
  5488.        objects in the new location.
  5489.  
  5490.      Modifying View Objects
  5491.  
  5492.      Once you have placed view objects you may find you need to
  5493.      modify the definition of the object. You can modify the
  5494.      definition of any view object while the Record View designer
  5495.      is active. You can only modify one view object at a time.
  5496.  
  5497.      To modify a view object:
  5498.  
  5499.  
  5500.  
  5501.  
  5502.      PC-File Version 7 Users Guide                             93
  5503.  
  5504.  
  5505.  
  5506.      1.Select the object to modify.
  5507.  
  5508.      2.Choose Edit from the button bar.
  5509.  
  5510.      Or...
  5511.  
  5512.        Press ENTER.
  5513.  
  5514.      Or...
  5515.  
  5516.        Click the left button on the mouse twice on the desired
  5517.        object. The appropriate dialog box will display for editing
  5518.        a field object or a text object.
  5519.  
  5520.      3.Make any changes to the object.
  5521.  
  5522.      4.Choose OK.
  5523.  
  5524.      Deleting View Objects
  5525.  
  5526.      You can delete one or more view objects after selecting them.
  5527.  
  5528.      To delete view objects:
  5529.  
  5530.      1.Select the object or group of objects you want to delete.
  5531.  
  5532.      2.Choose Delete from the button bar. A dialog box displays to
  5533.        confirm that you want to delete the selected objects.
  5534.  
  5535.      3.Choose Yes to delete the selected objects.
  5536.  
  5537.      Completing the Record View Definition Process
  5538.  
  5539.      When you are happy with the design of your custom record view,
  5540.      you need to choose OK from the button bar to continue with the
  5541.      record view definition process. This displays the Access Order
  5542.      screen.
  5543.  
  5544.      The numbers next to each of the fields indicate the current
  5545.      order the fields will be accessed when entering data. By
  5546.      default, the access order is determined by the order you
  5547.      placed the fields in your view. The first field you placed is
  5548.      numbered 1; the second field you place numbered 2, and so on.
  5549.      This sequence is irrespective of where the field is placed in
  5550.      the work area. If this order is acceptable, you can choose OK
  5551.      to continue on to name your new view and conclude the
  5552.      definition process. The following section describes how to
  5553.      customize the access order.
  5554.  
  5555.      Setting Access Order
  5556.  
  5557.  
  5558.  
  5559.  
  5560.      PC-File Version 7 Users Guide                             94
  5561.  
  5562.  
  5563.      There are many ways to access the fields in your views. You
  5564.      may want a particular field to be accessed first in spite of
  5565.      the fact that the field is in the middle of work area. Or if
  5566.      you have more than one field per line, you may prefer either a
  5567.      left to right or a top to bottom access order.
  5568.  
  5569.      PC-File lets you change the access order easily. There are
  5570.      three access orders that can be applied automatically using
  5571.      the Sequence button. Choosing the Sequence button displays the
  5572.      Field Order dialog box.
  5573.  
  5574.      Left to Right
  5575.  
  5576.      If you have two or more fields per line, you can access all
  5577.      the fields in a row from left to right before moving to the
  5578.      next row. Choosing the Left to Right option automatically
  5579.      renumbers your fields in a left to right access order.
  5580.  
  5581.      Top to Bottom
  5582.  
  5583.      If you have two or more columns of data, you may prefer to
  5584.      access all of one column top to bottom before moving to the
  5585.      next one. Choosing the Top to Bottom option automatically
  5586.      renumbers your fields in this sequence.
  5587.  
  5588.      Physical
  5589.  
  5590.      The physical order is the order of the fields in the database
  5591.      structure. When you created the database structure, the order
  5592.      in which you entered the fields determined the physical order.
  5593.      The Default Record view reflects the physical order for your
  5594.      database. Choosing the Physical (DBF) option automatically
  5595.      renumbers your fields in this sequence.
  5596.  
  5597.      Custom Order
  5598.  
  5599.      You can also change the access order to anything you want by
  5600.      typing the desired sequence number next to each field. To do
  5601.      this, you do not choose the Sequence button, simply navigate
  5602.      to each field on the Access Order screen and type the desired
  5603.      sequence number.
  5604.  
  5605.      If you are defining a custom order for a large number of
  5606.      fields the Refresh button may come in handy. Choosing the
  5607.      Refresh button resolves any duplication in the sequence you
  5608.      are defining. For example, if the first two fields in your
  5609.      view are both numbered 1, choosing Refresh will leave the
  5610.      first field numbered 1, renumber the second field to 2, and
  5611.      renumber all following fields from 3 forward. You can also use
  5612.      the Refresh button to quickly move a field to the end of the
  5613.      access order. To do this: type a number greater than the total
  5614.      number of fields in your database in the field, then choose
  5615.      Refresh.
  5616.  
  5617.      To define the view's access order automatically:
  5618.  
  5619.  
  5620.  
  5621.  
  5622.      PC-File Version 7 Users Guide                             95
  5623.  
  5624.  
  5625.      Choose the Sequence button. The Field Order dialog box
  5626.      displays.
  5627.  
  5628.      1.Choose the desired option. The access order is renumbered.
  5629.  
  5630.      2.Choose OK on the button bar to continue with the view
  5631.        definition.
  5632.  
  5633.      3.To define a custom access order:
  5634.  
  5635.      1.Navigate to a text box next to a field using TAB or SHIFT-
  5636.        TAB, the ARROW keys, or by clicking in the text box.
  5637.  
  5638.      2.Type the number for the desired sequence in the access
  5639.        order.
  5640.  
  5641.      3.Repeat steps 1 and 2 until all fields are numbered. Choose
  5642.        Refresh to resolve duplication, if desired.
  5643.  
  5644.      4.Choose OK on the button bar to continue with the view
  5645.        definition.
  5646.  
  5647.      Naming the View
  5648.  
  5649.      After you have defined the access order, you must name your
  5650.      custom Record view to complete the view definition process.
  5651.      Choosing OK from the Access Order screen displays the View
  5652.      Name dialog box:
  5653.  
  5654.      A default name of "Custom Record View" displays in the box.
  5655.      You generally will want to use a more descriptive name. Each
  5656.      view must have a unique name. You can enter a name up to 30
  5657.      characters long.
  5658.  
  5659.      To name a Record view:
  5660.  
  5661.      1.Type in a name for the view.
  5662.  
  5663.      2.Choose OK.
  5664.  
  5665.      The record view definition process is complete. You are
  5666.      returned to the main PC-File work area. Your new record view
  5667.      is now active.
  5668.  
  5669.  
  5670.  
  5671.      Overview of Creating a Custom Record View
  5672.  
  5673.      This overview will take you through the basic steps for
  5674.      creating a view. You can pattern a view after one of the
  5675.      default views or any other view that has been defined. In this
  5676.      example, you will create a completely new view.
  5677.  
  5678.      To create a new Record view:
  5679.  
  5680.      1.Open a database.
  5681.  
  5682.  
  5683.  
  5684.  
  5685.      PC-File Version 7 Users Guide                             96
  5686.  
  5687.  
  5688.  
  5689.      2.Choose Create from the View menu. A decision box will
  5690.        display.
  5691.  
  5692.      3.Choose No. The Create View dialog box will display.
  5693.  
  5694.      4.Choose Record View. You will then move into the View
  5695.        Designer. The work area is blank.
  5696.  
  5697.      5.Place your field and text objects in the work area.
  5698.  
  5699.      6.Choose OK.
  5700.  
  5701.      7.Select the sequence for access order.
  5702.  
  5703.      8.Choose OK.
  5704.  
  5705.      9.Enter a name for the View.
  5706.  
  5707.      10.  Choose OK. The newly defined Record view is active.
  5708.  
  5709.      Modifying a Custom Record View
  5710.  
  5711.      You can modify any of the Custom Record views you have created
  5712.      using the Modify option on the Views menu. You cannot modify
  5713.      the Default Record view.
  5714.  
  5715.      Choosing Modify presents you with a list of all of your custom
  5716.      views, both record and table views. The view designer that
  5717.      displays after you choose a view to modify depends on the kind
  5718.      of view you choose from the list. For this reason, you may
  5719.      want to include the kind of view as part of each custom view's
  5720.      name when creating them so that you can easily distinguish
  5721.      them.
  5722.  
  5723.      Once you have the selected view active in the Record View
  5724.      designer, you can use any of the procedures described in the
  5725.      "Adding Fields", "Adding Text", and "Selecting, Moving,
  5726.      Modifying, and Deleting View Objects" sections to modify the
  5727.      view.
  5728.  
  5729.      To modify a Record view:
  5730.  
  5731.      1.Open a database.
  5732.  
  5733.      2.Choose Modify from the Views menu.
  5734.  
  5735.      3.Select a Record view to modify.
  5736.  
  5737.      4.Choose OK. The Record View Designer displays. The work area
  5738.        displays the objects that currently make up the view.
  5739.  
  5740.      5.Edit the field and text objects in the work area.
  5741.  
  5742.      6.Choose OK.
  5743.  
  5744.  
  5745.  
  5746.  
  5747.      PC-File Version 7 Users Guide                             97
  5748.  
  5749.  
  5750.      7.Select the sequence for access order.
  5751.  
  5752.      8.Choose OK.
  5753.  
  5754.      9.Enter a name for the view.
  5755.  
  5756.      10.  Choose OK. The modification process is complete.
  5757.  
  5758.      Deleting a Record View
  5759.  
  5760.      You can delete a view at anytime. If you created a view to
  5761.      more easily complete a particular task, you can delete that
  5762.      view when you have finished.
  5763.  
  5764.      To delete a Record view:
  5765.  
  5766.      1.Choose Delete from the Views menu.
  5767.  
  5768.      2.Select the view to delete.
  5769.  
  5770.      3.Choose OK.
  5771.  
  5772.  
  5773.  
  5774.  
  5775.      PC-File Version 7 Users Guide                             98
  5776.  
  5777.  
  5778.  
  5779.      The Table View Designer
  5780.  
  5781.      Use the Table view designer to specify which fields to put
  5782.      into a custom Table view and to determine the order they
  5783.      display in. The Table View designer is accessed from the View
  5784.      menu like the Record view designer.
  5785.  
  5786.      Just like record views, you can start the Table view
  5787.      definition process by patterning after other Table views, or
  5788.      you can create them from scratch. Unlike creating Record
  5789.      views, there are not as many differences between creating a
  5790.      Table view with a pattern or without a pattern.
  5791.  
  5792.      After you choose to define a Table view, the Table View
  5793.      designer displays.
  5794.  
  5795.      The Field Name column displays each of the field names for all
  5796.      of the fields in your database. You cannot edit the field
  5797.      names.
  5798.  
  5799.      The Column column lets you determine the order the columns in
  5800.      your custom Table view will display. For example, typing a 1
  5801.      for a field causes that field's column to display at the far
  5802.      left of the Table View work area. Similarly, typing a 3 for a
  5803.      field causes that field to display as the third column from
  5804.      the left. Any field that you do not enter a number for will
  5805.      not be included in the view.
  5806.  
  5807.      The Width column defaults to displaying the current display
  5808.      width for each field. Changing the Width number increases or
  5809.      decreases how much of the field displays at once in the
  5810.      resulting Table view-the display width of each column. You
  5811.      cannot enter a width that is larger than the field's data
  5812.      length. You cannot specify a width of zero, but you can
  5813.      exclude a field from displaying by not typing a Column number
  5814.      for that field. And you cannot change the display width for
  5815.      numeric fields- numeric
  5816.      always display their full data length.
  5817.  
  5818.      Creating a Table View
  5819.  
  5820.      To create a new Table view:
  5821.  
  5822.      1.Open a database.
  5823.  
  5824.      2.Choose Create from the View menu. A decision box will
  5825.        display.
  5826.  
  5827.      3.Choose No. The Create View box will display.
  5828.  
  5829.      4.Choose Table View. The Table View Designer displays.
  5830.  
  5831.      5.Move the highlight to the column field.
  5832.  
  5833.  
  5834.  
  5835.  
  5836.      PC-File Version 7 Users Guide                             99
  5837.  
  5838.  
  5839.      6.Type the number corresponding to the column where this field
  5840.        should display.
  5841.  
  5842.      7.Move the highlight to the display width.
  5843.  
  5844.      8.Type an appropriate display width.
  5845.  
  5846.      9.Repeat this procedure for each of the fields you wish to
  5847.        display.
  5848.  
  5849.      10.  Choose OK to continue the Table View definition process.
  5850.  
  5851.      Naming the View
  5852.  
  5853.      After you have determined the columns and display widths, you
  5854.      must name your custom Table view. The default name is Custom
  5855.      Table View. You generally will want to use a more descriptive
  5856.      name. It's a good idea to include the type of view (Record or
  5857.      Table) in the name.
  5858.  
  5859.      To name a Table view:
  5860.  
  5861.      After you have determined the columns and display widths, a
  5862.      dialog box will display prompting you to enter a view name:
  5863.  
  5864.      1.Type in a name for the view. You can type up to 30 alpha-
  5865.        numeric characters.
  5866.  
  5867.      2.Choose OK.
  5868.  
  5869.      Modifying Custom Table Views
  5870.  
  5871.      You can modify any of the Custom Table views you have created
  5872.      using the Modify option on the Views menu. You cannot modify
  5873.      the Default Table view.
  5874.  
  5875.      Choosing Modify presents you with a list of all of your custom
  5876.      views, both record and table views. The view designer that
  5877.      displays after you choose a view to modify depends on the kind
  5878.      of view you choose from the list. For this reason, you may
  5879.      want to include the kind of view as part of each custom view's
  5880.      name when creating them so that you can easily distinguish
  5881.      them.
  5882.  
  5883.      Once you have the selected view in the Table View designer,
  5884.      you can modify its definition.
  5885.  
  5886.      To modify a Custom Table view:
  5887.  
  5888.      1.Open a database.
  5889.  
  5890.      2.Choose Modify from the Views menu.
  5891.  
  5892.      3.Select a Table view to modify.
  5893.  
  5894.      4.Choose OK. The Table View Designer displays.
  5895.  
  5896.  
  5897.  
  5898.  
  5899.      PC-File Version 7 Users Guide                            100
  5900.  
  5901.  
  5902.  
  5903.      5.Edit the Table view definition
  5904.  
  5905.      6.Choose OK.
  5906.  
  5907.      7.Enter a name for the view.
  5908.  
  5909.      8.Choose OK. The modification process is complete.
  5910.  
  5911.      Deleting Table Views
  5912.  
  5913.      You can delete a Table view at anytime. If you created a view
  5914.      to more easily complete a particular task, you can delete that
  5915.      view when you have finished.
  5916.  
  5917.      To delete a Table view:
  5918.  
  5919.      1.Choose Delete from the Views menu.
  5920.  
  5921.      2.Select the view to delete.
  5922.  
  5923.      3.Choose OK.
  5924.  
  5925.  
  5926.  
  5927.  
  5928.      PC-File Version 7 Users Guide                            101
  5929.  
  5930.  
  5931.  
  5932.  
  5933.      CHAPTER 6 ADDING DATA
  5934.  
  5935.      Once you create a database structure, you can begin adding
  5936.      data. Data is normally added one record at a time through the
  5937.      data entry screen. This chapter explains the procedures
  5938.      involved in adding data.
  5939.  
  5940.  
  5941.      Data Entry
  5942.  
  5943.      Data is normally added to a database on the data entry screen.
  5944.      When you add records, the current record on the screen clears
  5945.      and the cursor moves to the first entry field. You can then
  5946.      begin adding records, one at a time.
  5947.  
  5948.      You can add new records in either Record or Table views by
  5949.      choosing the Add option from the Edit menu or by choosing the
  5950.      Add button on the button bar. In a Record view, an empty
  5951.      record is displayed for you to fill out. In a Table view, an
  5952.      empty row is displayed at the top of the table for you to fill
  5953.      out. The new record is saved when you finish entering the data
  5954.      and navigate to a new record or choose to add another record.
  5955.  
  5956.      During data entry, the entire menu bar is available. If you
  5957.      perform another menu operation (except Tools menu options)
  5958.      while adding a record, the new record is automatically saved
  5959.      before proceeding.
  5960.  
  5961.      NOTE: You can also add data to a database by importing a file.
  5962.      See Chapter 13, "Utilities," for information on this method of
  5963.      adding data.
  5964.  
  5965.      You can add up to 1 billion records in a database. It is more
  5966.      likely that you will run out of space on your hard disk before
  5967.      you encounter the limits of PC-File itself.
  5968.  
  5969.      Adding a Record
  5970.  
  5971.      The procedures for entering a record are the same, whether you
  5972.      are in Record view or Table view.
  5973.  
  5974.      To add a record:
  5975.  
  5976.      1.Open the database.
  5977.  
  5978.      2.Choose Add from the Edit menu, or choose the Add button on
  5979.        the button bar (press ALT-A, if using a keyboard). An empty
  5980.        record data entry screen displays if you are in a Record
  5981.        view, or an empty row displays on the top row if you are in
  5982.        a Table view.
  5983.  
  5984.      3.Enter the record. Press TAB or ENTER to move from one field
  5985.        to the next. Use SHIFT-TAB to move to the previous field to
  5986.        correct an error.
  5987.  
  5988.  
  5989.  
  5990.  
  5991.      PC-File Version 7 Users Guide                            102
  5992.  
  5993.  
  5994.  
  5995.      4.Repeat these steps to add additional records.
  5996.  
  5997.      See Chapter 5, "Navigating Within Views" for full details on
  5998.      how to move around within a record.
  5999.  
  6000.      Saving a Record
  6001.  
  6002.      Each new record is saved as soon as you choose to add
  6003.      additional records or when you navigate to a pre-existing
  6004.      record (using the Prev and Next buttons or CTRL-P and CTRL-N).
  6005.      Also, if you perform another menu operation (except Tools menu
  6006.      options) while adding a record, the new record is
  6007.      automatically saved.
  6008.  
  6009.      Cancelling an Added Record
  6010.  
  6011.      You can cancel adding a new record at any point before the
  6012.      record is saved by choosing the Cancel button or by pressing
  6013.      ESC. A visual cue that cancelling is possible is that the
  6014.      Cancel button is greyed-out once the record has been added.
  6015.  
  6016.      Entering Data in a Memo Field
  6017.  
  6018.      Memo fields differ from other fields in that you can expand
  6019.      the display during data entry. The field expands to a window,
  6020.      allowing you to see most or all of your entry. This makes data
  6021.      entry and formatting much easier.
  6022.  
  6023.      A memo field is identifiable by the up arrow button that
  6024.      displays at the end of the field.
  6025.  
  6026.      To expand a memo field:
  6027.  
  6028.      1.Click on the button at the end of the field. From the
  6029.        keyboard, place the cursor in the field and press CTRL-E.
  6030.        The field expands to a window.
  6031.  
  6032.      If necessary, you can resize the window.
  6033.  
  6034.      To resize the window with a mouse:
  6035.  
  6036.      1.Click on the maximize button in the upper right corner to
  6037.        expand the window to full size. Click on the same button to
  6038.        return the window to its original size.
  6039.  
  6040.        As an alternative, move the cursor to one of the corners or
  6041.        sides of the window, hold down the left mouse button, and
  6042.        drag the sides of the window. In this manner, you can expand
  6043.        or shrink the window.
  6044.  
  6045.      To resize the window with the keyboard:
  6046.  
  6047.      1.Press ALT-F10 to expand the window to full size. Press ALT-
  6048.        F10 again to return the window to its original size.
  6049.  
  6050.  
  6051.  
  6052.  
  6053.      PC-File Version 7 Users Guide                            103
  6054.  
  6055.  
  6056.        As an alternative, press ALT-F8. Then use the arrow keys to
  6057.        expand or shrink an outline of the window. When the outline
  6058.        reflects the size you want, press ENTER.
  6059.  
  6060.      You can also move the memo window in the same way that you
  6061.      move dialog boxes or Help windows.
  6062.  
  6063.      To close a memo window:
  6064.  
  6065.      1.Choose the OK button. This saves the memo entry and closes
  6066.        the window.
  6067.  
  6068.        If you don't want to save your entry or changes, choose
  6069.        Cancel or press ESC instead. In that case, PC-File prompts
  6070.        you to save changes before closing the window. Choose No if
  6071.        you don't want to save your changes.
  6072.  
  6073.      Once you close a memo window, only the first line of the memo
  6074.      displays in the field.
  6075.  
  6076.      You can enter up to 5000 characters in a memo field.
  6077.  
  6078.      NOTE: You can't expand character fields to a window, even if
  6079.      you have defined a data length that is longer than the display
  6080.      length. Instead, the text scrolls to the left as you enter
  6081.      data in the field.
  6082.  
  6083.      You can also spell check the contents of your memo field using
  6084.      the Spell button. See Chapter 15, "Using the Spell Checker"
  6085.      for details on how to use the spell checker dialog box.
  6086.  
  6087.  
  6088.      Do You Get a Beep?
  6089.  
  6090.      Some field types and field attributes place limitations on the
  6091.      characters that can be entered in a field. For example, you
  6092.      can't enter letters in a numeric field, and you can only enter
  6093.      the letters y, n, t, and f in logical fields. The Character
  6094.      Restriction field attribute can further limit the characters
  6095.      that can be entered.
  6096.  
  6097.      If the computer beeps at you when you are entering data, it's
  6098.      because you're trying to enter a character that isn't
  6099.      permitted in that particular field or because the field is
  6100.      full and characters are being deleted from the end.
  6101.  
  6102.      Not Editable
  6103.  
  6104.      If the cursor skips over a field, or if PC-File beeps when you
  6105.      try to click in a field, the Not Editable field attribute has
  6106.      been set for that field. As its name implies, the Not Editable
  6107.      field attribute is used to prevent the contents of a field
  6108.      from being edited. See Chapter 4 for details on the Not
  6109.      Editable field attribute.
  6110.  
  6111.      Leaving Fields Blank
  6112.  
  6113.  
  6114.  
  6115.  
  6116.      PC-File Version 7 Users Guide                            104
  6117.  
  6118.  
  6119.  
  6120.      The field type determines what happens to a field that you
  6121.      leave blank. If the field is numeric, PC-File places a 0 in
  6122.      the blank field. If the numeric field includes a decimal, PC-
  6123.      File includes a 0 before the decimal and a 0 for each
  6124.      character to the right of the decimal. Thus, a field with
  6125.      three characters to the right of the decimal looks like this
  6126.      when left blank: 0.000.
  6127.  
  6128.      All other field types display no characters in the field if
  6129.      left blank during data entry.
  6130.  
  6131.      Using Calculation Fields
  6132.  
  6133.      If you have defined a field with a calculation, the data in
  6134.      the field is derived from the calculation. PC-File allows you
  6135.      to access calculation fields and even enter data in them.
  6136.      However, the data displayed in the record is the data derived
  6137.      from the calculation. PC- File ignores any data you have
  6138.      entered by accident or otherwise, unless you chose the Only
  6139.      When Field is Empty option when defining the calculation.
  6140.  
  6141.      To prevent yourself or other users from entering or editing
  6142.      the result of a calculation, you can add the Not Editable
  6143.      field attribute. See Chapter 4 for details on how to do this.
  6144.  
  6145.  
  6146.      Shortcuts and Helpful Tips
  6147.  
  6148.      PC-File provides a number of hot keys and other short cuts to
  6149.      make data entry as easy as possible.
  6150.  
  6151.      Duplicating Fields and Records
  6152.  
  6153.      PC-File can automatically enter data from the previously
  6154.      viewed or added record into the current record. You can choose
  6155.      between duplicating a single field or duplicating all fields
  6156.      from the cursor position to the end of the record. Either way
  6157.      can shorten the time it takes to add data.
  6158.  
  6159.      Duplicating a field overrides any default data that you
  6160.      entered in a field when defining the database.
  6161.  
  6162.      Duplicating a Single Field
  6163.  
  6164.      Duplicate a single field when only that field repeats itself,
  6165.      but not the fields that follow. For example, if you are
  6166.      entering address information, it is likely that you could
  6167.      encounter two addresses in a row from the same state, but with
  6168.      a different zip code.
  6169.  
  6170.      To duplicate a field:
  6171.  
  6172.      1.Place the cursor in the field.
  6173.  
  6174.  
  6175.  
  6176.  
  6177.      PC-File Version 7 Users Guide                            105
  6178.  
  6179.  
  6180.      2.Press CTRL-F. The data from the previously-viewed or added
  6181.        record is copied into the current record.
  6182.  
  6183.      Duplicating to the End of the Record
  6184.  
  6185.      You can duplicate all data from the current field forward in
  6186.      access order to the end of the current view. For example, you
  6187.      may find in entering addresses that the city, state, and zip
  6188.      code information is the same for the current record as for the
  6189.      previously viewed or added record. It's probably quicker to
  6190.      copy the data from the previous record than to type it in
  6191.      again.
  6192.  
  6193.      To duplicate all data to the end of the record:
  6194.  
  6195.      1.Place the cursor in the appropriate field.
  6196.  
  6197.      2.Press CTRL-R. PC-File copies the data for that field and all
  6198.        subsequent fields (in access order) from the previous
  6199.        record.
  6200.  
  6201.      Once you complete the duplication, you can make changes before
  6202.      adding the record to the database.
  6203.  
  6204.      CTRL-R is most useful in either of two situations:
  6205.  
  6206.        When two records are almost exactly the same, and you just
  6207.        have to change one or two fields after making the
  6208.        duplication.
  6209.  
  6210.        When the last few fields in a record are the same. In that
  6211.        case, enter the information in the early fields, then press
  6212.        CTRL-R when you reach those fields that can be copied from
  6213.        one record to the next.
  6214.  
  6215.      NOTE: Be cautious in using CTRL-R if your database contains a
  6216.      field with the Serial Number field attribute. PC-File makes an
  6217.      exact duplicate with CTRL-R, including the Serial Number
  6218.      field. Thus, you would end up with two records with the same
  6219.      number in that particular field. You can get around this if
  6220.      the Serial Number field is the first field in the record. In
  6221.      that case, move the cursor to the second field before pressing
  6222.      CTRL-R.
  6223.  
  6224.      Memorizing Data
  6225.  
  6226.      If you want to enter the same data in a field quite often, you
  6227.      can copy the data to the buffer and paste it into a field
  6228.      whenever necessary. To do that, use the read from and write to
  6229.      hot keys. These hot keys are explained in detail in Chapter 7,
  6230.      "Finding and Modifying Data."
  6231.  
  6232.  
  6233.  
  6234.  
  6235.      PC-File Version 7 Users Guide                            106
  6236.  
  6237.  
  6238.      NOTE: If you find yourself using the buffer for one particular
  6239.      field a lot of the time, consider entering default data in the
  6240.      field instead. You can always overwrite the default data if
  6241.      necessary. See the section on entering default data in Chapter
  6242.      2, "Creating a Database."
  6243.  
  6244.      Using the Flip Data Character
  6245.  
  6246.      PC-File provides the tilde (~) character to flip data within a
  6247.      field. The tilde is most often used in name fields that
  6248.      include both the first and last name within a single field.
  6249.      Being able to flip the data lets you enter the last name first
  6250.      for sorting purposes, then flip the last name and first name
  6251.      to print mailing labels.
  6252.  
  6253.  
  6254.      NOTE: For most databases, it is recommended that you place
  6255.      first names and last names in separate fields. If you do that,
  6256.      you don't need the tilde.
  6257.  
  6258.      To flip data, type the tilde between the two parts of the
  6259.      field that you want to flip in every record you enter. Then,
  6260.      when you print out a report, whether on-screen or to a
  6261.      printer, the two parts of the field display in flipped order.
  6262.  
  6263.      Thus, if you enter Ratite ~Janet in the field when adding
  6264.      data, Janet Ratite appears in the report. Be sure to enter a
  6265.      space between the last name and the tilde that precedes the
  6266.      first name.
  6267.  
  6268.      NOTE: Make sure the flip data option is turned ON (checked) in
  6269.      the Print options dialog box.
  6270.  
  6271.      You can also flip data when you are adding or modifying a
  6272.      record. With the cursor in the field you want to flip, press
  6273.      CTRL-O to flip the data. This is most useful if you have
  6274.      entered dozens of names in one order, then realize you want
  6275.      them in reverse order for sorting. You can modify each record
  6276.      by placing the cursor in the proper field and pressing CTRL-O.
  6277.      This is much faster than retyping each one.
  6278.  
  6279.  
  6280.  
  6281.  
  6282.      PC-File Version 7 Users Guide                            107
  6283.  
  6284.  
  6285.  
  6286.      CHAPTER 7 FINDING AND MODIFYING DATA
  6287.  
  6288.      To find data, choose one of two powerful search options. To
  6289.      modify records, display a record, click in the field or press
  6290.      ALT to move the cursor into the record and then TAB to the
  6291.      field, and make your changes. These operations and more are
  6292.      covered in this chapter.
  6293.  
  6294.      The Search and Modify Options
  6295.  
  6296.      Locating data, viewing that data, and making changes to it are
  6297.      key ingredients of any database. PC-File provides a variety of
  6298.      alternatives for all three operations.
  6299.  
  6300.      For the most part, these operations are activated or performed
  6301.      from the options on the Edit and Search menus. These menus are
  6302.      illustrated below and each of the options described briefly.
  6303.      You can also locate records by simply browsing through the
  6304.      database as described in Chapter 5, "Views."
  6305.  
  6306.      The Search Menu
  6307.  
  6308.      Use the options on the Search menu to navigate through your
  6309.      records:
  6310.  
  6311.      Choose Beginning to display the first record in the database,
  6312.      based on the current index. Choose End to display the last
  6313.      record, also based on the current index. If you change
  6314.      indexes, these records are likely to change.
  6315.  
  6316.      You can also choose the Search button on the button bar to
  6317.      conduct a Simple search.
  6318.  
  6319.      The Edit Menu
  6320.  
  6321.  
  6322.      With the exception of Add, the options on the Edit menu are
  6323.      used for making changes to your data. You can make changes as
  6324.      long as the Read- only option is not checked. Checking the
  6325.      Read-only option permits you to view the data, but allows no
  6326.      access for making changes.
  6327.  
  6328.      Switching edit modes and making changes is covered in detail
  6329.      in the section "Modifying and Deleting Records," at the end of
  6330.      this chapter.
  6331.  
  6332.      The Add option is covered in Chapter 6, "Adding Data."
  6333.  
  6334.      Paging Through Records
  6335.  
  6336.  
  6337.  
  6338.  
  6339.      PC-File Version 7 Users Guide                            108
  6340.  
  6341.  
  6342.      For the most part, finding data means conducting a search for
  6343.      that data. You define specific criteria, then let PC-File
  6344.      search for the records that meet the criteria. However, you
  6345.      can also page through your records. PC-File lets you page
  6346.      through one record at a time in a Record view or a screen's
  6347.      worth of records in a Table view.
  6348.  
  6349.      Whether you page through one record or many records at a time
  6350.      depends on the current view. Display a Record view to page
  6351.      through one at a time. Use the Next and Prev buttons or CTRL-N
  6352.      and CTRL-P to page forward and backward in your database.
  6353.  
  6354.      Displaying a Table view lets you page through your records a
  6355.      screenful at a time. Use PGDN and PGUP to display the next
  6356.      screen or the previous screen of records. You can also use the
  6357.      UP and DOWN ARROW keys to move one record at a time.
  6358.      Alternatively, you can use the vertical scroll bar on the
  6359.      right side of a table view to page through records in a Table
  6360.      view.
  6361.  
  6362.      See Chapter 5, "Navigating Within Views" for full details on
  6363.      how to navigate within Record and Table views.
  6364.  
  6365.      You can also jump to the first or last record in your
  6366.      database, based on the current index, at any time. To display
  6367.      the first record or group of records, choose Beginning from
  6368.      the Search menu. To display the last record or group of
  6369.      records, choose End from the Search menu.
  6370.  
  6371.      Conducting a Search
  6372.  
  6373.      PC-File allows up to a billion records in a database, so fast
  6374.      and efficient methods of searching for data are an important
  6375.      feature of the program. Paging through your records, either in
  6376.      Record or Table view, can be useful, but offers little help
  6377.      when you want to find information in a large database quickly
  6378.      and easily.
  6379.  
  6380.      PC-File provides three powerful search options:
  6381.  
  6382.        Simple
  6383.  
  6384.        Formula
  6385.  
  6386.        Global
  6387.  
  6388.      A Simple search satisfies most search needs and is easy to
  6389.      learn and use. A Formula search provides more power than a
  6390.      Simple search, but requires you to enter a search command. Use
  6391.      a Global search to look in all but memo fields for specific
  6392.      text.
  6393.  
  6394.      Within Simple and Formula searches, you can look for records
  6395.      that "sound like" the search criteria, scan through a specific
  6396.      field for a word or part of a word, enter wildcard characters,
  6397.      and use comparison operators.
  6398.  
  6399.  
  6400.  
  6401.  
  6402.      PC-File Version 7 Users Guide                            109
  6403.  
  6404.  
  6405.  
  6406.      When you conduct a search, PC-File displays the first record
  6407.      found that satisfies the search criteria. To see the next
  6408.      record that satisfies the search criteria, click on the Again
  6409.      button or press CTRL-A.
  6410.  
  6411.      Choosing the Search Type
  6412.  
  6413.      For the most part, you will probably conduct Simple searches
  6414.      when looking for specific records. A Simple search is quicker
  6415.      and easier to conduct and powerful enough for most needs.
  6416.      However, there are some kinds of searches that can only be
  6417.      done with a Formula search. A Global search is most useful for
  6418.      searching for data when you are unsure in which field you need
  6419.      to look.
  6420.  
  6421.      Advantages of a Simple Search
  6422.  
  6423.      When you choose Simple search from the Search menu, PC-File
  6424.      displays your data entry screen and lets you enter the search
  6425.      criteria in the appropriate field(s).
  6426.  
  6427.      To search for all members in your database that live in
  6428.      Seattle, you simply type the word Seattle in the CITY field,
  6429.      as shown above.
  6430.  
  6431.      There are several advantages of a Simple search when compared
  6432.      to a Formula search. A Simple search:
  6433.  
  6434.        Is more intuitive
  6435.  
  6436.        Requires fewer keystrokes
  6437.  
  6438.        Allows less likelihood of making a typing mistake
  6439.  
  6440.        Doesn't require a knowledge of search command syntax
  6441.  
  6442.      It is likely you will conduct Simple searches in all cases
  6443.      except those that require a Formula search.
  6444.  
  6445.      Advantages of a Formula Search
  6446.  
  6447.      When you choose Formula from the Search menu, PC-File displays
  6448.      a dialog box for entering a search command.
  6449.  
  6450.      A Formula search is more powerful than a Simple search. You
  6451.      can conduct certain kinds of searches with a Formula search
  6452.      that you can't with a Simple search. Among them are searches
  6453.      that:
  6454.  
  6455.        Include more than one search criterion within a particular
  6456.        field
  6457.  
  6458.        Use OR statements
  6459.  
  6460.        Require a calculation
  6461.  
  6462.  
  6463.  
  6464.  
  6465.      PC-File Version 7 Users Guide                            110
  6466.  
  6467.  
  6468.  
  6469.      If you want to search for all members that live in either
  6470.      Seattle OR Portland, or you want to search for all members
  6471.      that live in Seattle OR have a last name of Jones, you must
  6472.      use a Formula search. (You could search for all members that
  6473.      live in Seattle AND have a last name of Jones using a Simple
  6474.      search, but to use OR, you must conduct a Formula search.)
  6475.  
  6476.      Advantages of a Global Search
  6477.  
  6478.      A Global search lets you scan through all the fields in your
  6479.      database, other than memo fields, for a specific bit of
  6480.      information or text. It is most useful when you have multiple
  6481.      fields that contain the same type of information. For example,
  6482.      if you have several name fields or several fields listing
  6483.      parts or parts numbers, use a Global search if you are unsure
  6484.      which field contains the data you are looking for.
  6485.  
  6486.      On the other hand, if you know which field you want to look
  6487.      in, conduct a Simple search instead, using the scan-across
  6488.      search method (described below). The Simple search is faster,
  6489.      as PC-File doesn't have to look through all the fields for the
  6490.      information. You can also use the scan- across method to
  6491.      conduct searches in memo fields, which you can't do with a
  6492.      Global search.
  6493.  
  6494.      Index Autoswitching
  6495.  
  6496.      On large databases, indexing the field you are searching on
  6497.      will speed up most Simple and Formula searches quite
  6498.      dramatically. (See Chapter 8, "Sorting and Indexing Data" for
  6499.      details on how to define indexes.) This increase in searching
  6500.      speed will only occur if the index for the field you are
  6501.      searching on is current when searching is performed. The
  6502.      current index is always indicated on the Status line on the
  6503.      bottom of the screen.
  6504.  
  6505.      By default, PC-File will automatically switch to the best
  6506.      index (if one is available) when performing a Simple or
  6507.      Formula search. This feature is called autoswitching.
  6508.  
  6509.      For example, suppose your database has an index on the ZIPCODE
  6510.      field and an index on the LASTNAME field. If the LASTNAME
  6511.      index was current when you conducted a Simple search on the
  6512.      ZIPCODE field, PC-File would autoswitch to the ZIPCODE index
  6513.      to perform the search as quickly as possible.
  6514.  
  6515.      There may be occasions where you want to prevent autoswitching
  6516.      from occuring. For example, suppose you have indexes on the
  6517.      STATE and the ZIPCODE fields. You might enter a search to find
  6518.      records for a particular state, but you want the records found
  6519.      to display in the ZIPCODE order. With autoswitching on, PC-
  6520.      File would always switch to the STATE. However, the bottom
  6521.      line of the Simple screen and Formula search dialog box has
  6522.      two option buttons to toggle autoswitching on and off.
  6523.      Choosing the No
  6524.  
  6525.  
  6526.  
  6527.  
  6528.      PC-File Version 7 Users Guide                            111
  6529.  
  6530.  
  6531.      button turns autoswitching off, choosing the Yes button turns
  6532.      autoswitching on.
  6533.  
  6534.      There is also an Index button in the lower left corner of the
  6535.      Simple search screen and Formula search dialog box. Choosing
  6536.      this button lets you manually switch the current index. See
  6537.      Chapter 8, "Switching Indexes" for details on how to switch
  6538.      indexes.
  6539.  
  6540.      Methods of Entering Search Criteria
  6541.  
  6542.      There are five different ways of entering search criteria in
  6543.      Simple and Formula searches. They include
  6544.  
  6545.        Generic
  6546.  
  6547.        Scan-across
  6548.  
  6549.        Sounds-like
  6550.  
  6551.        Wildcard
  6552.  
  6553.        Comparison
  6554.  
  6555.      All five methods can be used in both Simple and Formula
  6556.      searches. You can also combine the methods within one search,
  6557.      though there are some limitations that arise. For example, you
  6558.      cannot use the scan-across method in numeric fields. The
  6559.      limitations are covered in the discussion on each method
  6560.      below.
  6561.  
  6562.      NOTE: Determine case sensitivity in the Configuration option
  6563.      on the Utilities menu. If you make searches case sensitive,
  6564.      entering SEATTLE will not find Seattle or SEAttle. If you make
  6565.      searches case insensitive, then SEATTLE retrieves records for
  6566.      Seattle or SEAttle.
  6567.  
  6568.      NOTE: Search criteria in Simple and Formula searches require
  6569.      the use of specific characters. Those characters are ?, ~, and
  6570.      _. Because these characters are part of the search syntax, you
  6571.      cannot search for them using Simple or Formula searches.
  6572.      However, you can search for these characters using the Global
  6573.      search method.
  6574.  
  6575.      Generic Searches
  6576.  
  6577.      The generic search is the default method of entering search
  6578.      criteria. In a generic search, you enter the search criteria
  6579.      just as it appears in the record. For example, to retrieve
  6580.      records in which the city is listed as Seattle, type Seattle
  6581.      in the City field.
  6582.  
  6583.      You can also enter part of a word, but it must be the first
  6584.      part. For example, type le to retrieve records that start with
  6585.      LE in the field, such as LEOPARD or LEMUR. Records containing
  6586.      CATTLE or TURTLE would not be retrieved.
  6587.  
  6588.  
  6589.  
  6590.  
  6591.      PC-File Version 7 Users Guide                            112
  6592.  
  6593.  
  6594.  
  6595.      For the Simple search option, a generic search requires no
  6596.      special characters. Enter just the search criteria themselves.
  6597.  
  6598.      For the Formula search option, place quotation marks " "
  6599.      around the search criteria for generic searches. The quotation
  6600.      marks are part of the command syntax.
  6601.  
  6602.      If you only want to find occurrences of JOHN and not JOHNSON
  6603.      or JOHNSTON, follow the N with a space.
  6604.  
  6605.      Use only generic searches or comparison searches when
  6606.      searching for values in numeric fields. In addition, you must
  6607.      search for the actual value; you can't search for part of the
  6608.      value. For example, if you enter 1 in a numeric field search,
  6609.      PC-File only finds records where the value is 1, not 12 or
  6610.      100.
  6611.  
  6612.      Scan-across Searches
  6613.  
  6614.      Use the tilde (~) to look for an occurrence of a word or
  6615.      characters anywhere within a field. Thus, ~LE would retrieve
  6616.      records for Leopard, Lemur, Cattle, and Turtle.
  6617.  
  6618.      If you only want to find occurrences that end in LE, follow
  6619.      the LE with a space. Only Cattle and Turtle would be retrieved
  6620.      in that case.
  6621.  
  6622.      In Formula searches, place the tilde before and after the
  6623.      search criteria, like so: ~LE~ or ~PARD~.
  6624.  
  6625.      You can't use a scan-across search in a numeric field.
  6626.  
  6627.      Sounds-like Searches
  6628.  
  6629.      Use the question mark (?) to conduct a sounds-like search. A
  6630.      sounds- like search retrieves records that sound the same as
  6631.      the search information. This is used to find a name when
  6632.      you're uncertain of the spelling. For example, if you enter
  6633.      ?Rawlins, PC-File retrieves records such as Rollings, Rollins,
  6634.      Rawlings, and Rawlins.
  6635.  
  6636.      The first character of a sounds-like search must be the same.
  6637.      For example, you wouldn't be able to find Cranston if you
  6638.      asked for ?Kranston.
  6639.  
  6640.      Place a question mark before and after the search criteria in
  6641.      Formula searches, like so: ?RAWLINS? or ?SMITH?. In Simple
  6642.      searches, place the question mark in front of the search
  6643.      criteria only.
  6644.  
  6645.      Sounds-like searches can only be conducted on character
  6646.      fields.
  6647.  
  6648.      Wildcard Searches
  6649.  
  6650.  
  6651.  
  6652.  
  6653.      PC-File Version 7 Users Guide                            113
  6654.  
  6655.  
  6656.      Use an underscore ( _ ) to indicate wildcard characters
  6657.      appearing in fixed positions within a field. For example,
  6658.      suppose you wanted to find all members with a renewal date in
  6659.      the month of May. You could enter 05/__/____ or 05/__/1993 in
  6660.      the renewal date field to display those records. This example
  6661.      assumes you are using the default MM/DD/YYYY date display
  6662.      format. Enter wildcard searches on dates using the field's
  6663.      current display format.
  6664.  
  6665.      NOTE: When searching on a date field, you must enter the date
  6666.      in the the field's current display format. Also, if you enter
  6667.      searches on dates using the display format, you must include
  6668.      the separator characters. For example, if you are using the
  6669.      MM/DD/YYYY format, include both slashes in the search
  6670.      expression.
  6671.  
  6672.      When you enter the wildcard character as part of the search
  6673.      criteria, PC-File accepts any character found in that
  6674.      position.
  6675.  
  6676.      You cannot use wildcard characters in combination with sounds-
  6677.      like or global searches. Also, you can't use wildcards to
  6678.      search numeric fields. This is because a number in a numeric
  6679.      field is handled as a single value-PC-File does not "see" it
  6680.      as a string of separate characters. However, you can perform a
  6681.      wildcard search on a number stored in a character field.
  6682.  
  6683.      Comparison Searches
  6684.  
  6685.      Use comparison operator symbols when performing a simple
  6686.      search to search for data that is "greater than," "greater
  6687.      than or equal to," "less than," "less than or equal to," or
  6688.      "not equal to." You do this by typing the appropriate
  6689.      comparison operator followed by the search data on the Simple
  6690.      Search screen. You can use any of the following comparison
  6691.      symbols:
  6692.  
  6693.      Symbol    Comparison Operation
  6694.  
  6695.      >         Greater than
  6696.  
  6697.      <         Less than
  6698.  
  6699.      >=        Greater than or equal to
  6700.  
  6701.      <=        Less than or equal to
  6702.  
  6703.      ! or !=   Not equal to (the equals sign is not 
  6704.           required)
  6705.  
  6706.      For example, suppose you want to search for all checks with
  6707.      numbers greater than 1000 and dates on or before (less than or
  6708.      equal to) January 31, 1993. To do this you would type >1000 in
  6709.      your Check Number field and <=01/31/93 in your Check Date
  6710.      field on the Simple search screen.
  6711.  
  6712.  
  6713.  
  6714.  
  6715.      PC-File Version 7 Users Guide                            114
  6716.  
  6717.  
  6718.      NOTE: The number of spaces available to enter search criteria
  6719.      on the Simple search screen are limited to 2 characters
  6720.      greater than the display length of the field, except for date
  6721.      and memo fields. This provides 2 extra spaces for you to enter
  6722.      your comparison operator, if necessary. The contents of the
  6723.      search field will scroll 2 spaces if you enter a search
  6724.      criterion that is longer than the field's display width.
  6725.      Searches on dates will scroll up to 12 spaces, and searches on
  6726.      memos will scroll up to 65 spaces.
  6727.  
  6728.      You cannot include more than one comparison per field when
  6729.      conducting a Simple search. For example, you cannot enter
  6730.      >1000 & <1100 to find records greater than 1000 and less than
  6731.      1100. You must use a Formula search to do this.
  6732.  
  6733.      Also, in a Simple search, all search criteria must be met to
  6734.      find a record. The Simple search mentioned in the Check Number
  6735.      example above would be equivalent to a Formula search like
  6736.      this:
  6737.  
  6738.           CHECK_NO > 1000 & CHK_DATE <= "01/31/92"
  6739.  
  6740.      A simple search is always equivalent to a Formula search using
  6741.      "and" operations: "find records where both x and y are true."
  6742.      Any search that requires "or" operations must be entered as a
  6743.      Formula search.
  6744.  
  6745.      See "Conducting a Formula Search" for details on how to use
  6746.      comparison operators in Formula searches.
  6747.  
  6748.      Conducting a Simple Search
  6749.  
  6750.      Generally, you'll want to conduct a Simple search unless the
  6751.      complexity of the search criteria requires that you conduct a
  6752.      Formula search. Use any of the five methods of entering search
  6753.      criteria described above when conducting a Simple search.
  6754.  
  6755.      To conduct a Simple search:
  6756.  
  6757.      1.Choose the Search button or press CTRL-S. The Simple search
  6758.        screen displays.
  6759.  
  6760.      2.Enter the search criteria in the appropriate field(s).
  6761.  
  6762.      3.Turn off Autoswitch, if you want to remain in the current
  6763.        index. See "Index Autoswitching" earlier in this chapter for
  6764.        details.
  6765.  
  6766.      4.Choose OK to begin the search. PC-File displays the first
  6767.        record that meets the criteria.
  6768.  
  6769.      5.Choose the Again button or press CTRL-A to display the next
  6770.        record that meets the criteria. Repeat this step to retrieve
  6771.        all additional records that meet the criteria.
  6772.  
  6773.  
  6774.  
  6775.  
  6776.      PC-File Version 7 Users Guide                            115
  6777.  
  6778.  
  6779.      PC-File interprets unused character positions that follow your
  6780.      criteria as wildcards. Thus, if you search for the name Anders
  6781.      in a last name field, you'll find records for Anders,
  6782.      Anderson, and Andersen. If you only want to find records for
  6783.      Anders, enter a space with SPACEBAR after the last character
  6784.      in Anders.
  6785.  
  6786.      You can enter search criteria in a single field or in multiple
  6787.      fields. For example, to search for members living in Seattle,
  6788.      move the cursor to the City field and type Seattle. That is a
  6789.      single field search.
  6790.  
  6791.      A multiple-field search is a more selective type of search. If
  6792.      you enter search data in multiple fields, all of the data must
  6793.      match before the record is considered found.
  6794.  
  6795.      For example, you can search for zoo members living in Seattle
  6796.      that are life members.
  6797.  
  6798.      Only the records for those people that are both life members
  6799.      and live in Seattle are found as a result of the above search.
  6800.  
  6801.      Conducting a Formula Search
  6802.  
  6803.      A Formula search provides more power than a Simple search.
  6804.      With a Formula search, you enter the entire search command
  6805.      rather than just the search criteria. This gives you more
  6806.      flexibility when conducting the search.
  6807.  
  6808.      For example, you can enter multiple search criteria for a
  6809.      specific field. And you can use OR as a logical operator, as
  6810.      well as AND.
  6811.  
  6812.      To conduct a Formula search:
  6813.  
  6814.      1.Choose Search from the menu bar.
  6815.  
  6816.      2.Choose Formula from the Search menu. A dialog box appears.
  6817.  
  6818.      3.Enter the search command in the text box.
  6819.  
  6820.      4.Turn off Autoswitch, if you want to remain in the current
  6821.        index. See "Index Autoswitching" earlier in this chapter for
  6822.        details.
  6823.  
  6824.      5.Choose OK to begin the search. The first record that meets
  6825.        the search criteria displays.
  6826.  
  6827.      6.Click on the Again button or press CTRL-A to display
  6828.        additional records that meet the search criteria. The
  6829.        Formula search dialog box allows up to 250 characters.
  6830.  
  6831.      The Format of a Search Command
  6832.  
  6833.      A Formula search command follows a basic format containing a
  6834.      Search Location, a Comparison Operator and Search Criteria.
  6835.  
  6836.  
  6837.  
  6838.  
  6839.      PC-File Version 7 Users Guide                            116
  6840.  
  6841.  
  6842.  
  6843.      The search location always appears on the left side of the
  6844.      comparison operator and the search criteria on the right side.
  6845.  
  6846.  
  6847.      Another example illustrates a more involved search command:
  6848.  
  6849.      LASTNM = "SMITH" | LASTNM = "JONES" & CITY = SEATTLE"
  6850.  
  6851.      Translated into plain English, this command says "First find
  6852.      anyone named SMITH or JONES, then make sure the city is
  6853.      SEATTLE."
  6854.  
  6855.      You can include up to 34 comparisons in a search command. Use
  6856.      spaces as you see fit to improve readability. They don't
  6857.      affect the command, except when used in search criteria to
  6858.      indicate a space.
  6859.  
  6860.      The components of a search command are explained in detail
  6861.      below, followed by examples of various search commands.
  6862.  
  6863.      Search Location
  6864.  
  6865.      The search location is normally a field in the database, but
  6866.      can also be a calculation. The search location always appears
  6867.      on the left side of a comparison. Enter field names without
  6868.      any punctuation, as follows:
  6869.  
  6870.           LASTNAME = "SMITH"
  6871.  
  6872.      However, you can enter just enough of the field name so that
  6873.      PC-File recognizes it as unique in the database. Thus
  6874.  
  6875.           LA = "SMITH"
  6876.  
  6877.      would be fine as long as no other field in the database begins
  6878.      with LA.
  6879.  
  6880.      You must enter a search location for each comparison within a
  6881.      command. For example, you cannot enter
  6882.  
  6883.           LASTNAME = "SMITH" | "JONES"
  6884.           **INCORRECT**
  6885.  
  6886.      You must enter a field name for each criteria separately, like
  6887.      this:
  6888.  
  6889.           LASTNAME = "SMITH" | LASTNAME = "JONES"      **CORRECT**
  6890.  
  6891.  
  6892.      A calculation used as a search location can be any valid
  6893.      numeric or date calculation. You can't use relational lookups.
  6894.      The following example illustrates a calculation involving two
  6895.      fields:
  6896.  
  6897.           (TOTALDUE - AMTPD) >= 500
  6898.  
  6899.  
  6900.  
  6901.  
  6902.      PC-File Version 7 Users Guide                            117
  6903.  
  6904.  
  6905.  
  6906.      In this calculation, the program searches for all records
  6907.      where the balance due is greater than or equal to $500.
  6908.  
  6909.  
  6910.      Comparison Operators
  6911.  
  6912.      Comparison operators determine the relationship between the
  6913.      search location and the search criteria. The six comparison
  6914.      operators are:
  6915.  
  6916.      Equal to                 =
  6917.      Not equal to             !=
  6918.      Greater than             >
  6919.      Less than                <
  6920.      Greater than or equal    <=
  6921.      Less than or equal to    <=
  6922.  
  6923.      The operator Equal to (=) means that the comparison is exact.
  6924.      The command
  6925.  
  6926.           LASTNAME = "SMITH"
  6927.  
  6928.      will not find SMYTH (unless you do a sounds-like search). It
  6929.      will only find SMITH.
  6930.  
  6931.      PC-File follows the ASCII table in determining the order of
  6932.      alphanumeric characters. Greater than refers to those
  6933.      characters with higher numbers on the ASCII table. Less than
  6934.      is the opposite. Case insensitivity changes the rules
  6935.      slightly, making SMITH also equal to Smith, rather than Less
  6936.      than (Uppercase letters are lower in the ASCII table than
  6937.      lowercase letters).
  6938.  
  6939.      The operators Not equal to (!=), Greater than or equal to
  6940.      (>=), and Less than or equal to (<=) should always be entered
  6941.      in the order shown. Do not place the equal sign first.
  6942.  
  6943.      Search Criteria
  6944.  
  6945.      The right side of each comparison is normally a constant, but
  6946.      can also be a calculation or a field. In a Formula search, the
  6947.      constant must be surrounded by special characters. The only
  6948.      exception occurs when you use a numeric value as a constant.
  6949.      In that case, quotation marks are optional.
  6950.  
  6951.      The characters differ depending on the method of entering
  6952.      search criteria, as follows:
  6953.  
  6954.      Generic Quotation marks       (")  "SMITH"
  6955.  
  6956.      Scan-across Tilde             (~)       ~MIT~
  6957.  
  6958.      Sounds-like Question mark     (?)  ?SMITH?
  6959.  
  6960.  
  6961.  
  6962.  
  6963.      PC-File Version 7 Users Guide                            118
  6964.  
  6965.  
  6966.      The wildcard character ( _ ) must be used only in combination
  6967.      with generic and scan-across searches. You can't use wildcards
  6968.      with sounds- like searches.
  6969.  
  6970.      Logical Operators
  6971.  
  6972.      Use logical operators to link multiple comparisons. Use the
  6973.      ampersand (&) for AND and the pipe (|) for OR. On most
  6974.      keyboards, the pipe appears on the same key as the backslash.
  6975.      It is not a colon. PC-File does not recognize the words OR and
  6976.      AND as logical operators, so be sure to use the symbols
  6977.      instead.
  6978.  
  6979.      The operator AND means that both comparisons must be met to
  6980.      satisfy the search criteria. The operator OR means that either
  6981.      can be met. Normally OR is used when you are linking
  6982.      comparisons for the same field and AND is used when linking
  6983.      comparisons from different fields. Thus, in the search command
  6984.  
  6985.           STATE = "WA" | STATE = "CA"
  6986.  
  6987.      you must use the operator OR because both abbreviations do not
  6988.      appear in one record.
  6989.  
  6990.      Parentheses
  6991.  
  6992.      Parentheses are used to group comparisons logically. In many
  6993.      search commands, they are necessary to make the command work
  6994.      properly. Without them you would retrieve a different group of
  6995.      records.
  6996.  
  6997.      In most cases, a command that includes both logical operators
  6998.      requires parentheses to make the command work properly. For
  6999.      example, the command
  7000.  
  7001.           CITY = "SEATTLE" & (NAME = "JONES" | NAME =  "SMITH")
  7002.  
  7003.      would produce a different result without the parentheses. As
  7004.      it is, the search retrieves all records in which the city is
  7005.      SEATTLE and the name is either JONES or SMITH. Remove the
  7006.      parentheses and the command retrieves all records in which the
  7007.      city is SEATTLE and the name is JONES, plus those records for
  7008.      which the name is SMITH, no matter what the city.
  7009.  
  7010.      The reason it works this way is that PC-File reads commands
  7011.      from left to right. However, it disregards the previous
  7012.      logical operator when it encounters a new logical operator,
  7013.      unless it also encounters parentheses. Parentheses force the
  7014.      program to consider the information within the parentheses as
  7015.      a unit. Thus, with the parentheses in place in the above
  7016.      example, there are two main parts to the search command, which
  7017.      it considers together. Without the parentheses, PC-File
  7018.      disregards the AND when
  7019.      it gets to the OR, and treats it separately.
  7020.  
  7021.  
  7022.  
  7023.  
  7024.      PC-File Version 7 Users Guide                            119
  7025.  
  7026.  
  7027.      You normally don't need parentheses when you only use OR or
  7028.      only use AND in the command. For example, in the command
  7029.  
  7030.           STATE = "WA" | STATE = "CA" | STATE = "NY"
  7031.  
  7032.      parentheses are unnecessary. The same is true with the command
  7033.  
  7034.           NAME = "JONES" & STATE = "WA" & YEAR = "1985"
  7035.  
  7036.      However, in the search command
  7037.  
  7038.           STATE = "WA" & (NAME != ?SMITH? & NAME !=    ?JONES?)
  7039.  
  7040.      the parentheses make a difference in the records retrieved.
  7041.  
  7042.      Examples of Formula Search Commands
  7043.  
  7044.      A number of examples further illustrate the syntax used in
  7045.      Formula search commands. The examples are shown in uppercase
  7046.      letters, but uppercase letters are not required.
  7047.  
  7048.      Example #1
  7049.  
  7050.      The following example can also be performed as a Simple search
  7051.      by typing >150 into the AMOUNT field on the Simple search
  7052.      screen.
  7053.  
  7054.           AMOUNT > 150
  7055.  
  7056.      Example #2
  7057.  
  7058.      The following example can also be performed as a Simple search
  7059.      because an AND operation is assumed when using multiple search
  7060.      criteria in a Simple search. To perform this search as a
  7061.      Simple search, type <150 into the AMOUNT field and type
  7062.      >=03/15/91 into the DATE field.
  7063.  
  7064.           AMOUNT < 150 & DATE >= "03/15/91"
  7065.  
  7066.      Using the logical operator for AND requires that both criteria
  7067.      be met. As with the previous example, numeric values (150 in
  7068.      this case) don't require quotation marks. PC-File would find
  7069.      the same records if you did use quotation marks, though.
  7070.  
  7071.      Example #3
  7072.  
  7073.      In the following example, PC-File searches for all records
  7074.      between the two dates. This search cannot be performed as a
  7075.      Simple search because you cannot enter multiple criteria for
  7076.      one field.
  7077.  
  7078.           DATE > "03/15/91" & DATE < "03/31/91"
  7079.  
  7080.      Example #4
  7081.  
  7082.  
  7083.  
  7084.  
  7085.      PC-File Version 7 Users Guide                            120
  7086.  
  7087.  
  7088.      In the following example, PC-File searches for records with
  7089.      one or the other member number. The numbers are enclosed in
  7090.      quotation marks because Member_no is a character field, not a
  7091.      numeric field. This and all the following examples cannot be
  7092.      performed as Simple searches.
  7093.  
  7094.           MEMBER_NO = "001729" | MEMBER_NO = "096119"
  7095.  
  7096.      Example #5
  7097.  
  7098.      In the following example, PC-File searches for records with a
  7099.      specific date and either one or the other member number.
  7100.  
  7101.           DATE = "05/05/91" & (MEMBER_NO = "001729" |  MEMBER_NO =
  7102.      "096119")
  7103.  
  7104.      Example #6
  7105.  
  7106.      When using the comparison operator Not equal to (!=) with
  7107.      multiple criteria, you generally want to use AND (&) as a
  7108.      logical operator, rather than OR ( | ), as in the following
  7109.      example:
  7110.  
  7111.           DATE != "02/14/91" & DATE != "02/15/91"
  7112.  
  7113.      If you were to use OR, PC-File would search for dates not
  7114.      equal to 2/14/91, which includes 2/15/91, and dates not equal
  7115.      to 2/15/91, which includes 2/14/91. You must use AND to
  7116.      exclude both dates.
  7117.  
  7118.      Example #7
  7119.  
  7120.      Wildcards are especially useful when searching for dates. The
  7121.      following example illustrates this:
  7122.  
  7123.           DATE = "03/__/91" | DATE = "04/__/91"
  7124.  
  7125.      This command searches for all records with dates in the months
  7126.      of March and April.
  7127.  
  7128.      Example #8
  7129.  
  7130.      A global search looks everywhere for the search criteria
  7131.      except in memo fields. For memo fields, use a scan-across
  7132.      search, as follows:
  7133.  
  7134.           COMMENTS = ~cold~ | COMMENTS = ~icy~
  7135.  
  7136.      This command searches for the words cold and icy throughout
  7137.      the memo field.
  7138.  
  7139.      Conducting a Global Search
  7140.  
  7141.  
  7142.  
  7143.  
  7144.      PC-File Version 7 Users Guide                            121
  7145.  
  7146.  
  7147.      Global searches are similar to scan-across searches in that
  7148.      you can search for a word or part of a word. However, a global
  7149.      search looks through all fields (except memo fields) of all
  7150.      the records, while a scan-across search looks only in the
  7151.      designated field.
  7152.  
  7153.      When you conduct a Global search, enter the search criteria
  7154.      just as it appears in the records. PC-File treats the search
  7155.      criteria as a character string. Don't use quotation marks or
  7156.      other punctuation, unless that punctuation is part of the
  7157.      string you are searching for. You can't use wildcards either.
  7158.      If you enter an underscore character, PC-File searches for
  7159.      data containing an underscore.
  7160.  
  7161.      As long as case sensitivity remains turned off in your
  7162.      configuration profile, PC-File searches for both uppercase and
  7163.      lowercase variations on the criteria.
  7164.  
  7165.      You can't use multiple criteria, comparison operators, or
  7166.      logical operators in a Global search.
  7167.  
  7168.      To conduct a Global search:
  7169.  
  7170.      1.Choose Search from the menu bar.
  7171.  
  7172.      2.Choose Global search from the Search menu. PC-File prompts
  7173.        you for the search criteria.
  7174.  
  7175.      3.Enter the criteria in the text box.
  7176.  
  7177.      4.Choose OK. PC-File conducts the search and displays the
  7178.        first record that meets the criteria.
  7179.  
  7180.      5.Click on the Search Again button or press CTRL-A to display
  7181.        additional records that meet the search criteria.
  7182.  
  7183.      Because PC-File searches the data file in global searches, you
  7184.      must enter dates in the format they are maintained in this
  7185.      file: YYYYMMDD.
  7186.  
  7187.      Checking For Duplicate Records
  7188.  
  7189.      Duplicate records often appear in databases, particularly in
  7190.      mailing lists. PC-File makes it easy to find and display
  7191.      duplicate records, allowing you to delete them.
  7192.  
  7193.      There are two ways to process duplicate records:
  7194.  
  7195.        Display the duplicate records side by side, then choose to
  7196.        delete the record on the right, on the left, both, or
  7197.        neither of the records.
  7198.  
  7199.        Print a report listing all duplicate records, either on-
  7200.        screen, to a printer, or to a file. Then you can go back and
  7201.        consolidate data and delete duplicate records as necessary.
  7202.  
  7203.  
  7204.  
  7205.  
  7206.      PC-File Version 7 Users Guide                            122
  7207.  
  7208.  
  7209.      If you are the cautious type, you might want to run a report
  7210.      of your duplicate records before you start to compare and
  7211.      delete them on the screen. A report gives you time to check
  7212.      for address changes and other possible causes of duplicates
  7213.      that you might not catch if you go through the records quickly
  7214.      on the screen.
  7215.  
  7216.      How Duplicate Records Are Found
  7217.  
  7218.      Records are checked for duplication by comparing the data in
  7219.      one or more fields. You choose the fields from the database by
  7220.      which you want the data compared. You can choose up to 10
  7221.      fields. Be aware, though, that duplication exists only where
  7222.      two records are identical in all fields being compared. Thus,
  7223.      the more fields you select for comparison, the stiffer the
  7224.      comparison.
  7225.  
  7226.      PC-File ONLY compares adjacent records. For example, the data
  7227.      in the second record is compared to the data in the first and
  7228.      third records, but is NOT compared to the data in the fourth,
  7229.      fifth, or any other records. As the order of the records is
  7230.      based on the current index, it is important that your primary
  7231.      field of comparison (the first comparative field selected)
  7232.      coincides with your current index. If you are using last names
  7233.      as the primary comparison field, for example, a database
  7234.      indexed by
  7235.      zip codes will likely miss some if not all of the
  7236.      duplications.
  7237.  
  7238.      Displaying Duplicate Records
  7239.  
  7240.      Placing duplicate records side by side makes it easy to
  7241.      compare the fields in each record.
  7242.  
  7243.      The two records show two people with the same first and last
  7244.      name, but different addresses. This is in fact two separate
  7245.      people. You would not want to delete either record.
  7246.  
  7247.      To display duplicate records side by side:
  7248.  
  7249.      1.Choose Search from the menu bar.
  7250.  
  7251.      2.Choose Duplicate records from the Search menu.
  7252.  
  7253.      3.Choose one or more fields from the list box by which you
  7254.        want to compare records. The primary field of comparison
  7255.        should match your index. All other comparison fields are up
  7256.        to you. Select no more than 10. You can compare based on a
  7257.        portion of field by typing the notation for a partial field
  7258.        in the text box, e.g. ZIP,1,5 only compares the first 5
  7259.        characters of the ZIP field. See Chapter 1, "Selecting a
  7260.        Field or Partial Field" for more details.
  7261.  
  7262.      4.Choose OK when you finish selecting fields. A dialog box
  7263.        displays.
  7264.  
  7265.  
  7266.  
  7267.  
  7268.      PC-File Version 7 Users Guide                            123
  7269.  
  7270.  
  7271.      5.Choose Now when asked what course you want to take. The
  7272.        first pair of duplicates displays on the screen, along with
  7273.        a dialog box.
  7274.  
  7275.      6.Choose to delete the record on the left side of the screen,
  7276.        the record on the right side of the screen, both records, or
  7277.        neither record. The next pair of duplicates displays.
  7278.  
  7279.      7.Display each pair of duplicates and choose one of the
  7280.        options until you have gone through all the duplicate
  7281.        records. A box displays when you finish, informing you how
  7282.        many duplicate records were displayed and deleted.
  7283.  
  7284.      Printing a Report of Your Duplicate Records
  7285.  
  7286.      A printed report of your duplicate records can be handy for
  7287.      checking address changes, determining what causes duplication,
  7288.      and generally examining your duplicates before deleting any of
  7289.      them.
  7290.  
  7291.      PC-File prompts you to make several choices while defining a
  7292.      duplicates report, as follows:
  7293.  
  7294.      Print to the screen, a printer, or disk
  7295.  
  7296.      Print to the screen if you suspect just a few duplicates or
  7297.      want to check to see if there are any duplicates at all.
  7298.  
  7299.      Print to the default printer if you want a report you can
  7300.      study at length.
  7301.  
  7302.      Print to disk to produce a report that you can read with a
  7303.      word processing program or text editor. PC-File prints an
  7304.      ASCII file called databasename.DUP, located on the current
  7305.      directory. With a word processing program or text editor, you
  7306.      can conduct searches, which can be helpful if you have a lot
  7307.      of duplications. Use this option also if you have no printer
  7308.      currently available.
  7309.  
  7310.      Print all data or compared data
  7311.  
  7312.      You can print data from all the fields in the database for
  7313.      each duplicate record, or just the data in the fields you have
  7314.      chosen for comparison. If you feel you can compare duplicate
  7315.      records adequately with just the comparison data, just print
  7316.      compared data. Otherwise, you probably want to print all the
  7317.      data.
  7318.  
  7319.      If printing to a printer, you can also choose all the fields,
  7320.      then truncate those fields that don't fit within the width of
  7321.      the printer.
  7322.  
  7323.      Do you want to truncate?
  7324.  
  7325.  
  7326.  
  7327.  
  7328.      PC-File Version 7 Users Guide                            124
  7329.  
  7330.  
  7331.      If you are printing to the printer and the fields extend
  7332.      beyond the width of the printer, PC-File asks if you want to
  7333.      truncate the data. Choose Yes to print just the fields that
  7334.      fit. Choosing No results in data being printed off the edge of
  7335.      the paper, wrapping, or being truncated anyway. It depends on
  7336.      your printer.
  7337.  
  7338.      To print a duplicates report:
  7339.  
  7340.      1.Choose Search from the menu bar.
  7341.  
  7342.      2.Choose Duplicate records from the Search menu.
  7343.  
  7344.      3.Choose one or more fields from the list box by which you
  7345.        want to compare records. The primary field of comparison
  7346.        should match your index. All other comparison fields are up
  7347.        to you. Select no more than 10. You can enter a partial
  7348.        field for comparison by entering the field, starting
  7349.        position, and number of characters in the text box. See the
  7350.        section on choosing partial fields in Chapter 1, "Navigating
  7351.        in PC-File."
  7352.  
  7353.  
  7354.      4.Choose OK when you finish selecting fields. A dialog box
  7355.        displays.
  7356.  
  7357.      5.Choose List when asked what action you want to take.
  7358.  
  7359.      6.Choose to print the report to the screen, the printer, or to
  7360.        a file.
  7361.  
  7362.      7.Choose to print all data or just the data from the fields
  7363.        you have chosen for comparison.
  7364.  
  7365.      If you choose to print to the screen, the report displays on
  7366.      the screen. There is no way to stop and start the display if
  7367.      the duplicates run beyond a single screen.
  7368.  
  7369.      If you choose to print to a printer, the printing operation
  7370.      begins unless the fields being printed don't fit within the
  7371.      width of the printer. In that case, PC-File prompts you to
  7372.      truncate the fields to those that do fit.
  7373.  
  7374.      If you choose to print to a disk, PC-File prints a list of the
  7375.      duplicates to a file on the current directory named
  7376.      databasename.DUP.
  7377.  
  7378.      Modifying and Deleting Records
  7379.  
  7380.      The Read-only Mode option on the Edit menu must be off (not
  7381.      checked) to modify or delete records. This is true whether you
  7382.      are modifying or deleting individual records or making global
  7383.      changes or deletions.
  7384.  
  7385.  
  7386.  
  7387.  
  7388.      PC-File Version 7 Users Guide                            125
  7389.  
  7390.  
  7391.      As long as Read-only Mode is off, you can modify or delete a
  7392.      single record any time it is displayed on the screen. Global
  7393.      changes, on the other hand, can be made without displaying the
  7394.      individual records.
  7395.  
  7396.      In some cases, PC-File also lets you undo changes and restore
  7397.      deleted records.
  7398.  
  7399.      Read-only Mode
  7400.  
  7401.      Read-only mode permits the viewing of your data only. This
  7402.      option is provided because it is very easy to modify records
  7403.      otherwise. In Read- only mode you can navigate within records,
  7404.      but you cannot modify data. You can access the menu bar and
  7405.      the button bar; however all options on the Edit menu other
  7406.      than Read-only Mode are grayed out. Only the Edit menu is
  7407.      affected by Read-only mode. There are no limitations on other
  7408.      activities within PC-File, such as creating reports, printing
  7409.      graphs, and so
  7410.      on.
  7411.  
  7412.      Read-only mode is on when the Read-only Mode option is checked
  7413.      on the Edit menu.
  7414.  
  7415.      To toggle Read-only mode on and off:
  7416.  
  7417.      1.Choose Edit from the menu bar.
  7418.  
  7419.      2.Choose Read-only Mode.
  7420.  
  7421.      When a check mark is displayed to the left of the Read-only
  7422.      Mode menu option, Read-only Mode is on. When there is no check
  7423.      mark to the left, Read-only mode is off.
  7424.  
  7425.      Reading to and Writing from the Buffer
  7426.  
  7427.      PC-File provides a buffer that you can read to and write from
  7428.      at anytime. A buffer is a storage area that holds data in
  7429.      memory until it is needed. It is most useful for copying data
  7430.      from one spot and pasting it to another.
  7431.  
  7432.      You can use the buffer to hold data from fields in your
  7433.      records and from the edit window. The buffer is particularly
  7434.      useful when recording a recursive macro to make changes to a
  7435.      group of records. See Chapter 16, "Using Macros," for
  7436.      information on recursive macros.
  7437.  
  7438.      Only one block of data is held in the buffer at a time. If you
  7439.      read another block of data to the buffer, it replaces what was
  7440.      there before. The previous block of data is gone.
  7441.  
  7442.      You can use the following hot keys to read and write to the
  7443.      buffer.
  7444.  
  7445.           Hot key    Function
  7446.  
  7447.  
  7448.  
  7449.  
  7450.      PC-File Version 7 Users Guide                            126
  7451.  
  7452.  
  7453.           CTRL-INS   Read to the buffer
  7454.  
  7455.           SHIFT-DEL  Read to the buffer and delete
  7456.  
  7457.           SHIFT-INS  Write to the screen from the buffer
  7458.  
  7459.  
  7460.      To read to the buffer:
  7461.  
  7462.      1.Select the data you want to read to the buffer.
  7463.  
  7464.      2.Press CTRL-INS to copy the data to the buffer. If you want
  7465.        to copy the data to the buffer and delete it from its
  7466.        current location at the same time, press SHIFT-DEL instead.
  7467.  
  7468.      To write from the buffer:
  7469.  
  7470.      1.Place the cursor where you want the data to appear.
  7471.  
  7472.      2.Press SHIFT-INS to copy from the buffer to the screen.
  7473.  
  7474.      Data remains in the buffer only during the current session.
  7475.      When you exit from PC-File, the buffer is emptied.
  7476.  
  7477.      Modifying a Record
  7478.  
  7479.      Changes can be made to any record displayed on the screen, as
  7480.      long as you are in Modify mode. It doesn't matter whether you
  7481.      displayed the record by paging through your database or by
  7482.      conducting a search. Nor does it matter whether you are in
  7483.      Record view or Table view. If you can move the cursor to the
  7484.      fields in a record, you can change the record.
  7485.  
  7486.      To change a record, simply type in the correct information.
  7487.      You can type right over the previous entry, or erase the field
  7488.      first (by pressing CTRL-B) and then type in the correction.
  7489.      You can also use BACKSPACE and DEL to erase current data.
  7490.  
  7491.  
  7492.      Saving Your Changes
  7493.  
  7494.      Changes made to a record are saved automatically as soon as
  7495.      you leave the record. This is true whether you move to a new
  7496.      record or choose a menu option to begin a new action. Even if
  7497.      you choose Exit on the File menu, the change is saved.
  7498.  
  7499.      Automatic saving works in Table view just as it does in Record
  7500.      view. As soon as you move the cursor from one record to
  7501.      another, any changes made in the previous record are saved.
  7502.  
  7503.      Canceling a Change
  7504.  
  7505.      If you make changes to a record, then decide you don't like
  7506.      the changes, you can undo them. However, you can only undo
  7507.      them if you haven't saved the changes by moving to a new
  7508.      record.
  7509.  
  7510.  
  7511.  
  7512.  
  7513.      PC-File Version 7 Users Guide                            127
  7514.  
  7515.  
  7516.  
  7517.      To undo changes to a record:
  7518.  
  7519.      1.Choose Edit from the menu bar.
  7520.  
  7521.      2.Choose Cancel Changes from the Edit menu, or press CTRL-C or
  7522.        ESC. The record is restored to its state when it was last
  7523.        saved.
  7524.  
  7525.      Recalculating
  7526.  
  7527.      Press ALT-R or choose the Recalc button to rerun any
  7528.      calculations in your records for which data has changed. All
  7529.      the calculations in the current record, whether in a Record
  7530.      view or a Table view, are rerun.
  7531.  
  7532.      This button is most useful for relational lookups in which the
  7533.      data in the lookup database has changed, and for date
  7534.      calculations in which one or more dates have changed.
  7535.  
  7536.      The results of the recalculation display on your screen as
  7537.      soon as the calculation is finished, or when you save the
  7538.      record.
  7539.  
  7540.      Deleting a Record
  7541.  
  7542.      You can delete records in a Record view or a Table view.
  7543.  
  7544.      To delete a record in a Record view:
  7545.  
  7546.      1.Display the record on the screen.
  7547.  
  7548.      2.Choose Edit from the menu bar.
  7549.  
  7550.      3.Choose Delete from the Edit menu.
  7551.  
  7552.      4.Choose Yes when asked to confirm the deletion.
  7553.  
  7554.      The next record replaces the deleted record on the screen. If
  7555.      there is no next record, the previous record is shown.
  7556.  
  7557.      To delete a record in a Table view:
  7558.  
  7559.      1.Place the cursor anywhere within the record you want to
  7560.        delete.
  7561.  
  7562.      2.Choose Edit from the menu bar
  7563.  
  7564.      3.Choose Delete from the Edit menu.
  7565.  
  7566.      4.Choose Yes when asked to confirm the deletion. PC-File
  7567.        refreshes the screen, deleting the record in the process.
  7568.  
  7569.  
  7570.  
  7571.  
  7572.      PC-File Version 7 Users Guide                            128
  7573.  
  7574.  
  7575.      If you change your mind after you have deleted a record, you
  7576.      must use the Undelete option on the Edit menu. See the section
  7577.      below on undeleting records. The Cancel Changes option on the
  7578.      Edit menu restores only fields, not deleted records.
  7579.  
  7580.      NOTE: A record is not removed from the data file when it is
  7581.      deleted, it is only removed from view. For this reason, the
  7582.      record count that displays in the lower left corner of the
  7583.      screen stays the same after deleting records. For the same
  7584.      reason, deleting records does not reduce the size of the data
  7585.      file. You can pack the database to permanently remove all
  7586.      deleted records from the data file. See Chapter 13, "Packing a
  7587.      Database" for details on packing.
  7588.  
  7589.      Modifying Multiple Records
  7590.  
  7591.      You can modify all or a selected group of records in your
  7592.      database at one time, using the Global modify option on the
  7593.      Edit menu. For example, if the post office changes a
  7594.      particular zip code from 98007 to 98008, you can select all
  7595.      the records with the 98007 zip code and change them to 98008
  7596.      without displaying the records.
  7597.  
  7598.      Using Global modify to change a selected group of records
  7599.      assumes that there is some common denominator within the
  7600.      database that you can use as a criteria for selecting those
  7601.      records. The change in the zip code, for example, provides
  7602.      criteria by which you can search for specific records. A batch
  7603.      of address changes from your members, on the other hand, does
  7604.      not provide the criteria necessary to make a global change. In
  7605.      that case you would have to make changes individually.
  7606.  
  7607.      There are also some types of global changes that you can't
  7608.      make with the Global modify option, but that you can make with
  7609.      a recursive macro. Generally those changes involve variable
  7610.      length data and inserting data within other data. See Chapter
  7611.      16, "Using Macros," for information on what types of changes
  7612.      you can make with a recursive macro that you can't make with
  7613.      Global modify.
  7614.  
  7615.      You can only make changes in the open database.
  7616.  
  7617.      To make a global change:
  7618.  
  7619.      1.Choose Edit from the menu bar.
  7620.  
  7621.      2.Choose Global modify from the Edit menu.
  7622.  
  7623.      3.Choose All or Some from the dialog box that displays. Choose
  7624.        All to change ALL the records in the database. Choose Some
  7625.        if you want to make changes to a selected group of records.
  7626.        PC-File prompts you to conduct a search. See the section on
  7627.        searching earlier in this chapter.
  7628.  
  7629.      4.Enter the change or changes on the screen that displays.
  7630.  
  7631.  
  7632.  
  7633.  
  7634.      PC-File Version 7 Users Guide                            129
  7635.  
  7636.  
  7637.      5.Choose OK.
  7638.  
  7639.      6.PC-File displays the first record selected and asks if you
  7640.        want to make changes to the displayed record.
  7641.  
  7642.           Choose Yes to change the current record and display the
  7643.           next.
  7644.  
  7645.           Choose No to leave the displayed record as is, and
  7646.           display the next record.
  7647.  
  7648.           Choose All to make the prescribed changes to the current
  7649.           and all remaining records.
  7650.  
  7651.           Choose Quit to quit the operation.
  7652.  
  7653.      Use spaces to blank out characters in a change.
  7654.  
  7655.      Use wildcards to prevent changes to specific characters within
  7656.      a field you are changing. The wildcard character is the
  7657.      underscore ( _ ). Place it in a field you are changing to
  7658.      indicate you want no change at that particular spot. For
  7659.      example, if you are changing a nine-digit zip code field, but
  7660.      want no changes to the last four digits, use the underscore in
  7661.      the last four spots. Do not use blank spaces in those spots,
  7662.      as they will blank out that portion of the zip code in all
  7663.      records that are changed.
  7664.  
  7665.      Deleting Multiple Records
  7666.  
  7667.      If you want to delete all or a large group of records in your
  7668.      database, you may be able to use the Global delete option on
  7669.      the Edit menu. As with the Global modify option, you can only
  7670.      delete a selected group of records if there is a common
  7671.      denominator that allows you to select these records.
  7672.  
  7673.      You can only delete records in the open database.
  7674.  
  7675.      NOTE: A record is not removed from the data file when it is
  7676.      deleted, it is only removed from view. For this reason, the
  7677.      record count that displays in the lower left corner of the
  7678.      screen stays the same after deleting records. For the same
  7679.      reason, deleting records does not reduce the size of the data
  7680.      file. You can pack the database to permanently remove all
  7681.      deleted records from the data file. See Chapter 13, "Packing a
  7682.      Database" for details on packing.
  7683.  
  7684.      To delete multiple records:
  7685.  
  7686.      1.Choose Edit from the menu bar.
  7687.  
  7688.      2.Choose Global delete from the Edit menu.
  7689.  
  7690.  
  7691.  
  7692.  
  7693.      PC-File Version 7 Users Guide                            130
  7694.  
  7695.  
  7696.      3.Choose All or Some from the dialog box that displays. Choose
  7697.        All to delete ALL the records in the database. Choose Some
  7698.        to delete a selected group of records. PC-File prompts you
  7699.        to conduct a search. See the section on searching earlier in
  7700.        this chapter.
  7701.  
  7702.      4.PC-File displays the first selected record and asks if you
  7703.        want to delete it. Choose Yes to delete the record and
  7704.        display the next record. Choose No to leave it as is and
  7705.        display the next record. Choose All to delete it and all the
  7706.        remaining selected records as well. Choose Quit to quit the
  7707.        operation.
  7708.  
  7709.      Recovering Deleted Records
  7710.  
  7711.      You can restore records that you have deleted if you change
  7712.      your mind about them or find you have deleted them by mistake.
  7713.      This includes records deleted individually or through a global
  7714.      delete.
  7715.  
  7716.      The reason you can recover deleted records is that PC-File
  7717.      doesn't erase records when you delete them. Instead it just
  7718.      removes them from view.
  7719.  
  7720.      However, if you pack the database all deleted records are
  7721.      erased (see Chapter 13, "Packing a Database" for details on
  7722.      packing). Also, redefining the database writes a new copy of
  7723.      the data file which omits deleted records. Therefore, you
  7724.      cannot undelete records deleted before packing or redefining.
  7725.  
  7726.      To recover deleted records:
  7727.  
  7728.      1.Choose Edit from the menu bar.
  7729.  
  7730.      2.Choose Undelete records from the Edit menu. PC-File displays
  7731.        the deleted records that it finds one at a time. You can
  7732.        then choose which records you want to restore.
  7733.  
  7734.  
  7735.  
  7736.  
  7737.      PC-File Version 7 Users Guide                            131
  7738.  
  7739.  
  7740.  
  7741.  
  7742.      CHAPTER 8 SORTING AND INDEXING DATA
  7743.  
  7744.      PC-File uses indexes to sort data. Indexes are normally based
  7745.      on one or more fields in your database. However, they can also
  7746.      include dBASE and PC-File functions, as well as calculations.
  7747.      This chapter tells you how to create and use indexes.
  7748.  
  7749.      Rearranging Data
  7750.  
  7751.      Data in a database is always arranged in some order. It might
  7752.      only be the order that it was entered, but it does have an
  7753.      order. To be most useful for you, it should be arranged
  7754.      according to your needs.
  7755.  
  7756.      To print out mailing labels, for example, you might want the
  7757.      labels arranged in zip code order. To print out a phone list
  7758.      from the same database, however, sorting the records in
  7759.      alphabetical order by last name would be more useful.
  7760.  
  7761.      In PC-File, indexes are used to sort data. Indexes are
  7762.      normally based on fields, the data within the field is used
  7763.      for the sort. Thus, if you index on a zip code field, the data
  7764.      is arranged in the order of the zip code numbers. You can
  7765.      arrange indexes in either ascending or descending order.
  7766.  
  7767.      Indexes can also include functions (normally dBASE functions)
  7768.      and calculations. These are called Formula indexes.
  7769.  
  7770.      You can create several indexes for a database, allowing you to
  7771.      quickly rearrange the data in any order you want it. For
  7772.      example, you could arrange files in zip code order to print
  7773.      out a set of mailing labels, then quickly switch to
  7774.      alphabetical order by last name to print a membership list. If
  7775.      you're viewing your data in a Table view on the screen,
  7776.      switching indexes rearranges the data as you watch.
  7777.  
  7778.      You can also define indexes that sort on multiple fields. For
  7779.      example, you can create an index that sorts first on the last
  7780.      name field, then on the first name field. Thus, when you get
  7781.      to the Smiths, Andy would appear first, then Bob, then
  7782.      Charles.
  7783.  
  7784.      PC-File also lets you create one index for each database that
  7785.      is based on a selected group of records only. This is called a
  7786.      Subgroup index. You can redefine this index whenever the need
  7787.      arises.
  7788.  
  7789.      Along with sorting data, indexes speed up the process of
  7790.      searching for records. Conducting a search using an indexed
  7791.      field is a faster operation than conducting the search on a
  7792.      non-indexed field.
  7793.  
  7794.      Unindexed Order
  7795.  
  7796.  
  7797.  
  7798.  
  7799.      PC-File Version 7 Users Guide                            132
  7800.  
  7801.  
  7802.      Sometimes, you will find it advantageous to use no indexes.
  7803.      You can see the data in the order in which it was entered by
  7804.      using the Unindexed Order option. This option can be useful
  7805.      when you have small databases because you don't need to create
  7806.      additional files, and searches are still fast because there is
  7807.      little data.
  7808.  
  7809.      Indexing Operations
  7810.  
  7811.      When you create a database, you don't need to define an index.
  7812.      However, an index can be very useful because it displays your
  7813.      data in a particular order. One index may be all you need.
  7814.      However, it is likely that you will find a need for additional
  7815.      indexes, or that you need to modify a current index. When you
  7816.      do, choose Index Maintenance from the File menu. PC-File
  7817.      displays a dialog box.
  7818.  
  7819.      The command buttons are used to access each of the indexing
  7820.      operations. These operations are described briefly below.
  7821.  
  7822.      Make Index
  7823.  
  7824.      If you find a need for an index, it is easy to create one. You
  7825.      will find yourself creating indexes as the need arises. For
  7826.      example, you can decide what indexes you need as you create
  7827.      reports that require specific sorting options. When that
  7828.      occurs, choose this option from the dialog box to define the
  7829.      index.
  7830.  
  7831.      Make Subgroup
  7832.  
  7833.      Use this option when you want to work with a specific subset
  7834.      of records from the whole database. If you wanted to print all
  7835.      the records that have a specific zipcode, you would create a
  7836.      subgroup of only those records. Using this index, PC-File
  7837.      would only need to manipulate these records and not the whole
  7838.      database. When you have a large database and only need to work
  7839.      with one easily identifiable portion, this is a convenient way
  7840.      to do it.
  7841.  
  7842.      Delete Index
  7843.  
  7844.      If you find you have created indexes you don't use, delete
  7845.      them. Updating indexes when you add or modify data takes time,
  7846.      so keep only those you need. Select the index to delete, then
  7847.      choose this option from the dialog box.
  7848.  
  7849.      Rename Index
  7850.  
  7851.      If you want to change the name you gave an index, you can
  7852.      rename it. Renaming does not affect the DOS file name, only
  7853.      the description used to identify the index.
  7854.  
  7855.      Rebuild Index
  7856.  
  7857.  
  7858.  
  7859.  
  7860.      PC-File Version 7 Users Guide                            133
  7861.  
  7862.  
  7863.      If you suspect that you have a "bad" index, rebuild that
  7864.      index. A "bad" index usually results from some unforeseen
  7865.      trouble like a power outage while adding records. Use this
  7866.      option to rebuild only one index. In some cases, PC-File
  7867.      prompts you to rebuild an index when it encounters a problem
  7868.      with an index. See Chapter 13, "Repairing a Database" for more
  7869.      information.
  7870.  
  7871.      Rebuild All
  7872.  
  7873.      Use this option to rebuild all the indexes associated with a
  7874.      database. See Rebuild Indexes above for more information.
  7875.  
  7876.      Switching Indexes
  7877.  
  7878.      PC-File lets you switch indexes at almost any time. You may
  7879.      want to switch indexes prior to printing a report or while
  7880.      paging through a Table view of your records.
  7881.  
  7882.      NOTE: The current index is always listed on the status line at
  7883.      the bottom of the main screen.
  7884.  
  7885.      There are three ways to switch indexes in PC-File:
  7886.  
  7887.      Press CTRL-I
  7888.  
  7889.      Use this hot key to display a list of the indexes defined for
  7890.      the current database. Choose the index you want from the list.
  7891.  
  7892.      Use the menu
  7893.  
  7894.      Choose Index Switch from the File menu, then choose the
  7895.      appropriate index from the list.
  7896.  
  7897.      Let PC-File switch the index automatically
  7898.  
  7899.      PC-File lets you choose whether to automatically switch
  7900.      indexes when performing Simple and Formula searches. This is
  7901.      called autoswitching. When you conduct a search for records
  7902.      with autoswitching on, PC-File automatically switches indexes
  7903.      to the field you are searching on, if that field is indexed.
  7904.      This will generally make the search go faster. PC-File will
  7905.      also autoswitch to unindexed access if that is the most
  7906.      efficient way to perform the search. If the search field is
  7907.      not indexed, PC-File
  7908.      maintains the current index.
  7909.  
  7910.      If you want to prevent an automatic index switch, turn off the
  7911.      Autoswitch option from the Simple or Formula search screen.
  7912.      See Chapter 7, "Index Autoswitching" for more information on
  7913.      the Autoswitch feature.
  7914.  
  7915.      To switch indexes:
  7916.  
  7917.      1.Choose File from the menu bar.
  7918.  
  7919.  
  7920.  
  7921.  
  7922.      PC-File Version 7 Users Guide                            134
  7923.  
  7924.  
  7925.      2.Choose Index Switch from the File menu. As an alternative to
  7926.        steps 1 and 2, press CTRL-I. The Switch Index dialog box
  7927.        displays.
  7928.  
  7929.      3.Choose the index you want from the list. Data is arranged
  7930.        according to the new index.
  7931.  
  7932.      In PC-Label, the hot key CTRL-I doesn't function. To switch
  7933.      indexes, choose Define/modify setup from the PC-Label Main
  7934.      Menu. On the setup screen, choose Define Search to display a
  7935.      list of the current indexes. Choose the one you want. The list
  7936.      of indexes only displays if you have more than one index
  7937.      defined in the database.
  7938.  
  7939.  
  7940.      Index Maintenance Operations
  7941.  
  7942.      Indexes are very helpful in managing your data, and generally,
  7943.      you will employ indexes at one time or another. You create and
  7944.      maintain indexes using the Index Maintenance option on the
  7945.      File menu which displays a dialog box.
  7946.  
  7947.      When you create an index, you designate which field or fields
  7948.      take precedence in sorting the data. For example, in a list of
  7949.      names and addresses, you could sort the data by first names,
  7950.      by last names, by addresses, cities, and so on. Obviously,
  7951.      some fields make more sense for sorting than others. If you
  7952.      are creating mailing labels, you probably want to sort by zip
  7953.      codes. If you are creating a phone list, sorting by last name
  7954.      is more logical, or, if it's a short list, perhaps by first
  7955.      name.
  7956.  
  7957.      In a database, you can determine what fields to sort by as the
  7958.      need arises. If you have created a database to print mailing
  7959.      labels, then decide later to use the same list to keep track
  7960.      of membership renewals, you can add an index based on the
  7961.      renewal date.
  7962.  
  7963.  
  7964.  
  7965.      Choosing the Type of Index
  7966.  
  7967.      To create a new index, choose Index Maintenance from the File
  7968.      menu, then choose Make Index from the dialog box. PC-File
  7969.      displays the following dialog box, prompting you to choose the
  7970.      type of index you want to create.
  7971.  
  7972.      Choose either the Simple index or Formula index option.
  7973.  
  7974.      A Simple index lets you sort data directly on the contents of
  7975.      one or more fields. You can:
  7976.  
  7977.        Sort on up to 10 fields, each one sorting within the
  7978.        previous field
  7979.  
  7980.        Order each field in ascending or descending order
  7981.  
  7982.  
  7983.  
  7984.  
  7985.      PC-File Version 7 Users Guide                            135
  7986.  
  7987.  
  7988.  
  7989.        Sort on partial fields
  7990.  
  7991.      Simple indexes should handle most of your indexing needs.
  7992.      However, there are some kinds of indexes you can't define with
  7993.      the Simple index option. For those you need to create a
  7994.      Formula index.
  7995.  
  7996.      A Formula index allows for a wider range of index definitions
  7997.      by letting you define an index in the form of an expression.
  7998.      With an expression, you can enter dBASE and PC-File functions.
  7999.      Functions allow you to:
  8000.  
  8001.        Enter a calculation as part of an index
  8002.  
  8003.        Define an index based on the record number
  8004.  
  8005.      Both Simple indexes and Formula indexes are explained in depth
  8006.      below.
  8007.  
  8008.      Defining a Simple Index
  8009.  
  8010.      A Simple index lets you sort data directly on the contents of
  8011.      one or more fields. For example, you can create an index based
  8012.      on a single zip code field. You can also create an index based
  8013.      on both a last name field and on a first name field. You can
  8014.      include up to 10 fields in an index.
  8015.  
  8016.      Each field you add in an index is nested, in a sense, within
  8017.      the previous field. Thus, in the above example, last names are
  8018.      sorted first, then first names are sorted within the last
  8019.      names. The Johnsons would appear before the Kelloggs, and
  8020.      within the list of Johnsons, Bob would appear before Kathleen
  8021.      and Kathleen before Vicki.
  8022.  
  8023.      Whether you index on a single field or multiple fields, each
  8024.      field is sorted in ascending or descending order. Ascending
  8025.      order sorts spaces first, then 0 to 9, then A to Z, and from
  8026.      earlier to later. Descending order runs in the opposite
  8027.      direction. The default is ascending order.
  8028.  
  8029.      For indexes with multiple fields, you select the order for
  8030.      each field individually. Thus, if you define an index sorted
  8031.      first on state, then on zip code, you could sort the state
  8032.      field in descending order and the zip code field in ascending
  8033.      order.
  8034.  
  8035.      You can also sort on partial fields, in both single and
  8036.      multiple field indexes. Thus, you could index first on a state
  8037.      field, then on just the first five characters of a 10-
  8038.      character zip code field.
  8039.  
  8040.  
  8041.  
  8042.  
  8043.      PC-File Version 7 Users Guide                            136
  8044.  
  8045.  
  8046.      NOTE: You can't sort memo fields. You can sort date fields,
  8047.      but you can't sort dates in character-type fields with a
  8048.      Simple index. If you try to sort dates in character fields,
  8049.      08/27/78 would sort after 03/27/91, as the date would be
  8050.      treated as a string and 08 comes after 03.
  8051.  
  8052.      To define a simple index:
  8053.  
  8054.      1.Choose File from the menu bar.
  8055.  
  8056.      2.Choose Index Maintenance from the File menu. The Index
  8057.        Maintenance dialog box displays.
  8058.  
  8059.      3.Choose Make Index. PC-File prompts you to choose the type of
  8060.        index.
  8061.  
  8062.      4.Choose Simple index. A field selection dialog box displays.
  8063.  
  8064.      5.Determine the sorting order for the primary field. Leave the
  8065.        default of Ascending, or choose the Descending option
  8066.        button.
  8067.  
  8068.      6.Choose the primary field you want to sort on. The field you
  8069.        select is checked and displays in the Selected list. The
  8070.        number 1 and the letter A (for ascending) or D (for
  8071.        descending) displays next to the field name. If you are
  8072.        indexing on just a single field, choose OK and skip the next
  8073.        two steps.
  8074.  
  8075.      7.If you are defining a multiple-field index, repeat the
  8076.        previous two steps for each field you add. First determine
  8077.        the order by choosing the appropriate option button, then
  8078.        choose the field. The second field you choose appears in the
  8079.        Selected list right below the first field with the
  8080.        appropriate letter, A or D, next to it; the third field
  8081.        appears below the first two with the appropriate letter next
  8082.        to it, and so on. You can choose a partial field instead of
  8083.        an entire field for any part of the index. To do so, enter
  8084.        the field name, starting position, and number of characters
  8085.        in the text box. See the section on choosing partial fields
  8086.        in Chapter 1, "Navigating in PC-File," for more information
  8087.        on this operation.
  8088.  
  8089.      8.Choose OK when you finish.
  8090.  
  8091.      9.Enter a description up to 30 characters long for the index
  8092.        when prompted or leave the default suggestion. A status box
  8093.        displays indicating the how the index building operation is
  8094.        proceeding. This may take a long time on large databases.
  8095.        Once the index is completely built, PC-File displays an
  8096.        information box indicating that the new index is now
  8097.        current.
  8098.      10.  Choose OK.
  8099.  
  8100.      11.  Choose OK to clear the information box.
  8101.  
  8102.  
  8103.  
  8104.  
  8105.      PC-File Version 7 Users Guide                            137
  8106.  
  8107.  
  8108.      Defining a Formula Index
  8109.  
  8110.      When you create a formula index, you enter an expression in a
  8111.      text box. With index expressions, you can enter dBASE and PC-
  8112.      File functions, as well as calculations.
  8113.  
  8114.      Functions are commands that perform a specific, predefined
  8115.      action. For example, the function UPPER converts all
  8116.      characters to uppercase. The function TOSTR converts all non-
  8117.      character field data to character strings.
  8118.  
  8119.      Index expressions range from basic to complex. The following
  8120.      illustrates a basic index expression:
  8121.  
  8122.      UPPER(Lastname)
  8123.  
  8124.      This expression defines a single field index for the field
  8125.      Lastname. The function UPPER converts all characters to
  8126.      uppercase. That forces the field to sort without concern for
  8127.      case sensitivity. It also assumes that case sensitivity
  8128.      remains turned off in your configuration profile.
  8129.  
  8130.      It is unlikely you would define this index with the Formula
  8131.      option, as you could create the same index more quickly with
  8132.      the Simple index option. (The function UPPER is assumed in
  8133.      Simple indexes as long as case sensitivity is turned off.)
  8134.  
  8135.      A more complex index expression might look like this:
  8136.  
  8137.      SUBSTR(Part_no,4,2) + LEFT(Code,3) + TOSTR(Date)
  8138.  
  8139.      This expression defines an index based on three fields. Both
  8140.      the Part_no and Code fields are character fields. The SUBSTR
  8141.      function performs the same operation as defining a partial
  8142.      field in a Simple index. The LEFT function also lets you
  8143.      define a partial field, but the field always starts with the
  8144.      first character in the field. In the example above, it uses
  8145.      the first three characters of the Code field. The TOSTR
  8146.      function converts the date into a character string. This
  8147.      expression can also be accomplished with a Simple index.
  8148.  
  8149.      PC-File lets you pattern a new index after any other index
  8150.      within the current database. When you get ready to enter an
  8151.      index expression, choose the Pattern button instead. PC-File
  8152.      displays the list of indexes. Choose the one you want to use.
  8153.      PC-File enters the index expression in the text box. You can
  8154.      then edit it to fit your new index.
  8155.  
  8156.      To create a Formula index:
  8157.  
  8158.      1.Choose File from the menu bar.
  8159.  
  8160.      2.Choose Index Maintenance from the File menu. The Index
  8161.        Maintenance dialog box displays.
  8162.  
  8163.  
  8164.  
  8165.  
  8166.      PC-File Version 7 Users Guide                            138
  8167.  
  8168.  
  8169.      3.Choose Make Index. PC-File prompts you to choose the type of
  8170.        index.
  8171.  
  8172.      4.Choose Formula index. A text box displays.
  8173.  
  8174.      5.Enter an index expression in the text box. Choose the
  8175.        Pattern after button if there is another index expression
  8176.        after which you want to pattern the current index. Choose
  8177.        the appropriate index when prompted.
  8178.  
  8179.      6.Choose OK when you finish entering the index expression.
  8180.  
  8181.      7.Enter a description up to 30 characters long for the index
  8182.        when prompted or leave the default suggestion.
  8183.  
  8184.      8.Choose OK. A status box displays indicating the how the
  8185.        index building operation is proceeding. This may take a long
  8186.        time on large databases. Once the index is completely built,
  8187.        PC-File displays an information box indicating that the new
  8188.        index is now current.
  8189.  
  8190.      9.Choose OK to clear the information box.
  8191.  
  8192.      NOTE: As with Simple indexes, you can't use memo fields in
  8193.      Formula indexes.
  8194.  
  8195.      Guidelines for Formula Indexes
  8196.  
  8197.      There are a few guidelines you should keep in mind when
  8198.      creating Formula indexes:
  8199.  
  8200.        Use complete field names in index expressions.
  8201.  
  8202.        Expressions are limited to 100 characters.
  8203.  
  8204.        The data that results from the expression is also limited to
  8205.        100 characters. Thus, you could not sort on two 60-character
  8206.        fields together. Use partial fields for one or both of them.
  8207.  
  8208.        If you are mixing field types within an expression, convert
  8209.        all the fields to character strings, using the TOSTR or STR
  8210.        functions.
  8211.  
  8212.        Ensure that you use the same number of left and right
  8213.        parentheses in an expression.
  8214.  
  8215.        When you use the CALC function, enclose the calculation
  8216.        within quotation marks as well as within parentheses. For
  8217.        example: CALC("Amount + 3")
  8218.  
  8219.        Expressions are evaluated left to right and inside of
  8220.        parentheses first. For example, in the expression CALC("5 *
  8221.        (2 + 3)"), the addition of 2 + 3 takes place first, then the
  8222.        result is multiplied by 5. The result is 25. If the
  8223.        expression read CALC("(5 * 2) + 3"), 5 is multiplied by 2
  8224.        and the result is added to 3. The result is 13.
  8225.  
  8226.  
  8227.  
  8228.  
  8229.      PC-File Version 7 Users Guide                            139
  8230.  
  8231.  
  8232.  
  8233.      Formula Functions
  8234.  
  8235.      You can find a complete list of dBASE functions in a dBASE
  8236.      manual. The ones most often employed in indexing in PC-File
  8237.      are explained below. This list also contains four functions
  8238.      specific to PC-File.
  8239.  
  8240.      UPPER(field)
  8241.  
  8242.      Converts all characters to uppercase before performing the
  8243.      action. This makes the expression case insensitive. Use this
  8244.      expression only when you have case sensitivity for sorting
  8245.      turned OFF in your configuration profile.
  8246.  
  8247.      SUBSTR(field,starting position,length)
  8248.  
  8249.      Use this function to define a partial field for sorting.
  8250.  
  8251.      LEFT(field,length)
  8252.  
  8253.      This function also creates a partial field, in this case
  8254.      starting with the first character and running to the right the
  8255.      prescribed length.
  8256.  
  8257.      RIGHT(field,length)
  8258.  
  8259.      The opposite of the previous function. Creates a partial field
  8260.      starting with the last character and running to the left the
  8261.      prescribed number of characters.
  8262.  
  8263.      TOSTR(field)
  8264.  
  8265.      Converts the data in a numeric, date, or logical field to a
  8266.      character string so that it can be indexed. Indexes in
  8267.      ascending order. This function is specific to PC-File.
  8268.  
  8269.      STR(field,length,decimal)
  8270.  
  8271.      Converts numeric values to a character string for indexing.
  8272.      Specify the length and the number of places to the right of
  8273.      the decimal. Because you can specify the length with this
  8274.      function, it produces a much shorter result than the TOSTR
  8275.      function, and thus is recommended when converting numeric
  8276.      values.
  8277.  
  8278.      DESCEND(field)
  8279.  
  8280.      This function operates like the TOSTR function, in that it
  8281.      converts the data in a numeric, date, or logical field to a
  8282.      character string. However, it indexes in descending order.
  8283.  
  8284.      VAL(field)
  8285.  
  8286.  
  8287.  
  8288.  
  8289.      PC-File Version 7 Users Guide                            140
  8290.  
  8291.  
  8292.      The opposite of TOSTR in that it converts a character string
  8293.      to a numeric value. Use it for indexing numeric data in
  8294.      character-type fields when the data is of different lengths.
  8295.  
  8296.      RECNO( )
  8297.  
  8298.      Each record is assigned a record number within the data file
  8299.      based on the order it was entered. This function sorts the
  8300.      records in that order.
  8301.  
  8302.      IIF(condition, field1,field2)
  8303.  
  8304.      If condition is true, uses the data in field 1 as the index
  8305.      data. If condition is false, uses the data in field 2 instead.
  8306.      This function is most often used to sort data based on the
  8307.      second expression when the first expression comes up with a
  8308.      blank.
  8309.  
  8310.      SOUNDEX(field)
  8311.  
  8312.      Use this function to sort data that sounds alike. Thus, if
  8313.      used with a last name field, this function would sort names
  8314.      that are similar in sound together. For example, Smith and
  8315.      Smythe would sort together. This function is specific to PC-
  8316.      File.
  8317.  
  8318.      ROMAN(field)
  8319.  
  8320.      Converts roman numerals to numbers before sorting. Like the
  8321.      previous function, this function is specific to PC-File.
  8322.  
  8323.      CALC("calculation")
  8324.  
  8325.      Use this PC-File function for any calculation you want to use
  8326.      in an index. Use both quotation marks and parentheses around
  8327.      the calculation itself.
  8328.  
  8329.      Examples of Formula Indexes
  8330.  
  8331.      The following examples illustrate some Formula indexes.
  8332.      Several basic examples are illustrated first to show how to
  8333.      put an expression together.
  8334.  
  8335.      Multi-level Sorting
  8336.  
  8337.      You can define a multi-level index in either the Simple index
  8338.      option or the Formula index option. A Formula multi-level
  8339.      index expression looks like this:
  8340.  
  8341.      UPPER(Lastname + Firstname)
  8342.  
  8343.      The function UPPER converts all characters to uppercase,
  8344.      essentially causing the index to sort without sensitivity to
  8345.      case. The first field in the expression, Lastname, is the
  8346.      primary sort field. Thus, records are sorted first on the last
  8347.      name and then on the first name.
  8348.  
  8349.  
  8350.  
  8351.  
  8352.      PC-File Version 7 Users Guide                            141
  8353.  
  8354.  
  8355.  
  8356.      This expression is equivalent to a Simple index in which you
  8357.      selected the Lastname field as the first field and the
  8358.      Firstname field as the second field.
  8359.  
  8360.      You can also enter the expression in this way:
  8361.  
  8362.      UPPER(Lastname) + UPPER(Firstname)
  8363.  
  8364.      Since there is a limit of 100 characters for expressions, it
  8365.      is recommended that you use the first method above, which is
  8366.      shorter. If you are sorting on character fields, you may
  8367.      string as many of these expressions together as will fit in
  8368.      the 100-character window. For example, you could define this
  8369.      index:
  8370.  
  8371.      UPPER(Company+Dept_No+Manager+Employee+Acct_no)
  8372.  
  8373.      As with Simple indexes, you can sort to 10 levels in a Formula
  8374.      index.
  8375.  
  8376.      Indexing Multiple Non-Character Fields
  8377.  
  8378.      If you define a multiple field index, some or all of which are
  8379.      non- character fields, you must convert all the fields to
  8380.      character strings. The only exception to this rule is an index
  8381.      with all numeric fields in which you want to add the data
  8382.      together before indexing.
  8383.  
  8384.      Thus, if you index on a character field and a date field,
  8385.      convert the date field to a character string. The same rule
  8386.      applies if you combine a date field and a numeric field, or
  8387.      any other combination of field types.
  8388.  
  8389.      NOTE: You can't index on memo fields, no matter what you try
  8390.      to do to them.
  8391.  
  8392.      Use the function TOSTR to convert date and logical fields to
  8393.      character strings and the function STR to convert numeric
  8394.      fields to a character string. Several examples illustrate the
  8395.      use of these functions.
  8396.  
  8397.      If you indexed on the company name and the company number,
  8398.      your index expression might look like this:
  8399.  
  8400.      UPPER(Company) + STR(Comp_no,8,0)
  8401.  
  8402.      The STR function converts the numeric field Comp_no to a
  8403.      character string.
  8404.  
  8405.      The following index, used in the Donation database,
  8406.      illustrates the conversion of a date field to a character
  8407.      string:
  8408.  
  8409.      UPPER(Member_no) + TOSTR(Date)
  8410.  
  8411.  
  8412.  
  8413.  
  8414.      PC-File Version 7 Users Guide                            142
  8415.  
  8416.  
  8417.      In the case of date fields only, PC-File reorders the data
  8418.      internally so that it reads the date as year, month, and day.
  8419.      That way the date is sorted properly.
  8420.  
  8421.      If you index on two date fields, convert both of them to
  8422.      character strings:
  8423.  
  8424.      TOSTR(Duedate) + TOSTR(Duedate2)
  8425.  
  8426.      In most cases, you also want to convert the numeric fields in
  8427.      an index containing multiple fields to character strings. If
  8428.      you leave the data as numeric values, PC-File adds the data in
  8429.      each record before indexing it. That would result in a
  8430.      different index order than you would get if you converted the
  8431.      data to character strings.
  8432.  
  8433.      Indexing Character Fields Containing Numeric Data
  8434.  
  8435.      If you have a character field that contains numeric data, you
  8436.      may want to convert the character data to numeric values for
  8437.      sorting. This is necessary because character fields locate
  8438.      data flush left, which can cause problems if the values are of
  8439.      different length. The following example illustrates how a
  8440.      character field containing numeric values might sort: 1, 10,
  8441.      100, 2, 26.
  8442.  
  8443.      Changing these character strings to numeric values forces them
  8444.      to sort in the proper numeric order, as follows: 1, 2, 10, 26,
  8445.      100.
  8446.  
  8447.      Use the function VAL to convert character strings to numeric
  8448.      values. An index might look like this:
  8449.  
  8450.      VAL(MemberID)
  8451.  
  8452.      If the numeric data in a character field is all the same
  8453.      length, the conversion to numeric values is unnecessary.
  8454.  
  8455.      Sorting by Record Number
  8456.  
  8457.      When you add data to a database, PC-File derives an internal
  8458.      record number for each record. The first record is assigned
  8459.      number 1, the second record number 2, and so on. Within limits
  8460.      (see note below), you can sort your data in the order it was
  8461.      entered by sorting on the derived record number.
  8462.  
  8463.      Use the function RECNO to sort by record number. To sort on
  8464.      the record number alone, enter the expression RECNO( ) in the
  8465.      text box. Be sure to use the parentheses, but with nothing
  8466.      between them. If you combine the record number with other
  8467.      fields in an index, convert the record number to a character
  8468.      string, like this:
  8469.  
  8470.      UPPER(Lastname + STR(RECNO(),6,0)
  8471.  
  8472.  
  8473.  
  8474.  
  8475.      PC-File Version 7 Users Guide                            143
  8476.  
  8477.  
  8478.      NOTE: If you delete records, records added later replace the
  8479.      deleted records. The record numbers of the deleted records are
  8480.      assigned to the new records-in this case, RECNO will not give
  8481.      you an accurate representation of the order the data was
  8482.      entered.
  8483.  
  8484.      Increasing Speed on Large Databases with Duplicate Entries
  8485.  
  8486.      Adding, modifying, and searching for records in large
  8487.      databases with a large number of duplicate entries can slow
  8488.      PC-File down. This is because indexes are most efficient when
  8489.      PC-File is searching for unique entries. For example, suppose
  8490.      you have a large database indexed on Last_name and you have a
  8491.      1000 entries under the name Smith. If you search for the most
  8492.      recently added Smith record, PC- File has to search through
  8493.      the 999 previous entries before it can locate the record you
  8494.      want. You can make PC-File operate faster by defining a
  8495.      Formula index that adds the record number at the end of the
  8496.      Last_name index entry, like this:
  8497.  
  8498.      UPPER(Last_name + STR(RECNO(),6,0))
  8499.  
  8500.      You should consider using this type of index if more than 10
  8501.      records have the same duplicated index information. It is
  8502.      especially helpful if you have a large number of records where
  8503.      the indexed field is blank.
  8504.  
  8505.      Using a Calculation to Sort
  8506.  
  8507.      You can sort on a calculation. Normally, the calculation used
  8508.      in indexes involve arithmetic operations involving two or more
  8509.      numeric fields. For example, you can subtract the data in one
  8510.      field from another, and index on the balance. Or you can add
  8511.      the values in two or more fields together.
  8512.  
  8513.      You can use the PC-File function CALC to perform calculations,
  8514.      or you can perform them without a function. Use the CALC
  8515.      function if you want to abbreviate field names, as in the
  8516.      example below, and when performing date calculations. The CALC
  8517.      function is the only indexing function that allows you to
  8518.      abbreviate field names.
  8519.  
  8520.      For example, an index in the sample database called Attend
  8521.      looks like this:
  8522.  
  8523.      CALC("Pr + Y + A + Sn + Pa + C + Sp + Sc + O")
  8524.  
  8525.      This calculation adds the attendance figures for each category
  8526.      together and then sorts on the total. The field names are
  8527.      shortened to conserve space, but remain unique within the
  8528.      database.
  8529.  
  8530.  
  8531.      Creating a Subgroup Index
  8532.  
  8533.  
  8534.  
  8535.  
  8536.      PC-File Version 7 Users Guide                            144
  8537.  
  8538.  
  8539.      You can create one index within a database that sorts a
  8540.      selected group of records. This can be a time-saver when
  8541.      working with a large database.
  8542.  
  8543.      For example, you might want to send out a mailing to just
  8544.      those people who have been members for more than 40 years. If
  8545.      this group amounts to about 300 out of 20,000 members, you
  8546.      could create a separate zipcode index for just those 300
  8547.      members. Then, when you get ready to print mailing labels, PC-
  8548.      File doesn't have to search through your entire database to
  8549.      find and print labels for 300 records. For a large database,
  8550.      this can save a lot of time, even if you only print the labels
  8551.      once.
  8552.  
  8553.      You can have only one Subgroup index within any given database
  8554.      and it will always be named Subgroup Index. If you try to
  8555.      create another Subgroup index, PC-File will prompt you to
  8556.      delete your existing subgroup index before proceeding to
  8557.      create one.
  8558.  
  8559.      Subgroup indexes are designed to be used on a temporary basis.
  8560.      Create a new Subgroup index every time you find a need for
  8561.      using just a small part of a large database. You can use
  8562.      Subgroup indexes for reports, letters, labels, redefining
  8563.      databases, and graphs.
  8564.  
  8565.      A Subgroup index can be a Simple or Formula index. It is
  8566.      created much the same way as you have defined one of your
  8567.      other indexes.
  8568.  
  8569.      To create a Subgroup index:
  8570.  
  8571.      1.Choose File from the menu bar.
  8572.  
  8573.      2.Choose Index Maintenance from the File menu. The Index
  8574.        Maintenance dialog box displays.
  8575.  
  8576.      3.Choose Make Subgroup. If you already have a Subgroup Index,
  8577.        you will be prompted to delete it before moving onto the
  8578.        next step in the procedure. A dialog box displays prompting
  8579.        you to choose the type of index to define. You can select
  8580.        either type of index to create. Subgroup indexes can be
  8581.        either simple or formula indexes. See above, "Defining a
  8582.        Simple Index" or "Defining a Formula Index" for more
  8583.        information.
  8584.  
  8585.      4.Choose the kind of index you want to make and define the
  8586.        index as you would any other index. PC-File prompts you to
  8587.        choose the type of search.
  8588.  
  8589.      5.Choose Simple or Formula search. See Chapter 7, "Finding and
  8590.        Modifying Data," for more information on searches.
  8591.  
  8592.      6.Define the search criteria. PC-File performs the search and
  8593.        defines the index.
  8594.  
  8595.  
  8596.  
  8597.  
  8598.      PC-File Version 7 Users Guide                            145
  8599.  
  8600.  
  8601.      When you get ready to perform the operation that requires the
  8602.      Subgroup index, press CTRL-I to switch indexes. Choose the
  8603.      index labeled Subgroup Index from the list. This index remains
  8604.      current until you switch indexes again.
  8605.  
  8606.      Once a Subgroup index is defined, it remains available until
  8607.      you overwrite the file with a new Subgroup index for that
  8608.      database. However, all updated records within the database are
  8609.      added to this index, even if they wouldn't have been included
  8610.      initially. For example, if you defined the subgroup to include
  8611.      records where State = CA, all records added or modified in the
  8612.      database since you created the Subgroup index are added to it,
  8613.      no matter what the State. Thus, you need to recreate this
  8614.      index if
  8615.      you update the database.
  8616.  
  8617.  
  8618.      Renaming an Index
  8619.  
  8620.      You may find it necessary to rename an index. PC-File allows
  8621.      you to do this easily.
  8622.  
  8623.      To rename an index:
  8624.  
  8625.      1.Choose File from the menu bar.
  8626.  
  8627.      2.Choose Index Maintenance from the File menu. The Index
  8628.        Maintenance dialog box displays including a list of the
  8629.        available indexes.
  8630.  
  8631.      3.Select the index you want to rename from the Indexes list.
  8632.  
  8633.      4.Choose Rename Index. The Rename Index dialog box will
  8634.        display.
  8635.  
  8636.      5.Type in a new name up to 30 characters long.
  8637.  
  8638.      6.Choose OK.
  8639.  
  8640.      Modifying an Index Expression
  8641.  
  8642.      If you find that an index doesn't quite work the way you
  8643.      hoped, you can modify the index expression using the Formula
  8644.      option and try it again. To modify an expression, start by
  8645.      making a new index, then display a pattern of the one you want
  8646.      to edit. Make changes to expression, then build the new index.
  8647.      Then delete the original "problem" index as described in the
  8648.      "Deleting an Index" section later in this chapter.
  8649.  
  8650.      To modify an index expression:
  8651.  
  8652.      1.Choose File from the menu bar.
  8653.  
  8654.      2.Choose Index Maintenance from the File menu.
  8655.  
  8656.      3.Choose Make Index.
  8657.  
  8658.  
  8659.  
  8660.  
  8661.      PC-File Version 7 Users Guide                            146
  8662.  
  8663.  
  8664.  
  8665.      4.Choose Formula.
  8666.  
  8667.      5.Choose the Pattern after button.
  8668.  
  8669.      6.Choose the index you want to use as a pattern.
  8670.  
  8671.      7.Modify the expression.
  8672.  
  8673.      8.Choose OK.
  8674.  
  8675.      9.Enter a name for the index up to 30 characters long or
  8676.        accept the default.
  8677.  
  8678.      10.  Choose OK. PC-File builds the index.
  8679.  
  8680.      11.  Delete the old index as described in the "Deleting an
  8681.        Index" section later in this chapter.
  8682.  
  8683.      Rebuilding Indexes
  8684.  
  8685.      Sometimes indexes need to be rebuilt. Rebuilding an index
  8686.      recreates the index, though with the same definition, the same
  8687.      name, and the same file name. If you want to make changes to
  8688.      the index, you have to make a new index instead.
  8689.  
  8690.      PC-File allows you to rebuild just one index or all your
  8691.      indexes at once. The Index Maintenance dialog box provides
  8692.      both options. There are two ways to rebuild indexes:
  8693.  
  8694.        Choose "Rebuild Index" or "Rebuild All" from the Index
  8695.        Maintenance dialog box
  8696.  
  8697.        Choose "Rebuild the index" when PC-File prompts you to
  8698.        rebuild an index
  8699.  
  8700.      If you suspect a problem with an index, rebuilding the indexes
  8701.      in the database may solve the problem. For example, if your
  8702.      searches aren't working properly, try rebuilding the indexes.
  8703.      You may find that takes care of the problem.
  8704.  
  8705.      To rebuild one index:
  8706.  
  8707.      1.Choose File from the menu bar.
  8708.  
  8709.      2.Choose Index Maintenance from the File menu. The Index
  8710.        Maintenance dialog box displays including a list of the
  8711.        available indexes.
  8712.  
  8713.      3.Select the index to rebuild from the Indexes list.
  8714.  
  8715.      4.Choose Rebuild Index. PC-File rebuilds that index.
  8716.  
  8717.      To rebuild all indexes:
  8718.  
  8719.      1.Choose File from the menu bar.
  8720.  
  8721.  
  8722.  
  8723.  
  8724.      PC-File Version 7 Users Guide                            147
  8725.  
  8726.  
  8727.  
  8728.      2.Choose Index Maintenance from the File menu. The Index
  8729.        Maintenance dialog box displays.
  8730.  
  8731.      3.Choose Rebuild All.
  8732.  
  8733.      4.Choose OK.
  8734.  
  8735.      PC-File rebuilds all the indexes in the current database.
  8736.  
  8737.      NOTE: When you choose to rebuild all the indexes in the
  8738.      database, PC- File deletes the Subgroup index if there is one.
  8739.      You can't rebuild a Subgroup index; you have to remake it.
  8740.  
  8741.      Rebuilding "Bad" Indexes
  8742.  
  8743.      If PC-File detects a "bad" index, it displays a dialog box
  8744.      that lets you decide how you want to handle it.
  8745.  
  8746.      "Bad" indexes can result in a variety of circumstances. If a
  8747.      power outage occurred when adding records, your indexes may be
  8748.      corrupted. If this were to happen, you would rebuild all the
  8749.      indexes for the database that were in use at the time of the
  8750.      power interruption. See Chapter 13, "Repairing a Database" for
  8751.      more information.
  8752.  
  8753.      You can choose to Rebuild the index, delete the index, or
  8754.      ignore the warning.
  8755.  
  8756.      Ignoring the warning is the same as choosing Cancel.
  8757.  
  8758.      To rebuild an index when prompted:
  8759.  
  8760.      1.Choose Rebuild the Index when the Bad Index dialog box
  8761.        displays. PC-File rebuilds the index.
  8762.  
  8763.      Bad indexes can also result from a corrupted data or index
  8764.      file or from a damaged disk. You can try copying your files to
  8765.      another directory to see if that remedies the problem. You can
  8766.      also run the DOS CHKDSK /F command to check for damaged files.
  8767.      See your DOS manual for information on using this command. See
  8768.      Chapter 11, "Repairing a Database" for more details on how to
  8769.      address a corrupted database.
  8770.  
  8771.      WARNING: Exit from ALL programs and applications before
  8772.      running the CHKDSK /F command. Do not use the Drop to DOS
  8773.      option to run this command. If you are running Windows, exit
  8774.      from Windows and return to the DOS prompt before running the
  8775.      command. Otherwise, damage to the File Allocation Table on
  8776.      your hard disk can result.
  8777.  
  8778.      Deleting an Index
  8779.  
  8780.  
  8781.  
  8782.  
  8783.      PC-File Version 7 Users Guide                            148
  8784.  
  8785.  
  8786.      Too many indexed fields in a database slow down operations and
  8787.      take up space. Each time you add, modify, or delete data in a
  8788.      database, PC-File updates each index. This takes time. If you
  8789.      have indexes that you don't use for sorting or searching, get
  8790.      rid of them. You can always redefine them if you find a need
  8791.      for them in the future.
  8792.  
  8793.      When you delete an index, PC-File deletes the file for that
  8794.      index and removes any reference to the index in the header
  8795.      file.
  8796.  
  8797.      To delete an index:
  8798.  
  8799.      1.Choose File from the menu bar.
  8800.  
  8801.      2.Choose Index Maintenance from the File menu. The Index
  8802.        Maintenance dialog box displays including a list of the
  8803.        available indexes.
  8804.  
  8805.      3.Select the index you want to delete from the Indexes list.
  8806.  
  8807.      4.Choose Delete Index. The index is deleted from the database.
  8808.  
  8809.      NOTE: If you delete an index file with the DOS DELETE command,
  8810.      the reference to the index in the header file doesn't get
  8811.      deleted. As a result, PC-File warns you that the index may be
  8812.      damaged the next time you open the database.
  8813.  
  8814.      PC-File Index Files
  8815.  
  8816.      In previous versions of PC-File (PC-File:dB, PC-File 5.x, and
  8817.      PC-File 6.x), index files were saved to whatever name the user
  8818.      specified using .NDX extensions. This could sometimes cause
  8819.      problems because index files from different database could be
  8820.      accidentally overwritten.
  8821.  
  8822.      In this version of PC-File, all indexes for a database are
  8823.      saved to the same name as the database with an .NDn extention,
  8824.      where "n" is a digit 0-9. For example, if a database named
  8825.      CONTACTS has three indexes defined for it the indexes would be
  8826.      named: CONTACTS.ND0, CONTACTS.ND1, and CONTACTS.ND3.
  8827.  
  8828.      This naming convention applies to all indexes regardless of
  8829.      how they were defined.
  8830.  
  8831.  
  8832.  
  8833.  
  8834.      PC-File Version 7 Users Guide                            149
  8835.  
  8836.  
  8837.  
  8838.  
  8839.      CHAPTER 9 CREATING REPORTS
  8840.  
  8841.      Reports are one of the most important features of a database
  8842.      program. Reports let you rearrange your data for viewing or
  8843.      printing in a wide variety of formats. You can create mailing
  8844.      labels, phone lists, invoices, checks, inventories, and
  8845.      quarterly sales reports. This chapter tells you how to create
  8846.      a new report. See Chapter 11, "Printing Reports and Letters,"
  8847.      for information on printing a report.
  8848.  
  8849.  
  8850.  
  8851.      Introduction
  8852.  
  8853.      Use PC-File to create the report that fits your needs using a
  8854.      format that fits your experience.
  8855.  
  8856.      Fit your needs by creating any of a wide variety of report
  8857.      types, including mailing labels and phone lists, invoices,
  8858.      checks, inventory reports, and quarterly sales reports.
  8859.  
  8860.      Fit your experience by selecting the report-generating format
  8861.      that's right for you. PC-File provides five formats for your
  8862.      use, ranging from an easy single record per page format to a
  8863.      very flexible but also complex command statement format.
  8864.  
  8865.      When you create a report, you essentially create a report
  8866.      structure. The structure is saved to a separate file. The file
  8867.      carries the report name and the extension .REP.
  8868.  
  8869.      Choosing a Report Format
  8870.  
  8871.      PC-File provides five format options for defining a report:
  8872.      Page, Row, Mail label, Free form, and Language. If you are
  8873.      inexperienced in creating reports, consider using one of the
  8874.      first three options, as PC- File leads you through the
  8875.      operation each step of the way.
  8876.  
  8877.      More experienced users should select the format that serves
  8878.      their current needs. The simpler formats are generally faster,
  8879.      but not as flexible as the Free form and Language formats.
  8880.      However, you can define a report using any format, then go
  8881.      back and edit it with either the Free form or Language
  8882.      formats. Thus, you could lay out a report quickly with the Row
  8883.      format, for example, then edit the report to add whatever
  8884.      changes and features you want.
  8885.  
  8886.      The five report formats are explained briefly below. Choose
  8887.      the format that will help you produce the report you want.
  8888.  
  8889.      PAGE
  8890.  
  8891.  
  8892.  
  8893.  
  8894.      PC-File Version 7 Users Guide                            150
  8895.  
  8896.  
  8897.      Prints one record per page-similar to the format of a data
  8898.      entry screen designed with the Record view designer. All the
  8899.      fields in the database are used, and all or some records are
  8900.      printed. This is the quickest and easiest format.
  8901.  
  8902.      ROW
  8903.  
  8904.      Prints the data in columns, with the field names listed across
  8905.      the top of the screen. You can select and order the fields you
  8906.      want displayed. Automatically totals and subtotals numeric
  8907.      fields. Also lets you enter a title for the report.
  8908.  
  8909.      MAIL LABEL
  8910.  
  8911.      Defines simple mailing labels in a single column format. This
  8912.      format is also useful for defining snapshot labels. For multi-
  8913.      column mailing labels, use the mailing label program (PC-
  8914.      Label) described in Chapter 14.
  8915.  
  8916.      FREE FORM
  8917.  
  8918.      Lets you "paint" the report on the screen. You place titles,
  8919.      headings, and fields where you want them. This is the most
  8920.      visual format for creating a report, as you can see what your
  8921.      report will look like as you create it. Use this format when
  8922.      you want more flexibility of design than found in the first
  8923.      three formats.
  8924.  
  8925.      Along with giving you a lot more flexibility in the design of
  8926.      the report, the Free form format lets you subtotal and total
  8927.      numeric fields, add system fields, perform calculations, and
  8928.      add miscellaneous text and lines. You can also use Free form
  8929.      to edit a report, although complex reports are better edited
  8930.      using the Language format.
  8931.  
  8932.      LANGUAGE
  8933.  
  8934.      Gives you complete flexibility and control over your report.
  8935.      In addition to the operations permitted with the Free form
  8936.      format, the Language format allows you to use IF commands,
  8937.      perform calculations on subtotals and totals, use buckets to
  8938.      accumulate totals and hold string text, and use the
  8939.      conditional page command.
  8940.  
  8941.      The Language format lets you edit any report, no matter what
  8942.      format you produced it in. However, the Language format does
  8943.      require some knowledge of programming concepts.
  8944.  
  8945.  
  8946.      Using the Page Format
  8947.  
  8948.      The Page format provides the quickest and easiest method for
  8949.      creating a report. Each record is printed on a separate page,
  8950.      with the fields arranged just as they appear in one of your
  8951.      Record views.
  8952.  
  8953.  
  8954.  
  8955.  
  8956.      PC-File Version 7 Users Guide                            151
  8957.  
  8958.  
  8959.      All fields defined in the Record view you choose are used in
  8960.      the report. Reports stretch to as many pages as necessary for
  8961.      each record to accommodate all the fields.
  8962.  
  8963.      To create a report using Page format:
  8964.  
  8965.      1.Choose Print from the menu bar.
  8966.  
  8967.      2.Choose Reports from the Print menu.
  8968.  
  8969.      3.Choose New from the dialog box listing the operations.
  8970.  
  8971.      4.Choose Page from the dialog box listing the formats.
  8972.  
  8973.      5.A dialog displays to choose which Record view to pattern
  8974.        your page report on.
  8975.  
  8976.      6.Choose the view you want from the list.
  8977.  
  8978.      7.   Choose OK. PC-File creates the report while you wait.
  8979.  
  8980.      8.When prompted to save the report, choose Yes or No. Choose
  8981.        Yes if you want to save the report for future viewing or
  8982.        printing. Choose No if you want to print or view the report
  8983.        only once, and don't want to save it. PC-File displays the
  8984.        Print options dialog box. See Chapter 11 for information on
  8985.        printing reports.
  8986.  
  8987.      9.If you chose Yes in the previous step, enter a report
  8988.        description of up to 50 characters. Choose OK when you
  8989.        finish. The description is optional, but can be useful in
  8990.        reminding you of the contents of the report at some later
  8991.        date.
  8992.  
  8993.      10.  Enter a report name of up to eight characters. Choose OK.
  8994.        The Print options dialog box displays. See Chapter 11 for
  8995.        information on printing reports.
  8996.  
  8997.      Using the Row Format
  8998.  
  8999.      A report defined in the Row format lines up the data in
  9000.      columns across the page. This format lets you choose the
  9001.      fields to be printed and select their order of appearance. You
  9002.      can also enter a title for the report, either when creating
  9003.      the report or prior to printing.
  9004.  
  9005.      Limiting the number of fields allows you to create specialized
  9006.      reports within a database. For example, five of 12 fields were
  9007.      selected to create the report shown above. In the same
  9008.      database you could run out a phone list by selecting the name
  9009.      and phone number fields.
  9010.  
  9011.  
  9012.  
  9013.  
  9014.      PC-File Version 7 Users Guide                            152
  9015.  
  9016.  
  9017.      PC-File prints the fields side by side with one space between
  9018.      each field. If the report is printed to the screen and is
  9019.      wider than 79 characters, only the first 79 characters of each
  9020.      row are displayed. When sending the report to the printer, the
  9021.      width should not exceed what the printer can print on one
  9022.      line. Consider using condensed type if it does run over
  9023.      somewhat.
  9024.  
  9025.      All numeric fields used in a Row-formatted report generate
  9026.      subtotals and totals, which are printed in the appropriate
  9027.      places in the report.
  9028.  
  9029.      NOTE: To print Subtotals, you must also choose the Subtotals
  9030.      option in the Print options dialog box. See Chapter 11 for
  9031.      information about this operation.
  9032.  
  9033.      Only the display length of character and memo fields prints
  9034.      when you use the Row format. To print the entire field, you
  9035.      must edit the field using the Free form or Language format.
  9036.      See the section on using these formats later in this chapter
  9037.      for more information.
  9038.  
  9039.      To create a report using Row format:
  9040.  
  9041.      1.Choose Print from the menu bar.
  9042.  
  9043.      2.Choose Reports from the Print menu.
  9044.  
  9045.      3.Choose New from the dialog box listing the operations.
  9046.  
  9047.      4.Choose Row from the dialog box listing the formats. PC-File
  9048.        displays a check-off dialog box, listing the fields in your
  9049.        database.
  9050.  
  9051.      5.Choose the fields you want to appear on the report, in the
  9052.        order that you want them to appear.
  9053.  
  9054.      6.Choose OK when you are finished choosing all the fields to
  9055.        include in your row report.
  9056.  
  9057.      7.The Title dialog box displays.
  9058.  
  9059.      8.Enter a permanent title for the teport. If you leave this
  9060.        box blank, PC-File prompts you for a temporary title each
  9061.        time you print the report. A permanent title can be up to 65
  9062.        characters in length, while temporary titles can only be 35
  9063.        characters in length.
  9064.  
  9065.      9.When prompted to save the report, choose Yes or No. Choose
  9066.        Yes if you want to save the report for future viewing or
  9067.        printing. Choose No if you want to print or view the report
  9068.        only once, and don't want to save it. PC-File displays the
  9069.        Print options dialog box. See Chapter 11 for information on
  9070.        printing reports.
  9071.  
  9072.  
  9073.  
  9074.  
  9075.      PC-File Version 7 Users Guide                            153
  9076.  
  9077.  
  9078.      10.  If you chose Yes in the previous step, enter a report
  9079.        description of up to 50 characters. Choose OK when you
  9080.        finish. The description is optional, but can be useful in
  9081.        reminding you of the contents of the report at some later
  9082.        date.
  9083.  
  9084.      11.  Enter a report name of up to eight characters. Choose OK.
  9085.        The Print options dialog box displays. See Chapter 11 for
  9086.        information on printing reports.
  9087.  
  9088.      Using the Mail Label Format
  9089.  
  9090.      Use the Mail label format to define simple mailing labels to
  9091.      be printed in single column format. The mail label option is
  9092.      also used to create a format for snapshot labels. See Chapter
  9093.      15, "Tools" for information on snapshot labels.
  9094.  
  9095.      For more complex labels, such as labels in a side by side
  9096.      format, use the PC-Label utility, described in Chapter 14.
  9097.  
  9098.      When you create labels using this format, first determine the
  9099.      number of print lines per label. The print lines are the total
  9100.      number of lines from the top of one mailing label to the top
  9101.      of the next label. The print lines include both the lines on
  9102.      which the name and address are printed and the blank lines
  9103.      above or below the name and address. The common one-inch label
  9104.      has six lines, but your label stock may have a different
  9105.      number of lines. Font size can also determine the number of
  9106.      lines on your
  9107.      label.
  9108.  
  9109.      To create a report using Mail label format:
  9110.  
  9111.      1.Choose Print from the menu bar.
  9112.  
  9113.      2.Choose Reports from the Print menu.
  9114.  
  9115.      3.Choose New from the dialog box listing the operations.
  9116.  
  9117.      4.Choose Mail label from the dialog box listing the formats.
  9118.  
  9119.      5.Enter the number of print lines for each label. The default
  9120.        is 6.
  9121.  
  9122.      6.Choose OK.
  9123.  
  9124.      7.The dialog box to select the fields to print on the first
  9125.        line of the label displays.
  9126.  
  9127.      8.Select the fields that you want to print on the line in the
  9128.        order you want them printed across the line. For example, to
  9129.        print a first name field followed by a last name field:
  9130.        Select the field containing the first name first, then
  9131.        select the field containing the last name. Each field is
  9132.        numbered as you select it and it displays in the Selected
  9133.        list.
  9134.  
  9135.  
  9136.  
  9137.  
  9138.      PC-File Version 7 Users Guide                            154
  9139.  
  9140.  
  9141.  
  9142.      9.Choose OK when you are finished selecting all the fields for
  9143.        that line. If you want to leave the line blank, choose OK
  9144.        without selecting any fields.
  9145.  
  9146.      10.  Repeat steps 8 and 9 for each of the following lines. The
  9147.        numbering starts over for each line. Choose OK after
  9148.        selecting the fields for each line.
  9149.  
  9150.      11.  When prompted to save the report, choose Yes or No.
  9151.        Choose Yes if you want to save the labels for future viewing
  9152.        or printing. Choose No if you want to print or view the
  9153.        report only once, and don't want to save it. PC-File
  9154.        displays the Print options dialog box. See Chapter 11 for
  9155.        information on printing reports.
  9156.  
  9157.      12.  If you chose Yes in the previous step, enter a report
  9158.        description of up to 50 characters. Choose OK when you
  9159.        finish. The description is optional, but can be useful in
  9160.        reminding you of the contents of the report at some later
  9161.        date.
  9162.  
  9163.      13.  Enter a report name of up to eight characters. Choose OK.
  9164.  
  9165.      The Print options dialog box displays. See Chapter 11 for
  9166.      information on printing reports.
  9167.  
  9168.      Lines that have no data to print from a given record are
  9169.      removed automatically by PC-File. Thus, you can format the
  9170.      label for three line addresses, knowing that records with only
  9171.      two lines worth of data will print neatly.
  9172.  
  9173.      This format prints one space between fields which appear on
  9174.      the same line. If you want punctuation between fields, you can
  9175.      either include it in the field when you enter data or edit the
  9176.      report using the Free form or Language format.
  9177.  
  9178.      Using the Free Form Format
  9179.  
  9180.      The Free form format lets you create a report by painting it
  9181.      directly on the screen. Giving you much more flexibility than
  9182.      the Row, Page, and Label formats, the Free form format lets
  9183.      you enter title lines and headings, locate fields where you
  9184.      want, draw lines, and sum the data into subtotals and totals.
  9185.  
  9186.      While providing flexibility, Free form also makes creating a
  9187.      report relatively easy. You use a special edit window divided
  9188.      into six sections to create your report. This allows you to
  9189.      build the report piece-by-piece. You can format fields
  9190.      directly from the keyboard, or you can have PC-File enter
  9191.      fields for you. Report fields can pull data from database
  9192.      fields, system fields (like the computer's clock),
  9193.      calculations, and field totals.
  9194.  
  9195.  
  9196.  
  9197.  
  9198.      PC-File Version 7 Users Guide                            155
  9199.  
  9200.  
  9201.      You can also edit any existing report, no matter what format
  9202.      you used to create it. Thus, you can define a quick report
  9203.      with the Page format, then display the report in Free form and
  9204.      play around with it until you get exactly what you want.
  9205.  
  9206.      Procedures for Creating a Free Form Report
  9207.  
  9208.      This section briefly outlines the procedures for creating a
  9209.      new report using the Free form format. Each of the various
  9210.      features that go into making up a Free form report, such as
  9211.      text and fields, are covered in more depth later in this
  9212.      section.
  9213.  
  9214.      To create a Free form report:
  9215.  
  9216.      1.Choose Print from the menu bar.
  9217.  
  9218.      2.Choose Reports from the Print menu.
  9219.  
  9220.      3.Choose New from the dialog box listing the operations.
  9221.  
  9222.      4.Choose Free form from the dialog box listing the formats.
  9223.        The Free form edit window displays.
  9224.  
  9225.      5.Paint the report on the screen. Enter text, fields, and any
  9226.        lines or boxes within the appropriate sections. Choose OK
  9227.        when you finish.
  9228.  
  9229.      6.Choose Yes or No when prompted to save the report. Choose
  9230.        Yes if you want to save the report for future viewing or
  9231.        printing. Choose No if you want to print or view the report
  9232.        only once, and don't want to save it. PC-File displays the
  9233.        Print options dialog box. See Chapter 11 for information on
  9234.        printing reports.
  9235.  
  9236.      7.If you chose Yes in the previous step, enter a report
  9237.        description of up to 50 characters. Choose OK when you
  9238.        finish. The description is optional, but can be useful in
  9239.        reminding you of the contents of the report at some later
  9240.        date.
  9241.  
  9242.      8.Enter a report name of up to eight characters. Choose OK.
  9243.  
  9244.      The Print options dialog box displays. See Chapter 11 for
  9245.      information on printing reports.
  9246.  
  9247.      Procedures for Modifying a Report Using Free Form
  9248.  
  9249.      You can display any existing report in the Free form edit
  9250.      window. You can then make changes to it and add any features
  9251.      available in Free form. Thus, you might find it useful to
  9252.      create a report quickly with another format, such as Row, then
  9253.      add to the report structure as needed by modifying it in the
  9254.      Free form window.
  9255.  
  9256.      To modify a report in the Free form window:
  9257.  
  9258.  
  9259.  
  9260.  
  9261.      PC-File Version 7 Users Guide                            156
  9262.  
  9263.  
  9264.  
  9265.      1.Choose Print from the menu bar.
  9266.  
  9267.      2.Choose Reports from the Print menu.
  9268.  
  9269.      3.Choose Modify from the dialog box listing the operations.
  9270.  
  9271.      4.Choose Free form from the dialog box listing the edit
  9272.        formats. PC-File displays the Free form edit window.
  9273.  
  9274.      5.Choose File from edit window menu bar.
  9275.  
  9276.      6.Choose Open from the File menu.
  9277.  
  9278.      7.Choose the report you want to modify from the file selection
  9279.        dialog box. The report displays in the edit window, broken
  9280.        down appropriately between the different sections.
  9281.  
  9282.      8.Make your changes to the report.
  9283.  
  9284.      9.Choose Save from the File menu when you finish. If you want
  9285.        to save the modified report under a new name, choose Save As
  9286.        instead. The original report remains unchanged in that case.
  9287.  
  9288.      10.  Enter a new description or leave the default. The Print
  9289.        options dialog box displays. See Chapter 11 for information
  9290.        on printing reports.
  9291.  
  9292.      Free Form Guidelines
  9293.  
  9294.      Though the Free form edit window is divided into sections, it
  9295.      is the same edit window found elsewhere in PC-File.
  9296.  
  9297.      Follow these guidelines in using the edit window and creating
  9298.      a Free form report:
  9299.  
  9300.      Sections
  9301.  
  9302.      The edit window is divided into the six report sections. Each
  9303.      section will scroll up to 120 characters wide. There is no way
  9304.      to set a right margin to wrap lines-you must indicate the end
  9305.      of a line manually by pressing ENTER when you want to break to
  9306.      a new line. Enter only the information in each section that
  9307.      you intend. If you don't want to use a section, leave it
  9308.      blank. The end marker (<<) should appear in the first line of
  9309.      those sections you leave blank.
  9310.  
  9311.      You don't have to define the report in the order suggested by
  9312.      the sections. If fact, it may be easier to enter fields in the
  9313.      Detail section of the report before doing anything else. That
  9314.      can help you line up headings in the Heading section, and
  9315.      subtotals and totals in their respective sections.
  9316.  
  9317.      Formatting Commands
  9318.  
  9319.  
  9320.  
  9321.  
  9322.      PC-File Version 7 Users Guide                            157
  9323.  
  9324.  
  9325.      Use formatting commands to force a new page, compress out
  9326.      blank lines, or enter printer codes. The formatting commands
  9327.      are described in detail beginning on page 202. You can use any
  9328.      of the formatting commands that begin with a period, like .FF
  9329.      or .GROUP. Enter these commands on a separate line.
  9330.  
  9331.      Blank lines
  9332.  
  9333.      All blank lines are saved and printed as blank lines. Enter
  9334.      only those blank lines that you want.
  9335.  
  9336.      Lines
  9337.  
  9338.      You can use the hyphen or underscore characters to create
  9339.      lines on a report, or you can use ASCII characters to make
  9340.      lines and boxes. See the section on creating lines and boxes
  9341.      in Chapter 1, "Navigating in PC-File," for more information.
  9342.      Use lines in any section of a report format.
  9343.  
  9344.      Text
  9345.  
  9346.      Anything typed in the edit window other than form feeds or
  9347.      fields (indicated by field markers) is text. Text is printed
  9348.      on the report just as it is entered on the screen. Uppercase
  9349.      and lowercase letters are read as entered.
  9350.  
  9351.      The Free Form Window
  9352.  
  9353.      The Free form edit window is divided into six sections,
  9354.      representing the six parts of a Free form report.
  9355.  
  9356.      Navigating in Free Form
  9357.  
  9358.      This section explains how to move between and within the six
  9359.      sections of the Free form edit window, how to expand each
  9360.      section for easier use, and how to determine the current
  9361.      location of the cursor.
  9362.  
  9363.      To move between sections:
  9364.  
  9365.      1.Click on the appropriate section with the mouse. With the
  9366.        keyboard, use TAB and SHIFT-TAB to move between the
  9367.        sections. The active section of the window is shaded darker
  9368.        than the rest of the window.
  9369.  
  9370.      You can "paint" a report within each section in either of two
  9371.      views:
  9372.  
  9373.        A contracted view
  9374.  
  9375.        An expanded view
  9376.  
  9377.  
  9378.  
  9379.  
  9380.      PC-File Version 7 Users Guide                            158
  9381.  
  9382.  
  9383.      The contracted view is the view you see of each section when
  9384.      you first open the Free form edit window. You can enter text
  9385.      and fields in this view, but you can only see two or three
  9386.      lines of the section at a time. As you move from one line to
  9387.      another within a section, a new line scrolls into view.
  9388.  
  9389.      Expanding each section individually makes it easier to define
  9390.      and format that section, as well as to visualize what you are
  9391.      doing. However, the menus are unavailable when a section is
  9392.      expanded.
  9393.  
  9394.      To expand a section to a window:
  9395.  
  9396.      1.Place the cursor in the section you want to expand.
  9397.  
  9398.      2.Press CTRL-E. The section expands to a window.
  9399.  
  9400.      Paint your report in this format, then choose OK to return the
  9401.      section window to its original contracted size.
  9402.  
  9403.      If necessary, you can determine the current location of the
  9404.      cursor in the edit window, in either the contracted or
  9405.      expanded section windows. This can be handy for lining up
  9406.      fields with their respective column headings.
  9407.  
  9408.      To display the cursor location:
  9409.  
  9410.      1.Press CTRL-W. A dialog box displays, indicating the current
  9411.        row and column location of the cursor.
  9412.  
  9413.      2.Choose OK to return to the edit window.
  9414.  
  9415.      Report Sections
  9416.  
  9417.      A Free form report consists of up to six sections. These
  9418.      sections- Cover, Heading, Detail, Subtotal, Total, and
  9419.      Footing-each control a specific part of the report. Only those
  9420.      sections you define in your report are used when the report is
  9421.      printed.
  9422.  
  9423.      Cover
  9424.  
  9425.      This section is used to print text once at the beginning of a
  9426.      report. You can define a separate title page or print a title
  9427.      at the top of the first page of the report. Use a form feed
  9428.      (.FF) after the title to locate it on a separate title page.
  9429.  
  9430.      Heading
  9431.  
  9432.      The text in the Heading section is printed at the top of each
  9433.      page. Use this section to print titles, page numbers, column
  9434.      headings, and lines under the headings.
  9435.  
  9436.      Detail
  9437.  
  9438.  
  9439.  
  9440.  
  9441.      PC-File Version 7 Users Guide                            159
  9442.  
  9443.  
  9444.      This is the most important section, as it is here that the
  9445.      records from the database are printed. Everything in the
  9446.      Detail section is printed once for each record selected.
  9447.      Without a Detail section, data from individual records won't
  9448.      be printed.
  9449.  
  9450.      Subtotal
  9451.  
  9452.      The Subtotal section is only printed when a subtotal break is
  9453.      requested. The Subtotal section can be used to print text,
  9454.      subtotals of numeric fields, and blank lines.
  9455.  
  9456.      Total
  9457.  
  9458.      The Total section is printed at the end of a report after all
  9459.      of the records have been printed. Items that usually appear in
  9460.      the Total section include totals for numeric fields, the
  9461.      number of records printed, and any criteria used for selecting
  9462.      records.
  9463.  
  9464.      Footing
  9465.  
  9466.      This section is printed at the end of each page, and
  9467.      determines the bottom margin on each page. Information in the
  9468.      Footing section can include page numbers, blank lines, and
  9469.      text. The Footing section is required in any report that
  9470.      includes any section other than a Detail section, and with any
  9471.      report that needs a bottom margin on each page. The Footing
  9472.      section should contain at least one printed line (which can be
  9473.      blank).
  9474.  
  9475.      The Free Form Menus
  9476.  
  9477.      The menu bar at the top of the Free form window contains three
  9478.      options. Two of the options-File and Data-display pull-down
  9479.      menus when selected. The Help option displays a Help window.
  9480.  
  9481.      Using the File Menu
  9482.  
  9483.      Use the File menu to open and save reports.
  9484.  
  9485.      Option    Purpose
  9486.  
  9487.      New       Start a new report
  9488.  
  9489.      Open      Display an existing report
  9490.  
  9491.      Save As   Save the current report to a new name or 
  9492.           directory
  9493.  
  9494.      OK        Quit the Free form edit window; PC-File prompts you
  9495.      to save
  9496.  
  9497.      Cancel    Quit the Free form edit window
  9498.  
  9499.  
  9500.  
  9501.  
  9502.      PC-File Version 7 Users Guide                            160
  9503.  
  9504.  
  9505.      When you first display the Free form edit window for the
  9506.      purpose of creating a report, you don't need to choose New
  9507.      from the File menu. This option is designed to clear an
  9508.      existing report from the screen and provide you with an empty
  9509.      edit window for starting a new report.
  9510.  
  9511.  
  9512.      Using the Data Menu
  9513.  
  9514.      You can enter fields in your report from the keyboard or have
  9515.      PC-File enter them for you. Use the options on the Data menu
  9516.      to have PC-File enter the fields.
  9517.  
  9518.      Option              Purpose
  9519.  
  9520.      Field (trimmed)     Displays a field selection dialog box.
  9521.      Choose a field from the dialog box. Enters data with the
  9522.      spaces removed.
  9523.  
  9524.      Field (padded)      Displays a field selection dialog box.
  9525.      Choose a field from the dialog box. Enters data without the
  9526.      spaces removed.
  9527.  
  9528.      Field (bar code)    Displays a field selection dialog box,
  9529.      followed by bar code type and bar code height dialog boxes.
  9530.      Enters data formatted to print as bar code. See "Printing Bar
  9531.      Codes" later in this chapter for details.
  9532.  
  9533.      System field        Displays a list of system field options.
  9534.      Choose an option to enter system-generated data.
  9535.  
  9536.      Calculation         Displays a text box for entering a
  9537.      calculation. Data is generated by the calculation.
  9538.  
  9539.      Lookup (relational)      Displays relational lookup definition
  9540.      dialog boxes. See "Defining Relational Lookups" for details.
  9541.  
  9542.  
  9543.      Entering Text
  9544.  
  9545.      Use text in a Free form report for titles, field headings and
  9546.      labels, lines and boxes, and miscellaneous descriptions or
  9547.      information. To enter text, place the cursor where you want
  9548.      the text to begin and type the text from the keyboard. PC-File
  9549.      prints uppercase and lowercase letters just as they are
  9550.      entered.
  9551.  
  9552.      Be sure you enter text in the correct section of the report.
  9553.      If you want the title of the report to print at the beginning
  9554.      only, for example, enter it in the Cover section. If you want
  9555.      it printed on every page, place it in the Heading section.
  9556.  
  9557.  
  9558.  
  9559.  
  9560.      PC-File Version 7 Users Guide                            161
  9561.  
  9562.  
  9563.      Most if not all fields should have labels, headings, or a
  9564.      description associated with them on the report. In rare cases,
  9565.      data can stand alone without some kind of descriptive label
  9566.      next to it or above it. For example, the current date
  9567.      displayed at the top of a report normally doesn't need to be
  9568.      identified.
  9569.  
  9570.      If you build the report to display columns of data, use field
  9571.      headings above the data. Headings generally should be entered
  9572.      in the Heading section of a report. They are then printed on
  9573.      each page of the report, making it clear for readers to
  9574.      understand what the data is without having to refer back to
  9575.      the first page. The following report illustrates the use of
  9576.      field headings.
  9577.  
  9578.      Field headings are often enhanced by entering a single or
  9579.      double line beneath them. You can use the hyphen or equal sign
  9580.      for this purpose, though on most printers these produce broken
  9581.      lines. Use line characters from the ASCII table to create a
  9582.      solid line. See the section on creating lines and boxes in
  9583.      Chapter 1, "Navigating in PC-File," for more information on
  9584.      these characters.
  9585.  
  9586.      Locating Fields
  9587.  
  9588.      Fields are defined in a Free form report to pull data from one
  9589.      of four places:
  9590.  
  9591.        Database fields
  9592.        A calculation
  9593.        The system (such as the computer's clock)
  9594.        A summation of other fields
  9595.  
  9596.      You can locate fields in any of the six sections of a report,
  9597.      but there are limitations on the type of field you can locate
  9598.      in certain sections. These limitations are outlined below:
  9599.  
  9600.           Section: Valid Fields
  9601.  
  9602.           Cover: System fields
  9603.  
  9604.           Heading, Detail, and Footing: System fields, database
  9605.           fields, and calculated fields
  9606.  
  9607.           Subtotal and Total: System fields and summations of other
  9608.           fields
  9609.  
  9610.  
  9611.  
  9612.  
  9613.      PC-File Version 7 Users Guide                            162
  9614.  
  9615.  
  9616.      Fields are represented in the Free form edit window with the
  9617.      use of two marker characters: the "at" sign (@) or the "pound"
  9618.      sign (#). These markers appear on the Free Form edit window
  9619.      only. They don't show up when you print a report. These
  9620.      characters are automatically placed on the screen when
  9621.      choosing options from the Data menu. If you type field marker
  9622.      characters directly from the keyboard, which character you use
  9623.      determines whether the data you have formatted for this
  9624.      location prints as a padded field or a trimmed field.
  9625.  
  9626.      The at (@) sign is used to print your data as a padded field.
  9627.      A padded field includes extra spaces to "pad" the printed data
  9628.      to the number of marker characters on the Free form edit
  9629.      window. For example, if there are 10 at signs on the report
  9630.      structure screen, but the data printing for a given record at
  9631.      that location is only 5 characters long, PC-File will "print"
  9632.      5 extra spaces at the end of the data. Padded fields are
  9633.      generally used to line up data in columns when printing more
  9634.      than one field per line.
  9635.  
  9636.      The pound sign (#) is used to print your data as a trimmed
  9637.      field. A trimmed field removes any leading or trailing spaces
  9638.      in the data, but not internal spaces. This format is commonly
  9639.      used when combining first and last name fields, and city,
  9640.      state, and zipcode fields when printing addresses.
  9641.  
  9642.      You can use either marker character with data from any field
  9643.      type, system field, subtotal, total, or calculation. You
  9644.      cannot mix the two characters within one string of marker
  9645.      characters for one field.
  9646.  
  9647.      For most fields, you can use either of two methods for
  9648.      entering the field markers:
  9649.  
  9650.        Choose options from the Data menu
  9651.  
  9652.        Type the characters directly from the keyboard
  9653.  
  9654.      If you use the options on the Data menu, PC-File prompts you
  9655.      to define the data source as you place each item. This method
  9656.      is recommended, as most users find it less confusing. If you
  9657.      enter a field from the keyboard, PC-File prompts you to define
  9658.      the data source after you finish painting the entire report.
  9659.      Both methods are described below.
  9660.  
  9661.      Guidelines for Locating Fields
  9662.  
  9663.      Follow these guidelines when locating and defining your fields
  9664.      in a report:
  9665.  
  9666.      Spacing
  9667.  
  9668.      There must be at least one space between each field, and at
  9669.      least one space between a field and any text.
  9670.  
  9671.      Field length
  9672.  
  9673.  
  9674.  
  9675.  
  9676.      PC-File Version 7 Users Guide                            163
  9677.  
  9678.  
  9679.  
  9680.      The number of field markers you enter to designate a field on
  9681.      the screen determines the number of characters that can appear
  9682.      in the report. For example, @@@@@ or ##### prints a maximum of
  9683.      five characters. If you create a field in the report that is
  9684.      shorter than the field in the database, PC-File truncates data
  9685.      that is longer than the report field. The same is true for
  9686.      system fields, summations, and calculations, so be sure to
  9687.      make your fields long enough to hold the data you expect to
  9688.      fill them with. This is generally not an issue when using the
  9689.      Data menu to place report items, because the Data menu options
  9690.      will automatically place the same number of field markers as
  9691.      the field's display length.
  9692.  
  9693.      Wrapping fields
  9694.  
  9695.      The maximum number of field markers you can use in one field
  9696.      is 65. PC-File ignores all field markers after the 65th in a
  9697.      group. For memo fields or character fields longer than 65
  9698.      characters, you can choose to print only the first 65
  9699.      characters of the field, or you can use one of two methods to
  9700.      wrap the data to two or more lines.
  9701.  
  9702.      One method is to enter a single set of field markers on your
  9703.      Free form report, then edit the report using the Language
  9704.      format. Change the print mask for the field from @'s to a
  9705.      "word wrap mask," which allows the data to wrap to its full
  9706.      length. When using this method you only have one wrapping
  9707.      field per line and no field can print to the right of that
  9708.      field. See the section, "Character Masks" later in this
  9709.      chapter for more information.
  9710.  
  9711.      The other method is to enter as many sets of @'s as necessary
  9712.      to print all the data. Then define each set of field markers
  9713.      as successive partial fields. For example, for a 100-character
  9714.      field called Description, you might define two 50-character
  9715.      partial fields, like this:
  9716.  
  9717.      Description,1,50 Description,51,50
  9718.  
  9719.      The first 50 characters of data print in the first group of at
  9720.      signs and the second 50 characters print in the second group.
  9721.  
  9722.      Entering Fields from the Data Menu
  9723.  
  9724.      You can enter any kind of field from the Data menu other than
  9725.      a summation field. Summation fields must be entered from the
  9726.      keyboard, in either the Subtotal or Total sections of the
  9727.      report.
  9728.  
  9729.      Entering fields from the Data menu is a two step operation:
  9730.  
  9731.        Choose an option from the menu.
  9732.  
  9733.        Define the data source.
  9734.  
  9735.  
  9736.  
  9737.  
  9738.      PC-File Version 7 Users Guide                            164
  9739.  
  9740.  
  9741.      Which option you select determines how you define the data
  9742.      source. For padded and trimmed fields, you choose the field
  9743.      from the field selection dialog box. For calculations, enter
  9744.      the expression in the text box. For system fields, choose one
  9745.      of 10 system field options from a dialog box.
  9746.  
  9747.      Once you define the data source, PC-File determines the
  9748.      correct field marker and the field length. For calculations,
  9749.      you are prompted for a field length.
  9750.  
  9751.      To enter fields from the Data menu:
  9752.  
  9753.      1.Place the cursor where you want the field to start.
  9754.  
  9755.      2.Choose Data from the menu bar.
  9756.  
  9757.      3.Choose the appropriate option from the Data menu. The dialog
  9758.        box that displays depends on your choice of option.
  9759.  
  9760.      4.Define the data source by choosing an option from the dialog
  9761.        box or entering a calculation. PC-File enters the field
  9762.        markers in the report.
  9763.  
  9764.      You can lengthen or shorten a field entered from the menu if
  9765.      necessary. For example, if you have defined a field with a
  9766.      field length of 15 characters, but know that none of the data
  9767.      in that field is more than 12 characters in length, you can
  9768.      shorten the field when you locate it on your report
  9769.      accordingly.
  9770.  
  9771.  
  9772.      Entering Fields from the Keyboard
  9773.  
  9774.      You can enter a field yourself by typing it into the
  9775.      appropriate section in the edit window. Use the desired marker
  9776.      character and enter the correct number of characters to
  9777.      indicate the field length. For example, type @@@@@@@@ if you
  9778.      are printing an 8-character field as a padded field. You can
  9779.      enter any type of field from the keyboard.
  9780.  
  9781.      Fields entered from the keyboard are defined in a different
  9782.      manner than fields entered from the Data menu. Since you don't
  9783.      define the source of data for a field when you just type in a
  9784.      series of field markers, PC- File has to prompt you for the
  9785.      source. It does this after you have finished painting the
  9786.      entire report and choose to save it. A dialog box displays for
  9787.      each field that must be defined. A set of question marks
  9788.      replaces the field that PC-File is prompting you to define.
  9789.      Choose the type
  9790.      of data source first, such as System field, then the source
  9791.      itself.
  9792.  
  9793.      To enter a field from the keyboard:
  9794.  
  9795.      1.Place the cursor where you want the field to start.
  9796.  
  9797.  
  9798.  
  9799.  
  9800.      PC-File Version 7 Users Guide                            165
  9801.  
  9802.  
  9803.      2.Type the field information. Indicate length by the number of
  9804.        characters you enter. Choose the field marker based on how
  9805.        you intend to define the field.
  9806.  
  9807.      To define the source of data for fields entered from the
  9808.      keyboard:
  9809.  
  9810.      1.Paint the entire report in the Free form edit window.
  9811.  
  9812.      2.Choose Save from the Free form File menu. PC-File displays a
  9813.        dialog box prompting you to define the source of data for
  9814.        the first field that you entered from the keyboard.
  9815.  
  9816.      3.Choose the appropriate data source button. Depending on the
  9817.        button you chose, PC-File prompts you to choose a database
  9818.        field or a system field, or enter a calculation.
  9819.  
  9820.      4.Choose the appropriate option or enter a calculation.
  9821.  
  9822.      5.PC-File moves to the next undefined field and prompts you
  9823.        for a data source. Fields that you defined using the Data
  9824.        menu options are skipped over, as PC-File already knows the
  9825.        data source.
  9826.  
  9827.      Defining the Fields
  9828.  
  9829.      How you define the field is determined by how you enter the
  9830.      field in the report. If you enter a field from the Data menu,
  9831.      you define the source of data for the field during the process
  9832.      of entering it on the screen. If you enter a field from the
  9833.      keyboard, PC-File prompts you to define the source of data for
  9834.      the field after you have painted your entire report in the
  9835.      edit window.
  9836.  
  9837.      No matter which method you use, however, you must define the
  9838.      source of data. This section describes each of the four source
  9839.      options:
  9840.  
  9841.        Data fields
  9842.        System fields
  9843.        Summations
  9844.        Calculations
  9845.  
  9846.      Data Fields
  9847.  
  9848.      If you enter fields from the Data menu, you can define either
  9849.      padded or trimmed fields. If you enter a field from the
  9850.      keyboard, it is assumed to be a padded field.
  9851.  
  9852.      A padded field retains blank spaces that occur in a field.
  9853.      Thus, if you define a report field as 15 characters long, 15
  9854.      characters print each time, even if some of them are blank.
  9855.      Use padded fields in reports when you want to maintain data in
  9856.      columns.
  9857.  
  9858.  
  9859.  
  9860.  
  9861.      PC-File Version 7 Users Guide                            166
  9862.  
  9863.  
  9864.      If you define a trimmed field, on the other hand, PC-File
  9865.      removes the trailing spaces, printing only the data within
  9866.      each field. Use trimmed fields for mailing labels, in
  9867.      particular, where you want the data within fields to flow
  9868.      together.
  9869.  
  9870.      For example, if you define the City, State, and Zip code
  9871.      fields as trimmed fields on an address label like this:
  9872.  
  9873.           ############, ## #####
  9874.  
  9875.      PC-File removes trailing spaces from the City field any time
  9876.      the city name is less than 12 characters in length. Thus, the
  9877.      report would produce an address like this:
  9878.  
  9879.           Seattle, WA 98103
  9880.  
  9881.      The State and Zip code fields adjust to the length of the data
  9882.      in the city field as it changes from record to record.
  9883.  
  9884.      System Fields
  9885.  
  9886.      System fields can be located in any section of the report. A
  9887.      system field pulls data directly from the computer, the
  9888.      program, the database, and even the operator. For example, you
  9889.      can use a system field to have PC-File enter the current date
  9890.      any time you print the report.
  9891.  
  9892.      There are 10 system fields supported in the Free form format,
  9893.      as follows:
  9894.  
  9895.      System field: Description
  9896.  
  9897.      Date now: The current date as determined by the computer's
  9898.      calendar.
  9899.  
  9900.      Time now: The current time as determined by the computer's
  9901.      clock.
  9902.  
  9903.      Page number: Displays the current page number, counting the
  9904.      first one as page 1.
  9905.  
  9906.      Records in database: The current number of records in the
  9907.      database.
  9908.  
  9909.      Selection criteria: Any criteria used to select records to be
  9910.      printed. For example, if you chose to just print reports with
  9911.      Washington addresses, the criteria might be STATE=WA.
  9912.  
  9913.      Index field: The index currently active when you print the
  9914.      report.
  9915.  
  9916.      Qty in Subtotal group: Number of records in the current
  9917.      subtotal.
  9918.  
  9919.      Field name of Subtotalgroup: The field you chose to subtotal.
  9920.  
  9921.  
  9922.  
  9923.  
  9924.      PC-File Version 7 Users Guide                            167
  9925.  
  9926.  
  9927.  
  9928.      Count of records printed: The total number of records printed.
  9929.  
  9930.      Operator input: PC-File prompts the user for input at this
  9931.      point.
  9932.  
  9933.  
  9934.      Summations
  9935.  
  9936.      If your report includes fields for which you want to show
  9937.      subtotals or totals, you must enter them in their respective
  9938.      section of the report. Subtotals are always defined in the
  9939.      Subtotal section and totals are always defined in the Total
  9940.      section.
  9941.  
  9942.      When you include a subtotal in a report, you define both the
  9943.      field you want to sum into subtotals and the field that
  9944.      determines the subtotal break. The subtotal break is the
  9945.      manner in which you group records that you want to subtotal.
  9946.  
  9947.      For example, you could subtotal sales volume by month or by
  9948.      department. In that case, sales would be the field you sum and
  9949.      month or department would be the break field.
  9950.  
  9951.      You define the field you want to sum when you define the field
  9952.      marker in the Subtotal section of your report. Enter a
  9953.      subtotal field marker from the keyboard only.
  9954.  
  9955.      The subtotal break field is defined later when you print the
  9956.      report using the Print Options dialog box. At that time, you
  9957.      indicate that you want to perform subtotals, then PC-File asks
  9958.      for the break field. See Chapter 11 for more information on
  9959.      this operation.
  9960.  
  9961.      If you include a total in a report, you just define which
  9962.      field to sum up. Totals only print at the end of a report.
  9963.  
  9964.      Calculations
  9965.  
  9966.      Calculations can be used in the Detail, Heading, and Footing
  9967.      sections of a report. You can use any type of calculation
  9968.      supported by PC-File. Calculations are described in Chapter
  9969.      17, "Calculations."
  9970.  
  9971.      However, you can't perform calculations on subtotals or totals
  9972.      using the Free form format. For example, you couldn't figure a
  9973.      commission based on a subtotal of sales. To do that, you would
  9974.      have to edit the report in Language format and add the
  9975.      commission calculation to the Subtotal section.
  9976.  
  9977.      Formatting and IF Commands
  9978.  
  9979.  
  9980.  
  9981.  
  9982.      PC-File Version 7 Users Guide                            168
  9983.  
  9984.  
  9985.      The Free form format supports most of the formatting commands
  9986.      described in the "Formatting Commands" section of the "Using
  9987.      the Language Format" section. Refer to the appropriate
  9988.      sections for details on how they work. The commands supported
  9989.      are:
  9990.  
  9991.      .FF
  9992.      .CP n
  9993.      .GROUP
  9994.      .EGROUP
  9995.      .EGROUP R
  9996.      .REFORMAT nn
  9997.      .ENDREFORMAT
  9998.  
  9999.      To use these commands in a Free form report enter each command
  10000.      on a line of it's own in the report section where you want it
  10001.      to take effect.
  10002.  
  10003.      The "Printer Markers" and the "Printer Control Codes" commands
  10004.      also documented in the "Formatting Commands" section of the
  10005.      "Using the Language Format" section cannot be used in Free
  10006.      form reports. However, you can edit a report originally
  10007.      formatted as a Free form report using the Language Format to
  10008.      insert these commands.
  10009.  
  10010.      You can also use the commands documented in the "IF Commands"
  10011.      section of the "Using the Language Format" section. Each IF
  10012.      command must be entered on a line of it's own in the report
  10013.      section you want affected.
  10014.  
  10015.  
  10016.      Using the Language Format
  10017.  
  10018.      As you create a report using one of the simpler formats (such
  10019.      as Row or Free form), PC-File translates it into written
  10020.      command statements. You don't see these command statements, as
  10021.      they remain below the surface of the report format, one level
  10022.      down. But it is these statements that PC- File reads when it
  10023.      prints a report.
  10024.  
  10025.      For example, when you enter a column heading with a line under
  10026.      it while painting a Free form report, PC-File translates that
  10027.      action into five command statements, as shown below.
  10028.  
  10029.      Free form
  10030.  
  10031.      Last name
  10032.      ========
  10033.  
  10034.  
  10035.      Commands
  10036.  
  10037.      =1
  10038.      "Last name"
  10039.      /1
  10040.      =1
  10041.  
  10042.  
  10043.  
  10044.  
  10045.      PC-File Version 7 Users Guide                            169
  10046.  
  10047.  
  10048.      "========"
  10049.  
  10050.      The first command statement indicates the column at which the
  10051.      heading starts, the second tells the program to print the
  10052.      heading, the third moves the printer down one line, the fourth
  10053.      indicates the column at which the line starts, and the last
  10054.      statement tells the program to draw the line.
  10055.  
  10056.      The command statements are, in a sense, the report language
  10057.      for PC- File. You can work with the command statements by
  10058.      choosing the Language format. You can either create a new
  10059.      report or edit an existing report, no matter what format was
  10060.      used to create it. In most cases, in fact, you will find it
  10061.      easier to create a report in another format, such as Row or
  10062.      Free form, then edit and customize it in the Language format.
  10063.  
  10064.      The advantage of the Language format is that it gives you the
  10065.      widest range of flexibility in PC-File. Among the features
  10066.      only available in Language format are:
  10067.  
  10068.        the ability to perform calculations upon subtotals, totals,
  10069.        and buckets
  10070.  
  10071.        the ability to use all formatting commands
  10072.  
  10073.        the ability to use printer markers and word wrap
  10074.  
  10075.      A report displayed in the Language format is a series of
  10076.      command statements, each on its own line. There are seven
  10077.      kinds of commands recognized in PC-File.
  10078.  
  10079.  
  10080.      Type of command     Description
  10081.  
  10082.      Section head        Specify the beginning of a 
  10083.                section
  10084.  
  10085.      Formatting          Define location of text and 
  10086.                fields, and set printer codes
  10087.  
  10088.      Text                Enter text, including titles, 
  10089.                column heads, and lines, in a 
  10090.           report
  10091.  
  10092.      Data field          Define which field to print
  10093.  
  10094.      System field        Pull information from the 
  10095.                computer, the database (other 
  10096.           than from a field), or from                       the
  10097.      operator
  10098.  
  10099.      Calculation         Perform a calculation or a 
  10100.                relational lookup
  10101.  
  10102.      IF                  Set conditions for performing 
  10103.                an operation
  10104.  
  10105.  
  10106.  
  10107.  
  10108.      PC-File Version 7 Users Guide                            170
  10109.  
  10110.  
  10111.  
  10112.  
  10113.      A command statement can also include print masks and buckets.
  10114.      Print masks are used to define how data is formatted when it
  10115.      prints. Buckets are used to hold data or text temporarily.
  10116.  
  10117.      Each type of command, along with print masks and buckets, is
  10118.      explained in detail later in this chapter.
  10119.  
  10120.      Procedures for Creating a Language Format Report
  10121.  
  10122.      To create a report using the Language format:
  10123.  
  10124.      1.Choose Print from the menu bar.
  10125.  
  10126.      2.Choose Reports from the Print menu.
  10127.  
  10128.      3.Choose New from the dialog box listing the operations.
  10129.  
  10130.      4.Choose Language from the dialog box listing the formats. The
  10131.        edit window displays.
  10132.  
  10133.      5.Create the report by entering the command statements in the
  10134.        edit window.
  10135.  
  10136.      6.Choose OK when you finish.
  10137.  
  10138.      7.When prompted to save the report, choose Yes or No. Choose
  10139.        Yes if you want to save the report for future viewing or
  10140.        printing. Choose No if you want to print or view the report
  10141.        only once, and don't want to save it. PC-File displays the
  10142.        Print options dialog box. See Chapter 11 for information on
  10143.        printing reports.
  10144.  
  10145.      8.If you chose Yes in the previous step, enter a report
  10146.        description of up to 50 characters. Choose OK when you
  10147.        finish. The description is optional, but can be useful in
  10148.        reminding you of the contents of the report at some later
  10149.        date.
  10150.  
  10151.      9.Enter a report name of up to eight characters. Choose OK.
  10152.        The Print options dialog box displays. See Chapter 11 for
  10153.        information on printing reports.
  10154.  
  10155.  
  10156.      Procedures for Modifying a Report With the Language Format
  10157.  
  10158.      To edit a report using the Language format:
  10159.  
  10160.      1.Choose Print from the menu bar.
  10161.  
  10162.      2.Choose Reports from the Print menu.
  10163.  
  10164.      3.Choose Modify from the dialog box listing the operations.
  10165.  
  10166.  
  10167.  
  10168.  
  10169.      PC-File Version 7 Users Guide                            171
  10170.  
  10171.  
  10172.      4.Choose Language from the dialog box listing the formats. The
  10173.        file selection dialog box displays.
  10174.  
  10175.      5.Choose the report you want to edit. The report appears in
  10176.        the edit window.
  10177.  
  10178.      6.Make your changes to the report.
  10179.  
  10180.      7.Choose OK when you finish.
  10181.  
  10182.      8.Give the report a new name if you want to keep the original
  10183.        report, or accept the original name to overwrite the report.
  10184.  
  10185.      9.Enter a description (optional).
  10186.  
  10187.      Basic Guidelines
  10188.  
  10189.      PC-File displays the edit window when you choose to create or
  10190.      edit a report using the Language format. However, you can use
  10191.      any word processor that can produce an ordinary ASCII file
  10192.      (also referred to as "DOS text" or "unformatted" files) to
  10193.      create or edit the report. Just be sure to store the report in
  10194.      a file using the .REP extension.
  10195.  
  10196.      Follow these simple rules when creating or editing a report
  10197.      using the Language format:
  10198.  
  10199.        Enter each command statement on a separate line.
  10200.  
  10201.        Use no more than one line and 80 characters for each command
  10202.        statement.
  10203.  
  10204.      As with the Free form format, use only the sections you need.
  10205.  
  10206.      Section Head Commands
  10207.  
  10208.      The Language format divides up a report into the same six
  10209.      sections found in the Free form format: Cover, Heading,
  10210.      Detail, Subtotal, Total, and Footing. Each section head begins
  10211.      with a colon and must be in all uppercase letters, like this:
  10212.  
  10213.      :DETAIL :TOTAL
  10214.  
  10215.      Sections can be ordered in any sequence. However, for clarity
  10216.      in reading a report definition, it is easier to keep the
  10217.      sections in the basic order that the report follows. For more
  10218.      information on the purpose and parameters of each section, see
  10219.      "Report Sections" in the section on Free form formats earlier
  10220.      in this chapter.
  10221.  
  10222.      Formatting Commands
  10223.  
  10224.      Use formatting commands to tell PC-File where and how to print
  10225.      text and fields. Formatting commands control line and
  10226.      character spacing, compress out blank lines, and insert
  10227.      printer control codes.
  10228.  
  10229.  
  10230.  
  10231.  
  10232.      PC-File Version 7 Users Guide                            172
  10233.  
  10234.  
  10235.  
  10236.      The following formatting commands are used in PC-File.
  10237.  
  10238.      Command        Description
  10239.  
  10240.      =nn            Horizontal tab (tab to column nn)
  10241.  
  10242.      /n             Line feed (insert n lines)
  10243.  
  10244.      .FF            Form feed (start new page)
  10245.  
  10246.      .CP n          Conditional page (start new page if 
  10247.           less than n lines left on page)
  10248.  
  10249.      .GROUP         Compress lines within grouping
  10250.  
  10251.      .EGROUP        End grouping
  10252.  
  10253.      .EGROUP R      End grouping, but replace lines at 
  10254.           end
  10255.  
  10256.      .x             Printer markers (where x is a print 
  10257.           enhancement or style, such as                     .BOLD)
  10258.  
  10259.      .A nn,nn       Printer control codes
  10260.  
  10261.  
  10262.      Formatting commands amount to over half the commands used in a
  10263.      report, as they dictate the placement of fields and text
  10264.      within the report.
  10265.  
  10266.      Each of the formatting commands are explained in more detail
  10267.      below.
  10268.  
  10269.      Horizontal Tab
  10270.  
  10271.      Use =nn to control the horizontal print location. The nn
  10272.      indicates the column that is tabbed to, not the number of
  10273.      spaces to insert before the next piece of data. For example,
  10274.      the command =40 would tab to column 40 and =73 would tab to
  10275.      column 73. To move the print head to the first column in the
  10276.      next line, use the line feed command instead.
  10277.  
  10278.      You can't tab backwards on a line. For example, you can't
  10279.      locate a field at column 73 on a line and then locate another
  10280.      field at column 40 on the same line. Commands must be issued
  10281.      with the idea that the print head will move from left to right
  10282.      on a line.
  10283.  
  10284.      The following sample shows two horizontal tabs.
  10285.  
  10286.      :DETAIL
  10287.      =25
  10288.      [SALUTATION]
  10289.      =29
  10290.      [FIRSTNAME]
  10291.  
  10292.  
  10293.  
  10294.  
  10295.      PC-File Version 7 Users Guide                            173
  10296.  
  10297.  
  10298.  
  10299.      Line Feed
  10300.  
  10301.      The /n command tells the printer to move down n number of
  10302.      lines. To skip down five lines you would use the command /5.
  10303.      Each section that doesn't end with a form feed (.FF) must end
  10304.      with a line feed.
  10305.  
  10306.      The following sample shows several line feeds.
  10307.  
  10308.      :DETAIL
  10309.      /1
  10310.      [FIRSTNAME]
  10311.      /1
  10312.      [LASTNAME]
  10313.      /2
  10314.  
  10315.      Form Feed
  10316.  
  10317.      The .FF command tells the printer to begin a new page, even if
  10318.      the current page is not full. The form feed is most useful for
  10319.      printing a cover page at the beginning of a report or for
  10320.      starting a new page after each subtotal break. DO NOT use the
  10321.      .FF command in the Heading or Footing sections. If you use .FF
  10322.      in the Cover, Detail, Subtotal, or Total sections, you must
  10323.      include a Footing section with at least one line feed (/1)
  10324.      command. If any data is printed in the section with a form
  10325.      feed, you
  10326.      must also have a line feed before the form feed.
  10327.  
  10328.      The following sample shows a form feed used to begin a new
  10329.      page.
  10330.  
  10331.      :DETAIL
  10332.      /1
  10333.      [FIRSTNAME]
  10334.      /1
  10335.      [LASTNAME]
  10336.      /2
  10337.      .FF
  10338.  
  10339.  
  10340.      Conditional Page
  10341.  
  10342.      Use the .CP n command to prevent several lines of data from
  10343.      being split between two pages. The .CP n command tells the
  10344.      printer to begin a new page, but only if there are less than n
  10345.      lines left on a page. The number of lines taken into account
  10346.      does not include any lines in headers or footers-if you are
  10347.      printing 66 lines per page, and you have a 3 line header and a
  10348.      3 line footer, the conditional page command will check for how
  10349.      many of the 60 "body" lines remain. For example, the command
  10350.      .CP 8 will prompt PC-File to check how many lines are left on
  10351.      the page. If there are less than eight lines left, the printer
  10352.      will skip to the next page.
  10353.  
  10354.  
  10355.  
  10356.  
  10357.      PC-File Version 7 Users Guide                            174
  10358.  
  10359.  
  10360.      The .CP n command is normally placed at the beginning of a
  10361.      section, but never at the end (as it would serve no purpose).
  10362.      Don't use the .CP n command in the Heading or Footing section.
  10363.      And don't use it to determine the bottom margin on the page.
  10364.      Use a Footing section with a line feed instead.
  10365.  
  10366.      The following sample shows a conditional page command.
  10367.  
  10368.      :DETAIL
  10369.      .CP 3
  10370.      /1
  10371.      [FIRSTNAME]
  10372.      /1
  10373.      [LASTNAME]
  10374.      /1
  10375.  
  10376.      Line Compression
  10377.  
  10378.      The .GROUP, .EGROUP, and .EGROUP R commands are used to
  10379.      compress lines, most often in address lists and mailing
  10380.      labels. Addresses are often formatted for four or five lines
  10381.      to accommodate those addresses that need them, but most
  10382.      addresses are only three or four lines long. Without the line
  10383.      compression commands, you could end up with mailing labels
  10384.      that look like this:
  10385.  
  10386.      Janet Ratite
  10387.      438 Savannah Way
  10388.  
  10389.      Seattle, WA 98103
  10390.  
  10391.      To remove blank lines from addresses, place the .GROUP command
  10392.      before and the .EGROUP command after the commands that locate
  10393.      your name and address fields. Use the .EGROUP R command
  10394.      instead of .EGROUP to place any blank lines removed from the
  10395.      middle of an address after the last data line in the group.
  10396.      This command is most used in mailing labels where you must
  10397.      maintain the same number of lines for each label.
  10398.  
  10399.      Here's an example of a typical label report using the .GROUP
  10400.      and .EGROUP R commands:
  10401.  
  10402.      :DETAIL
  10403.      .GROUP
  10404.      [NAME]
  10405.      /1
  10406.      [ADDRESS1]
  10407.      /1
  10408.      [ADDRESS2]
  10409.      /1
  10410.      <CITY>
  10411.      ", "
  10412.      <STATE>
  10413.      " "
  10414.      <ZIP>
  10415.      .EGROUP R
  10416.  
  10417.  
  10418.  
  10419.  
  10420.      PC-File Version 7 Users Guide                            175
  10421.  
  10422.  
  10423.      /3
  10424.  
  10425.  
  10426.      Every .GROUP command must be followed by either an .EGROUP or
  10427.      an .EGROUP R command.
  10428.  
  10429.      Reformatting Commands
  10430.  
  10431.      There are times where you need to reformat a section of a
  10432.      report to a particular width. For example, if you are printing
  10433.      several fields of varying length in the midst of a paragraph
  10434.      of constant text. Use the .REFORMAT nn (where nn is the width
  10435.      you want the following lines reformatted to) and .ENDREFORMAT
  10436.      commands to reformat the paragraph to the specified width.
  10437.  
  10438.      You use the .REFORMAT and .ENDREFORMAT commands like the
  10439.      .GROUP and .EGROUP commands-surround the Text and Field
  10440.      commands to be reformatted. Each command should be placed on a
  10441.      line by itself, and should start at the left edge. For
  10442.      example:
  10443.  
  10444.      .REFORMAT 55
  10445.      "If you have questions, call your local sales"
  10446.      "office at:
  10447.      "
  10448.      <PHONE>
  10449.      ". "
  10450.      "Your salesperson will answer any questions"
  10451.      "you have."
  10452.      /1
  10453.      .ENDREFORMAT
  10454.  
  10455.      This would reformat the paragraph to a width of 55. The
  10456.      resulting paragraph would look something like this:
  10457.  
  10458.      If you have any questions, call your local sales office at:
  10459.      555-1234. Your salesperson will answer any questions you have.
  10460.  
  10461.      Printer markers
  10462.  
  10463.      Use printer markers to change character formatting within the
  10464.      report. Printer markers are available for many of the standard
  10465.      print enhancements, such as bold, italics, and underlined
  10466.      type.
  10467.  
  10468.      The available printer markers are:
  10469.  
  10470.      .NORMAL
  10471.      .CONDENSED
  10472.      .BOLD
  10473.      .ITALIC
  10474.      .UNDERLINE
  10475.      .PORTRAIT
  10476.      .LANDSCAPE
  10477.      .PROPORTIONAL
  10478.      .DOUBLEWIDE
  10479.  
  10480.  
  10481.  
  10482.  
  10483.      PC-File Version 7 Users Guide                            176
  10484.  
  10485.  
  10486.      .USERn (where n is 1-5)
  10487.  
  10488.      Enter a printer marker where you want a change in the font or
  10489.      type to occur. Use the marker .NORMAL to return to the
  10490.      default.
  10491.  
  10492.      For example, if you want to make the title of a report
  10493.      boldface, it might look like this:
  10494.  
  10495.      :HEADING
  10496.      .BOLD
  10497.      "Current Member List"
  10498.      .NORMAL
  10499.      /1
  10500.      :DETAIL
  10501.      <LASTNAME>
  10502.      " "
  10503.      <FIRSTNAME> /1
  10504.  
  10505.  
  10506.      .USERn is a user-defined printer marker. You can define up to
  10507.      five of these markers in a configuration profile. See Chapter
  10508.      13, "Utilities" for information on defining these markers.
  10509.  
  10510.      Printer Control Codes
  10511.  
  10512.      To change character formatting in ways not defined with the
  10513.      printer markers listed above, use the ASCII (A nn,nn) command.
  10514.      The values following A represent the ASCII decimal value of
  10515.      the printer control code. For example, if you want to change
  10516.      the typeface for a particular section of a report, enter the
  10517.      ASCII command for that particular typeface. You can then use
  10518.      the printer marker .NORMAL to change back to the default
  10519.      typeface.
  10520.  
  10521.      You can also use the ASCII command to enter characters not
  10522.      available on the keyboard.
  10523.  
  10524.      Enter the command in the format
  10525.  
  10526.           .A nn,nn
  10527.  
  10528.      with a space between A and the printer code string. Follow
  10529.      each ASCII value with a comma, but no space. For example:
  10530.  
  10531.           .A 27,38,108,49,79
  10532.  
  10533.      You can use up to 67 characters in an ASCII command. If you
  10534.      need more than that, as some laser printer fonts do, divide
  10535.      the command into two or more commands.
  10536.  
  10537.      Text Commands
  10538.  
  10539.  
  10540.  
  10541.  
  10542.      PC-File Version 7 Users Guide                            177
  10543.  
  10544.  
  10545.      Use text commands to print text. Text includes titles,
  10546.      headings, lines, and miscellaneous text that appears in a
  10547.      report. Text is always surrounded by quotation marks in a text
  10548.      command statement, as shown in the following example:
  10549.  
  10550.      :HEADING
  10551.      "Current Member List"
  10552.      /1
  10553.      :DETAIL
  10554.      <LASTNAME>
  10555.      " "
  10556.      <LASTNAME>
  10557.      /1
  10558.  
  10559.      Enter text as you want it to appear in the report; that is,
  10560.      words you want to appear in uppercase letters, enter in
  10561.      uppercase.
  10562.  
  10563.      Database Field Commands
  10564.  
  10565.      Use database field commands to print data from fields in your
  10566.      database. Field commands are entered in either of two modes:
  10567.  
  10568.           [field]   padded field
  10569.  
  10570.           <field>   trimmed field (spaces removed)
  10571.  
  10572.  
  10573.      Use a padded field to line up fields in columns. This format
  10574.      is most often used in combination with horizontal tab
  10575.      commands. For example, the commands
  10576.  
  10577.      =4
  10578.      [City]
  10579.      =18
  10580.      [St]
  10581.  
  10582.      produce a report like this
  10583.  
  10584.           Miami              FL
  10585.           Tallahassee        FL
  10586.  
  10587.      Use a trimmed field to remove trailing spaces (and leading
  10588.      spaces, if they appear, but not internal spaces). This format
  10589.      is most often used when combining first and last name fields,
  10590.      city, state, and zipcode fields, and in similar situations.
  10591.  
  10592.      A text command, such as the addition of a space or comma, is
  10593.      often used with these commands. The commands
  10594.  
  10595.      =4
  10596.      <City>
  10597.      ", "
  10598.      <St>
  10599.  
  10600.      produce a report like this
  10601.  
  10602.  
  10603.  
  10604.  
  10605.      PC-File Version 7 Users Guide                            178
  10606.  
  10607.  
  10608.  
  10609.           Miami, FL
  10610.           Tallahassee, FL
  10611.  
  10612.      PC-File lets you designate a partial field with either mode as
  10613.      well, though this is most often used with square bracketed
  10614.      fields, as follows:
  10615.  
  10616.      =4
  10617.      [City,1,12]
  10618.      =17
  10619.      [St,1,2]
  10620.  
  10621.      Database field commands can be used with print masks and
  10622.      buckets, which are explained later in this chapter.
  10623.  
  10624.      System Field Commands
  10625.  
  10626.      Use system field commands to print data that is taken from the
  10627.      system in one form or another. System field commands include
  10628.      commands to print the current time or date as recorded by the
  10629.      computer, page numbers, and counts of records. The command to
  10630.      prompt the user to key in information is a system field
  10631.      command as well.
  10632.  
  10633.      System field commands available in the Language format are:
  10634.  
  10635.      Command        Description
  10636.  
  10637.      [DATE*]        System date
  10638.  
  10639.      [TIME*]        System time
  10640.  
  10641.      [PAGE*]        Current page number
  10642.  
  10643.      [SELECT*]      Selection criteria for the report
  10644.  
  10645.      [SORT*]        Current index-field index is 
  10646.           attached to, not index formula
  10647.  
  10648.      [COUNT*]       Number of records printed
  10649.  
  10650.      [RECORDS*]     Number of records in database
  10651.  
  10652.      [KEYIN*msg]    Prompt for operator input
  10653.  
  10654.      System field commands must be entered in uppercase letters,
  10655.      followed by an asterisk (*), and enclosed in brackets. Like
  10656.      data field commands, system field command statements can
  10657.      include print masks and buckets.
  10658.  
  10659.      PC-File also provides system field commands for handling data
  10660.      derived from subtotal operations. See "Subtotal Report
  10661.      Commands" later in this chapter for details.
  10662.  
  10663.  
  10664.  
  10665.  
  10666.      PC-File Version 7 Users Guide                            179
  10667.  
  10668.  
  10669.      Calculation Commands
  10670.  
  10671.      A calculation can use a database field, a system field, a
  10672.      constant, or a total bucket. You can use any PC-File-supported
  10673.      calculation in a report. A calculation must be surrounded by
  10674.      parentheses.
  10675.  
  10676.      When entering a calculation in a report, type field names as
  10677.      they appear in the database; do not use brackets. Constants
  10678.      must be surrounded by quotation marks. System fields and total
  10679.      buckets must be surrounded by square brackets. System fields
  10680.      must be entered in uppercase with an asterisk following the
  10681.      system field name. Relational calculations must be surrounded
  10682.      by parentheses.
  10683.  
  10684.      The following example illustrates the use of a calculation in
  10685.      a report.
  10686.  
  10687.      :DETAIL
  10688.      /1
  10689.      (DONATION * 12):zz,zzz.##:
  10690.  
  10691.      For more information on calculations, see Chapter 17,
  10692.      "Calculations."
  10693.  
  10694.      IF Commands
  10695.  
  10696.      Use the IF...ENDIF commands when you want PC-File to perform a
  10697.      task only when certain conditions are met. In most cases, this
  10698.      means that PC-File checks the data within a field or
  10699.      calculation, then performs the task if the data meets the
  10700.      condition(s) set within the IF command.
  10701.  
  10702.      IF commands follow a set format:
  10703.  
  10704.      .IF (a comparison calculation)
  10705.      Things to do if true (can be many commands long) .ELSE
  10706.      Things to do if not true (can be many commands    long)
  10707.      .ENDIF
  10708.  
  10709.      Every .IF statement must have a matching .ENDIF statement. The
  10710.      .ELSE statement is optional, however.
  10711.  
  10712.      You can't put an IF statement within another IF statement,
  10713.      which is known as "nesting" statements in programming
  10714.      languages. Use separate IF commands rather than nesting the IF
  10715.      commands. This doesn't mean you can't have many commands
  10716.      between the IF command and the ENDIF command-you can use as
  10717.      many commands as necessary within memory limitations.
  10718.  
  10719.      The following example selectively performs a calculation based
  10720.      on the contents of the Tax field, where the Tax field is used
  10721.      to indicate whether or not an item is taxable.
  10722.  
  10723.      .IF (Tax = " Y")
  10724.      " Amount of tax for this item is "
  10725.  
  10726.  
  10727.  
  10728.  
  10729.      PC-File Version 7 Users Guide                            180
  10730.  
  10731.  
  10732.      ([Amount]*.081):zz#.##:
  10733.      .ELSE
  10734.      " Not a taxable item"
  10735.      .ENDIF
  10736.  
  10737.      The IF statement calculates the tax when there is a Y in the
  10738.      Tax field and prints "Not a taxable item" when there is an N
  10739.      in the Tax field.
  10740.  
  10741.      IF commands are closely related to complex searches. All of
  10742.      the valid complex search operators work in IF commands,
  10743.      including scan-across, soundex, generic, and wildcard
  10744.      searches. The IF command can also include system fields, total
  10745.      buckets, and calculations in the IF condition. System fields
  10746.      and total buckets must be enclosed by square brackets.
  10747.  
  10748.      The following example of an IF command shows how to print
  10749.      address information using relational lookups once for each
  10750.      subtotal group. This example uses relational lookups to pull
  10751.      in the address information based on an account number present
  10752.      in both the Customer list database and the Order database.
  10753.      This report is run from within the Order database.
  10754.  
  10755.      :DETAIL
  10756.      .IF ([SUBCOUNT*] = 1)
  10757.      [Company]
  10758.      /1
  10759.      (@Acct_no,Customer,Cust_ID,Address)
  10760.      /1
  10761.      (@*,City)
  10762.      ", "
  10763.      (@*,State)
  10764.      " "
  10765.      (@*,Zipcode)
  10766.      /1
  10767.      .ENDIF
  10768.  
  10769.  
  10770.      Print Masks
  10771.  
  10772.      Use print masks to format a field or calculation. Print masks
  10773.      can be used to restrict the output to a certain length, add
  10774.      dollar signs or decimal places to numeric entries, or suppress
  10775.      leading zeroes.
  10776.  
  10777.      Print masks are not commands; instead, they are added to
  10778.      commands to indicate how the command should be printed. You
  10779.      can use them with database field commands, system field
  10780.      commands, and calculation commands.
  10781.  
  10782.      Print masks are always enclosed within colons, and follow the
  10783.      command itself, as the following examples illustrate:
  10784.  
  10785.      [Month]:@@@:
  10786.  
  10787.  
  10788.  
  10789.  
  10790.      PC-File Version 7 Users Guide                            181
  10791.  
  10792.  
  10793.           Only the first three characters of the field called Month
  10794.           are printed
  10795.  
  10796.      [Amount]:$$,$$$.##:
  10797.  
  10798.           Adds a dollar sign to a numeric figure
  10799.  
  10800.      Print masks are not mandatory for fields or calculations
  10801.      (except for date calculations), but are useful when you want
  10802.      to prescribe how the field will look in the report.
  10803.  
  10804.      There are three types of print masks:
  10805.  
  10806.           Character masks
  10807.           Numeric masks
  10808.           Empty masks
  10809.  
  10810.      The different types of masks are explained below.
  10811.  
  10812.      Character Masks
  10813.  
  10814.      There are two character masks:
  10815.           the :@@@: mask limits the number of characters that print
  10816.           in a field;
  10817.           the :Wnn: word wrap mask (where nn is a number) limits
  10818.           the width of the printed data to nn characters, wrapping
  10819.           any additional text from one line to the next.
  10820.  
  10821.      For :@@@: masks, the number of @ characters between the colons
  10822.      equals the width of the printed field. Thus, :@@: prints the
  10823.      first two characters in the field, and :@@@@@@: prints the
  10824.      first six characters. Any characters beyond the formatted
  10825.      width are not printed. For the word wrap mask, the number
  10826.      following the W determines the width at which the printed data
  10827.      will wrap. For example, :W6: prints no more than six
  10828.      characters wide, but will use as many lines as it takes to
  10829.      print all the data in the
  10830.      field.
  10831.  
  10832.      The following examples illustrate how character masks format
  10833.      data in a report:
  10834.  
  10835.      [Name]         Roosevelt
  10836.  
  10837.      [Name]:@@@@@:  Roose
  10838.  
  10839.      [Notes]:W6:    This
  10840.                     member
  10841.                     has no
  10842.                     phone.
  10843.  
  10844.      The word wrap mask doesn't split words. It is most useful with
  10845.      memo fields and scroll fields, but can be used with any field
  10846.      type, including numeric fields.
  10847.  
  10848.  
  10849.  
  10850.  
  10851.      PC-File Version 7 Users Guide                            182
  10852.  
  10853.  
  10854.      The :@@@: mask can be used with any field type, but they are
  10855.      most appropriate for fields that contain character data:
  10856.      character, date, and memo fields.
  10857.  
  10858.      Both kinds of character masks cause output to be left-aligned.
  10859.  
  10860.      Numeric Masks
  10861.  
  10862.      The pound sign (#) and the lowercase z represent digits and
  10863.      are used to format numeric fields. The only difference between
  10864.      the two masks is that the lowercase z suppresses leading
  10865.      zeros, the # doesn't. The following examples show how the two
  10866.      masks would treat the same data:
  10867.  
  10868.      [Amount]:##,###.##:      02,564.50
  10869.  
  10870.      [Amount]:zz,zzz.zz:       2,564.50
  10871.  
  10872.      If the value of a field was zero, the two masks would handle
  10873.      it as follows:
  10874.  
  10875.      [Amount]:##,###.##:      00,000.00
  10876.  
  10877.      [Amount]:zz,zzz.zz:
  10878.  
  10879.      Commas and decimal points should be placed where you want them
  10880.      to appear in the field. A leading comma will not print if
  10881.      there are no digits to the left of it, as shown in the
  10882.      following example:
  10883.  
  10884.      [Amount]:zz,zzz.##:      26.49
  10885.  
  10886.      The asterisk (*) and dollar sign ($) are used as floating
  10887.      characters in numeric fields, and are useful for check
  10888.      writing. Both suppress leading zeros, like the lowercase z.
  10889.      The $ prints a single dollar sign immediately to the left of
  10890.      the first non-zero digit, while the * prints as many asterisks
  10891.      as space allows. The following examples illustrate their use.
  10892.  
  10893.      [Amount]:$$,$$$.##:      $4.52
  10894.  
  10895.      [Amount]:**,***.##: *****4.52
  10896.  
  10897.      Any other characters placed in a numeric print mask will print
  10898.      as entered, as shown in the following examples:
  10899.  
  10900.      [Item]:zz-zz:       2-45
  10901.  
  10902.      [Serial_no]:TY######:    TY040090
  10903.  
  10904.      All numeric print masks cause the value to be right-aligned.
  10905.  
  10906.      Empty Masks
  10907.  
  10908.  
  10909.  
  10910.  
  10911.      PC-File Version 7 Users Guide                            183
  10912.  
  10913.  
  10914.      Empty masks are used in combination with buckets, which are
  10915.      explained in the next section. Essentially, an empty mask
  10916.      (also called a null mask) prevents the value in the field from
  10917.      being printed. Instead, the value is placed in the bucket,
  10918.      sort of a temporary holding bin. An empty mask looks like
  10919.      this:
  10920.  
  10921.      [Amount]::`Amt
  10922.  
  10923.      The value in the Amount field is added to the bucket `Amt. The
  10924.      empty mask, represented by the double colon (::), prevents the
  10925.      value from being printed.
  10926.  
  10927.      Buckets
  10928.  
  10929.      As the name implies, buckets are storage containers. In PC-
  10930.      File, they are used to store values temporarily. Temporary
  10931.      storage is useful in two ways:
  10932.  
  10933.      To accumulate numeric values (the total can then be printed in
  10934.      the report or used in a calculation)
  10935.  
  10936.      To hold text to be printed later Buckets used to accumulate
  10937.      numeric values are called total buckets; those used to hold
  10938.      text are called string buckets.
  10939.  
  10940.      Buckets are like print masks in that they are not commands
  10941.      themselves, but are used in command statements. Buckets can be
  10942.      used with text commands (string buckets only), database field
  10943.      commands, system field commands, and calculation commands.
  10944.  
  10945.      A bucket is designated by a name of one to five characters,
  10946.      using only letters (no numbers, spaces, or punctuation). You
  10947.      can use more than five characters, but any characters after
  10948.      the fifth character are ignored. Bucket names are case-
  10949.      sensitive; uppercase and lowercase names are different. Total
  10950.      bucket names are preceded by a backwards apostrophe (`);
  10951.      string bucket names are preceded by the backwards apostrophe
  10952.      and the dollar sign ($).
  10953.  
  10954.      Examples of valid total bucket names are:
  10955.  
  10956.      `a `Value `VALUE
  10957.  
  10958.      Valid string bucket names include:
  10959.  
  10960.      `$a `$Name `$TITLE
  10961.  
  10962.      Using Total Buckets
  10963.  
  10964.      As mentioned above, total buckets are used to accumulate
  10965.      numeric totals. There are two steps to using total buckets.
  10966.  
  10967.  
  10968.  
  10969.  
  10970.      PC-File Version 7 Users Guide                            184
  10971.  
  10972.  
  10973.      In the Detail section of the report, specify the field or
  10974.      calculation for which you want to accumulate totals. Subtotals
  10975.      and Totals for a particular field are accumulated in the same
  10976.      bucket.
  10977.  
  10978.      In the Subtotal and/or Total section of the report, print the
  10979.      bucket or use it in a calculation.
  10980.  
  10981.      To specify the field or calculation to be accumulated, simply
  10982.      place the bucket name at the end of the command line. For
  10983.      example, in this command statement
  10984.  
  10985.      [Commission]:: `Comm
  10986.  
  10987.      the data in the Commission field is accumulated in a bucket
  10988.      called Comm. The individual values are not printed as a result
  10989.      of the empty mask (::).
  10990.  
  10991.      In the command statement
  10992.  
  10993.      (Price*Quantity):zz,zzz.##:`Amt
  10994.  
  10995.      the result of the calculation is printed in the format
  10996.      zz,zzz.## and is also accumulated in the bucket called Amt for
  10997.      later use.
  10998.  
  10999.      To print the value in a bucket, enclose the bucket name in
  11000.      square brackets, just as you would a field name. Include a
  11001.      print mask to format the output. The buckets created in the
  11002.      earlier examples are printed like this:
  11003.  
  11004.      [`Comm]:$$$.##: [`Amt]:zz,zzz.##:
  11005.  
  11006.      You can also include bucket totals in calculations. The result
  11007.      of the calculation is then printed. A calculation that
  11008.      includes a bucket might look like this:
  11009.  
  11010.      ([`Amt]*[Tax]):$$,$$$.##:
  11011.  
  11012.      A total bucket can be used to keep a count. To keep a count,
  11013.      use the calculation
  11014.  
  11015.      (1)::`x
  11016.  
  11017.      This calculation adds 1 to the bucket called x each time it is
  11018.      encountered, thus accumulating a running count. The empty mask
  11019.      (::) keeps it from printing.
  11020.  
  11021.      To set a bucket to zero, use the command
  11022.  
  11023.      (0-[`Value])::`Value
  11024.  
  11025.      In this calculation, the value of the bucket called Value is
  11026.      subtracted from zero, resulting in a negative value. When the
  11027.      negative bucket value is added to the positive bucket value,
  11028.      the result is always zero.
  11029.  
  11030.  
  11031.  
  11032.  
  11033.      PC-File Version 7 Users Guide                            185
  11034.  
  11035.  
  11036.  
  11037.      Using String Buckets
  11038.  
  11039.      String buckets hold text in memory until you are ready to
  11040.      print it. Unlike total buckets, string buckets can't
  11041.      accumulate or append text. If you add another string of text
  11042.      to a bucket, it replaces the previous contents. However, you
  11043.      can have several different string buckets in memory at one
  11044.      time.
  11045.  
  11046.      To store text in a string bucket, include the string bucket
  11047.      name at the end of the command line. In the text command
  11048.  
  11049.      "Janet Ratite" `$Name
  11050.  
  11051.      the name Janet Ratite is stored in a bucket called Name.
  11052.  
  11053.      In the database field command
  11054.  
  11055.      [State]:@@:`$St
  11056.  
  11057.      each state name in the field called State is stored in a
  11058.      bucket called St. At the same time, it prints out in a two-
  11059.      character format as indicated by the mask.
  11060.  
  11061.  
  11062.      If you create a report using the Row format, and decide to
  11063.      enter the title of your report each time you print it, the
  11064.      command
  11065.  
  11066.      <KEYIN*TITLE LINE>::`$TITLE
  11067.  
  11068.      appears in the Cover section of the report if you print it out
  11069.      in Language format. This command prints the message TITLE LINE
  11070.      when you call up the report, then holds your response in a
  11071.      string bucket called TITLE.
  11072.  
  11073.      To print out the text string that is stored in a string
  11074.      bucket, enclose the bucket name in brackets, just as you would
  11075.      a field. For example, in the last example above, the title is
  11076.      printed with the following command:
  11077.  
  11078.      [`$TITLE]
  11079.  
  11080.      String buckets can be used in any section of the report.
  11081.  
  11082.  
  11083.      Subtotal Report Commands
  11084.  
  11085.  
  11086.  
  11087.  
  11088.      PC-File Version 7 Users Guide                            186
  11089.  
  11090.  
  11091.      PC-File provides special system field commands to handle data
  11092.      derived from subtotal operations. While you would typically
  11093.      only use one subtotal level, PC-File allows up to nine levels
  11094.      of subtotal breaks. For example, you might want to print a
  11095.      report for a database tracking sales that breaks to print
  11096.      subtotals on three levels: Level 1 - Region, Level 2 - Branch,
  11097.      and Level 3 - Salesperson. Level 1 breaks are the largest,
  11098.      most general subtotal groupings, level 2 are groups break
  11099.      within level 1,
  11100.      level 3 groups break within level 2, and so on. Use subtotal
  11101.      report commands to print subtotal data, or to control what
  11102.      happens for each subtotal level.
  11103.  
  11104.      [SUBLEVEL*]
  11105.  
  11106.      Returns the level number of the subtotal break that caused the
  11107.      current :SUBTOTAL section to print. Level 1 is the first
  11108.      (outermost) subtotal level, level 9 is the last (innermost)
  11109.      level. This command is generally used in .IF statement
  11110.      conditions to control what happens for each break when
  11111.      performing multiple level subtotal breaks.
  11112.  
  11113.      [SUBCMD*n]
  11114.  
  11115.      Returns the subtotal trigger formula in dBASE format. For
  11116.      example: (MONTH(date)). Omit "n" to have PC-File return the
  11117.      formula for the current level, replace "n" with 1-9 to return
  11118.      the command for a particular level. For example, [SUBCMD*3]
  11119.      returns the trigger formula for subtotal level 3.
  11120.  
  11121.      [SUBCOUNT*n]
  11122.  
  11123.      Returns the number of records printed in a subtotal group.
  11124.      Omit "n" to return the current level's group, replace "n" with
  11125.      1-9 to return the number of records for that level's groups.
  11126.      For example, [SUBCOUNT*2] returns the number of records for
  11127.      the current level 2 group.
  11128.  
  11129.      [SUBFLD*n]
  11130.  
  11131.      Returns the subtotal trigger field name. Omit "n" to return
  11132.      the current level's trigger field, replace "n" with 1-9 to
  11133.      return the trigger field for that level. For example,
  11134.      [SUBFLD*5] returns the trigger field name for subtotal level
  11135.      5.
  11136.  
  11137.      [SUBID*n]
  11138.  
  11139.      Returns the data (either from the field or the result of the
  11140.      trigger formula) that triggered the subtotal break. Omit "n"
  11141.      to return the current level's trigger data, replace "n" with
  11142.      1-9 to return the trigger data for that level. For example,
  11143.      [SUBID*7] returns the current trigger data for subtotal level
  11144.      7.
  11145.  
  11146.      Subtotal Levels and Total Buckets
  11147.  
  11148.  
  11149.  
  11150.  
  11151.      PC-File Version 7 Users Guide                            187
  11152.  
  11153.  
  11154.  
  11155.      Individual total buckets hold the values from all subtotal
  11156.      levels at the same time. When you enter the bucket command in
  11157.      the :SUBTOTAL section of a report, for example:
  11158.  
  11159.      :SUBTOTAL [`AMT]:zzz,zz#.##: /1
  11160.  
  11161.      PC-File returns the value for the level that triggered the
  11162.      subtotal break. You can refer to a specific subtotal level by
  11163.      putting the appropriate level number immediately after the
  11164.      bucket name, for example: [`AMT3] returns the subtotal for
  11165.      subtotal level 3. Note that the "3" following "AMT" is NOT
  11166.      part of the bucket name, it is only used to force PC-File to
  11167.      return the bucket value for that level.
  11168.  
  11169.      If you are only choosing one subtotal break when printing your
  11170.      report, you do not need to use subtotal level numbers ("n" in
  11171.      the descriptions above). Also, even when performing multiple
  11172.      level subtotal breaks, you only need to use level numbers to
  11173.      force a subtotal system field to return data for that level.
  11174.      If you do not include level numbers, the current subtotal
  11175.      break level is assumed.
  11176.  
  11177.      With all the above commands, you can also refer to level 0,
  11178.      which is the level that is never reset, that is, the grand
  11179.      total level. For example, using [`AMT0] in the :SUBTOTAL
  11180.      section would print the running total.
  11181.  
  11182.      A typical :SUBTOTAL section for multiple level breaks uses .IF
  11183.      statements to determine what action to take for each subtotal
  11184.      level. For example, a three-level report might print total
  11185.      buckets for levels 2 and 3, printing an extra blank line after
  11186.      level 2 breaks, and feed to a new page for level 1 breaks:
  11187.  
  11188.      :SUBTOTAL
  11189.      .IF ([SUBLEVEL*] > 1)
  11190.      "Totals: "
  11191.      [`AMT]:zzz,zz#.##:
  11192.      /1
  11193.      .ENDIF
  11194.      .IF ([SUBLEVEL*] = 2)
  11195.      /1
  11196.      .ENDIF
  11197.      .IF ([SUBLEVEL*] = 1)
  11198.      .FORMFEED
  11199.      .ENDIF
  11200.  
  11201.  
  11202.  
  11203.      Printing Bar Codes
  11204.  
  11205.  
  11206.  
  11207.  
  11208.      PC-File Version 7 Users Guide                            188
  11209.  
  11210.  
  11211.      PC-File can print a large variety of bar codes on most dot-
  11212.      matrix and laser printers-without requiring special drivers or
  11213.      font cartridges. For example, you can use PC-File to print
  11214.      zipcode bar codes (Postnet) directly on envelopes, postcards
  11215.      or labels. You can also use this feature to print price tags,
  11216.      inventory control labels, and inventory control sheets in UPC
  11217.      and many other bar code formats.
  11218.  
  11219.      Printers Supported
  11220.  
  11221.      PC-File's bar code printing supports the following printers
  11222.      (and should work on any printer that fully emulates any of
  11223.      these printers):
  11224.  
  11225.           PostScript
  11226.           Epson 9 pin
  11227.           Epson 24 pin
  11228.           IBM Proprinter 9 pin
  11229.           IBM Proprinter 24 pin
  11230.           HP LaserJet
  11231.           HP DeskJet
  11232.           Toshiba 24 pin
  11233.           Okidata Microline Standard
  11234.  
  11235.      NOTE: You must use Configuration on the Utilities menu to
  11236.      choose the type of printer you are using before formatting
  11237.      reports to print bar codes. See "Configuring Your Database" in
  11238.      Chapter 13 for details.
  11239.  
  11240.      Also note that bar codes will only appear in printed output or
  11241.      as graphic commands when printing to a disk file. Bar codes
  11242.      will NOT display when choosing Display on the Print Options
  11243.      dialog box. The bar code graphics commands when printing to a
  11244.      disk file are specifically for the printer you choose when
  11245.      configuring your database.
  11246.  
  11247.  
  11248.      Available Bar Code Formats
  11249.  
  11250.      PC-File supports the following bar code types:
  11251.  
  11252.      UPC-A
  11253.  
  11254.      The standard bar code for items for sale to the public, UPC-A
  11255.      is the bar code used at grocery stores. The standard UPC-A
  11256.      code contains 1 system digit, 5 digits for the manufacturer
  11257.      number, and 5 digits for the product number. PC-File's bar
  11258.      code output also supports 2 or 5 supplemental digits that can
  11259.      follow the standard UPC-A code's 11 digits.
  11260.  
  11261.      UPC-E
  11262.  
  11263.  
  11264.  
  11265.  
  11266.      PC-File Version 7 Users Guide                            189
  11267.  
  11268.  
  11269.      A zero-suppressed and compressed version of the UPC code. The
  11270.      same number and kind of digits as UPC-A (including 2 and 5
  11271.      supplemental codes) can be encoded, but the code number must
  11272.      have at least 4 zeros. The possible number of different
  11273.      product numbers encoded varies from 5 to 1000 depending on the
  11274.      where the zeros are in the UPC code number.
  11275.  
  11276.      EAN/JAN-13
  11277.  
  11278.      An extended version of the UPC code containing digits to
  11279.      encode the country of origin. EAN/JAN-13 codes contain 2
  11280.      digits for the country code, 10 digits for the product
  11281.      information and a checksum number. Since the checksum number
  11282.      is generated, the standard EAN/JAN-13 input code number
  11283.      contains 12 characters. EAN/JAN-13 also supports 2 or 5 digit
  11284.      supplemental codes.
  11285.  
  11286.      EAN/JAN-8
  11287.  
  11288.      A shorter version of the EAN/JAN code composed of 2 country
  11289.      digits, 5 data digits, and a generated checksum number. Also
  11290.      supports 2 or 5 digit supplemental codes.
  11291.  
  11292.      3 of 9 (Code 39)
  11293.  
  11294.      Probably the most common bar code because it allows digits,
  11295.      letters and some punctuation to be bar coded. It is standard
  11296.      for many government bar code specifications. An input string
  11297.      of 2 to 30 characters is supported. All lowercase letters are
  11298.      converted to uppercase letters.
  11299.  
  11300.      Extended 3 of 9
  11301.  
  11302.      Supports every character in the standard ASCII 128 character
  11303.      set, including uppercase and lowercase letters and control
  11304.      codes. Supports codes from 2 to 30 characters in length.
  11305.  
  11306.      Interleaved 2 of 5
  11307.  
  11308.      A numeric-only bar code that supports numbers from 2 to 30
  11309.      digits.
  11310.  
  11311.      Code 128
  11312.  
  11313.      A very compact bar code that can encode the full ASCII 128
  11314.      character set. Supports codes from 2 to 30 characters in
  11315.      length.
  11316.  
  11317.      Codabar
  11318.  
  11319.      Encodes digits and the + - $ : / . symbols, often used to
  11320.      encode dollar figures and mathematical values. Supports codes
  11321.      from 2 to 30 characters long.
  11322.  
  11323.      ZIP + 4 Postnet
  11324.  
  11325.  
  11326.  
  11327.  
  11328.      PC-File Version 7 Users Guide                            190
  11329.  
  11330.  
  11331.      The special bar code to encode ZIP+4 codes for mailing
  11332.      addresses. Also supports 5 and 11 digit ZIP codes.
  11333.  
  11334.      MSI Plessey
  11335.  
  11336.      Used most often in grocery stores for shelf labels. A numeric-
  11337.      only code that supports codes from 2 to 15 characters in
  11338.      length.
  11339.  
  11340.      Code 93
  11341.  
  11342.      A compressed version of the 3 of 9 bar code.
  11343.  
  11344.      Extended 93
  11345.  
  11346.      A compressed version of the Extended 3 of 9 bar code.
  11347.  
  11348.      UCC-128
  11349.  
  11350.      19 digit fixed length numeric bar code used on shipping
  11351.      containers for items marked with UPC code.
  11352.  
  11353.  
  11354.      The following table summarizes the type and number of
  11355.      characters allowed for each bar code type:
  11356.  
  11357.  
  11358.           Bar Code Type Input Length Allowed Characters
  11359.  
  11360.  
  11361.           UPC-A 11,13, or 16 N
  11362.  
  11363.           UPC-E 11,13, or 16 N
  11364.  
  11365.           EAN/JAN-13 12, 14, or 17 N
  11366.  
  11367.           EAN/JAN-8 7, 9 or 12 N
  11368.  
  11369.           3 of 9 (Code 39) 2 to 30 N-U-P
  11370.  
  11371.           Extended 39 2 to 30 N-U-L-P-C
  11372.  
  11373.           Interleaved 2 of 5 2 to 30 N
  11374.  
  11375.           Code 128 2 to 30 N-U-L-P-C
  11376.  
  11377.           Codabar 2 to 30 N
  11378.  
  11379.           ZIP+4 Postnet 5, 9, or 11 N
  11380.  
  11381.           MSI Plessey 2 to 30 N
  11382.  
  11383.           Code 93 2 to 30 N-U-P
  11384.  
  11385.           Extended 93 2 to 30 N-U-L-P
  11386.  
  11387.  
  11388.  
  11389.  
  11390.      PC-File Version 7 Users Guide                            191
  11391.  
  11392.  
  11393.           UCC-128 19 N
  11394.  
  11395.  
  11396.  
  11397.      Allowed Characters:
  11398.  
  11399.           N-Numbers (0-9)
  11400.           U-Uppercase (A-Z)
  11401.           L-Lowercase (a-z)
  11402.           P-Punctuation
  11403.           C-Control Characters (ASCII values less than 32)
  11404.  
  11405.  
  11406.  
  11407.      Bar Code Printing Restrictions
  11408.  
  11409.      PC-File can only print one bar code per line. Additionally,
  11410.      nothing can be printed to the right on the same line as a bar
  11411.      code. Further, each of the bar code types supports specific
  11412.      data lengths and types of characters. See "Table of Bar Code
  11413.      Input Requirements" above for the input requirements of each
  11414.      type of bar code. Also note that bar codes will only appear in
  11415.      printed output or as graphic commands when printing to a disk
  11416.      file. Bar codes will NOT display when choosing Display on the
  11417.      Print
  11418.      Options dialog box.
  11419.  
  11420.      Type of Bar Code Dialog Box
  11421.  
  11422.      PC-File can produce 14 types of bar code output (see list and
  11423.      descriptions of available bar code types above). When using
  11424.      the Row, Mail Label, and Free Form formats, PC-File displays a
  11425.      dialog box for each field you've formatted to print as a bar
  11426.      code.
  11427.  
  11428.      The top line of the dialog box lists the name of the field
  11429.      that will print as a bar code. Type the corresponding letter,
  11430.      or click the mouse on the appropriate button to choose what
  11431.      type of bar code to print.
  11432.  
  11433.      Bar Code Height Dialog Box
  11434.  
  11435.      After you've chosen the type of bar code, PC-File displays the
  11436.      following dialog box to choose how high to print the bar code.
  11437.  
  11438.      Type the corresponding number or click the mouse on the
  11439.      appropriate button to select the height of your bar code
  11440.      output.
  11441.  
  11442.      NOTE: This dialog box does not appear when printing the ZIP+4
  11443.      Postnet bar code which can only print one height.
  11444.  
  11445.  
  11446.  
  11447.  
  11448.      PC-File Version 7 Users Guide                            192
  11449.  
  11450.  
  11451.  
  11452.  
  11453.      Printing Bar Codes with Row Format
  11454.  
  11455.      You can use a Row Format report to quickly produce reports in
  11456.      a one record per row format. Using the Row Format you can
  11457.      print bar codes for inventory control catalogs and the like.
  11458.      PC-File can only print one bar code per line with no other
  11459.      data or text printing to the right of the bar code. Therefore,
  11460.      you can only choose to print one field as a bar code with a
  11461.      Row Format report, and it must either be the only field you
  11462.      choose or the rightmost field you choose.
  11463.  
  11464.      First, you must choose any fields you want to print as text
  11465.      from the list box in the order you want to print them across
  11466.      the page. Then, to format the last (or only) field to print as
  11467.      a bar code, type the field's name followed by a comma and the
  11468.      letter "B" in the text box above the field selection list box
  11469.      (like FIELDNAME,B in the picture above), then press ENTER.
  11470.  
  11471.      For example, after you have made the menu selections to format
  11472.      a Row Report, the Field Selection dialog box is displayed.
  11473.  
  11474.      At this point, there should be a checkmark and a sequence
  11475.      number next to the left of each of the fields you have chosen.
  11476.      The field you chose to print as a bar code must be the last
  11477.      (or only) field in the sequence. If it is not, choose Reset
  11478.      and choose your fields again. Choose OK to continue with the
  11479.      report definition.
  11480.  
  11481.      After you choose OK, PC-File displays the bar code type
  11482.      selection box for the field you selected to print as a bar
  11483.      code. After choosing the bar code type, PC-File displays the
  11484.      bar code height selection box. The top border of both dialog
  11485.      boxes shows which field you are formatting to print as a bar
  11486.      code.
  11487.  
  11488.      To print bar code data using Row Format:
  11489.  
  11490.      1.Choose Reports from the Print menu.
  11491.  
  11492.      2.Choose New.
  11493.  
  11494.      3.Choose Row Format.
  11495.  
  11496.      4.Choose the fields you want to print as text:
  11497.  
  11498.           Click on the field name in the list box. Or...
  11499.  
  11500.           Highlight the field name in the list box and press ENTER.
  11501.           Or...
  11502.  
  11503.           Type the fieldname in the text box and press ENTER.
  11504.  
  11505.      5.Choose the field you want to print as a bar code:
  11506.  
  11507.  
  11508.  
  11509.  
  11510.      PC-File Version 7 Users Guide                            193
  11511.  
  11512.  
  11513.           Move the highlight to the text box above the field
  11514.           selection list box, if it isn't there already.
  11515.  
  11516.           Type the desired field's name exactly as it appears in
  11517.           the field selection list box, followed by a comma and the
  11518.           letter "B."
  11519.  
  11520.           Press ENTER.
  11521.  
  11522.        For example, to format a field named ZIPCODE for bar code
  11523.        printing, type: zipcode,b then press ENTER.
  11524.  
  11525.      6.Choose OK to continue.
  11526.  
  11527.      7.Choose the bar code type.
  11528.  
  11529.      8.Choose the bar code height. (The bar code height dialog box
  11530.        does not display when formatting ZIP+4 bar code).
  11531.  
  11532.      9.Type the report title and save the report, if desired.
  11533.  
  11534.      10.  Make selections on the Print Options dialog box. See
  11535.        Chapter 11, "The Print Options" for details).
  11536.  
  11537.      11.  Choose OK to print.
  11538.  
  11539.      See "Using the Row Format" earlier in this chapter for more
  11540.      information on printing using Row format.
  11541.  
  11542.  
  11543.  
  11544.  
  11545.      PC-File Version 7 Users Guide                            194
  11546.  
  11547.  
  11548.  
  11549.      Printing Bar Codes with Mailing Label Format
  11550.  
  11551.      PC-File now produces bar codes on labels. If you send mailings
  11552.      of 250- 500 pieces or more at a time, you may be able to save
  11553.      anywhere from 2o to over 5o per piece when using ZIP+4 bar
  11554.      coded addressing! (As of this printing-contact your local Post
  11555.      Office for up-to-date information on discounts and addressing
  11556.      standards). You can also use this feature to print labels with
  11557.      bar codes in other formats for applications such as inventory
  11558.      control tags and UPC price tags.
  11559.  
  11560.      Formatting labels to print bar codes with the Mail Label
  11561.      format works much like the procedure used with Row format. The
  11562.      same restrictions hold: You can print no more than one bar
  11563.      code per line, and if anything else is printing on that line,
  11564.      the bar code must be the last thing printing on the line. When
  11565.      selecting fields for each line of your label, type the field's
  11566.      name followed by a comma and the letter "B" to have that
  11567.      field's data print as a bar code. This triggers PC-File to
  11568.      display the bar code type and bar code size dialog boxes
  11569.      discussed at the beginning of this section. Note that the bar
  11570.      code definition dialog boxes do not display until you choose
  11571.      OK after choosing all fields for that line in the label.
  11572.  
  11573.      To print bar codes using the Mail Label report option:
  11574.  
  11575.      1.Choose Reports from the Print menu.
  11576.  
  11577.      2.Choose New.
  11578.  
  11579.      3.Choose Mail Label.
  11580.  
  11581.      4.Type the number of lines per label and choose OK.
  11582.  
  11583.      5.First, choose the fields (if any) you want to print as text
  11584.        on the first line of the label:
  11585.  
  11586.  
  11587.             Click on the field name in the list box. Or..
  11588.  
  11589.             Highlight the Field name in the list box and press
  11590.             ENTER. Or...
  11591.  
  11592.             Type the fieldname in the text box and press ENTER.
  11593.  
  11594.           Repeat for all fields to print as text on the first line.
  11595.  
  11596.      6.Only after choosing all fields to print as text, choose a
  11597.        field (if any) to print as a bar code on the first line:
  11598.  
  11599.           Move the highlight to the text box above the field
  11600.           selection list box, if it isn't there already.
  11601.  
  11602.           Type the desired field's name exactly as it appears in
  11603.           the field selection list box.
  11604.  
  11605.  
  11606.  
  11607.  
  11608.      PC-File Version 7 Users Guide                            195
  11609.  
  11610.  
  11611.  
  11612.           Type a comma followed by the letter "B."
  11613.  
  11614.           Press ENTER. For example, to format a field named ZIPCODE
  11615.           for bar code printing type: ZIPCODE,B then press ENTER.
  11616.           Remember: Do not choose any additional fields to print to
  11617.           the right of a bar code.
  11618.  
  11619.      7.Choose OK.
  11620.  
  11621.      8.If you have formatted a field to print as a bar code, the
  11622.        bar code type and height definition dialog boxes display as
  11623.        described above (height definition does not display for
  11624.        ZIP+4). Answer each box appropriately.
  11625.  
  11626.      9.Repeat steps 5-8 to define each line of the label.
  11627.  
  11628.      10.  Type a name and save the label format, if desired.
  11629.  
  11630.      11.  Make selections on the Print Options dialog box. See
  11631.        Chapter 11, "The Print Options," for details on the Print
  11632.        Options dialog box.
  11633.  
  11634.      12.  Choose OK to print.
  11635.  
  11636.      See "Using the Mailing Label Format" earlier in this chapter
  11637.      for more information on using the Mail Label format.
  11638.  
  11639.  
  11640.  
  11641.  
  11642.      PC-File Version 7 Users Guide                            196
  11643.  
  11644.  
  11645.  
  11646.      Printing Bar Codes with Free Form Format
  11647.  
  11648.      The Free Form format gives you more flexibility than either
  11649.      the Row or Mail Label formats. Use the Free Form format to
  11650.      print more complex labels, postcards, envelopes, catalogs,
  11651.      order forms, and other reports with bar codes. However, the
  11652.      same printing restrictions apply to all formats: only one bar
  11653.      code per line and nothing can print to the right of the bar
  11654.      code.
  11655.  
  11656.      A new menu option has been added to the Free Form report Data
  11657.      menu to let you to choose to print a field as a bar code. The
  11658.      Field (bar code) option lets you format a field to print as a
  11659.      bar code: First, place the cursor where you want the bar code
  11660.      to print in the appropriate report section (Heading, Detail,
  11661.      etc.). Then, pull down the Data menu and choose the Field (bar
  11662.      code) option. A field selection list box dialog appears to let
  11663.      you choose which field to print. After selecting the field to
  11664.      print, the Type of Bar Code dialog box is displayed, followed
  11665.      by the Bar Code Height dialog box.
  11666.  
  11667.      To print bar codes using the Free Form format:
  11668.  
  11669.      1.Choose Reports from the Print menu.
  11670.  
  11671.      2.Choose New.
  11672.  
  11673.      3.Choose Free Form.
  11674.  
  11675.      4.Move the cursor where you want to print the bar code, in the
  11676.        appropriate report section.
  11677.  
  11678.      5.Choose Field (bar code) from the Data menu.
  11679.  
  11680.      6.Choose the field from the list box.
  11681.  
  11682.      7.Choose the bar code type.
  11683.  
  11684.      8.Choose the bar code height. (The bar code height dialog box
  11685.        does not display when formatting ZIP+4 bar codes.) A row of
  11686.        @'s the length of the selected field appears in the location
  11687.        the bar code will print.
  11688.  
  11689.      9.Repeat steps 4-8 to print any    additional fields as a bar
  11690.        code. Remember not to print more than one bar code per line
  11691.        and do not print anything to the right of a bar code.
  11692.  
  11693.      10.  Format any additional fields as trimmed or padded text,
  11694.        system data, subtotals, or totals; typing any other text
  11695.        directly from the keyboard.
  11696.  
  11697.      11.  Choose OK from the File menu.
  11698.  
  11699.      12.  Choose Yes to if you want to save your report.
  11700.  
  11701.  
  11702.  
  11703.  
  11704.      PC-File Version 7 Users Guide                            197
  11705.  
  11706.  
  11707.      13.  Type a report description up to 50 characters, if you
  11708.        answered Yes in step 12.
  11709.  
  11710.      14.  Type a report name of up to 8 characters. Choose OK.
  11711.  
  11712.      15.  Make appropriate selections on the Print Options dialog
  11713.        box and choose OK to print your report. See "The Print
  11714.        Options" in Chapter 11 for more information on the Print
  11715.        Options dialog box.
  11716.  
  11717.  
  11718.      Printing Bar Codes with Language Format
  11719.  
  11720.      You can use the Language format to print fields or other data
  11721.      as a bar code by placing an appropriately formatted print mask
  11722.      after the data you want to print as a bar code. This includes
  11723.      printing calculations, relational lookups, string buckets,
  11724.      totals, subtotals, system fields, or formatted strings of
  11725.      text. The same printing restrictions apply as with other
  11726.      report formats: one bar code per line and no printing to the
  11727.      right of a bar code.
  11728.  
  11729.      The format of a bar code print mask is as follows:
  11730.  
  11731.      [Fieldname]:BAR*, Type, Height, ShowErrors:
  11732.  
  11733.      Or...
  11734.  
  11735.      (Calculation):BAR*, Type, Height, ShowErrors:
  11736.  
  11737.      Or...
  11738.  
  11739.      "String":BAR*, Type, Height, ShowErrors:
  11740.  
  11741.      Where "Fieldname" is a valid field name in the database you
  11742.      are printing from. "Fieldname" can also be a valid total
  11743.      bucket name, string bucket name, or system field name.
  11744.  
  11745.      Where "Calculation" is a valid PC-File calculation or
  11746.      relational lookup.
  11747.  
  11748.      Where "String" is any string of alphanumeric characters. Make
  11749.      sure that the number and kind of characters are supported by
  11750.      the bar code type you want to print.
  11751.  
  11752.      Replace "Type" with a number, 1 through 14, to print the
  11753.      desired bar code type. Refer to "Bar Code Type Numbers" below
  11754.      for the appropriate number.
  11755.  
  11756.      Replace "Height" with a number from 1 to 9 to print the bar
  11757.      code that many lines high. This setting is ignored for ZIP+4
  11758.      Postnet bar codes, which always print at a fixed height.
  11759.  
  11760.  
  11761.  
  11762.  
  11763.      PC-File Version 7 Users Guide                            198
  11764.  
  11765.  
  11766.      Replace "ShowErrors" with a 1 to cause PC-File to print error
  11767.      messages if it encounters problems when printing bar codes.
  11768.      (See Bar Code Errors for details). Replace "ShowErrors" with 0
  11769.      or omit to suppress printing of bar code error messages.
  11770.  
  11771.      Bar Code Type Numbers
  11772.  
  11773.      Bar Code Type Type Number
  11774.  
  11775.      UPC-A 1
  11776.  
  11777.      UPC-B 2
  11778.  
  11779.      EAN/JAN-13 3
  11780.  
  11781.      EAN/JAN-8 4
  11782.  
  11783.      3 of 9 (Code 39) 5
  11784.  
  11785.      Extended 3 of 9 6
  11786.  
  11787.      Interleaved 2 of 5 7
  11788.  
  11789.      Code 128 8
  11790.  
  11791.      Codabar 9
  11792.  
  11793.      ZIP+4 Postnet 10
  11794.  
  11795.      MSI Plessey 11
  11796.  
  11797.      Code 93 12
  11798.  
  11799.      Extended 93 13
  11800.  
  11801.      UCC-128 14
  11802.  
  11803.  
  11804.  
  11805.      For example, the line in a PC-File language report to print a
  11806.      field named ZIPCODE using the ZIP+4 Postnet bar code would
  11807.      look like this:
  11808.  
  11809.      [ZIPCODE]:BAR*,10,1:
  11810.  
  11811.      The number 10 following BAR* tells PC-File to use Postnet bar
  11812.      code. The number 1 to its right indicates 1 line high,
  11813.      although this number can be omitted for ZIP+4 Postnet bar code
  11814.      because Postnet only prints one height. Omitting anything to
  11815.      the right of the height number, suppresses the printing of
  11816.      error codes.
  11817.  
  11818.      Another example to print a field CODE using UPC-A bar code 3
  11819.      lines high and print error messages would look like this:
  11820.  
  11821.      [CODE]:BAR*,1,3,1:
  11822.  
  11823.  
  11824.  
  11825.  
  11826.      PC-File Version 7 Users Guide                            199
  11827.  
  11828.  
  11829.  
  11830.      The first number after BAR*, 1, indicates UPC-A bar code type,
  11831.      3 tells PC-File to print the bar code 3 lines high, the 1 at
  11832.      the end causes error messages to print if errors are
  11833.      encountered.
  11834.  
  11835.      To Print Bar Codes Using the Report Language Editor:
  11836.  
  11837.      1.Choose Reports from the Print menu.
  11838.  
  11839.      2.Choose New, if you are writing a report from scratch, or
  11840.        choose Modify, if you are editing a pre-existing report to
  11841.        print bar codes.
  11842.  
  11843.      3.Choose Language, if you chose New in step 2, or choose
  11844.        Language Editor, if you chose Modify in step 2, then choose
  11845.        the report to edit.
  11846.  
  11847.      4.Put a mask in the :BAR*, Type, Height, ShowErrors: format
  11848.        after any field or calculation you want to print as a bar
  11849.        code. Make sure only one bar code is printing per line, and
  11850.        that nothing prints to the right of a bar code.
  11851.  
  11852.      5.Choose OK and save the report.
  11853.  
  11854.      6.Answer Print Options dialog box appropriately. See "The
  11855.        Print Options" in Chapter 11 for more information on the
  11856.        Print Options dialog box.
  11857.  
  11858.      7.Choose OK to print.
  11859.  
  11860.      Refer to "Using the Language Format" earlier in this chapter
  11861.      for further details on using Language format.
  11862.  
  11863.      Bar Code Error Messages
  11864.  
  11865.      PC-File does not print bar code error messages for bar code
  11866.      reports set up with the Row, Mailing Label or Free Form
  11867.      formats. In this case, if PC-File encounters an error when
  11868.      printing any record, it will not print that record's bar code.
  11869.      You can use the Language Editor to modify bar code reports to
  11870.      print error messages, regardless of the method originally used
  11871.      to define them. To do this, insert a comma and a 1 at the end
  11872.      of the :*BAR: print mask. For example, if the line in your
  11873.      report format
  11874.      originally looks like this:
  11875.  
  11876.      [CODE]:BAR*,1,5:
  11877.  
  11878.      Inserting a comma and a 1 after the 5, like this:
  11879.  
  11880.      [CODE]:BAR*,1,5,1:
  11881.  
  11882.      causes PC-File to print error messages when it encounters
  11883.      them.
  11884.  
  11885.  
  11886.  
  11887.  
  11888.      PC-File Version 7 Users Guide                            200
  11889.  
  11890.  
  11891.      The error message prints directly on the page or label in the
  11892.      location where the bar code would have appeared had an error
  11893.      not occurred. The error message is printed in this format:
  11894.  
  11895.      BAR*x Error y
  11896.  
  11897.      where "x" is the Bar Code Type Number (see the table of bar
  11898.      code types above), and "y" is the Bar Code Error Number. The
  11899.      following table explains the significance of each error
  11900.      number.
  11901.  
  11902.  
  11903.      Bar Code Error Message Numbers
  11904.  
  11905.      Error Significance Number
  11906.  
  11907.      1 Wrong bar code type number in :BAR*:mask
  11908.  
  11909.      2 Length of input string is 0 or greater than 30
  11910.  
  11911.      3 Length of text is greater than 30
  11912.  
  11913.      4* Wrong printer number
  11914.  
  11915.      5 Trying to print beyond the 250th column position on the page
  11916.  
  11917.      6 Bar code height is greater than 20 (2") or less than 1
  11918.  
  11919.      7* Checksum is greater than 2
  11920.  
  11921.      8* Number of passes <1 or >5 on dot matrix printers
  11922.  
  11923.      9 Wrong number of characters, or characters not supported by
  11924.      bar code type
  11925.  
  11926.  
  11927.  
  11928.      Error message numbers in the table followed with an asterisk
  11929.      should not appear-PC-File does not allow you to control these
  11930.      functions. In nearly all cases, the only error you will see is
  11931.      "Error 9" which indicates that the data you are trying to
  11932.      print does not meet the requirements for the chosen bar code
  11933.      type. For example, you cannot encode Canadian Postal Codes
  11934.      using the Postnet bar code format which requires 5 or 10 digit
  11935.      zipcodes (no letters).
  11936.  
  11937.  
  11938.  
  11939.  
  11940.      PC-File Version 7 Users Guide                            201
  11941.  
  11942.  
  11943.  
  11944.  
  11945.      CHAPTER 10 WRITING LETTERS AND MERGING DATA
  11946.  
  11947.      PC-File's letter writing utility lets you combine word
  11948.      processing and data retrieval to create form letters. You can
  11949.      merge name and address information, as well as other data,
  11950.      easily and quickly. This chapter tells you how to do it. For
  11951.      information on printing letters, see Chapter 11, "Printing
  11952.      Reports and Letters."
  11953.  
  11954.  
  11955.      Overview
  11956.  
  11957.      Form letters combine text from the keyboard and data from a
  11958.      database. Thus, you can type up a basic letter, then merge in
  11959.      name and address information, as well as other data, and print
  11960.      out hundreds of "personal" letters. You can print out letters
  11961.      for all or a selected group of your records.
  11962.  
  11963.      PC-File uses the edit window for creating form letters. The
  11964.      edit window is a basic word processing utility that provides
  11965.      many of the same editing options available in other editors
  11966.      and word processors. See Chapter 1, "Navigating in PC-File,"
  11967.      for information on the editing tools usable in the edit
  11968.      window.
  11969.  
  11970.      You create a form letter just as you would a regular letter,
  11971.      except that you enter commands where you want to insert data
  11972.      from a database. When you print the letter, PC-File replaces
  11973.      the commands with the data from your records.
  11974.  
  11975.      Commands are also used to help format the letter. These
  11976.      commands let you determine spacing, enter special printing
  11977.      codes, and feed a new page through the printer at the right
  11978.      time.
  11979.  
  11980.      Text is typed into the letter just as it is with any word
  11981.      processing program. The commands can also be typed in, but
  11982.      must include special characters so that PC-File interprets
  11983.      them correctly. Or you can have PC-File enter the commands by
  11984.      choosing them from a menu.
  11985.  
  11986.      Writing a Letter
  11987.  
  11988.      Form letters include the text of the letter and the commands
  11989.      that merge data and control formatting. Combining text with
  11990.      these commands requires a bit of planning before you start.
  11991.      Decide what information you want to pull from a database and
  11992.      where you intend to place it in the letter. You may want to
  11993.      sketch out the letter on paper first.
  11994.  
  11995.      If you plan to use data from more than one database, decide
  11996.      which database provides the majority of the data. Create the
  11997.      letter with that database open. You can use relational lookups
  11998.      to pull in data from the secondary database.
  11999.  
  12000.  
  12001.  
  12002.  
  12003.      PC-File Version 7 Users Guide                            202
  12004.  
  12005.  
  12006.  
  12007.      Letter Writing Procedures
  12008.  
  12009.      The basic procedures involved in creating a form letter are
  12010.      outlined below. The specifics of entering mail merge commands
  12011.      are covered in detail later in this chapter.
  12012.  
  12013.      To create a letter:
  12014.  
  12015.      1.Open the primary database. The primary database is the
  12016.        database that will supply most or all of the data for your
  12017.        letter.
  12018.  
  12019.      2.Choose Print from the menu bar.
  12020.  
  12021.      3.Choose Letters from the Print menu. A dialog box displays.
  12022.  
  12023.      4.Choose New from the dialog box.
  12024.  
  12025.      5.Accept the column width of 70 characters, or enter a new
  12026.        width up to 120 characters. A width of 70 characters assumes
  12027.        a 3/4 inch margin on each side if you are using 8.5x11 paper
  12028.        and normal type. To increase the side margins, decrease the
  12029.        number of characters.
  12030.  
  12031.      6.Type your letter, including the appropriate mail merge
  12032.        commands, in the edit window. You can type in the mail merge
  12033.        commands yourself or, in most cases, choose the Insert
  12034.        button to have PC-File enter the commands.
  12035.  
  12036.      7.Choose OK when you finish.
  12037.  
  12038.      8.Choose Yes when prompted to save the letter.
  12039.        Choose No if you are sure you will only use it once.
  12040.  
  12041.      9.If you choose to save the letter, enter a name in the dialog
  12042.        box. You don't need to enter the extension, as PC-File adds
  12043.        it automatically.
  12044.  
  12045.      10.  Enter a description (optional).
  12046.  
  12047.      The Print Options dialog box appears. See Chapter 11,
  12048.      "Printing Reports and Letters," for information on printing a
  12049.      letter.
  12050.  
  12051.      Letter Writing Guidelines
  12052.  
  12053.      When you call up the letter writing utility to enter a new
  12054.      letter, the Edit Window appears.
  12055.  
  12056.      Use the edit window just as you would any other text editor or
  12057.      word processing program. Text wraps automatically from one
  12058.      line to the next as you type the letter.
  12059.  
  12060.      Follow these guidelines as you type your letter.
  12061.  
  12062.  
  12063.  
  12064.  
  12065.      PC-File Version 7 Users Guide                            203
  12066.  
  12067.  
  12068.      Top margin
  12069.  
  12070.      The letter writing utility does not provide for a top margin
  12071.      or header. You must determine the margin by inserting the
  12072.      appropriate number of lines at the start of the letter. For
  12073.      dot matrix and daisy wheel printers, drop down six lines for
  12074.      each inch of top margin required.
  12075.  
  12076.      Laser printers insert a three-line margin automatically, so
  12077.      you should insert blank lines at the top for whatever margin
  12078.      you want beyond three lines.
  12079.  
  12080.      Side margins
  12081.  
  12082.      Start your text in column 1. Don't try to increase your left
  12083.      margin by moving your text in from column one. Instead,
  12084.      determine your margins by increasing or decreasing the page
  12085.      width when prompted by PC-File. If your letter prints too far
  12086.      to the left or right on the paper, you can move the paper in
  12087.      some printers. You can also move the copy, to the right only,
  12088.      by increasing the number in the Left margin parameter in the
  12089.      Print Options dialog box.
  12090.  
  12091.      Bottom margin
  12092.  
  12093.      Place a form feed (.FF) at the bottom of the letter. The form
  12094.      feed kicks the letter out of the printer so that each letter
  12095.      starts on a new page. If your letter appears to be fairly
  12096.      long, determine the number of lines in the top margin and in
  12097.      the letter itself, then subtract them from the page length. In
  12098.      that way you can decide if you have enough room for a bottom
  12099.      margin or need to extend the letter to two pages.
  12100.  
  12101.      Multi-page letters
  12102.  
  12103.      If your form letter runs to more than one page, place a form
  12104.      feed (.FF) on the bottom of each page. The top margin of each
  12105.      page begins on the line immediately following the form feed
  12106.      for the previous page. You can include up to five pages in a
  12107.      letter. Be sure to include a form feed at the end of the final
  12108.      page.
  12109.  
  12110.      Determining Where You Are
  12111.  
  12112.      You can determine the current location of the cursor in the
  12113.      letter writing edit window (and in the Free form report edit
  12114.      window). This can be handy for lining up fields and
  12115.      determining how many lines you have used.
  12116.  
  12117.      To display the cursor location:
  12118.  
  12119.      Press CTRL-W. A dialog box displays, indicating the current
  12120.      row and column location of the cursor. Choose OK to return to
  12121.      the edit window.
  12122.  
  12123.      Spell Checking Your Letter
  12124.  
  12125.  
  12126.  
  12127.  
  12128.      PC-File Version 7 Users Guide                            204
  12129.  
  12130.  
  12131.  
  12132.      You can check the spelling in your letter at any time by
  12133.      choosing the Spell button on the bottom of the Letter editing
  12134.      window. See Chapter 15, "Spell Checking" for details on how to
  12135.      use the Spell Check dialog box.
  12136.  
  12137.      Adding Mail Merge Commands
  12138.  
  12139.      There are two ways to add mail merge commands to a letter:
  12140.  
  12141.        1. Type them in.
  12142.  
  12143.        2. Choose them from a dialog box.
  12144.  
  12145.      You can type the commands in yourself, following the
  12146.      formatting rules for entering the different types of commands
  12147.      correctly. These rules are described in the sections on the
  12148.      commands.
  12149.  
  12150.      An easier method is to use the Insert button. With this button
  12151.      you can have PC-File enter most of the available mail merge
  12152.      commands for you.
  12153.  
  12154.      Using the Insert Button
  12155.  
  12156.      Use the Insert button on the button bar to have PC-File enter
  12157.      merge commands for you. Choosing the button displays a list of
  12158.      commands, from which you can choose the one you want.
  12159.  
  12160.      To choose the Insert button, click on it or press ALT-I.
  12161.  
  12162.      To have PC-File enter a command:
  12163.  
  12164.        1. Place the cursor where you want to locate the merge
  12165.           command.
  12166.  
  12167.        2. Choose the Insert button from the bottom of the screen.
  12168.           PC-File remembers the location of the cursor in the edit
  12169.           window before you move it to choose the Insert button. A
  12170.           dialog box displays.
  12171.  
  12172.        3. Choose the appropriate option. For example, choose Data.
  12173.           Another dialog box displays.
  12174.  
  12175.        4. Choose a field from the dialog box. PC-File prints out
  12176.           the field name at the cursor location on the letter. The
  12177.           field name is formatted as a trimmed field.
  12178.  
  12179.  
  12180.  
  12181.  
  12182.      PC-File Version 7 Users Guide                            205
  12183.  
  12184.  
  12185.      Of the options in the insert dialog box, Data and Keyed data
  12186.      require additional information before they print a command to
  12187.      the screen. The Data option requires that you choose a field
  12188.      from the database. The Keyed data option displays a text box,
  12189.      allowing you to enter a prompt for the operator. The remaining
  12190.      options print commands directly to the screen. For the
  12191.      IF...ELSE...ENDIF command, you must enter the IF expression
  12192.      between the parentheses. You can erase the ELSE command if it
  12193.      isn't
  12194.      necessary.
  12195.  
  12196.      You can enter other commands in a letter from the keyboard
  12197.      that do not appear as options in the Insert dialog box.
  12198.      However, they are less often used than those offered. All of
  12199.      the commands are explained below.
  12200.  
  12201.      Command Guidelines
  12202.  
  12203.      Mail merge commands must be entered in a specific way in order
  12204.      for PC- File to recognize that they are commands and not text.
  12205.      If you use the Insert button, PC-File enters commands as they
  12206.      should appear. If you type the commands yourself, be sure to
  12207.      follow the rules described below.
  12208.  
  12209.      Start all mail merge commands with a period.
  12210.  
  12211.      Enter command words in uppercase letters. The exceptions are
  12212.      database field names, calculations, and any message included
  12213.      with a KEYIN command.
  12214.  
  12215.      Place all formatting and IF commands on a line by themselves,
  12216.      and begin these commands in the first column. Don't count the
  12217.      lines used by the commands as part of a letter. PC-File reads
  12218.      the commands, but eliminates the lines they occupy.
  12219.  
  12220.      Types of Commands
  12221.  
  12222.      Mail merge commands can be divided into five basic types:
  12223.  
  12224.      Type Function
  12225.  
  12226.           Data field commands Insert data from database fields
  12227.  
  12228.           System field commands Allow for user input and insert
  12229.           current date
  12230.  
  12231.           Formatting commands Determine the format and design of
  12232.           the letter
  12233.  
  12234.           Calculation commands Enter the results of a calculation
  12235.  
  12236.           IF commands Let you include or exclude text based on a
  12237.           comparison
  12238.  
  12239.      Each type of command is covered separately below.
  12240.  
  12241.  
  12242.  
  12243.  
  12244.      PC-File Version 7 Users Guide                            206
  12245.  
  12246.  
  12247.      Data Field Commands
  12248.  
  12249.      The most commonly used mail merge commands are the field
  12250.      commands. Field commands add data directly from fields in your
  12251.      database. For example, you would use a field command to enter
  12252.      first name, last name, address, city, state, and zip code from
  12253.      the respective fields in the database.
  12254.  
  12255.      Field commands can be entered in uppercase or lowercase
  12256.      letters. There are two formats:
  12257.  
  12258.      Trimmed field Padded field
  12259.  
  12260.      Trimmed Field
  12261.  
  12262.      Extra spaces are removed from the end of data when you
  12263.      designate a trimmed field. Thus, if the City field is 15
  12264.      characters in length, but the city is Seattle, only the seven
  12265.      characters in the city name are printed. The remaining eight
  12266.      spaces in the field are removed.
  12267.  
  12268.      This is the most commonly used format for letters, and is
  12269.      practically a must in addresses, where you want the data in
  12270.      the first name and last name fields, as well as the data in
  12271.      the city, state, and zip code fields, to flow together. If you
  12272.      use the Insert button to enter a field, it is formatted as a
  12273.      trimmed field.
  12274.  
  12275.      Trimmed fields are indicated with angle brackets around the
  12276.      field name. Thus, trimmed fields are entered like this:
  12277.      .<City>
  12278.  
  12279.      The following example shows the use of trimmed fields in an
  12280.      address. Spaces and punctuation are added where needed. For
  12281.      example, one space is entered between the first and last
  12282.      names. A comma and a space separate the city and state fields,
  12283.      as is normally the case, while a space separates the state
  12284.      from the zip code. The brackets and periods do not count as
  12285.      spaces.
  12286.  
  12287.      .<FNAME> .<LNAME> .<ADDRESS1> .<ADDRESS2> .<CITY>,.<ST> .<ZIP>
  12288.  
  12289.      You can abbreviate the field name in trimmed formats, as long
  12290.      as there is enough of the field name to identify it as unique
  12291.      in the database.
  12292.  
  12293.      Padded Field
  12294.  
  12295.      Use a padded field when you want to retain all the spacing
  12296.      within a field. This format is most useful when you want to
  12297.      set up columns of data in your letter. The field length you
  12298.      define in the letter doesn't have to be the same length as the
  12299.      data entry field, but if you create a shorter field in the
  12300.      letter, data that extends beyond that length is truncated.
  12301.  
  12302.  
  12303.  
  12304.  
  12305.      PC-File Version 7 Users Guide                            207
  12306.  
  12307.  
  12308.      Padded field are indicated with square brackets [ ] around the
  12309.      field name. Enter the number of characters between the
  12310.      brackets that you want to allow for in the letter.
  12311.  
  12312.      Padded field commands look like this:
  12313.  
  12314.      .[Habitat ] .[Species ]
  12315.  
  12316.      Use blank spaces after the field name to add the necessary
  12317.      padding to the field command. Thus, if the field name is seven
  12318.      characters long and the field itself is 15 characters long,
  12319.      add eight blank spaces after the field name to give the field
  12320.      the necessary spacing for the data.
  12321.  
  12322.      You can abbreviate the field name in padded formats, as long
  12323.      as there is enough of the field name to identify it as unique
  12324.      in the database.
  12325.  
  12326.      If you enter a field with the Insert button, it is formatted
  12327.      as a trimmed field. Change the angle brackets to square
  12328.      brackets to define the field as a padded field.
  12329.  
  12330.      System Field Commands
  12331.  
  12332.      System fields normally provide for automatic data from the
  12333.      computer. For letters, you can have PC-File enter the current
  12334.      date, or prompt the user to key in data during the printing of
  12335.      each record.
  12336.  
  12337.      Current Date
  12338.  
  12339.      This command pulls the current date from your computer or
  12340.      network system. It is handy when you plan to reuse a letter
  12341.      and don't want to update the current date each time you print
  12342.      it. Enter it in the format .<DATE*> or choose Current date
  12343.      from the Insert dialog box. Be sure to enter the asterisk in
  12344.      the field if you add it yourself. Otherwise, PC-File
  12345.      interprets the command as a field command, and looks for a
  12346.      field called DATE in your database.
  12347.  
  12348.      Keyed Data
  12349.  
  12350.      Use this command to set up a field that allows user input for
  12351.      each record. While printing letters, the printer pauses and
  12352.      displays the prompt (message) you entered as part of the
  12353.      command. Press ENTER once you finish entering the message to
  12354.      continue printing.
  12355.  
  12356.      Choose Keyed data from the Insert dialog box to have PC-File
  12357.      set up the keyed data command. PC-File asks you for the
  12358.      message to prompt the user with during the printing of each
  12359.      letter. Enter the message as you want it to appear on the
  12360.      screen. For example, you could enter Type p.s. here.
  12361.  
  12362.      To enter the command yourself, type both the command and the
  12363.      message. For example, you could use the following command:
  12364.  
  12365.  
  12366.  
  12367.  
  12368.      PC-File Version 7 Users Guide                            208
  12369.  
  12370.  
  12371.  
  12372.      .<KEYIN*Type a personal note here>
  12373.  
  12374.      With the angle bracket format, you don't have to indicate the
  12375.      field length of the user input. You can enter up to 65
  12376.      characters for each letter. If you want to fix the length of
  12377.      the potential input, use square brackets around the command.
  12378.  
  12379.      Always use the asterisk (*) with the system commands, as
  12380.      illustrated above.
  12381.  
  12382.      Formatting Commands
  12383.  
  12384.      As the name suggests, use these commands to format a letter.
  12385.      The commands can remove unwanted blank lines, force a page
  12386.      change, and set printer codes for special character formatting
  12387.      such as bold or italics.
  12388.  
  12389.      You can enter the more commonly used formatting commands from
  12390.      the Insert dialog box. You'll have to enter the printer codes
  12391.      yourself.
  12392.  
  12393.      Formatting commands do not use brackets, but must be preceded
  12394.      by a period and entered in uppercase letters.
  12395.  
  12396.      Form Feed
  12397.  
  12398.      The .FF or .FORMFEED command (use either format) tells PC-File
  12399.      to skip to a new page. Use the command at the end of a one
  12400.      page letter. Without the command, the page won't kick out
  12401.      unless it also happens to be the last printable line of the
  12402.      page. For letters with multiple pages, use the form feed at
  12403.      the end of each page.
  12404.  
  12405.      Always enter a form feed command on a line by itself and start
  12406.      it at the left margin.
  12407.  
  12408.      Conditional Page
  12409.  
  12410.      The .CP n command skips to a new page, but only if there are
  12411.      less than n lines left on the page. For example, the command
  12412.      .CP 8 would skip to a new page only if there were less than
  12413.      eight lines left on the current page. This command is useful
  12414.      when you want to prevent a section of a letter from being
  12415.      split between two pages.
  12416.  
  12417.      Always enter a conditional page command on a line by itself
  12418.      and start it at the left margin.
  12419.  
  12420.      Reformatting Commands
  12421.  
  12422.  
  12423.  
  12424.  
  12425.      PC-File Version 7 Users Guide                            209
  12426.  
  12427.  
  12428.      There are times where you need to reformat a section of a
  12429.      letter to a particular width. For example, if you are printing
  12430.      several fields of varying length in the midst of a paragraph.
  12431.      The .REFORMAT nn (where nn is the width you want the following
  12432.      lines reformatted to) and .ENDREFORMAT commands reformat the
  12433.      paragraph to the specified width.
  12434.  
  12435.      To use the .REFORMAT nn and .ENDREFORMAT commands surround the
  12436.      paragraph to be reformatted. Each command should be placed on
  12437.      a line by itself, and should start at the left edge. For
  12438.      example:
  12439.  
  12440.      .REFORMAT 55 If you have any questions, please call your local
  12441.      sales office at: .<PHONE>. Your salesperson will be happy to
  12442.      answer any questions you have. .ENDREFORMAT
  12443.  
  12444.      This would reformat the paragraph to a width of 55. The
  12445.      resulting paragraph would look something like this:
  12446.  
  12447.      If you have any questions, please call your local sales office
  12448.      at: 555-1234. Your salesperson will be happy to answer any
  12449.      questions you have.
  12450.  
  12451.      Do not surround more than one paragraph with the .REFORMAT nn
  12452.      and .ENDREFORMAT or they will be reformatted into a single
  12453.      paragraph. Use the commands around each paragraph you need to
  12454.      reformat.
  12455.  
  12456.      Line Compression (Begin group and End group)
  12457.  
  12458.      The .GROUP, .EGROUP, and .EGROUP R commands are used to
  12459.      compress out blank lines, most often in addresses. Addresses
  12460.      can be formatted to accommodate four or five lines, but often
  12461.      require only three or four lines. With the line compression
  12462.      commands, blank lines resulting from empty fields are
  12463.      compressed out.
  12464.  
  12465.      Place the .GROUP command before and the .EGROUP command after
  12466.      the body of text in which you want the blank lines removed.
  12467.      Use .EGROUP R in place of .EGROUP if you want to relocate the
  12468.      blank lines to the end of the grouping, thus maintaining the
  12469.      overall line spacing. If you are entering the commands from
  12470.      the Insert dialog box, you have to add the space and the R
  12471.      from the keyboard.
  12472.  
  12473.      The following example illustrates the use of the line
  12474.      compression commands:
  12475.  
  12476.           .GROUP
  12477.           .<FNAME> .<LNAME>>
  12478.           .<ADDRESS1>
  12479.           .<<ADDRESS2>
  12480.           .<CITY>,.<ST>> .<ZIP>
  12481.           .EGROUP
  12482.  
  12483.  
  12484.  
  12485.  
  12486.      PC-File Version 7 Users Guide                            210
  12487.  
  12488.  
  12489.      For those cases with no data in the ADDRESS2 field, the blank
  12490.      line gets compressed out.
  12491.  
  12492.      Always enter line compression commands on a line by themselves
  12493.      and start the command at the left margin.
  12494.  
  12495.      Printer Markers
  12496.  
  12497.      Use printer markers to change character formatting within your
  12498.      letter. Printer markers are available for many of the standard
  12499.      print enhancements, such as bold, italics, and underlined
  12500.      type. You have to enter printer markers from the keyboard;
  12501.      they are not available from the Insert dialog box.
  12502.  
  12503.      The available printer markers are:
  12504.  
  12505.           .NORMAL
  12506.           .CONDENSED
  12507.           .BOLD
  12508.           .ITALIC
  12509.           .UNDERLINE
  12510.           .PORTRAIT
  12511.           .LANDSCAPE
  12512.           .PROPORTIONAL
  12513.           .DOUBLEWIDE
  12514.           .USERn (where n is 1-5)
  12515.  
  12516.      Enter a printer marker where you want a change in the font or
  12517.      type to occur. Use the marker .NORMAL to return to the
  12518.      default.
  12519.  
  12520.      The following line taken from the sample letter illustrates
  12521.      the use of a pair of printer markers.
  12522.  
  12523.      ...5-acre .BOLDRocky Mtn.NORMAL habitat for ...
  12524.  
  12525.      You can enter a printer marker at the start of a letter to
  12526.      enhance the entire letter. For markers such as .PORTRAIT and
  12527.      .LANDSCAPE, you would normally do that anyway.
  12528.  
  12529.      The .USERn printer markers are user-defined printer codes that
  12530.      you can set in your configuration profile. If you think you
  12531.      might use a particular print enhancement on a regular basis,
  12532.      consider creating a user-defined code. Otherwise, you can use
  12533.      ASCII decimal value for the code, described below. See Chapter
  12534.      13, "Utilities," for information on user-defined printer
  12535.      codes.
  12536.  
  12537.      Miscellaneous Printer Codes
  12538.  
  12539.      You can imbed printer codes other than those listed as printer
  12540.      markers. To imbed these codes, use the ASCII command.
  12541.  
  12542.  
  12543.  
  12544.  
  12545.      PC-File Version 7 Users Guide                            211
  12546.  
  12547.  
  12548.      For example, if you want to insert a superscript or subscript
  12549.      character into a letter, you have to use the ASCII command.
  12550.      You can also change the line spacing in this way. Normally,
  12551.      line spacing is set to 6 lines per inch. You can change it to
  12552.      8 lines per inch to accent a particular paragraph or tighten
  12553.      up the entire letter.
  12554.  
  12555.      The ASCII command follows this format: .A nn,nn . The .A is
  12556.      followed by a space, then by the decimal values of printer
  12557.      control characters, each separated by a comma. A space must
  12558.      follow the last digit in the command. The space at the end of
  12559.      the command is not printed. See your printer manual for the
  12560.      printer codes and their respective decimal values.
  12561.  
  12562.      Calculation Commands
  12563.  
  12564.      Calculations can be used in letters in much the same way they
  12565.      are used in reports. The answer to the calculation appears in
  12566.      each letter at the prescribed location.
  12567.  
  12568.      Use both angle brackets and parentheses to enclose
  12569.      calculations, as shown:
  12570.  
  12571.      .<(@Member_no,Donation,Member_no,Amount):$$,$##.##:>
  12572.  
  12573.      This relational lookup pulls the data from the Amount field in
  12574.      the Donation database by using the Member_no field common to
  12575.      both the Members and Donation database.
  12576.  
  12577.      Use print masks with calculations to specify the formatting.
  12578.      In the above example, the print mask adds the dollar sign and
  12579.      punctuation to the data. Enclose the print mask within colons.
  12580.      Enter the closing angle bracket after the mask. Print masks
  12581.      are explained in detail in Chapter 9, "Creating Reports."
  12582.  
  12583.      All types of calculations supported by PC-File can be used in
  12584.      a letter, including relational lookups. See Chapter 17,
  12585.      "Calculations," for information on using calculations.
  12586.  
  12587.      IF Commands
  12588.  
  12589.      IF commands can be useful in letters to include or omit
  12590.      information based on a comparison. For example, you can use an
  12591.      IF to include a middle initial in a name when the field
  12592.      contains data, but omit it and close up the space when the
  12593.      field is empty.
  12594.  
  12595.      IF commands also follow a set format:
  12596.  
  12597.           .IF (add a comparison calculation)
  12598.           Things to do if true (can be many commands long)
  12599.           .ELSE
  12600.           Things to do if not true (can be many commands long)
  12601.           .ENDIF
  12602.  
  12603.  
  12604.  
  12605.  
  12606.      PC-File Version 7 Users Guide                            212
  12607.  
  12608.  
  12609.      Every .IF statement must have a matching .ENDIF statement. The
  12610.      .ELSE statement is optional. Always start the commands in the
  12611.      first column of the letter.
  12612.  
  12613.      The following example illustrates the use of an IF command in
  12614.      a letter:
  12615.  
  12616.           .IF (Middle = " ")
  12617.           .<First>> .<Last>
  12618.           .ELSE .
  12619.           <First> .<Middle> .<Last>
  12620.           .ENDIF
  12621.           .<Address>
  12622.           .<City>,.<State> .<Zip>
  12623.  
  12624.      The comparison is always contained on the same line with the
  12625.      .IF command. The .ELSE and .ENDIF commands must appear on
  12626.      lines by themselves. For that reason, you can't include IF
  12627.      commands within the body of a paragraph of text. The lines
  12628.      used by the commands disappear when you print the letter.
  12629.  
  12630.      Choose the option If, Else, Endif from the Insert dialog box
  12631.      to have PC-File enter the command for you. PC-File prints the
  12632.      three commands on separate lines. You can remove the Else
  12633.      command if you don't use it.
  12634.  
  12635.      Modifying a Letter
  12636.  
  12637.      You can call up an existing letter and make changes to it at
  12638.      any time.
  12639.  
  12640.      To modify a letter:
  12641.  
  12642.      1.Choose Print from the menu bar.
  12643.  
  12644.      2.Choose Letters from the Print menu.
  12645.  
  12646.      3.Choose Modify from the dialog box. A file selection dialog
  12647.        box appears.
  12648.  
  12649.      4.Choose the letter you want to modify from the list.
  12650.  
  12651.      5.Accept the column width of 70 characters, or enter a new
  12652.        width up to 120 characters.
  12653.  
  12654.      6.Make your changes to the letter.
  12655.  
  12656.      7.Choose OK when you finish.
  12657.  
  12658.      8.Choose Yes to save the letter.
  12659.  
  12660.      9.Accept the current description or enter a new one. The
  12661.        modified letter is saved.
  12662.  
  12663.  
  12664.  
  12665.  
  12666.      PC-File Version 7 Users Guide                            213
  12667.  
  12668.  
  12669.  
  12670.  
  12671.      CHAPTER 11 PRINTING REPORTS AND LETTERS
  12672.  
  12673.      Reports and letters follow similar printing procedures and use
  12674.      the same dialog box for setting printing parameters. This
  12675.      chapter explains those procedures and parameters. In addition,
  12676.      this chapter covers Printer setup, an option on the Print
  12677.      menu.
  12678.  
  12679.  
  12680.  
  12681.      Printing Procedures
  12682.  
  12683.      PC-File simplifies the process of printing a report or letter.
  12684.      When you get ready to print, the program displays the Print
  12685.      options dialog box. Make all your necessary settings and
  12686.      adjustments there. When you finish, you are ready to begin
  12687.      printing.
  12688.  
  12689.      Before attempting to print a report or letter, be sure your
  12690.      computer is properly connected to the printer and that PC-File
  12691.      is configured for your printer. For information on configuring
  12692.      your printer, see Chapter 13, "Utilities," and the section on
  12693.      printer setup later in this chapter.
  12694.  
  12695.      NOTE: Printing graphs and multi-column labels follow separate
  12696.      procedures. See Chapter 12, "Creating Graphs," for information
  12697.      on printing graphs. See Chapter 14 for information on printing
  12698.      labels created with PC-Label. See Chapter 15, "Tools," for
  12699.      information on printing snapshot labels.
  12700.  
  12701.      To print a report or letter, you can either choose an existing
  12702.      report or letter or create a new one. In either case, PC-File
  12703.      displays the Print options dialog box that allows you to set
  12704.      the parameters for printing.
  12705.  
  12706.      To print a report or letter:
  12707.  
  12708.      1.Choose Print from the menu bar.
  12709.  
  12710.      2.Choose Report or Letter from the Print menu, depending on
  12711.        which one you want to print.
  12712.  
  12713.        PC-File displays a dialog box. The options are the same
  12714.        whether you choose reports or letters.
  12715.  
  12716.      3.Choose Run from the dialog box.
  12717.  
  12718.        If you are creating or modifying a report or letter before
  12719.        printing, choose the appropriate option. When you finish,
  12720.        the Print options dialog box displays.
  12721.  
  12722.      4.Choose the report or letter from the file selection dialog
  12723.        box.
  12724.  
  12725.  
  12726.  
  12727.  
  12728.      PC-File Version 7 Users Guide                            214
  12729.  
  12730.  
  12731.        The Print options dialog box displays.
  12732.  
  12733.      5.Set the options you want and choose OK.
  12734.  
  12735.        If you are printing a report, the settings are saved to a
  12736.        file, named reportname.ANS. The settings become the default
  12737.        the next time you print the report.
  12738.  
  12739.        If you are printing a letter, the settings only pertain to
  12740.        the current printing. The program default settings display
  12741.        the next time you print the letter.
  12742.  
  12743.      6.What happens next depends upon your settings in the Print
  12744.        Options box.
  12745.  
  12746.        If you chose to print Some records, PC-File prompts you to
  12747.        conduct a search for the records you want to print.
  12748.  
  12749.        If you chose to print to disk, PC-File prompts you to enter
  12750.        a path and file name.
  12751.  
  12752.        If you checked the Do Subtotals box, PC-File prompts you to
  12753.        enter the field or calculation that triggers the subtotal.
  12754.  
  12755.      7.If you are printing to a printer or to a file, PC-File
  12756.        displays the first record on the screen and prompts you to
  12757.        choose Yes, No, All, or Quit.
  12758.  
  12759.      This prompt displays for two reasons. First, it allows you to
  12760.      choose a selected group of records for which there is no
  12761.      precise selection criteria. In other words, you can print a
  12762.      random group of records. Secondly, if you have defined a
  12763.      selection criteria, it lets you assure yourself your criteria
  12764.      is correct by viewing your records. Once you feel certain you
  12765.      have chosen the right records, you don't have to look at the
  12766.      rest.
  12767.  
  12768.      8.Choose Yes to print the record and display the next.
  12769.  
  12770.      9.Choose No to skip the current record and display the next.
  12771.  
  12772.      10.  Choose All to print the current record and all the
  12773.        remaining records that meet the selection criteria without
  12774.        any further prompting.
  12775.  
  12776.      11.  Choose Quit to stop printing the report or letter.
  12777.  
  12778.      If you are printing to the screen, PC-File displays the report
  12779.      or letter without prompting you.
  12780.  
  12781.  
  12782.  
  12783.  
  12784.      PC-File Version 7 Users Guide                            215
  12785.  
  12786.  
  12787.  
  12788.      The Print Options
  12789.  
  12790.      PC-File displays the Print options dialog box when you are
  12791.      ready to print a report or letter. Set your printing
  12792.      parameters there.
  12793.  
  12794.      The setting options are the same for both letters and reports,
  12795.      but PC- File handles the two features differently. This is
  12796.      because reports are often run repeatedly, while letters are
  12797.      more likely to be used only once.
  12798.  
  12799.      When you print a report, PC-File remembers the settings from
  12800.      the Print options window and places them in a file. The file
  12801.      is named reportname.ANS. The settings are then used as the
  12802.      default anytime you print that particular report. Presumably,
  12803.      you would not have to reset any of the parameters. If you do
  12804.      make a change, that becomes the new default.
  12805.  
  12806.      For letters, PC-File doesn't retain the settings and doesn't
  12807.      create a file for them. After you print a letter, PC-File
  12808.      replaces your settings with the program default. Thus, if you
  12809.      want to double-space a letter, you have to set the line
  12810.      spacing parameter to 2 each time you print the letter.
  12811.  
  12812.      Each parameter in the Print options dialog box is explained
  12813.      below.
  12814.  
  12815.      Print
  12816.  
  12817.      You can choose which records in your database you want to
  12818.      print. Choose All records to print all the records in your
  12819.      database; choose Some records to select certain records. If
  12820.      you choose to print Some records, PC-File prompts you to
  12821.      select the records by conducting a search. See Chapter 7,
  12822.      "Finding and Modifying Data," for information on conducting a
  12823.      search.
  12824.  
  12825.      You can also print selected records for which there is no
  12826.      specific criteria. For example, you may want to print letters
  12827.      to send to a few members chosen at random from the database.
  12828.      To do this, choose All records. When you get ready to print,
  12829.      the records display one by one on the screen for you to
  12830.      select. Choose the records you want to print. You can follow
  12831.      the same procedure after choosing Some records if you want to
  12832.      pick out selected records from within a specific subgroup of
  12833.      your database.
  12834.  
  12835.      The program default is All records.
  12836.  
  12837.      Output
  12838.  
  12839.      PC-File can print a report or letter to the printer, screen,
  12840.      or to a file on the disk. To select the output device, choose
  12841.      the appropriate option. Only one option can be selected at a
  12842.      time. The program default is Printer.
  12843.  
  12844.  
  12845.  
  12846.  
  12847.      PC-File Version 7 Users Guide                            216
  12848.  
  12849.  
  12850.  
  12851.      If you select Printer as the output device, PC-File prints to
  12852.      the printer port selected in the configuration profile or in
  12853.      Printer setup.
  12854.  
  12855.      If you print to a file on the disk, PC-File prompts you for
  12856.      the drive, path, and file name. Enter the output file
  12857.      specifications in the dialog box. For example, you might type:
  12858.      c:\pcfile\sample\temp.txt.
  12859.  
  12860.      The file printed to disk is an ASCII file.
  12861.  
  12862.      Subtotals
  12863.  
  12864.      Subtotal breaks allow you to separate groups of related
  12865.      records in a report. You can then print subtotal values for
  12866.      each group, or you can just separate the groupings by
  12867.      inserting blank lines or page breaks between them.
  12868.  
  12869.      Creating subtotal breaks is a two-part process. The first part
  12870.      involves creating a Subtotal section within the report and
  12871.      defining the action that will occur. See Chapter 9, "Creating
  12872.      Reports," for details. For the second part, select the
  12873.      Subtotals option button in the Print options dialog box,
  12874.      choose OK, then name the break. A subtotal break can be a
  12875.      field, a portion of a field, or a calculation.
  12876.  
  12877.      Normally, a break is a field or partial field. Whenever the
  12878.      data in the break field changes, a new subtotal grouping is
  12879.      triggered. The following example shows a subtotal break on the
  12880.      first letter of the last name. When the first letter changes,
  12881.      a blank line is inserted to break up the names.
  12882.  
  12883.      A subtotal break can produce a simple break or a break with
  12884.      subtotals.
  12885.  
  12886.      Subtotal breaks can also be based on calculations. You can use
  12887.      the same information in the above example, but break it on a
  12888.      calculation based on the amount of the donation. The subtotal
  12889.      break calculation is (Amount >150). The result is illustrated
  12890.      below.
  12891.  
  12892.      PC-File allows up to nine levels of subtotal breaks. For
  12893.      example, you could subtotal by product within salesperson
  12894.      within department within division. In general, the primary
  12895.      subtotal level should be the current index field.
  12896.  
  12897.      After you choose how to perform subtotals, PC-File lets you
  12898.      choose whether you want to print the data from the break only
  12899.      once when it changes or every time it appears. This is called
  12900.      group highlighting. Turning group highlighting ON prevents the
  12901.      data from being repeated over and over. Group highlighting
  12902.      works on every subtotal level. In the previous two examples,
  12903.      group highlighting is turned off. The following example shows
  12904.      the Donation report subtotaled on Member_no with group
  12905.      highlighting
  12906.  
  12907.  
  12908.  
  12909.  
  12910.      PC-File Version 7 Users Guide                            217
  12911.  
  12912.  
  12913.      turned on.
  12914.  
  12915.      In addition to group highlighting, PC-File provides the
  12916.      option, "New Page After Subtotals." Choosing this option
  12917.      causes your report to feed to a new page at the end of each
  12918.      level 1 subtotal break. You must use the Language format to
  12919.      set up more sophisicated paging when performing multiple level
  12920.      subtotal breaks. See the section, "Subtotal Report Commands"
  12921.      in Chapter 9, for details.
  12922.  
  12923.      The default is for subtotals to be turned off. When the
  12924.      setting is turned off, the Subtotal section of the report is
  12925.      ignored. The subtotal setting is always ignored when you print
  12926.      a letter.
  12927.  
  12928.      To set subtotal breaks:
  12929.  
  12930.      1.Select the Subtotals option button.
  12931.  
  12932.      2.Choose OK when you finish with the dialog box.
  12933.  
  12934.      3.Enter the primary subtotal break. You can choose a field
  12935.        name or enter a calculation into the text box and press
  12936.        ENTER.
  12937.  
  12938.      4.Repeat step 3 for any additional subtotal break levels. You
  12939.        can enter up to nine levels of subtotal breaks.
  12940.  
  12941.      5.Choose Cancel when you finish entering breaks.
  12942.  
  12943.      6.Choose Group Highlighting or New Page After Subtotals, if
  12944.        desired.
  12945.  
  12946.      7.Choose OK.
  12947.  
  12948.      PC-File prints the report to your specifications.
  12949.  
  12950.      Pause Between Pages
  12951.  
  12952.      If you feed paper into your printer manually, select the Pause
  12953.      Between Pages option button on the Print Options dialog box.
  12954.      The program will pause after each page, allowing you to insert
  12955.      a new sheet of paper. Press any key to start printing again.
  12956.  
  12957.      The program default is No Page Pause.
  12958.  
  12959.      Flip Data
  12960.  
  12961.      PC-File normally flips the data in a field containing the flip
  12962.      character, a tilde (~). This is indicated by the Flip Data
  12963.      option button on the Print Options dialog box. You can
  12964.      suppress the flip action by selecting the Don't Flip Data
  12965.      option button instead.
  12966.  
  12967.  
  12968.  
  12969.  
  12970.      PC-File Version 7 Users Guide                            218
  12971.  
  12972.  
  12973.      For example, if a name field contains data entered in the
  12974.      format LASTNAME ~FIRSTNAME, and you leave Flip Data on, PC-
  12975.      File prints data in the order FIRSTNAME LASTNAME. If you
  12976.      select Don't Flip Data, the data in the field remains in the
  12977.      LASTNAME ~FIRSTNAME format. The tilde prints as part of the
  12978.      data.
  12979.  
  12980.      The program default is Flip Data. If you have no fields
  12981.      containing tildes, this setting is ignored.
  12982.  
  12983.      Normal Type/Condensed Type
  12984.  
  12985.      PC-File can print a report using one of two pre-defined print
  12986.      sizes. These sizes are determined in your configuration
  12987.      profile, based on the printer you choose or the user codes you
  12988.      set.
  12989.  
  12990.      Condensed type is most useful for reports that are wider than
  12991.      the normal carriage width. Normally, you should use condensed
  12992.      type if your report exceeds 80 characters in width. Otherwise,
  12993.      the printer will either wrap each line of the report to the
  12994.      next line or it will print off the edge of the paper.
  12995.  
  12996.      Most printers other than daisy-wheel printers are set up to
  12997.      handle normal and condensed type. However, you can enter new
  12998.      printer codes in your configuration profile so that the normal
  12999.      and condensed options actually produce some other type style.
  13000.      For example, you can enter printer codes for condensed type
  13001.      that will print a larger type size or a landscape format.
  13002.  
  13003.      The program default is Normal Type, in which case your report
  13004.      or letter prints in normal type. Select the Condensed Type
  13005.      option button to print in condensed type.
  13006.  
  13007.      Number of Copies
  13008.  
  13009.      You can print up to 99 copies of your report or letter in one
  13010.      printing. If you have a multi-page report or letter, PC-File
  13011.      normally prints the entire document before it begins the next
  13012.      copy.
  13013.  
  13014.      Enter the number of copies you want to print. The default is
  13015.      1.
  13016.  
  13017.      Line Spacing
  13018.  
  13019.      You can set the line spacing in a report or letter. For
  13020.      reports, the spacing only affects the Detail section. For
  13021.      letters, the entire letter is affected, including the name and
  13022.      address.
  13023.  
  13024.      Enter 1 to single-space the report or letter. Enter 2 to
  13025.      double-space it. The default is 1.
  13026.  
  13027.  
  13028.  
  13029.  
  13030.      PC-File Version 7 Users Guide                            219
  13031.  
  13032.  
  13033.      For reports, enter 0 to prevent the Detail section from
  13034.      printing. This is useful when only the subtotal or total
  13035.      information is required.
  13036.  
  13037.      NOTE: If you want to double space the body of a letter, but
  13038.      not the name and address, you must enter the extra line
  13039.      spacing directly into the letter itself.
  13040.  
  13041.      Left Margin
  13042.  
  13043.      The Left margin parameter lets you add extra spaces to the
  13044.      left side of your report or letter, beyond the normal left
  13045.      margin. This is especially useful if you have a narrow report
  13046.      that you want to center. For example, if you print a phone
  13047.      listing that includes just names and phone numbers, you could
  13048.      increase the left margin to center the two columns of data.
  13049.  
  13050.      The program default is 0.
  13051.  
  13052.      Page Length
  13053.  
  13054.      The page length setting makes it easy to adjust the length of
  13055.      your report or letter for different size paper and different
  13056.      types of printers without changing the configuration profile.
  13057.      To change the number of lines per page, enter the new page
  13058.      length. The default is 66 lines per page.
  13059.  
  13060.      For reports, PC-File calculates the number of lines of Detail
  13061.      per page by subtracting the number of lines in the Heading and
  13062.      Footing sections from the page length. To adjust your top and
  13063.      bottom margins, edit the report format and change the size of
  13064.      the Heading and Footing sections.
  13065.  
  13066.      Laser printers usually require a page length of 60 lines when
  13067.      printing in portrait mode and 45 lines in landscape mode. Dot
  13068.      matrix and daisy wheel printers normally use 66 lines. For
  13069.      legal size paper, the page length is 78 for laser printers and
  13070.      84 for other printers. You can determine the number of lines
  13071.      per page by multiplying the page length in inches times the
  13072.      number of lines per inch.
  13073.  
  13074.      The program default is 66.
  13075.  
  13076.      NOTE: If each page of your report or letter prints higher on
  13077.      the page than the previous one, increase the page length; if
  13078.      it prints lower, decrease it.
  13079.  
  13080.      Start at Page #
  13081.  
  13082.      Normally, printing starts on the first page of a report. This
  13083.      setting lets you start printing on a later page.
  13084.  
  13085.      For example, if you have already printed part of the report
  13086.      and need to restart printing (after a paper jam, for example),
  13087.      this permits you to skip over what has already been printed.
  13088.  
  13089.  
  13090.  
  13091.  
  13092.      PC-File Version 7 Users Guide                            220
  13093.  
  13094.  
  13095.      NOTE: Don't change your selection criteria midway through
  13096.      printing a report or set of letters. PC-File uses the original
  13097.      selection criteria for printing.
  13098.  
  13099.      The program default is 1.
  13100.  
  13101.      Printer Setup
  13102.  
  13103.      Use the Printer setup option on the Print menu to override the
  13104.      printer defaults in the current configuration profile. These
  13105.      default settings include page length, printer, and printer
  13106.      port. This option is most useful if you only need to change
  13107.      printers or page lengths on rare occasions. If you need to
  13108.      change settings on a regular basis, it is recommended that you
  13109.      define an auxiliary configuration profile. You can then load
  13110.      that profile when you want to change your settings. Refer to
  13111.      Chapter 13,
  13112.      "Utilities," for information on auxiliary profiles.
  13113.  
  13114.      Changes made using the Printer setup option remain in effect
  13115.      only during the current session in PC-File. The settings are
  13116.      overriden if you load another configuration profile.
  13117.  
  13118.      To change your printer defaults temporarily:
  13119.  
  13120.      1.Choose Print from the menu bar.
  13121.  
  13122.      2.Choose Printer setup from the Print menu.
  13123.  
  13124.        The printer setup dialog box displays.
  13125.  
  13126.      3.Set the options you want.
  13127.  
  13128.      4.Choose OK.
  13129.  
  13130.      Your printer options are adjusted for the current session
  13131.      based on your settings.
  13132.  
  13133.      NOTE: The Page length setting in the Print options dialog box
  13134.      overrides the setting defined with the Printer setup option.
  13135.      Be sure to check that the settings match when you print your
  13136.      report or letter.
  13137.  
  13138.      Common Printing Problems
  13139.  
  13140.      This section lists some of the common problems that occur with
  13141.      printing reports and letters, and offers suggestions on how to
  13142.      correct them. Most of the problems relate to reports only,
  13143.      though some refer to both reports and letters.
  13144.  
  13145.      Bad Report Format Message
  13146.  
  13147.      If PC-File does not recognize a field name or names in a
  13148.      report or letter when asking to print them, a message displays
  13149.      in this format:
  13150.  
  13151.  
  13152.  
  13153.  
  13154.      PC-File Version 7 Users Guide                            221
  13155.  
  13156.  
  13157.      Bad Report Format Field: fieldname
  13158.  
  13159.      where "fieldname" is a field in your report or letter.
  13160.  
  13161.      This occurs when:
  13162.  
  13163.      A field name is spelled incorrectly in the report or letter
  13164.      The report or letter was defined for a different database
  13165.      (with different field names)
  13166.  
  13167.      The name of the field has changed since the report or letter
  13168.      was defined
  13169.  
  13170.      To correct the problem, first check to make sure the report or
  13171.      letter was defined to go with the current database. Then check
  13172.      the field name in the document with the field name in the
  13173.      database. You can run a database description (from the
  13174.      Utilities menu) to get a complete list of the database fields
  13175.      if necessary.
  13176.  
  13177.      If the Bad Report Format message displays when trying to print
  13178.      a system field, check to make sure that the system field name
  13179.      is followed by an asterisk and that the system field name is
  13180.      entered entirely in uppercase letters.
  13181.  
  13182.      The Document Creeps Up or Down the Page
  13183.  
  13184.      There are several reasons why a report or letter might creep
  13185.      up or down the page.
  13186.  
  13187.      Incorrect page length
  13188.  
  13189.      Check the Page length setting in the Print options dialog box
  13190.      to see that it is correct. Generally, if the report is
  13191.      creeping up the page, you should increase the page length. If
  13192.      the report is creeping down the page, you should decrease it.
  13193.  
  13194.      Report too wide
  13195.  
  13196.      The printer may be wrapping information from one line to the
  13197.      next. This happens when the report is too wide for your
  13198.      printer to print. (This is seldom a problem with letters.) To
  13199.      correct this problem, edit the report using the Language
  13200.      format option. Insert a new line with the /1 command after the
  13201.      command to print the last field that fits on one line.
  13202.      Alternatively, you may be able to print the report in
  13203.      condensed print so that all columns fit on one line.
  13204.  
  13205.      Missing line feeds
  13206.  
  13207.      The report may not have a /1 command at the end of each
  13208.      section. Generally, every section should end with at least one
  13209.      /1 command. The only exception to this rule is if the section
  13210.      ends with a .FF. You can edit reports with the Language editor
  13211.      to make sure the line feeds are in place.
  13212.  
  13213.  
  13214.  
  13215.  
  13216.      PC-File Version 7 Users Guide                            222
  13217.  
  13218.  
  13219.      Missing Footing section
  13220.  
  13221.      Generally, every report should include a Footing section with
  13222.      at least one line feed command (/1) at the end. The only
  13223.      exception is when the report contains only a Detail section
  13224.      and is designed to print on continuous form labels or cards.
  13225.  
  13226.      The Report Prints on the Perforation
  13227.  
  13228.      There are three reasons why PC-File might print on the bottom
  13229.      perforation.
  13230.  
  13231.      Missing or incorrect Footing section
  13232.  
  13233.      The report does not have a Footing section, or the Footing
  13234.      section is not defined to print a bottom margin (blank lines).
  13235.      The number of blank lines at the end of the Footing section
  13236.      determine the bottom margin of each page. Edit the report and
  13237.      add the following line in the Footing section:
  13238.  
  13239.      /6
  13240.  
  13241.      If the report already has a Footing section, add six line
  13242.      feeds (/6) at the end of the section. This gives you a one-
  13243.      inch bottom margin. You can increase the number of line feeds
  13244.      to lengthen the bottom margin, or decrease it to shorten the
  13245.      bottom margin.
  13246.  
  13247.      PC-File determines how many lines of data to print per page by
  13248.      subtracting the number of lines in the Heading and Footing
  13249.      section from the page length. For example, if the page length
  13250.      is 66 and there are 4 lines in the Heading section and 5 lines
  13251.      in the Footing section, PC-File prints 57 lines of data per
  13252.      page.
  13253.  
  13254.      Do not use the .CP command in the Detail section to determine
  13255.      the bottom margin. The .CP command is used only to prevent
  13256.      data from being split between two pages.
  13257.  
  13258.      Incorrect page length
  13259.  
  13260.      Check to see that the page length is correct. Refer to the
  13261.      section "The Report Creeps Up or Down the Page" above for more
  13262.      information.
  13263.  
  13264.      Incorrect page alignment
  13265.  
  13266.      The initial page alignment may be incorrect. To ensure the
  13267.      initial page alignment is correct, the printer should be
  13268.      aligned to the top of the page before printing begins. Do not
  13269.      manually move the paper in the printer. Use the buttons on the
  13270.      printer to move the paper. You can also align the paper in the
  13271.      printer, turn the printer off, then turn the printer on to
  13272.      reset the printer to the top of the page.
  13273.  
  13274.  
  13275.  
  13276.  
  13277.      PC-File Version 7 Users Guide                            223
  13278.  
  13279.  
  13280.      On laser printers, make sure the Form feed light is not on
  13281.      before you start printing.
  13282.  
  13283.      Nothing Prints on the Report or Only Headings Print
  13284.  
  13285.      There are four possible reasons why no data prints on the
  13286.      report.
  13287.  
  13288.      Incorrect line spacing setting
  13289.  
  13290.      Check the Line spacing setting in the Print options dialog
  13291.      box. To print the data from individual records, line spacing
  13292.      must be set at 1 or higher. If you set the line spacing at 0,
  13293.      data from individual records is not printed; only the Cover,
  13294.      Heading, Subtotal, Total, and Footing sections are printed.
  13295.  
  13296.      Report incorrectly defined
  13297.  
  13298.      Make sure the report is defined correctly. The commands to
  13299.      print data from individual records must be in the Detail
  13300.      section. Refer to Chapter 9, "Creating Reports," to make sure
  13301.      you have defined the rest of your report correctly.
  13302.  
  13303.      No records meet selection criteria
  13304.  
  13305.      If you are printing some records rather than all of them,
  13306.      check to see that you haven't narrowed the range so much that
  13307.      no records meet your selection criteria. Try printing the
  13308.      report selecting all records. If nothing prints, investigate
  13309.      the other possible reasons.
  13310.  
  13311.      Damaged file or index
  13312.  
  13313.      The index or data file may be damaged. Rebuild the indexes or
  13314.      run the Repair option from the Utilities menu. However, if you
  13315.      can view your records while browsing, this is not the reason.
  13316.  
  13317.      The Heading Only Prints on the First Page
  13318.  
  13319.      There are two possible reasons why the heading information
  13320.      only prints on the first page.
  13321.  
  13322.      1.Heading incorrectly defined
  13323.  
  13324.        The heading information is defined in the Cover section
  13325.        instead of the Heading section. The Cover section is only
  13326.        printed once at the beginning of the report.
  13327.  
  13328.      2.Footing incorrectly defined
  13329.  
  13330.        If you have a Heading section, you must have a Footing
  13331.        section. If nothing else, at least enter a line feed (/1) in
  13332.        the footing section.
  13333.  
  13334.  
  13335.  
  13336.  
  13337.      PC-File Version 7 Users Guide                            224
  13338.  
  13339.  
  13340.  
  13341.  
  13342.      CHAPTER 12 CREATING GRAPHS
  13343.  
  13344.      You can create visual representations of your data with PC-
  13345.      File's graphing option. PC-File walks you through the process
  13346.      step by step. Once you have created a basic graph, you can
  13347.      switch between several different types, including line graphs,
  13348.      bar graphs, and pie charts.
  13349.  
  13350.  
  13351.      Graphing Your Database
  13352.  
  13353.      PC-File can give you a graphic view of your data. Graphing can
  13354.      be an especially powerful way to present data because it
  13355.      allows you to summarize large volumes of data in an easily
  13356.      understood picture.
  13357.  
  13358.      You can create several types of graphs-line graphs, horizontal
  13359.      and vertical bar charts, pie charts, scatter charts,
  13360.      overlapped bar charts, and cumulative bar and line graphs. And
  13361.      once you create a graph, you can switch back and forth between
  13362.      the different types to find the one that best displays your
  13363.      data.
  13364.  
  13365.      You can also add a grid, calculate and display an average, and
  13366.      determine and show smoothed averages.
  13367.  
  13368.      Graphing data can seem a bit intimidating to an inexperienced
  13369.      user, but, in fact, it can be a lot of fun. So don't be afraid
  13370.      to give it a try. PC-File walks you through the process of
  13371.      creating a graph step by step. It usually only takes a minute
  13372.      or two to create a graph, so if you make a mistake, you can
  13373.      try it again.
  13374.  
  13375.      System Requirements
  13376.  
  13377.      The PC-File graphing utility will display a graph on most
  13378.      monitors and print a graph on most printers in use today.
  13379.      However, check the following requirements to see that your
  13380.      equipment meets the minimum needs of the program.
  13381.  
  13382.      Monitors
  13383.  
  13384.      The following monitors support the PC-File graphing utility:
  13385.  
  13386.           Hercules or Hercules-compatible monochrome
  13387.  
  13388.           CGA
  13389.  
  13390.           EGA
  13391.  
  13392.           VGA
  13393.  
  13394.  
  13395.  
  13396.  
  13397.      PC-File Version 7 Users Guide                            225
  13398.  
  13399.  
  13400.      The graphing utility runs "as is" on a color monitor. However,
  13401.      if you have a Hercules or Hercules-compatible graphics card
  13402.      and a monochrome monitor, you must run a special program
  13403.      before you can produce graphs. The program is called
  13404.      MSHERC.COM. It is included with PC-File and is automatically
  13405.      loaded onto your hard disk when you install PC-File.
  13406.  
  13407.      If you intend to work with the graphing utility and have a
  13408.      monochrome monitor, you need to run MSHERC.COM before you
  13409.      start PC-File. To run the program, type msherc at the DOS
  13410.      prompt and press ENTER. The program runs through quickly and
  13411.      returns you to the DOS prompt.
  13412.  
  13413.      If you use the graphing option regularly, enter the command
  13414.      MSHERC in your AUTOEXEC.BAT file. The program will run
  13415.      automatically each time you boot up. Refer to your DOS manual
  13416.      for more information on the AUTOEXEC.BAT file.
  13417.  
  13418.      Printers
  13419.  
  13420.      Graphs created with PC-File can be printed on the following
  13421.      printers:
  13422.  
  13423.           Epson (FX) dot matrix
  13424.  
  13425.           Epson (MX) / IBM dot matrix
  13426.  
  13427.           Okidata dot matrix
  13428.  
  13429.           HP Laserjet
  13430.  
  13431.           PostScript printers
  13432.  
  13433.      For other printers, you may be able to use the DOS GRAPHICS
  13434.      command to print graphs as they appear on the screen. See your
  13435.      DOS manual for information on using this command.
  13436.  
  13437.      Graphing Concepts
  13438.  
  13439.      During the process of defining a graph, PC-File introduces a
  13440.      number of concepts that may not be completely clear to the
  13441.      user at first glance. These concepts are explained in detail
  13442.      below.
  13443.  
  13444.      Subtotals and Totals
  13445.  
  13446.      You must choose between graphing subtotals and totals during
  13447.      the process of defining a graph. The difference is fairly
  13448.      straightforward. Choose Subtotals if you want to graph the
  13449.      data within a field or within several fields. Choose Totals if
  13450.      you want to compare the totals of two or more fields. In other
  13451.      words, if you want to graph records within a field or fields,
  13452.      choose subtotals; if you want to graph a summation of all the
  13453.      records from several fields, choose totals.
  13454.  
  13455.      Values and Counts
  13456.  
  13457.  
  13458.  
  13459.  
  13460.      PC-File Version 7 Users Guide                            226
  13461.  
  13462.  
  13463.  
  13464.      During graph definition, PC-File asks you to choose between
  13465.      accumulating Values or Counts. Values refers to the actual
  13466.      data in the database that you are graphing. Counts refers to
  13467.      the number of records being graphed.
  13468.  
  13469.      In most cases, you want to choose values. If you are graphing
  13470.      sales by each employee, zoo attendance by year, or increases
  13471.      in the captive snow leopard population, you are graphing data
  13472.      from a database and should select Values. Values should always
  13473.      be numeric.
  13474.  
  13475.      It is much less likely that you would choose counts. If you
  13476.      wanted to count the number of sales made by each employee,
  13477.      rather than total the sales themselves, you would choose
  13478.      counts. In that case you would graph the number of records,
  13479.      with each record representing a sale, rather than the sales
  13480.      data itself.
  13481.  
  13482.      Counts are also useful when the data is not numeric. For
  13483.      example, if you want to graph the number of members that lived
  13484.      in each state, you could just count the records by state.
  13485.  
  13486.      Graph Titles
  13487.  
  13488.      PC-File prompts you to enter four titles for the graph. These
  13489.      titles include the main graph title, a subtitle, a category
  13490.      heading and a variable heading. The placement of these titles
  13491.      is illustrated below.
  13492.  
  13493.      The title and subtitle always appear above the graph. They are
  13494.      synonymous with a report title and subtitle.
  13495.  
  13496.      The variable heading normally appears on the vertical axis of
  13497.      the graph. It describes the data of the fields you are
  13498.      graphing. For example, if you are graphing sales by month,
  13499.      sales would be your variable heading.
  13500.  
  13501.      The category heading normally appears along the horizontal
  13502.      axis of a graph. It often describes the contents of the field
  13503.      that you choose for the subtotal break (which is described
  13504.      below). For example, if you are graphing sales by month, month
  13505.      is the field on which you categorize the data, and is your
  13506.      likely category heading.
  13507.  
  13508.      Exceptions to the rules are horizontal bar graphs and pie
  13509.      charts. In horizontal bar graphs, the headings are reversed.
  13510.      In pie charts, the variable heading normally displays as a
  13511.      description beneath the chart and the category heading is used
  13512.      with a legend on the side. The legend provides a description
  13513.      for the wedges of the pie.
  13514.  
  13515.      The titles are case sensitive, and thus appear just as you
  13516.      enter them.
  13517.  
  13518.      All titles are optional. Press ENTER to skip a title.
  13519.  
  13520.  
  13521.  
  13522.  
  13523.      PC-File Version 7 Users Guide                            227
  13524.  
  13525.  
  13526.  
  13527.      Subtotal Breaks
  13528.  
  13529.      If you graph subtotals, PC-File prompts you to choose a
  13530.      subtotal break. The subtotal break is normally the field by
  13531.      which you are grouping your data (it can also be a
  13532.      calculation). In that way it is very similar to a subtotal
  13533.      break in a report.
  13534.  
  13535.      Normally, the subtotal break is the field plotted along the
  13536.      horizontal axis of the graph. This is the same field on which
  13537.      you based the category heading. The subtotal break is usually
  13538.      not a field that you are graphing.
  13539.  
  13540.      If you are graphing sales by month, the break field is month.
  13541.      If you are graphing sales by department, the break field is
  13542.      department.
  13543.  
  13544.      Types of Graphs
  13545.  
  13546.      There are four basic kinds of graphs that you can create in
  13547.      PC-File. Read the descriptions below to help you decide which
  13548.      kind you want to use for the data you are graphing. However,
  13549.      once you define a graph, you can switch back and forth between
  13550.      various graph types, using the same selected data. In that
  13551.      way, you can often tell which is the best representation of
  13552.      your data.
  13553.  
  13554.      Line Graphs
  13555.  
  13556.      In general, line graphs are useful for seeing trends-increases
  13557.      or decreases-over time.
  13558.  
  13559.      Line graphs can also be used to plot engineering or scientific
  13560.      data. How temperature readings in one city vary over several
  13561.      months, or how a car's gas mileage changes as the r.p.m.'s
  13562.      increase are two simple examples of possible uses for line
  13563.      graphs.
  13564.  
  13565.      Scatter Graphs
  13566.  
  13567.      Scatter graphs are very similar to line graphs. (Line graphs
  13568.      are actually scatter graphs with lines drawn between the
  13569.      points.) Scatter graphs are most useful when you have a lot of
  13570.      points to plot. As a general rule, if you will be plotting
  13571.      more than 20 points, a scatter graph or line graph will give
  13572.      you a clearer visual summary of your information than one of
  13573.      the other graph formats.
  13574.  
  13575.      Pie Charts
  13576.  
  13577.      Pie charts are the least flexible of all the graph choices.
  13578.      They are primarily used to compare or show percentages. If you
  13579.      want your graph to answer the question, "how much of the pie
  13580.      did this person/these people get?" you probably want a pie
  13581.      chart.
  13582.  
  13583.  
  13584.  
  13585.  
  13586.      PC-File Version 7 Users Guide                            228
  13587.  
  13588.  
  13589.  
  13590.      Pie charts are not good if you will be plotting many fields,
  13591.      or if you will have many subtotal breaks. A pie chart becomes
  13592.      cluttered and hard to interpret with more than 10 or 15
  13593.      wedges.
  13594.  
  13595.      Bar Graphs
  13596.  
  13597.      Bar graphs are one of the most versatile of all the graph
  13598.      formats. Like pie charts, they are useful for visual
  13599.      comparison, but instead of showing you a percentage, bar
  13600.      graphs show actual numeric amounts. Like line graphs, you can
  13601.      use bar graphs to show trends by plotting the values of one or
  13602.      several fields' data over time.
  13603.  
  13604.      The strong point of bar graphs is their ability to show
  13605.      numerical amounts, be it dollars, time, mileage, etc. The
  13606.      choice between horizontal or vertical bar graphs is strictly a
  13607.      matter of preference. You can easily switch between either
  13608.      style to decide which you prefer.
  13609.  
  13610.      Defining a Graph
  13611.  
  13612.      Before you begin to define a graph, you should know:
  13613.  
  13614.           Which fields you are graphing
  13615.  
  13616.           Whether you are graphing subtotals or totals
  13617.  
  13618.           If graphing subtotals, which field or fields will serve
  13619.           as the break
  13620.  
  13621.           Whether you are using values or counts
  13622.  
  13623.      You might find it handy to sketch your graph on paper first.
  13624.      Draw a basic graph, indicating which fields you want to use
  13625.      and how the data will appear when graphed. Decide on the
  13626.      titles and headings. With your sketch in front of you, the
  13627.      actual process of defining a graph on the screen will take
  13628.      only a few moments.
  13629.  
  13630.      To define a graph:
  13631.  
  13632.      1.Choose Print from the menu bar.
  13633.  
  13634.      2.Choose Graphs from the Print menu.
  13635.  
  13636.      3.Choose New from the dialog box listing the operations. A
  13637.        file selection dialog box displays.
  13638.  
  13639.      4.Enter a file name for your graph in the text box. Choose OK.
  13640.        PC-File prompts you to choose how the data should be
  13641.        summarized.
  13642.  
  13643.  
  13644.  
  13645.  
  13646.      PC-File Version 7 Users Guide                            229
  13647.  
  13648.  
  13649.      5.Choose one of the four options. For example, if you are
  13650.        graphing totals rather than subtotals and counts rather than
  13651.        values, choose the fourth option, Total Counts. PC-File
  13652.        displays a field selection dialog box.
  13653.  
  13654.      6.Choose the fields you want to graph, in the order you want
  13655.        them to appear on the graph from left to right. PC-File
  13656.        displays a dialog box asking you to enter the titles and
  13657.        headings for the graph.
  13658.  
  13659.      7.Enter the Title, subtitle, and headings in the appropriate
  13660.        text boxes. Press ENTER to skip any of the titles. Choose OK
  13661.        to continue.
  13662.  
  13663.      8.Choose a default graph type. You can switch types later if
  13664.        you want. PC-File prompts you to save the graph.
  13665.  
  13666.      9.Choose Yes to save the graph or No to run the graph only
  13667.        once.
  13668.      10.  PC-File displays another field selection dialog box.
  13669.  
  13670.      11.  Choose the subtotal break.
  13671.  
  13672.      12.  Choose to graph all or some records.
  13673.  
  13674.      13.  Perform a search if you chose some records. PC-File
  13675.        displays the first record and asks if you want to output
  13676.        this record.
  13677.  
  13678.      14.  Choose Yes to graph this record and display the next.
  13679.        Choose No to skip this record and display the next. Choose
  13680.        All to output this and all remaining selected records
  13681.        without further prompting. PC-File displays the graph on the
  13682.        screen. Instructions for using
  13683.      15.  the menu commands on the graphing screen are covered
  13684.        below.
  13685.  
  13686.      Viewing and Printing a Graph
  13687.  
  13688.      Once you have displayed a graph on the screen, you have
  13689.      several options:
  13690.  
  13691.      Switch to a different type of graph Add one or more of the
  13692.      optional features Print the graph
  13693.  
  13694.      To perform any of these actions, use the menu. Press the
  13695.      letter M to display the menu. There are two menu lines, as
  13696.      shown below.
  13697.  
  13698.      The General menu, on the top line, remains the same no matter
  13699.      which graph type is displayed. The Type menu, on the bottom
  13700.      line, varies, depending on the type of graph displayed. The
  13701.      name of the menu also varies, depending on the type of graph
  13702.      currently displayed. For example, in the above screen, the
  13703.      menu is called Bar because a bar graph is displayed.
  13704.  
  13705.  
  13706.  
  13707.  
  13708.      PC-File Version 7 Users Guide                            230
  13709.  
  13710.  
  13711.      To choose an option from either menu line, press the letter
  13712.      indicated. You can choose options in this manner whether or
  13713.      not the menu is displayed.
  13714.  
  13715.      NOTE: The mouse is inactive within the graphing utility, so
  13716.      you must use the keyboard to choose menu options.
  13717.  
  13718.      The General Menu Options
  13719.  
  13720.      Of the nine options on the General menu, use the last five -
  13721.      Pie, Line, H(orizontal) bar, V(ertical) bar, and Scatter - to
  13722.      switch between the different graph types.
  13723.  
  13724.      Choose Quit when you finish to leave the graphing utility and
  13725.      return to the PC-File menu bar.
  13726.  
  13727.      The first three options on the General menu, Output, Color,
  13728.      and Menu, are explained in detail below.
  13729.  
  13730.      Output
  13731.  
  13732.      Choose Output to print the graph. There are several steps
  13733.      involved in printing. During printing, the menu bar, if
  13734.      currently displayed, is removed from the screen and is not
  13735.      printed.
  13736.  
  13737.      To print a graph:
  13738.  
  13739.      1.Choose Output from the General menu.
  13740.  
  13741.      2.Choose Portrait, Landscape, or GIF from the dialog box that
  13742.        displays.
  13743.  
  13744.        Portrait prints the graph in the normal vertical manner.
  13745.  
  13746.        Landscape rotates the graph 90 degrees and prints a somewhat
  13747.        larger image of the graph. If you are making overhead
  13748.        projector view foils, you probably want to use landscape.
  13749.  
  13750.        The GIF format produces a graphics file that can be imported
  13751.        into documents in most word processing or desktop publishing
  13752.        programs. GIF files are in a standard graphics format that
  13753.        is compressed to minimize the amount of disk space used. PC-
  13754.        File defines GIF files with names like PCG2_nnn.GIF, where
  13755.        nnn is a number such as 001. GIF files are defined to the
  13756.        current directory.
  13757.  
  13758.      3.If you chose Portrait or Landscape, choose the output
  13759.        printer from the list that displays.
  13760.  
  13761.  
  13762.  
  13763.  
  13764.      PC-File Version 7 Users Guide                            231
  13765.  
  13766.  
  13767.        Choose Epson for Epson FX and LQ model printers only. Choose
  13768.        IBM for IBM printers, Epson MX model printers, and Okidata
  13769.        printers set to IBM mode. Choose Okidata if your Okidata
  13770.        printer isn't set to IBM mode. Choose Laserjet for all HP-
  13771.        compatible laser printers. Choose PostScript for all
  13772.        printers with a PostScript driver. We recommend that you use
  13773.        PostScript if you have it. It produces the best quality
  13774.        output of all the options available.
  13775.  
  13776.      4.For PostScript only, another menu displays.
  13777.  
  13778.        Choose an option from this menu.
  13779.  
  13780.        Decide whether you are printing to a file or to the printer,
  13781.        then choose between pattern fill or gray fill.
  13782.  
  13783.        Pattern fill produces various patterns in the rectangles of
  13784.        bar charts and the wedges of pie charts, while gray fill
  13785.        colors those same areas in shades of gray. Choosing gray
  13786.        fill results in a much faster printing operation.
  13787.  
  13788.      As the graph prints, the screen colors change to their
  13789.      "negative" colors to show the progress of the printing
  13790.      process. When creating Postscript output, the graph is redrawn
  13791.      on the screen twice.
  13792.  
  13793.      When printing is completed, the graph is redrawn on the screen
  13794.      and the menu redisplayed (depending upon the state of the M
  13795.      toggle.)
  13796.  
  13797.      NOTE: If you are printing a Pie chart, it is redrawn on the
  13798.      screen when you select the orientation of the output. The
  13799.      aspect ratio defined for the selected orientation is used.
  13800.  
  13801.      Color
  13802.  
  13803.      Some colors may not show up clearly on your screen. The Color
  13804.      option allows you to select those colors which show up best,
  13805.      and also permits you to select the foreground and background
  13806.      colors. Your selections are saved to a file, called PCG2.ASP,
  13807.      and used in future graphing operations.
  13808.  
  13809.      NOTE: The Color option has no effect if you are using a
  13810.      monochrome or CGA screen, both of which display in black and
  13811.      white. CGA monitors display in black and white because the
  13812.      resolution is at its maximum in that mode.
  13813.  
  13814.      To change colors:
  13815.  
  13816.  
  13817.  
  13818.  
  13819.      PC-File Version 7 Users Guide                            232
  13820.  
  13821.  
  13822.      Choose Color from the General menu. PC-File displays a dialog
  13823.      box. Adjust the background and foreground colors if you want.
  13824.      Press B repeatedly to run through the available background
  13825.      colors, and press F repeatedly to run through the foreground
  13826.      colors until you have the color combination that you prefer.
  13827.      Turn any of the detail colors off. To turn a detail color off,
  13828.      press the number that is displayed to the left of the
  13829.      respective color bar. An N is displayed to the right of the
  13830.      bar when the
  13831.      color is turned off. Press the number again to turn it back
  13832.      on. You can press Q at any time to go back to your graph and
  13833.      view the current colors. Press C to return to the color
  13834.      screen. Press Q to return to the graph when you finish.
  13835.  
  13836.      Menu
  13837.  
  13838.      The Menu option toggles the menu display on and off. When the
  13839.      menu lines are not displayed, the message (press M for menu)
  13840.      is shown at the lower-right of your screen. You can press
  13841.      SHIFT-F1 to remove this message.
  13842.  
  13843.      The menu lines do not need to be displayed for you to choose
  13844.      any of the menu options. (When you print the graph, the menu
  13845.      lines are removed for you automatically.)
  13846.  
  13847.      The Type Menu Options
  13848.  
  13849.      Use the options on the Type menu to enhance your graphs. You
  13850.      can add a grid, display a calculated average, display smoothed
  13851.      averages, or replot your graph on a logarithmic scale.
  13852.  
  13853.      There are 14 enhancement options. The options available on the
  13854.      Type menu vary, depending on the type of graph currently
  13855.      displayed. Only those options that appear on the menu for the
  13856.      current graph can be used.
  13857.  
  13858.      All of the options are explained below.
  13859.  
  13860.      Bound
  13861.  
  13862.      You can change the scale of a graph with the Bound option.
  13863.      This is done in three steps.
  13864.  
  13865.      First, edit the GRAPH.ME file, using any text editor or word
  13866.      processing program that saves standard ASCII (non-formatted)
  13867.      files. Insert a one-line BOUND command before the first TITLE
  13868.      line in the file. Use the format
  13869.  
  13870.      BOUND:Xh,X1,Yh,Y1,0,Ch
  13871.  
  13872.      where
  13873.  
  13874.      Xh is the maximum X axis value X1 is the minimum X axis value
  13875.      Yh is the maximum Y axis value Y1 is the minimum Y axis value
  13876.      0 (zero) is required Ch is the maximum cumulative value
  13877.  
  13878.  
  13879.  
  13880.  
  13881.      PC-File Version 7 Users Guide                            233
  13882.  
  13883.  
  13884.      For example, to set the scale of the Y axis so that the
  13885.      maximum value is 500 and the minimum value is 1, and the
  13886.      maximum cumulative value is 5000, use the command
  13887.  
  13888.      BOUND:0,0,500,1,0,5000
  13889.  
  13890.      Second, after saving the edited GRAPH.ME file, run the
  13891.      graphing utility in stand-alone mode, from the DOS prompt.
  13892.      Making sure you are in the directory that contains both the
  13893.      PCG2.EXE file and the GRAPH.ME file, type pcg2 at the DOS
  13894.      prompt and press ENTER. When the graph is displayed, the old
  13895.      scale is still in effect.
  13896.  
  13897.      For the third step, choose Bound from the menu. The graph
  13898.      displays with the new scale in effect. Use the Bound option as
  13899.      a toggle to switch between the normal scale and the scale
  13900.      specified in the GRAPH.ME file.
  13901.  
  13902.      The Bound option is available with line, scatter, and bar
  13903.      graphs.
  13904.  
  13905.      Log
  13906.  
  13907.      Choose the Log option (by pressing the letter T) to change the
  13908.      scale along the vertical axis to a logarithmic scale. Choose
  13909.      Log again to return to the normal scale.
  13910.  
  13911.      The Log option is available with line, scatter, and bar
  13912.      graphs.
  13913.  
  13914.      Grid
  13915.  
  13916.      Place grid lines on your graph by choosing the Grid option.
  13917.      Remove the grid lines by choosing Grid again.
  13918.  
  13919.      The Grid option is available with line, scatter, and bar
  13920.      graphs.
  13921.  
  13922.      Xchg
  13923.  
  13924.      If you are using multiple variables in your graph, you can
  13925.      switch the way the data elements are displayed with the Xchg
  13926.      option. Choose Xchg to swap the elements. Choose it again to
  13927.      return to the original graph.
  13928.  
  13929.      The Xchg option is available with all types of graphs.
  13930.  
  13931.      Cum
  13932.  
  13933.      Use the Cum option to produce cumulative line and bar graphs.
  13934.      This option is most useful when you have multiple variables.
  13935.      The Y value of the points for each group at a given position
  13936.      on the X axis are totaled to produce this graph.
  13937.  
  13938.  
  13939.  
  13940.  
  13941.      PC-File Version 7 Users Guide                            234
  13942.  
  13943.  
  13944.      The Cum option is a toggle. Choose the option once to produce
  13945.      the cumulative graph, choose it again to return to the normal
  13946.      graph.
  13947.  
  13948.      The Overlap and Log options become inactive when you display a
  13949.      cumulative graph. The Cum option is available with line and
  13950.      bar graphs.
  13951.  
  13952.      Avg
  13953.  
  13954.      Choose the Avg option to draw a line across the graph showing
  13955.      the average or mean of all the data. This lets you see which
  13956.      points are above the average and which are below.
  13957.  
  13958.      To remove the average line, refresh the current graph format.
  13959.      For example, if you are viewing a scatter graph, press S to
  13960.      display a new scatter graph without the line.
  13961.  
  13962.      The Avg option is available with line, scatter, and bar
  13963.      graphs.
  13964.  
  13965.      Overlap
  13966.  
  13967.      The Overlap option lets you produce a somewhat more
  13968.      aesthetically pleasing bar graph, in which the bars within a
  13969.      group overlap each other.
  13970.  
  13971.      Press E to overlap the bars; press E again to return to the
  13972.      non- overlapped graph.
  13973.  
  13974.      Overlap is inactive for cumulative bar graphs.
  13975.  
  13976.      Fit
  13977.  
  13978.      To display the trend of your data, choose Fit. This option
  13979.      uses the method of least squares to calculate the regression
  13980.      line.
  13981.  
  13982.      To remove the line, refresh the current graph format by
  13983.      choosing the format again.
  13984.  
  13985.      The Fit option is available with line and scatter graphs.
  13986.  
  13987.      (0-9)Smoothed Avg
  13988.  
  13989.      Smoothed averages are used to show trends when you have a lot
  13990.      of data which varies considerably.
  13991.  
  13992.      Unlike the average line, which shows a single average of all
  13993.      the data, a smoothed average is produced by calculating an
  13994.      average for each point on the graph based on the values a
  13995.      specified number of data points to the left and right of that
  13996.      point.
  13997.  
  13998.  
  13999.  
  14000.  
  14001.      PC-File Version 7 Users Guide                            235
  14002.  
  14003.  
  14004.      The number you select (from 0 to 9) controls the amount of
  14005.      smoothing used. The number chosen is the number of points to
  14006.      the left and to the right that are included in the smoothed
  14007.      average. For example, if you press 2, then 2 points to the
  14008.      left, the current point, and 2 points to the right are
  14009.      included in the average for each plotted point. The higher the
  14010.      number you choose, the greater the amount of smoothing.
  14011.  
  14012.      Choosing 0 means that no points to the right or left are
  14013.      included in the average and you essentially duplicate a line
  14014.      graph. Choosing 9 on a graph with just 9 data points is the
  14015.      same as choosing the Avg option.
  14016.  
  14017.      You can display as many smoothed averages on your line or
  14018.      scatter graph as you want. To remove the lines, refresh the
  14019.      current graph format by choosing the format again.
  14020.  
  14021.      Aspect
  14022.  
  14023.      The Aspect option is used to make your pie charts round, both
  14024.      on- screen and printed. This option works by letting you
  14025.      adjust the aspect ratio of the circle. Aspect ratio is the
  14026.      ratio of height to width. If your pie charts appear elliptical
  14027.      rather than round, adjust the height and width with this
  14028.      option.
  14029.  
  14030.      When you choose Aspect, PC-File displays a screen with a
  14031.      circle enclosed in a box. Use this screen to adjust the
  14032.      roundness of the pie chart on your monitor only. To adjust the
  14033.      roundness of a printed pie chart, press P for Portrait or L
  14034.      for Landscape, depending on which format you plan to use. In
  14035.      either case, a similar screen displays. However, all three
  14036.      screens are separate and adjust the aspect of the pie for
  14037.      their respective uses only: the monitor, portrait print, or
  14038.      landscape print.
  14039.  
  14040.      In all three cases, use the arrow keys to adjust the
  14041.      horizontal and vertical dimensions until the circle appears
  14042.      round and the box appears square. The box makes it easier to
  14043.      tell if the dimensions of the circle are correct.
  14044.  
  14045.           The right arrow increases the width
  14046.  
  14047.           The left arrow decreases the width
  14048.  
  14049.           The down arrow increases the height
  14050.  
  14051.           The up arrow decreases the height
  14052.  
  14053.      Whichever arrow key you depress, hold it down for a few
  14054.      seconds. The degree of change with each keystroke is very
  14055.      slight, so you have to give it time to change. This allows you
  14056.      to really fine-tune the circle.
  14057.  
  14058.  
  14059.  
  14060.  
  14061.      PC-File Version 7 Users Guide                            236
  14062.  
  14063.  
  14064.      If you correct the aspect ratio for either portrait or
  14065.      landscape printing, you can print out a test circle to check
  14066.      it. With the respective screen in view, press P to print.
  14067.      Choose your printer from the menu that displays. The line
  14068.      inside the circle helps you differentiate between vertical and
  14069.      horizontal on your screen versus your printed output.
  14070.  
  14071.      Press Q to exit from the screens and return to the pie chart
  14072.      itself. Use the Output option to print the chart with the
  14073.      corrected aspect ratio.
  14074.  
  14075.      The aspect ratios are saved to the file PCG2.ASP and used in
  14076.      future graphs.
  14077.  
  14078.      Wedge
  14079.  
  14080.      You can emphasize specific slices of a pie chart by pulling
  14081.      wedges of the pie away from the center. If you are displaying
  14082.      multiple pies, the wedge(s) you pull out apply to all the
  14083.      pies.
  14084.  
  14085.      A new menu displays when you choose Wedge, and one section of
  14086.      the pie changes to a solid color. The solid-colored wedge is
  14087.      the active wedge.
  14088.  
  14089.      Use the menu options as follows:
  14090.  
  14091.           Detach the solid slice
  14092.  
  14093.           Attach the solid slice
  14094.  
  14095.           Skip to the next slice
  14096.  
  14097.           Return all detached sections to the center and exit the
  14098.           Wedge option screen
  14099.  
  14100.           Quit the Wedge option screen, saving your modifications
  14101.  
  14102.      Moving around the entire pie also causes you to exit the Wedge
  14103.      option screen.
  14104.  
  14105.      Disp
  14106.  
  14107.      If your pie chart appears cluttered, you can move the heading
  14108.      and percentage labels to a separate legend. This can create a
  14109.      much more pleasing display.
  14110.  
  14111.      The Disp option is actually a three-way toggle. Press D once
  14112.      to create a legend and move the heading labels next to it.
  14113.      Press D again to add the percent labels to the legend as well.
  14114.      Press D a third time to remove the legend and return to the
  14115.      original pie chart.
  14116.  
  14117.      (1-2)#pies
  14118.  
  14119.  
  14120.  
  14121.  
  14122.      PC-File Version 7 Users Guide                            237
  14123.  
  14124.  
  14125.      If you graphed multiple fields, each field is displayed on a
  14126.      separate pie chart. This option lets you display two pies on
  14127.      the screen at one time.
  14128.  
  14129.      Press 2 to display two pies on the screen side by side. Press
  14130.      1 to display just one pie.
  14131.  
  14132.      Next group
  14133.  
  14134.      If you graphed multiple fields, each field is displayed on a
  14135.      separate pie chart. This option lets you cycle through the
  14136.      pies, either one or two at a time, depending on your selection
  14137.      for the previous option.
  14138.  
  14139.      Editing Graphs
  14140.  
  14141.      Generally, if you make a mistake in defining a graph, the
  14142.      easiest thing to do is start over again. That's particularly
  14143.      true once you have some experience in creating graphs.
  14144.  
  14145.      However, there are some other options, though they are
  14146.      somewhat limited.
  14147.  
  14148.      If you selected the wrong subtotal break or selected too many
  14149.      or the wrong records, just rerun the graph. PC-File prompts
  14150.      you to rename the subtotal break and select the records to
  14151.      graph every time you run a graph you have already created.
  14152.  
  14153.      You can also edit the graph files. PC-File produces two files
  14154.      when you create a graph:
  14155.  
  14156.        FILENAME.GR
  14157.  
  14158.        GRAPH.ME
  14159.  
  14160.      FILENAME.GR contains the commands you issued as you created
  14161.      the graph. Basically, this is the structure of the graph. This
  14162.      file is like a report file and can be edited using the command
  14163.      format in reports.
  14164.  
  14165.      To edit a .GR file:
  14166.  
  14167.      1.Change the .GR extension to .REP.
  14168.  
  14169.        Use the DOS RENAME command to change the extension while at
  14170.        the DOS prompt. (See your DOS manual for information on this
  14171.        command.) You can use the Drop to DOS option in PC-File to
  14172.        display the DOS prompt.
  14173.  
  14174.      2.Return to PC-File and choose Reports from the Print menu.
  14175.  
  14176.      3.Choose Modify from the first dialog box, then the Language
  14177.        editor from the next one.
  14178.  
  14179.      4.Choose the graph file from the file selection dialog box.
  14180.  
  14181.  
  14182.  
  14183.  
  14184.      PC-File Version 7 Users Guide                            238
  14185.  
  14186.  
  14187.      5.Edit the file just as you would a report.
  14188.  
  14189.      6.Return to the DOS prompt and change the file extension back
  14190.        to .GR.
  14191.  
  14192.      7.Return to PC-File and call up the corrected graph.
  14193.  
  14194.      The GRAPH.ME file contains the data from the current graph.
  14195.      When you create or display another graph, the data from that
  14196.      graph replaces the previous data. Thus, there is just one
  14197.      GRAPH.ME file, which is rewritten every time you run a graph.
  14198.  
  14199.      You can edit the GRAPH.ME file using any text editor or word
  14200.      processing program that saves ASCII (unformatted) files.
  14201.      However, it is unlikely you will want to do so, unless you
  14202.      need to add a BOUND command (which is explained earlier in
  14203.      this chapter).
  14204.  
  14205.      If you want to save a particular GRAPH.ME file, rename it
  14206.      using the DOS RENAME command so it doesn't get overwritten.
  14207.      Change the name back to GRAPH.ME when you want to display the
  14208.      graph.
  14209.  
  14210.  
  14211.  
  14212.  
  14213.      PC-File Version 7 Users Guide                            239
  14214.  
  14215.  
  14216.  
  14217.  
  14218.      CHAPTER 13 UTILITIES
  14219.  
  14220.      This chapter covers the first four and the last three options
  14221.      on the Utilities menu. Exporting and importing files lets you
  14222.      exchange data between PC-File databases and most, if not all,
  14223.      of the popular database and spreadsheet programs. File
  14224.      management allows you to copy, delete, and rename files within
  14225.      PC-File. Use Configuration to set the parameters that
  14226.      influence the way PC-File looks and works. Use Pack to remove
  14227.      deleted records. Use Repair to fix damaged databases. And, use
  14228.      Database Description to document the structure of your
  14229.      database.
  14230.  
  14231.  
  14232.  
  14233.      Exporting and Importing Files
  14234.  
  14235.      Exchanging data with other programs or files is an important
  14236.      feature of PC-File. You can import data from and export data
  14237.      to just about any of the popular database and spreadsheet
  14238.      programs, including Lotus, Multiplan, and Excel. (Since PC-
  14239.      File databases are already in dBASE format, no transfer is
  14240.      necessary with dBASE files.) You can also move data to and
  14241.      from word processing data files used for mail merging,
  14242.      including those handled by WordPerfect, WordStar, and
  14243.      Microsoft Word.
  14244.  
  14245.      Imported data can be added to an empty database or appended to
  14246.      existing records. You can also use the import feature to
  14247.      append records from one PC-File database to another.
  14248.  
  14249.      When exporting data, PC-File creates a new file. Data is not
  14250.      appended to an existing file.
  14251.  
  14252.      Exchange Formats
  14253.  
  14254.      PC-File supports almost a dozen formats for transferring data
  14255.      between files. These include the data interchange format
  14256.      (.DIF) used by Lotus and Excel for transferring data, comma
  14257.      and line delimited formats, ASCII files, and the formats used
  14258.      by the major word processing programs for data merge in form
  14259.      letters.
  14260.  
  14261.      To transfer files to and from programs that don't support one
  14262.      of these formats, consult the program's manual and select a
  14263.      format common to both. For example, if you want to transfer a
  14264.      file in a Paradox format to PC-File, convert the Paradox file
  14265.      to the dBASE III format. You can then open it in PC-File, with
  14266.      no importing necessary. Whenever possible, convert to a dBASE
  14267.      file, as that eliminates the need to import the file in PC-
  14268.      File. However, if necessary, you can convert the file to ASCII
  14269.      or
  14270.      some other format and then convert that to the PC-File format.
  14271.  
  14272.  
  14273.  
  14274.  
  14275.      PC-File Version 7 Users Guide                            240
  14276.  
  14277.  
  14278.      PC-File can exchange data using the following formats:
  14279.  
  14280.      PC-File/dBASE
  14281.  
  14282.      PC-File uses the dBASE format, so it isn't necessary to export
  14283.      this format. However, you can export using this format to
  14284.      easily specify which fields and records to include in a new
  14285.      file. You can also use this format in importing. PC-File's
  14286.      dBASE import feature provides convenient way to tell PC-File
  14287.      where to put the fields from the database you are importing.
  14288.  
  14289.      Select this format only when you want to append (import) one.
  14290.      DBF file to another. These can be files created using PC-File,
  14291.      dBASE III, dBASE III PLUS, dBASE IV, FoxPRO, or any other
  14292.      programs that use the .DBF format. PC-File can't open dBASE IV
  14293.      files that contain more than 128 fields or float type fields.
  14294.      Also dBASE IV memo field data is not compatible.
  14295.  
  14296.      DIF
  14297.  
  14298.      The data interchange format is used by many spreadsheet and
  14299.      database programs for transferring data. These include Lotus
  14300.      1-2-3, Multiplan, and Microsoft Excel. For 1-2-3, convert the
  14301.      .WKS files to .DIF before making the transfer. For Multiplan,
  14302.      convert the SYLK files to .DIF before making the transfer. For
  14303.      Excel, save the .XLS file to a .DIF file.
  14304.  
  14305.      Fixed length
  14306.  
  14307.      Fixed length format is used by many programs which create
  14308.      "random" files. Every record is exactly the same length, with
  14309.      no delimiters or record separators. The only way to tell where
  14310.      one record stops and the next one starts is by knowing the
  14311.      exact length of each field. This format is just like the text
  14312.      editor format described below, except that the end of each
  14313.      record is not marked by a carriage return.
  14314.  
  14315.      Mail-merge
  14316.  
  14317.      This format consists of data fields separated by commas, with
  14318.      quotation marks surrounding fields that contain a comma. The
  14319.      end of each record has a carriage-return and optionally a line
  14320.      feed. Many word processing programs, including WordStar and
  14321.      Microsoft Word, use this format for their data files when
  14322.      creating form letters. It is also produced by many BASIC
  14323.      programs, and is an export option in many database programs.
  14324.      PC-File also gives you the option to put quotation marks
  14325.      around all fields,
  14326.      for programs that require them.
  14327.  
  14328.      Lotus .PRN
  14329.  
  14330.  
  14331.  
  14332.  
  14333.      PC-File Version 7 Users Guide                            241
  14334.  
  14335.  
  14336.      This is essentially the same format as mail-merge, with one
  14337.      exception. In the mail-merge format, if a field is blank or
  14338.      empty, nothing is written out except the comma, or, if all
  14339.      fields are enclosed in quotation marks, a space appears
  14340.      between the quotation marks. In .PRN files, if a character
  14341.      field is blank, a pair of quotation marks is written out,
  14342.      followed by the comma. If a numeric field is blank, 0 is
  14343.      written out. PRN files can be imported into 1-2- 3 by using
  14344.      the File Import Numbers
  14345.      command sequence in Lotus 1-2-3. The Lotus .PRN format is
  14346.      supported on export, but not import. To import a .PRN file
  14347.      created by 1-2-3 into PC-File, use the text editor format.
  14348.  
  14349.      Line delimited
  14350.  
  14351.      This format places each field on a separate line. It's
  14352.      sometimes called "field delimited" or "field per line" format.
  14353.      The only way to know where one record stops and another starts
  14354.      is to know exactly how many fields exist in each record. Each
  14355.      record must have the same number of lines. Blank fields are
  14356.      stored as blank lines. PeachText uses this format.
  14357.  
  14358.      Text editor or SDF format
  14359.  
  14360.      This format consists of fixed length fields with no separators
  14361.      between fields. The end of each record has a carriage return
  14362.      and sometimes a line-feed. This format is produced by many
  14363.      text editor and word processing programs, and is an
  14364.      export/import option in many database programs. If you were to
  14365.      look at a file in this format with your word processor, it
  14366.      would look like a columnar or tabular report, with each record
  14367.      on a separate line and each field starting at a fixed
  14368.      location.
  14369.  
  14370.      User-defined delimiter
  14371.  
  14372.      This format allows you to exchange data with programs that
  14373.      don't use one of the standard formats. You specify the field
  14374.      delimiter on import, and the field and record delimiter on
  14375.      export. When importing using this format, PC-File assumes the
  14376.      record delimiter is either a line-feed or carriage-
  14377.      return/line-feed.
  14378.  
  14379.      WordPerfect
  14380.  
  14381.      PC-File can transfer to or from WordPerfect secondary merge
  14382.      files and document files, but in most cases, you want to
  14383.      transfer data to and from the secondary merge files. For
  14384.      importing files, PC-File detects which version of WordPerfect
  14385.      you are using (4.2, 5.0, or 5.1) and handles the data
  14386.      accordingly. To export, choose the WordPerfect version you are
  14387.      exporting to when prompted.
  14388.  
  14389.      ASCII files
  14390.  
  14391.  
  14392.  
  14393.  
  14394.      PC-File Version 7 Users Guide                            242
  14395.  
  14396.  
  14397.      PC-File can import and export ASCII files. The ASCII formats
  14398.      supported by PC-File are fixed length, mail-merge, line
  14399.      delimited, text editor (.SDF), and Lotus .PRN
  14400.  
  14401.  
  14402.      Exporting Data
  14403.  
  14404.      Export data from a PC-File file when you want to use that data
  14405.      in another program or format. You can export all the data in
  14406.      the file or just selected records. You can also choose to
  14407.      export selected fields if you want.
  14408.  
  14409.      PC-File lets you select records as you export, viewing each
  14410.      record and exporting just those you want. Or you can choose
  14411.      just to export all the selected records without looking at
  14412.      them. Data is exported in sequence according to the current
  14413.      index.
  14414.  
  14415.      If you were exporting names and addresses for merging into a
  14416.      fundraising letter written in WordPerfect, you could select
  14417.      just the name and address fields and leave out extraneous
  14418.      fields such as the phone numbers. Plus, you could just select
  14419.      those members that live within a specific geographic area.
  14420.  
  14421.      The procedures for exporting data are the same for all format
  14422.      options except mail-merge and user-defined delimiter. Each of
  14423.      these two options requires an additional step, which is
  14424.      explained following the basic procedures.
  14425.  
  14426.      To export data:
  14427.  
  14428.      1.Make sure there is enough space on the receiving disk or
  14429.        drive to hold the data you are about to export. Fixed length
  14430.        and text editor formats occupy somewhat more disk space than
  14431.        .DBF files.
  14432.  
  14433.      2.Open the database from which you want to export data. You
  14434.        cannot export from a closed database.
  14435.  
  14436.      3.Choose Utilities from the menu bar.
  14437.  
  14438.      4.Choose Export from the Utilities menu. The export format
  14439.        dialog box displays.
  14440.  
  14441.      5.Choose the format type you want your exported file to take.
  14442.        The file selection dialog box displays.
  14443.  
  14444.      6.Choose the path and enter the file name you want to save the
  14445.        exported data to.
  14446.  
  14447.      7.Refer to additional steps described below if you chose an
  14448.        export format of mail-merge or user-defined delimited file.
  14449.  
  14450.  
  14451.  
  14452.  
  14453.      PC-File Version 7 Users Guide                            243
  14454.  
  14455.  
  14456.      8.Choose to flip the data or not. Choose Yes if the data
  14457.        contains a tilde (~) character and you want to flip the
  14458.        output. This is most likely in a mail-merge when you want to
  14459.        flip first and last names. Choose No if there is no data
  14460.        that needs to be flipped.
  14461.  
  14462.      9.Choose to export All or Some Fields. Choose Some if you want
  14463.        to limit the fields that are exported. PC- File displays the
  14464.        database fields in a check-off list box. Choose each field
  14465.        you want to export. A checkmark appears next to the fields
  14466.        that you choose. If you want to export a portion of a field,
  14467.        choose the Options button and designate the portion. Choose
  14468.        All to export all the fields in the database.
  14469.  
  14470.      10.  Choose to export All or Some Records. Choose Some if you
  14471.        want to limit the records that are exported. PC- File asks
  14472.        if you want to conduct a simple or formula search for the
  14473.        records. Choose the search mode and then enter the search
  14474.        criteria or command. See Chapter 7, "Finding and Modifying
  14475.        Data," for more information on searching. Choose All to
  14476.        export all records in the database, or to choose them as
  14477.        they are exported.
  14478.  
  14479.      11.  Choose Yes, No, All, or Quit once the export operation
  14480.        begins and the first record displays. Choose Yes to export
  14481.        the record displayed. Choose No if you don't want to export
  14482.        the displayed record. Choose All if you want to export the
  14483.        current record and all the remaining selected records
  14484.        without being asked again. Choose Quit to stop the
  14485.        operation.
  14486.  
  14487.      Mail-merge
  14488.  
  14489.      Various word processing programs handle the mail-merge format
  14490.      differently, so PC-File asks you to define a couple of
  14491.      additional options during the export process. The two steps
  14492.      below are inserted in the above procedures.
  14493.  
  14494.      1.   Choose Yes or No when asked if the first record of the
  14495.      exported file should contain the field names.
  14496.  
  14497.           Choose Yes if using a program like Microsoft Word, 
  14498.           which requires the field names in the first record.
  14499.  
  14500.           Choose No if field names are not required.
  14501.  
  14502.      2.   Choose Yes or No when asked if you want quotation 
  14503.           marks around every field.
  14504.  
  14505.           Choose Yes if the program you are exporting to 
  14506.           requires quotation marks around every field, even when 
  14507.           the field doesn't contain a comma. See your manual if 
  14508.           you are unsure about the program requirements.
  14509.  
  14510.           Choose No otherwise.
  14511.  
  14512.  
  14513.  
  14514.  
  14515.      PC-File Version 7 Users Guide                            244
  14516.  
  14517.  
  14518.      Continue on with step 8 in the main export procedures.
  14519.  
  14520.      User-defined Delimiter
  14521.  
  14522.      As the format name suggests, you get to define the delimiter
  14523.      used between fields and between records. A delimiter is a
  14524.      character used as a separator between each field and each
  14525.      record. The backslash (\) is the character sometimes used in
  14526.      non-standard programs.
  14527.  
  14528.      The steps below are inserted in the main export procedures.
  14529.  
  14530.      1.Choose the field delimiter. If you choose ASCII decimal
  14531.        value, PC-File prompts you to enter the value. If you choose
  14532.        Keyboard character, PC-File prompts you to enter the
  14533.        character. For example, you could choose Keyboard character,
  14534.        then enter a backslash in the text box that displays.
  14535.  
  14536.      2.Choose the record delimiter. Just as with the previous step,
  14537.        PC-File prompts you to enter the ASCII decimal value or the
  14538.        Keyboard character if you choose one of them as the option.
  14539.  
  14540.      3.Choose Yes or No when asked if the first record of the
  14541.        exported file should contain the field names. Choose Yes if
  14542.        using a program like Microsoft Word, which requires the
  14543.        field names in the first record. Choose No if field names
  14544.        are not required.
  14545.  
  14546.      Continue on with the rest of the main export procedures.
  14547.  
  14548.      NOTE: If you need to export to a format not supported by the
  14549.      export function, you can create a report in PC-File that
  14550.      converts the data to the correct format. Print the report to a
  14551.      disk file. It is then ready for use in the desired format.
  14552.  
  14553.      The exported file will have one of the following names:
  14554.  
  14555.           PC-File/dBASE  filename.DBF
  14556.  
  14557.           DIF            filename.DIF
  14558.  
  14559.           Fixed length   filename.FXD
  14560.  
  14561.           Lotus PRN           filename.PRN
  14562.  
  14563.           Mail-merge          filename.WS
  14564.  
  14565.           Line delimited      filename.LD
  14566.  
  14567.           Text editor    ilename.SDF
  14568.  
  14569.           User-defined   filename.USR
  14570.  
  14571.           WordPerfect    filename.WP
  14572.  
  14573.      Importing Data
  14574.  
  14575.  
  14576.  
  14577.  
  14578.      PC-File Version 7 Users Guide                            245
  14579.  
  14580.  
  14581.  
  14582.      You can import files or databases created with other programs.
  14583.      You can also use the import feature to append records from
  14584.      another PC-File database to the current database. PC-File
  14585.      imports the data into the current (opened) database.
  14586.  
  14587.      To import data, you have to open an existing database or
  14588.      define a new database to which it will be imported. Unlike the
  14589.      export process, you cannot create the receiving file (the
  14590.      current database) during the import process.
  14591.  
  14592.      The format of the import file determines certain requirements
  14593.      of the database, as follows:
  14594.  
  14595.      If you are importing from the text editor (.SDF) or fixed
  14596.      length format, the database must match the import file
  14597.      exactly. The database must be defined with the fields in the
  14598.      same sequence as they exist in the import file, with the same
  14599.      number of fields, and matching field lengths.
  14600.  
  14601.      If you are importing from another PC-File database or dBASE
  14602.      file, the database must have the same field lengths, but not
  14603.      necessarily the same number of fields. PC-File lets you map
  14604.      the fields from the database you are importing from to the
  14605.      fields of the open database.
  14606.  
  14607.      If you are importing from the line delimited format, the
  14608.      database must have the same number of fields in the same
  14609.      sequence as the file you are importing. Field lengths should
  14610.      be at least as long as those in the import file to avoid
  14611.      truncation of data.
  14612.  
  14613.      If you are importing from any other format, PC-File does not
  14614.      require that the import file have the same number of fields or
  14615.      matching field lengths, but does require the fields to be in
  14616.      the same order. If the import file contains more fields than
  14617.      the database, the extra fields are ignored. If the import file
  14618.      contains fewer fields than the database, the fields at the end
  14619.      of the record in the database are left blank. This is also
  14620.      true for field lengths. If the import file contains fields
  14621.      longer
  14622.      than those defined in the database, data in those fields are
  14623.      truncated to the database field length. If the import file
  14624.      contains fields which are shorter than the database, the extra
  14625.      spaces are filled with blanks.
  14626.  
  14627.      The files being imported can have any file extensions, except
  14628.      for dBASE files, which must have a .DBF extension, and DIF
  14629.      files, which must have a .DIF extension.
  14630.  
  14631.      Mapping Field Data from dBASE Files
  14632.  
  14633.      This section only applies to importing from dBASE files. If
  14634.      you are importing from any other format, skip ahead to the
  14635.      "Overview of Importing Process" section for a step-by-step
  14636.      description of the importing process.
  14637.  
  14638.  
  14639.  
  14640.  
  14641.      PC-File Version 7 Users Guide                            246
  14642.  
  14643.  
  14644.  
  14645.      PC-File allows you to readily import files from PC-File or any
  14646.      other software product that create dBASE III + compatible
  14647.      file. These files must have the .DBF file extension.
  14648.  
  14649.      After you have chosen the Normal DBF format and the
  14650.      appropriate file to import, the Mapping screen displays.
  14651.  
  14652.      If you are familiar with redefining a database structure,
  14653.      mapping will be quite familiar. Import mapping is quite
  14654.      similar to the process used in redefining a database
  14655.      structure.
  14656.  
  14657.      The Fields column shows the field name for the open database.
  14658.      The Comes From column shows which fields from the imported
  14659.      database are mapped to the fields in the Fields column.
  14660.  
  14661.      PC-File automatically maps all field names that match. If you
  14662.      have identical fields in the open database and the import
  14663.      database, you will see the same name in both the New Fields
  14664.      and the Come From columns for each identical field. In many
  14665.      cases, when PC-File has done the mapping for you, you cam
  14666.      simply choose OK to continue the importing process.
  14667.  
  14668.      However, if a field does not have a match, the Comes From
  14669.      column will be blank for that field-you must choose the data
  14670.      source for that field. For example, if you have a field name
  14671.      FIRST in the open database, but your import database has a
  14672.      field name FIRSTNAME, you must tell PC-File that you want the
  14673.      information from the FIRSTNAME to be put into the FIRST field.
  14674.  
  14675.      There are two ways to map your fields. You can select them by
  14676.      using the List button or by typing field names into the Comes
  14677.      From column directly.
  14678.  
  14679.      Selecting Fields Using the List Button
  14680.  
  14681.      You will need to map any fields that don't have an exact match
  14682.      with the fields in the open database. The List button provides
  14683.      a simple way to do this. Choosing the List button displays a
  14684.      list of the field names from the import database on the right
  14685.      side of the Mapping screen.
  14686.  
  14687.      The Import Fields List Box shows all the fields from the
  14688.      import database. All fields that have already been mapped by
  14689.      PC-File have a checkmark next to them. To map a field, put the
  14690.      cursor in the Comes From column next to the field in the
  14691.      Fields column you want to map. Then, choose a field from the
  14692.      Import Fields List. This inserts that field's name into the
  14693.      Comes From column.
  14694.  
  14695.      To map import fields with the List button:
  14696.  
  14697.  
  14698.  
  14699.  
  14700.      PC-File Version 7 Users Guide                            247
  14701.  
  14702.  
  14703.      Highlight the text box in the Come From column next to the
  14704.      Fields name you want to map. The text box should be empty.
  14705.      Choose the List button The Import Fields List displays on the
  14706.      right half of the screen. The cursor is active in the list.
  14707.      Click on the field you want to map, or navigate to the name of
  14708.      the field with the keyboard and press ENTER. The field name
  14709.      from the Import Field List is entered into the Come From list
  14710.      next to the field you choose in step 1. Repeat steps 1 through
  14711.      3 for each
  14712.      field you want to map. When you have finished mapping your
  14713.      fields, choose OK to continue the importing process.
  14714.  
  14715.      Selecting Fields by Typing Names
  14716.  
  14717.      Alternatively, you can map fields by simply typing the name of
  14718.      the import field in the appropriate Comes From text box. This
  14719.      may be a faster method if you are only using the keyboard.
  14720.      However, you must type in the name exactly as it is saved in
  14721.      the database. You can press ALT-L to display the Import Fields
  14722.      List for reference.
  14723.  
  14724.      To map your fields by typing names:
  14725.  
  14726.      Move the cursor to the text box next to the field you want to
  14727.      map. The box should be empty. Type in the name of the field
  14728.      that will be mapped from the import file. Repeat steps 1 and 2
  14729.      for each field you want to map. When you have finished mapping
  14730.      your fields, choose OK to continue the importing process.
  14731.  
  14732.  
  14733.      Overview of Importing Process
  14734.  
  14735.      To import data:
  14736.  
  14737.      Open the database into which the data is to be imported.
  14738.      Choose Utilities from the menu bar. Choose Import from the
  14739.      Utilities menu. The import format dialog box displays. Choose
  14740.      the format of the import file. If you select the User-defined
  14741.      delimiter option, PC-File asks you to choose the field
  14742.      delimiter; the record delimiter is set automatically as a
  14743.      carriage return/line feed. Choose the path and file name of
  14744.      the import file in the file selection dialog box. If you chose
  14745.      Normal DBF in step 4,
  14746.      you must map the fields as described above in, "Mapping Field
  14747.      Data from dBASE Files." Choose to append the new records to
  14748.      the current database or to overwrite the current database. If
  14749.      you choose to append, the imported records are added to the
  14750.      current database and will be ordered according to the current
  14751.      index. If you choose to overwrite, the current records are
  14752.      DELETED and the new records start at record 1. Choose to
  14753.      import All or Some records. Choose Some if you want to limit
  14754.      the records that
  14755.  
  14756.  
  14757.  
  14758.  
  14759.      PC-File Version 7 Users Guide                            248
  14760.  
  14761.  
  14762.      are imported. PC- File asks if you want to conduct a simple or
  14763.      formula search for the records. Choose the search mode and
  14764.      then enter the search criteria or command. See Chapter 5,
  14765.      "Finding and Modifying Data," for more information on
  14766.      searching. Choose All to import all records in the database,
  14767.      or to let yourself choose them as they are imported. Choose
  14768.      Yes, No, All, or Quit once the import operation begins and the
  14769.      first record displays. Choose Yes to import the record
  14770.      displayed. Choose No if
  14771.      you don't want to import the displayed record. Choose All if
  14772.      you want to import the current record and all the remaining
  14773.      records without being asked again. Choose Quit to stop the
  14774.      operation.
  14775.  
  14776.  
  14777.      NOTE: It is recommended that you choose Yes for the first few
  14778.      records to make sure they are being imported properly. If they
  14779.      are not, choose Quit to stop the operation. Check to see that
  14780.      the current database matches the import file in the ways it is
  14781.      supposed to (as described previously). Make whatever
  14782.      adjustments are necessary and begin the import operation
  14783.      again.
  14784.  
  14785.  
  14786.  
  14787.  
  14788.      PC-File Version 7 Users Guide                            249
  14789.  
  14790.  
  14791.  
  14792.      Managing Files
  14793.  
  14794.      Most people use DOS commands or, if they have Windows, the
  14795.      File Manager, to copy, delete, and rename files. However, you
  14796.      may find it easier to use the File Management option in PC-
  14797.      File to perform those functions on your database files.
  14798.  
  14799.      PC-File creates several files as you define a database,
  14800.      including a header file, data file, configuration file, memo
  14801.      file, and separate files for each index. In addition, every
  14802.      report, graph, and letter you create adds a new file. Making a
  14803.      copy of all those files using a DOS command could be
  14804.      confusing, particularly if you have more than one database in
  14805.      a directory.
  14806.  
  14807.      With the File Management option, however, PC-File lists the
  14808.      files associated with a database and lets you copy, delete, or
  14809.      rename those files in groups or, to a limited extent,
  14810.      individually.
  14811.  
  14812.      You can perform file management functions on either an open or
  14813.      closed database.
  14814.  
  14815.      Types of Database Files
  14816.  
  14817.      Whether you choose to copy, delete, or rename a file or
  14818.      database, PC- File displays a list of the types of files in
  14819.      the database.
  14820.  
  14821.      Choose the option from the list that suits your purpose. The
  14822.      Database and Report options include all the files that have
  14823.      their file extensions listed. The remaining options only
  14824.      include individual files with the extension shown.
  14825.  
  14826.      If, for example, you wanted to copy a database to a floppy
  14827.      disk, you would choose the first option, Database files. All
  14828.      the database files that include the listed extensions would be
  14829.      copied to the disk. If you wanted to copy the two database
  14830.      reports that you had defined as well, you would have to repeat
  14831.      the copy operation twice, once for each report, choosing the
  14832.      Report files option from the above list during the process.
  14833.  
  14834.      Copying a File
  14835.  
  14836.      The Copy option is useful for making backup copies of your
  14837.      database, for making a copy to take to another machine, and
  14838.      for a variety of other purposes. It is important that you make
  14839.      a backup copy of your database(s) and associated files, and
  14840.      update the backup on a regular basis. You never know when you
  14841.      might need to refer to a backup copy. See Chapter 1,
  14842.      "Navigating in PC-File," for more information on backing up
  14843.      your database.
  14844.  
  14845.      NOTE: If you want to copy your database to make changes to the
  14846.      structure, use the Redefine option on the File menu instead.
  14847.  
  14848.  
  14849.  
  14850.  
  14851.      PC-File Version 7 Users Guide                            250
  14852.  
  14853.  
  14854.  
  14855.      When you copy a database, you must either give the copy a
  14856.      unique name or place it on a separate directory or disk from
  14857.      the current database. Otherwise you will overwrite the current
  14858.      database files.
  14859.  
  14860.      Be sure you have enough space for copying the database files.
  14861.      If you are copying to a floppy disk and your database takes up
  14862.      more space than is available on the disk, you can use the DOS
  14863.      BACKUP command, or various software backup utilities.
  14864.  
  14865.      To copy files:
  14866.  
  14867.      1.Choose Utilities from the menu bar.
  14868.  
  14869.      2.Choose File Management from the Utilities menu.
  14870.  
  14871.      3.Choose Copy from the File Management dialog box.
  14872.  
  14873.      4.Choose the type of file(s) you want to copy.
  14874.  
  14875.      5.Choose the file or database that you want to copy.
  14876.  
  14877.      6.Enter the drive, path, and file or database name that you
  14878.        want to copy to. If you are copying to a different drive or
  14879.        path, you can give the file or database the same name. If
  14880.        you are copying to the same drive and path, you must give
  14881.        the file a new name.
  14882.  
  14883.      PC-File copies the file(s).
  14884.  
  14885.      Deleting a File
  14886.  
  14887.      To delete files:
  14888.  
  14889.      1.Choose Utilities from the menu bar.
  14890.  
  14891.      2.Choose File Management from the Utilities menu.
  14892.  
  14893.      3.Choose Delete from the File Management dialog box.
  14894.  
  14895.      4.Choose the type of file(s) you want to delete.
  14896.  
  14897.      5.Choose the file or database that you want to delete.
  14898.  
  14899.      6.Choose Yes to confirm the deletion. Choose No if you decide
  14900.        not to delete the file or database.
  14901.  
  14902.      PC-File deletes the file(s).
  14903.  
  14904.      When you delete database files, PC-File first looks in the
  14905.      header file for the names of the index files. The index files
  14906.      are deleted along with the other database files.
  14907.  
  14908.      You can delete the database that is currently open. If you do,
  14909.      the result is that no database is open.
  14910.  
  14911.  
  14912.  
  14913.  
  14914.      PC-File Version 7 Users Guide                            251
  14915.  
  14916.  
  14917.  
  14918.      Renaming a File
  14919.  
  14920.      To rename files:
  14921.  
  14922.      1.Choose Utilities from the menu bar.
  14923.  
  14924.      2.Choose File Management from the Utilities menu.
  14925.  
  14926.      3.Choose Rename from the File Management dialog box.
  14927.  
  14928.      4.Choose the type of file(s) you want to rename.
  14929.  
  14930.      5.Choose the file or database that you want to rename.
  14931.  
  14932.      6.Enter the new name for the file or database. The name must
  14933.        be unique within the directory and follow DOS filename
  14934.        rules.
  14935.  
  14936.      PC-File renames the file(s).
  14937.  
  14938.      Configuring Your Database
  14939.  
  14940.      Once installed, PC-File is configured and ready to run. All
  14941.      the necessary configuration parameters are defined. Many of
  14942.      the parameters, such as screen color and case sensitivity, are
  14943.      set by defaults in the program. Others, such as mode of
  14944.      operation and printer port, are determined during
  14945.      installation.
  14946.  
  14947.      However, the configuration parameters can be altered at any
  14948.      time. For example, you can change the screen colors, add
  14949.      password limitations, or set a default database to open when
  14950.      you start PC-File.
  14951.  
  14952.      In addition, PC-File lets you define a different set of
  14953.      configuration parameters for each database. Thus, you could
  14954.      define different color combinations for each database. PC-File
  14955.      even lets you define auxiliary sets of parameters that can be
  14956.      pulled up for special purposes, such as connecting to an
  14957.      alternative printer.
  14958.  
  14959.      There are eight basic parameters that can be defined in your
  14960.      configuration, some of which include multiple settings. They
  14961.      are described briefly here and in more detail later in the
  14962.      chapter.
  14963.  
  14964.      Parameter: Description
  14965.  
  14966.      Display :Turn graphics mode ON or OFF and set your screen
  14967.      colors
  14968.  
  14969.      Printer: Determine printer port, printer, and page length
  14970.  
  14971.      Default Date Format: Set the default display format for date-
  14972.      type fields
  14973.  
  14974.  
  14975.  
  14976.  
  14977.      PC-File Version 7 Users Guide                            252
  14978.  
  14979.  
  14980.  
  14981.      Phone Dialer: Determine the modem port and enter dialing codes
  14982.      and prefixes
  14983.  
  14984.      Snapshot: Define the mailing label formats and printer port
  14985.  
  14986.      Passwords: Define passwords for a database
  14987.  
  14988.      Case sensitive: Define whether PC-File distinguishes between
  14989.      uppercase and lowercase letters during sorts and searches
  14990.  
  14991.      Default database: Open a specific database automatically upon
  14992.      starting PC-File
  14993.  
  14994.  
  14995.      Configuration Files
  14996.  
  14997.  
  14998.      PC-File allows for multiple configurations. Each configuration
  14999.      profile is maintained in a separate file. Configuration files
  15000.      use the extension .PRO.
  15001.  
  15002.      There are three types of configuration files:
  15003.  
  15004.      Master profile
  15005.  
  15006.      The master configuration file is called PCFILE.PRO. If you
  15007.      have only one configuration file, this is it. This file was
  15008.      installed with your other program files, and should remain in
  15009.      the directory with those files. PCFILE.PRO contains the
  15010.      configuration defaults, including those set during
  15011.      installation.
  15012.  
  15013.      Database profiles
  15014.  
  15015.      Profiles associated with specific databases need to be named
  15016.      after the database (databasename.PRO). You can define a
  15017.      separate profile for each database. If PC-File finds a profile
  15018.      of the same name as the database when you open a database, it
  15019.      loads the configuration settings in that profile, overriding
  15020.      PCFILE.PRO.
  15021.  
  15022.      Databasename.PRO files should be located in the same
  15023.      directories as the databases with which they are associated.
  15024.  
  15025.      Auxiliary profiles
  15026.  
  15027.      Auxiliary profiles can also be defined, using whatever name
  15028.      you want (as long as you follow DOS filename rules) with the
  15029.      extension .PRO. Auxiliary profiles can be loaded as needed.
  15030.  
  15031.      Auxiliary profiles can be located anywhere, as you can define
  15032.      the path when you load them. However, if an auxiliary profile
  15033.      is associated with a specific database, it is easiest to
  15034.      locate the profile in the same directory as the other database
  15035.      files.
  15036.  
  15037.  
  15038.  
  15039.  
  15040.      PC-File Version 7 Users Guide                            253
  15041.  
  15042.  
  15043.  
  15044.      Why Define Additional Profiles?
  15045.  
  15046.      PCFILE.PRO may prove to be the only configuration profile you
  15047.      need. If you define and use just one database, you can fit the
  15048.      configuration to that database. You can always modify it if
  15049.      you buy a new printer, add a modem, or simply want to change
  15050.      your screen colors. You can also modify it temporarily. For
  15051.      example, you could switch your screen colors for a few
  15052.      sessions, then switch back.
  15053.  
  15054.      Even with several databases, the master profile may prove to
  15055.      be all you need. It's when your system gets more sophisticated
  15056.      that multiple profiles begin to become useful. The most likely
  15057.      reasons for using several profiles are:
  15058.  
  15059.      Using more than one printer Using passwords in multiple
  15060.      databases Defining separate snapshot label layouts for
  15061.      different databases
  15062.  
  15063.      Database profiles are practically a necessity for using
  15064.      passwords, which are normally designed to limit access to a
  15065.      particular database or part of a database.
  15066.  
  15067.      There may be other reasons for defining multiple profiles as
  15068.      well. One particular database may require case sensitivity in
  15069.      sorting, while others may not. Or you might want to define
  15070.      different color schemes for each database, making it always
  15071.      easy to tell which one is open.
  15072.  
  15073.      Which Profile is Current?
  15074.  
  15075.      When you choose Configuration from the Utilities menu, the
  15076.      current configuration profile displays on the screen. However,
  15077.      it is important to understand which profile gets loaded when,
  15078.      without having to call up the screen to read the title bar.
  15079.      The following guidelines apply:
  15080.  
  15081.      PCFILE.PRO is loaded automatically when you start PC-File, as
  15082.      long as you start PC-File from a directory containing a copy
  15083.      of PCFILE.PRO. (You can copy the master profile to as many
  15084.      directories as you want.) Thus, if you have set the path for
  15085.      PC-File in your AUTOEXEC.BAT file and start the program from
  15086.      some other directory, copy the master profile to that
  15087.      directory.
  15088.  
  15089.      If you start PC-File from a directory that doesn't contain
  15090.      PCFILE.PRO, no profile is in effect. In that case, PC-File
  15091.      assumes certain defaults. These defaults are listed below.
  15092.  
  15093.      If you have created a databasename.PRO, that profile takes
  15094.      effect when you open the associated database, as long as the
  15095.      profile is in the same directory. The database profile
  15096.      overrides PCFILE.PRO, but only to the extent that it differs
  15097.      from the master profile.
  15098.  
  15099.  
  15100.  
  15101.  
  15102.      PC-File Version 7 Users Guide                            254
  15103.  
  15104.  
  15105.      If PC-File can't find a profile on the current directory, it
  15106.      assumes certain defaults. The defaults are:
  15107.  
  15108.      Parameter: Default
  15109.  
  15110.      Display mode:  Graphics (VGA, EGA, and Hercules-compatible
  15111.      monochrome); Character (CGA)
  15112.  
  15113.      Display colors:  Nautical (VGA, EGA, and CGA); Black & White
  15114.      (mono)
  15115.  
  15116.      Printer port:  LPT1
  15117.  
  15118.      Page length:  66
  15119.  
  15120.      Default Date Format:  MM/DD/YYY (Month-Day-Year, 4-digit, and
  15121.      Slash)
  15122.  
  15123.      Modem port:  COM1
  15124.  
  15125.      Long distance code:  1
  15126.  
  15127.      Modem dialing code:  ATD
  15128.  
  15129.      Case sensitive searches:  Off
  15130.  
  15131.      Case sensitive indexes Off
  15132.  
  15133.  
  15134.      The Configuration Window
  15135.  
  15136.      You can open a configuration window whether a profile is
  15137.      currently loaded or not. The configuration window is a dialog
  15138.      box with a menu bar.
  15139.  
  15140.      To open the configuration window:
  15141.  
  15142.      1.Choose Utilities from the menu bar.
  15143.  
  15144.      2.Choose Configuration from the Utilities menu.
  15145.  
  15146.      The window displays the different parameters that you can set.
  15147.      The three command buttons in the lower left corner of the
  15148.      window display dialog boxes.
  15149.  
  15150.      The Configuration Menu
  15151.  
  15152.      The menu bar at the top has two options. Help! displays a Help
  15153.      window. The File option displays a pull-down menu of options.
  15154.  
  15155.      Use the options on Configuration menu as follows:
  15156.  
  15157.      Option:  Description
  15158.  
  15159.      Load:  Load and display an existing profile
  15160.  
  15161.  
  15162.  
  15163.  
  15164.      PC-File Version 7 Users Guide                            255
  15165.  
  15166.  
  15167.      Save:  Save the current profile
  15168.  
  15169.      Save As:  Save the current profile to a new name
  15170.  
  15171.      Exit:  Quit the configuration window
  15172.  
  15173.  
  15174.      The options on the File menu are explained below.
  15175.  
  15176.      Loading a Profile
  15177.  
  15178.      Loading an existing profile and displaying it on the screen
  15179.      are a single operation.
  15180.  
  15181.      To load and display a profile:
  15182.  
  15183.      1.Choose File from the configuration window menu bar.
  15184.  
  15185.      2.Choose Load from the File menu. The file selection dialog
  15186.        box displays.
  15187.  
  15188.      3.Choose the profile you want to open.
  15189.  
  15190.      The profile is loaded into memory and displayed on the screen.
  15191.  
  15192.      To close the configuration window, choose Exit from the
  15193.      configuration window File menu. The window closes, but the
  15194.      profile remains active.
  15195.  
  15196.  
  15197.      Modifying a Profile
  15198.  
  15199.      To modify a profile, display the configuration window and make
  15200.      your changes to the parameters. If the profile you want to
  15201.      modify is currently loaded into memory, all you have to do is
  15202.      display it on the screen. If you want to modify another
  15203.      profile, you must first load that profile. Follow the
  15204.      procedure outlined above for loading a profile.
  15205.  
  15206.      Once you modify a profile, you must save your changes.
  15207.      Choosing Save from the File menu saves to the name you loaded,
  15208.      choosing Save As allows you to save to a new name.
  15209.  
  15210.      To save a modified profile to its original name:
  15211.  
  15212.      1.Choose File from the configuration window menu bar.
  15213.  
  15214.      2.Choose Save from the File menu.
  15215.  
  15216.      The profile is saved.
  15217.  
  15218.      To save a modified profile to a new name:
  15219.  
  15220.      1.Choose File from the configuration window menu bar.
  15221.  
  15222.      2.Choose Save As. The file selection dialog box displays.
  15223.  
  15224.  
  15225.  
  15226.  
  15227.      PC-File Version 7 Users Guide                            256
  15228.  
  15229.  
  15230.  
  15231.      3.Enter a new name in the text box.
  15232.  
  15233.      The changes you made are saved to the new name.
  15234.  
  15235.      Creating a New Profile
  15236.  
  15237.      You can create a new profile in the same manner as you modify
  15238.      an existing one, except you give the profile a new name. You
  15239.      would only use this method to create an auxilliary profile
  15240.      that is loaded on demand.
  15241.  
  15242.      To define a new profile:
  15243.  
  15244.      1.Display the configuration window.
  15245.  
  15246.      2.Make any necessary changes to the parameters.
  15247.  
  15248.      3.Choose Save As from the File menu.
  15249.  
  15250.      4.Enter a new name for the profile in the text box.
  15251.  
  15252.      The new profile is now loaded in memory.
  15253.  
  15254.  
  15255.      The Configuration Parameters
  15256.  
  15257.      When you choose Configuration from the Utilities menu, the
  15258.      configuration profile currently loaded in memory displays.
  15259.  
  15260.      Each of the profile options is explained below.
  15261.  
  15262.      Display Mode
  15263.  
  15264.      PC-File operates in two modes: Graphics mode and Character
  15265.      mode. Graphics mode is designed for VGA, EGA, and Hercules-
  15266.      compatible monochrome monitors, Character mode for CGA
  15267.      monitors. PC-File determined which type of monitor you were
  15268.      using when you installed the program and set the mode
  15269.      accordingly. You can switch modes in certain cases, however.
  15270.      When you can switch and why you might want to are explained in
  15271.      Chapter 1, "Navigating in PC-File."
  15272.  
  15273.      To switch modes:
  15274.  
  15275.      1.Choose the Graphics mode check-off box.
  15276.  
  15277.      PC-File is operating in graphics mode when the box is checked,
  15278.      in character mode when it's not. However, you have to exit PC-
  15279.      File and start it again for a change in mode to take effect.
  15280.  
  15281.      Screen Colors
  15282.  
  15283.  
  15284.  
  15285.  
  15286.      PC-File Version 7 Users Guide                            257
  15287.  
  15288.  
  15289.      PC-File provides four pre-defined color schemes, allowing you
  15290.      to change the color patterns on your screen. Each color scheme
  15291.      includes pre-set foreground and background color settings.
  15292.      Additionally, PC- File provides the Customize option that lets
  15293.      you specify the colors for particular screen elements so you
  15294.      can customize your screen colors.
  15295.  
  15296.      The Nautical color scheme is the default for all color monitor
  15297.      cards; Black & White is the default for Hercules cards. If you
  15298.      have a CGA card with a monochrome monitor or an LCD, you might
  15299.      want to switch to Black & White if you didn't during
  15300.      installation.
  15301.  
  15302.      To select a pre-defined color scheme:
  15303.  
  15304.      1.Choose the option button you want.
  15305.  
  15306.      The colors on your screen change immediately to reflect your
  15307.      choice.
  15308.  
  15309.      Customizing Screen Colors
  15310.  
  15311.      Choosing the Customize button to the right of the User option
  15312.      button displays the Design Colors dialog box.
  15313.  
  15314.      Choosing an option in the list box sets either the background
  15315.      or the foreground color of the designated screen element (with
  15316.      the exception of Window Border, which has only one option).
  15317.      When you choose an option from the list box, that option is
  15318.      highlighted and a checkmark displays to its left indicating it
  15319.      is active. The 16 colored buttons to the right of the list box
  15320.      both set and indicate the current color of the active screen
  15321.      element. An "X" on the color button indicates which color is
  15322.      active for the current screen element.
  15323.  
  15324.      To set colors, choose an item from the list, then choose the
  15325.      desired color button. New color settings are effective
  15326.      immediately, reflected in the colors of the Design Colors
  15327.      dialog box and screen areas visible behind it.
  15328.  
  15329.      If you make a color choice that makes the screen unreadable,
  15330.      such as choosing the same color for both the background and
  15331.      foreground of a screen element, choose another color button.
  15332.      If you decide you don't like the color choices you have made
  15333.      and want to start over, press ESC or choose Cancel. This
  15334.      returns you to the main Configuration window and restores your
  15335.      original colors. Choosing Customize again at this point re-
  15336.      displays the Design Colors dialog box.
  15337.  
  15338.      To customize screen colors:
  15339.  
  15340.      1.Choose Customize.
  15341.  
  15342.      2.Choose a screen element to change from the list box.
  15343.  
  15344.      3.Choose the desired color button.
  15345.  
  15346.  
  15347.  
  15348.  
  15349.      PC-File Version 7 Users Guide                            258
  15350.  
  15351.  
  15352.  
  15353.      4.Repeat steps 2 and 3 for each area you want to customize.
  15354.  
  15355.      5.Choose OK when you are done setting colors.
  15356.  
  15357.      Printer
  15358.  
  15359.      These parameters let you set the default page length, printer,
  15360.      and printer port for your system. You can override these
  15361.      defaults when you print a report, letter, graph, or set of
  15362.      mailing labels if necessary.
  15363.  
  15364.      To set printer defaults:
  15365.  
  15366.      1.Enter a default page length if different than 66 lines per
  15367.        page. Sixty-six is the standard page length for a dot matrix
  15368.        printer. If you use a laser printer, you probably want to
  15369.        set the page length at 60. If you use paper of a different
  15370.        length, or your printer uses a different line spacing,
  15371.        adjust the page length accordingly.
  15372.  
  15373.      2.Choose the printer from the list box. If your printer is not
  15374.        listed, press F1 to display the Help window. A list of
  15375.        printers compatible with those shown in the list box
  15376.        displays. If you still don't see your printer, and your
  15377.        printer manual doesn't mention one of the listed printers as
  15378.        compatible, choose User codes from the list. A dialog box
  15379.        displays, allowing you to define the printer codes yourself.
  15380.        Your printer manual If you intend to print to disk rather
  15381.        than to a printer, choose No codes. Printer codes appear as
  15382.        scrambled text and symbols when printed to a file, so it is
  15383.        better to omit them.
  15384.  
  15385.      Choose the printer port.
  15386.  
  15387.      Default Date Format
  15388.  
  15389.      PC-File provides you with convenient ways to format your
  15390.      dates. Using the Default Date Format options in the
  15391.      Configuration window, will apply to any date fields which
  15392.      don't have Date Format field attributes set with the Field
  15393.      Attributes option on the File menu. To have all your date
  15394.      fields display in the same format, use the Default Date Format
  15395.      options in the Configuration window.
  15396.  
  15397.      The default format is Month-Day-Year order, four digit year
  15398.      and slashes (/) as separators. The resulting date for December
  15399.      29, 1961, would be as follows:
  15400.  
  15401.      12/29/1961
  15402.  
  15403.      You change your default date format by changing each of the
  15404.      elements of the format: order, year and separator. Make the
  15405.      choice for each element that accurately reflects your desired
  15406.      date format.
  15407.  
  15408.  
  15409.  
  15410.  
  15411.      PC-File Version 7 Users Guide                            259
  15412.  
  15413.  
  15414.      PC-File can accomodate many date formats including those used
  15415.      throughout Europe and Japan. In Switzerland, you might choose
  15416.      Day- Month-Year order, four digit year, and period (.) as a
  15417.      separator. The resulting date would be as follows:
  15418.  
  15419.      29.12.1961
  15420.  
  15421.      To set the default date format:
  15422.  
  15423.      1.Choose an order for month, day and year.
  15424.  
  15425.      2.Choose either two or four digit years.
  15426.  
  15427.      3.Choose a separator to use between the elements.
  15428.  
  15429.      Phone Dialer
  15430.  
  15431.      If you use the autodialing feature of PC-File, you'll want to
  15432.      check the dialer parameters in your configuration profile. You
  15433.      can define the modem port, dialing code, long distance prefix,
  15434.      and access prefix. Some of these parameters have defaults that
  15435.      you may need to change.
  15436.  
  15437.      To define dialing parameters:
  15438.  
  15439.      1.Choose the Phone dialer command button from the
  15440.        configuration window. A dialog box displays.
  15441.  
  15442.      2.Define the parameters to fit your system.
  15443.  
  15444.      3.Choose OK.
  15445.  
  15446.      The dialing parameters are defined as follows:
  15447.  
  15448.      Dialing port
  15449.  
  15450.      PC-File assumes your modem is connected to the COM1 port. If
  15451.      it is connected to one of the other COM ports, change the
  15452.      profile accordingly.
  15453.  
  15454.      Modem dialing command
  15455.  
  15456.      The dialing command activates the modem. It essentially tells
  15457.      the modem that you are about to make a call. The default
  15458.      dialing command is ATD. ATD is used with Hayes-compatible
  15459.      modems to make either pulse or tone calls. You can change the
  15460.      command to ATDT if you want to force the modem to use tones, a
  15461.      slightly faster process. You must have a touchtone phone, in
  15462.      that case. You can enter other codes if necessary. See your
  15463.      modem manual for more information.
  15464.  
  15465.      Line access prefix
  15466.  
  15467.      The line access prefix is the number required to dial outside
  15468.      of your office telephone system. Most often this is the number
  15469.      9. Enter the appropriate prefix for your telephone system.
  15470.  
  15471.  
  15472.  
  15473.  
  15474.      PC-File Version 7 Users Guide                            260
  15475.  
  15476.  
  15477.  
  15478.      Long distance prefix
  15479.  
  15480.      The default long distance prefix is 1. If your particular
  15481.      phone system requires a different prefix, enter that here.
  15482.  
  15483.      PC-File sends the long distance prefix when dialing phone
  15484.      numbers that are 10 digits or longer, unless the phone number
  15485.      begins with a zero. For long distance calls outside of the
  15486.      U.S. and Canada, incorporate the long distance prefix into the
  15487.      phone number in your database. When PC-File reads a number
  15488.      that starts with 0, it skips the long distance prefix in your
  15489.      configuration.
  15490.  
  15491.      Also, you should enter "1" in your phone number field for long
  15492.      distance calls within your area, unless your phone company
  15493.      requires you to dial the local area code for long distance
  15494.      calls. If your phone company requires area codes for all long
  15495.      distance calls, enter the area code in your phone number field
  15496.      for all long distance numbers and PC-File will automatically
  15497.      send the long distance prefix.
  15498.  
  15499.      Snapshot
  15500.  
  15501.      The snapshot feature lets you print mailing labels one at a
  15502.      time. If you intend to print snapshot labels, you must follow
  15503.      these initial steps:
  15504.  
  15505.      1.Define the label report.
  15506.  
  15507.      2.Assign the label report to a snapshot.
  15508.  
  15509.      3.Define the output (printer port or file).
  15510.  
  15511.      Steps 2 and 3 are implemented in the configuration profile,
  15512.      and are explained here. Defining a label report is covered
  15513.      Chapter 9, "Using the Mail Label Format." Printing a snapshot
  15514.      is discussed in greater detail in the section on snapshot
  15515.      labels in Chapter 15, "Tools."
  15516.  
  15517.      You can assign up to five labels in a profile. Each label is
  15518.      assigned to a number, which you select when you print the
  15519.      label.
  15520.  
  15521.      Labels are normally assigned within a databasename.PRO file,
  15522.      as you would generally associate a label with a particular
  15523.      database. However, you can assign labels in PCFILE.PRO if you
  15524.      expect to use them with several databases that share the same
  15525.      field names, or if you only have one database.
  15526.  
  15527.      To assign a label and define the output:
  15528.  
  15529.      1.buttons Choose the Snapshot button. A dialog box with five
  15530.        numbered displays.
  15531.  
  15532.  
  15533.  
  15534.  
  15535.      PC-File Version 7 Users Guide                            261
  15536.  
  15537.  
  15538.      2.Choose the number to which you want to assign the label. A
  15539.        file selection dialog box displays.
  15540.  
  15541.      3.Choose the report upon which the label is based. The output
  15542.        dialog box displays.
  15543.  
  15544.      4.Choose the printer port or file.
  15545.  
  15546.      If you choose file, PC-File prompts you to name the file.
  15547.      Repeat these steps for each snapshot label.
  15548.  
  15549.      Passwords
  15550.  
  15551.      PC-File allows you to define passwords to prohibit access to
  15552.      specific operations within the program. You can define
  15553.      passwords for all your databases, or for specific databases.
  15554.  
  15555.      The passwords do NOT protect databases from being accessed by
  15556.      unauthorized persons. Passwords in PC-File are mainly designed
  15557.      to prevent users from accidentally performing operations that
  15558.      they don't normally do.
  15559.  
  15560.      If you define a password for a particular function, you must
  15561.      enter the correct password when you access that function. For
  15562.      example, if you define a password for adding data, PC-File
  15563.      prompts you for the password when you choose Add on the Edit
  15564.      menu. If you don't enter the correct password, PC-File won't
  15565.      let you add new records.
  15566.  
  15567.      To prohibit access to certain operations within a specific
  15568.      database, define a database profile and determine your
  15569.      passwords within that profile. If you want to prohibit access
  15570.      within all your databases, you can define passwords within the
  15571.      master profile. If you don't define passwords for a database,
  15572.      all users of the database can perform any operation on that
  15573.      database.
  15574.  
  15575.      You can control access to the following operations with
  15576.      passwords:
  15577.  
  15578.        Adding records (Add)
  15579.  
  15580.        Modifying records (Modify)
  15581.  
  15582.        Deleting records (Delete)
  15583.  
  15584.        Opening the database (Read)
  15585.  
  15586.        Accessing the Utilities menu options and the record, modify,
  15587.        and delete macro options (and associated hot keys).
  15588.        (Utilities)
  15589.  
  15590.        Accessing the Print menu options (Print)
  15591.  
  15592.  
  15593.  
  15594.  
  15595.      PC-File Version 7 Users Guide                            262
  15596.  
  15597.  
  15598.      PC-File passwords are from one to three characters long and
  15599.      can include any character on the keyboard. Here are some valid
  15600.      passwords:
  15601.  
  15602.           TED
  15603.  
  15604.           JR
  15605.  
  15606.           911
  15607.  
  15608.           ?%#
  15609.  
  15610.           Hi!
  15611.  
  15612.      Passwords are not case sensitive, so you can type in Ted, ted,
  15613.      or TED for the password TED.
  15614.  
  15615.      If you want, you can use the same password for all password
  15616.      options.
  15617.  
  15618.      NOTE: If you define passwords, write your passwords down
  15619.      somewhere. It's embarrassing to get locked out of your own
  15620.      database.
  15621.  
  15622.      To define passwords:
  15623.  
  15624.      1.Open the appropriate profile.
  15625.  
  15626.      2.Choose the Password command button in the configuration
  15627.        window. The password dialog box displays.
  15628.  
  15629.      3.Type in a password in the text box for each operation that
  15630.        you want to control. Passwords display in the Password
  15631.        dialog box; however, they don't display as you type them in
  15632.        when accessing a restricted part of the program.
  15633.  
  15634.      4.Choose OK.
  15635.  
  15636.      Case Sensitive
  15637.  
  15638.      PC-File normally treats uppercase and lowercase letters the
  15639.      same throughout the program. However, you can require that PC-
  15640.      File distinguish between the two during searches and/or sorts.
  15641.  
  15642.      With case sensitive searching, PC-File finds records based
  15643.      precisely on how you enter the search criteria. For example,
  15644.      if you request all records for WALLA WALLA, records for Walla
  15645.      Walla and walla walla are not displayed as a result of the
  15646.      search.
  15647.  
  15648.  
  15649.  
  15650.  
  15651.      PC-File Version 7 Users Guide                            263
  15652.  
  15653.  
  15654.      With case sensitive indexing, PC-File sorts records based on
  15655.      the rule that uppercase letters precede lowercase letters. For
  15656.      example, BOTHELL would come before Bellevue, as an uppercase O
  15657.      comes before a lowercase e. For the same reason, anchorage
  15658.      would follow Tacoma in a sorted list, and les Baux would
  15659.      follow Zurich. If you change case sensitivity, you have to
  15660.      rebuild existing indexes, using the Index option on the File
  15661.      menu, for the change to take effect.
  15662.  
  15663.      To turn case sensitivity ON:
  15664.  
  15665.      1.Place a check in the appropriate box by choosing it.
  15666.  
  15667.      Generally, if you want case sensitivity, you would select it
  15668.      for both searches and sorts.
  15669.  
  15670.      Default Database
  15671.  
  15672.      If you use a particular database all or most of the time, you
  15673.      can prompt PC-File to open that database for you automatically
  15674.      when you start PC-File.
  15675.  
  15676.      Define a database default in the master profile (PCFILE.PRO)
  15677.      only. Defining a default database in a database profile is
  15678.      redundant, as a specific database profile doesn't get loaded
  15679.      until the database is opened.
  15680.  
  15681.      To enter a default database:
  15682.  
  15683.      1.Type the drive, path, and database name in the appropriate
  15684.        text boxes.
  15685.  
  15686.      Enter only the drive letter; no colon is necessary. However,
  15687.      the backslash is necessary before a directory name.
  15688.  
  15689.      You can define just the drive or just the drive and directory
  15690.      if you want. A default path provides a shortcut if you use
  15691.      several databases regularly that are located on the same drive
  15692.      or even in the same directory. It makes opening the database
  15693.      just a little bit quicker.
  15694.  
  15695.      Advanced Profile Parameters
  15696.  
  15697.      Configuration profiles are relatively easy to understand and
  15698.      define when viewed in the configuration window. However, a
  15699.      profile can also be edited or viewed with a text editor (or
  15700.      word processing program). Profiles viewed through a text
  15701.      editor display the parameters as commands, rather than
  15702.      buttons, check boxes, or other forms that they take in the
  15703.      configuration window. For example, to select a printer port in
  15704.      the configuration window, you choose one of the seven option
  15705.      buttons. The same
  15706.      parameter is represented by the command /PRPORT,x (where x is
  15707.      the name of the printer port) when viewed with a text editor.
  15708.  
  15709.  
  15710.  
  15711.  
  15712.      PC-File Version 7 Users Guide                            264
  15713.  
  15714.  
  15715.      The major reason for accessing a configuration profile with a
  15716.      text editor is that you can add several parameters here that
  15717.      you can't add in the configuration window.
  15718.  
  15719.      Editing a Profile With a Text Editor
  15720.  
  15721.      To edit a profile with a text editor, start the editor and
  15722.      open the appropriate .PRO file. You will see a file that looks
  15723.      like this:
  15724.  
  15725.      /VIEW,R
  15726.      /PAGELEN,66
  15727.      /PHPORT,COM1
  15728.      /PHINIT,ATD
  15729.      /PHLONG,1,
  15730.      /PRPORT,LPT1
  15731.      /PRINTER,No_Codes
  15732.  
  15733.      Only parameters you have changed appear in the file. The
  15734.      defaults are stored within the program and do not show up in
  15735.      this file.
  15736.  
  15737.      You can add parameters to the file by typing them in at the
  15738.      end of the current text. Place each parameter on a separate
  15739.      line.
  15740.  
  15741.      Hidden Profile Commands
  15742.  
  15743.      Several parameters that you can't add in the configuration
  15744.      window can be added when you use an editor. These parameters
  15745.      are:
  15746.  
  15747.      /MEMOW,n
  15748.  
  15749.      Sets the width of the memo field edit window. For example, to
  15750.      set the width of the window to 75, type /MEMOW,75 in your
  15751.      profile. The maximum width is 78 chartacters.
  15752.  
  15753.      /NOSNOW
  15754.  
  15755.      Changes the way PC-File displays on some CGA monitors to
  15756.      prevent flickering or "snow."
  15757.  
  15758.      /NOXMS
  15759.  
  15760.      Prevents PC-File from using extended memory.
  15761.  
  15762.      /NOEMS
  15763.  
  15764.      Prevents PC-File from using expanded memory.
  15765.  
  15766.      /READONLY
  15767.  
  15768.      Sets the default on the Edit menu to Read-only mode.
  15769.  
  15770.      Adding Commands at the DOS Prompt
  15771.  
  15772.  
  15773.  
  15774.  
  15775.      PC-File Version 7 Users Guide                            265
  15776.  
  15777.  
  15778.  
  15779.      You can change any configuration parameter for the current
  15780.      session of PC-File by adding that parameter to the command
  15781.      when you start the program. For example, you could enter pcf
  15782.      /COLOR,4 at the DOS prompt. The command "pcf" starts PC-File
  15783.      and /COLOR,4 tells the program to change the colors for the
  15784.      current session from the current default to black & white.
  15785.      Separate pcf from the rest of the command(s) with a space. If
  15786.      you need to include more than one command, separate each
  15787.      command with a comma (but no space).
  15788.  
  15789.      Entering a configuration command at the DOS prompt overrides
  15790.      the current default, but does not change the setting in the
  15791.      profile. The next time you start PC-File, the original setting
  15792.      takes effect.
  15793.  
  15794.      You can also set up a batch file containing specific
  15795.      configuration parameters that you want to use at specific
  15796.      times. In a batch file, enter all parameters on one line, like
  15797.      this:
  15798.  
  15799.      pcf /NOSNOW, /READONLY, /CHARMODE
  15800.  
  15801.  
  15802.  
  15803.      Configuration Command Summary
  15804.  
  15805.      The following table lists all of the configuration commands.
  15806.      You can enter these commands in a configuration profile file
  15807.      or at the DOS prompt when starting PC-File.
  15808.  
  15809.      Precede all commands with a forward slash (/) and enter the
  15810.      commands in uppercase letters. Commands that take variables
  15811.      are indicated with an x or n following the command. An n
  15812.      indicates a number or string of numbers separated by commas
  15813.      (e.g. /LANDSCAPE, 27,38,108,49,79), an x indicates a string
  15814.      variable. Use a comma between the command and the variable,
  15815.      with no space.
  15816.  
  15817.      For example, to define a password for data entry, you might
  15818.      enter /ADDPW,jdh. The variable, jdh, is the password you are
  15819.      defining.
  15820.  
  15821.      Command Explanation
  15822.  
  15823.      /ADDPW,x Define password for data entry
  15824.  
  15825.      /BOLD,n Define print codes for boldface type
  15826.  
  15827.      /CASEFIND Set case sensitivity for searches
  15828.  
  15829.      /CASESORT Set case sensitivity for sorts
  15830.  
  15831.      /CHARMODE Set character mode of operation
  15832.  
  15833.      /COLOR,n Set color palette
  15834.  
  15835.  
  15836.  
  15837.  
  15838.      PC-File Version 7 Users Guide                            266
  15839.  
  15840.  
  15841.  
  15842.      /CONDENSED,n Define print codes for condensed type
  15843.  
  15844.      /DATEFORMAT,x Define default date format
  15845.  
  15846.      /DELPW,x Define password to allow deletions
  15847.  
  15848.      /DOUBLEWIDE,n Define print codes for wide type
  15849.  
  15850.      /DRIVE,x Define default drive
  15851.  
  15852.      /FILE,x Define default database
  15853.  
  15854.      /ITALIC,n Define print codes for italic type
  15855.  
  15856.      /LANDSCAPE,n Define print codes for landscape format
  15857.  
  15858.      /MEMOW,n Define the default width of the memo field edit
  15859.      window
  15860.  
  15861.      /MODPW,x Define password for Modify mode
  15862.  
  15863.      /NORMAL,n Define print codes for normal type
  15864.  
  15865.      /NOEMS Prevents use of expanded memory
  15866.  
  15867.      /NOXMS Prevents use of extended memory
  15868.  
  15869.      /NOSNOW Prevents snow on some CGA monitors
  15870.  
  15871.      /PAGELEN,n Define page length
  15872.  
  15873.      /PATH,x Define default path
  15874.  
  15875.      /PHINIT,n Define dialing initialization code
  15876.  
  15877.      /PHPRE,n Define phone line access prefix
  15878.  
  15879.      /PHPORT,x Define modem port
  15880.  
  15881.      /PHLONG,n Define long distance code
  15882.  
  15883.      /PORTRAIT,n Define print codes for portrait print
  15884.  
  15885.      /POSTSCRIPT Set for PostScript output
  15886.  
  15887.      /PRINTPW,x Define password to allow access to Print menu
  15888.  
  15889.      /PROPORTIONAL,n Define print codes for proportional font
  15890.  
  15891.      /PRPORT,x Define printer port
  15892.  
  15893.      /READONLY Set read-only mode as default
  15894.  
  15895.      /SNAP1,x Assign first snapshot label report
  15896.  
  15897.  
  15898.  
  15899.  
  15900.      PC-File Version 7 Users Guide                            267
  15901.  
  15902.  
  15903.      /SNAP2,x Assign second snapshot label report
  15904.  
  15905.      /SNAP3,x Assign third snapshot label report
  15906.  
  15907.      /SNAP4,x Assign fourth snapshot label report
  15908.  
  15909.      /SNAP5,x Assign fifth snapshot label report
  15910.  
  15911.      /SYSPW,x Define password to allow access to Utilities menu
  15912.  
  15913.      /UNDERLINE,n Define print codes for underlined type
  15914.  
  15915.      /USEPW,x Define password to open database
  15916.  
  15917.      /USER1,n Enter user-defined print codes
  15918.  
  15919.      /USER2,n Enter user-defined print codes
  15920.  
  15921.      /USER3,n Enter user-defined print codes
  15922.  
  15923.      /USER4,n Enter user-defined print codes
  15924.  
  15925.      /USER5,n Enter user-defined print codes
  15926.  
  15927.  
  15928.      If you are using a profile defined in a previous version of
  15929.      PC-File, some commands may appear that are not described on
  15930.      the list above. These commands, such as /FG (foreground
  15931.      colors) and /BG (background colors), have been replaced or
  15932.      phased out. They are ignored by the program.
  15933.  
  15934.  
  15935.      Packing a Database
  15936.  
  15937.      When you delete records, PC-File removes the records from view
  15938.      and internally marks them as deleted, but they remain in the
  15939.      database file (.DBF). This allows you to reclaim accidentally
  15940.      deleted records using the Undelete option on the Edit menu.
  15941.      The marked records are still counted as part of the database
  15942.      after deleting them. This is reflected in the number of
  15943.      records displayed at the bottom of the main screen and printed
  15944.      in reports.
  15945.  
  15946.      To remove deleted records from the database permenantly, you
  15947.      mus use the Pack option on the Utilities menu.
  15948.  
  15949.      If the database has memo fields, packing also affects the size
  15950.      of a database's .DBT file by removing any unused memo entries
  15951.      from the .DBT file. Unused memo entries can arise (1) if
  15952.      records with memo entries are deleted, or (2) if a memo is
  15953.      edited in such a way that the disk space the memo originally
  15954.      occupied cannot be reused.
  15955.  
  15956.      How Packing Works
  15957.  
  15958.  
  15959.  
  15960.  
  15961.      PC-File Version 7 Users Guide                            268
  15962.  
  15963.  
  15964.      First, PC-File renames the original database to a temporary
  15965.      name. Then, the active records are copied to new files using
  15966.      the original file names. At minimum, the active records in the
  15967.      .DBF file are copied. If your database has memo fields, the
  15968.      active memos in the .DBT file are also copied. Because packing
  15969.      generates new data files without deleting the originals,
  15970.      completing the packing operation requires about as much
  15971.      available disk space as the original database occupied (this
  15972.      can be somewhat less depending on how many records and memo
  15973.      entries will be removed by packing). Once the .DBF and .DBT
  15974.      files are packed, PC-File rebuilds all indexes for the
  15975.      database and returns you to the database, if the database was
  15976.      open when you started packing. If the database was not open
  15977.      when you started packing, indexes are rebuilt the next time
  15978.      the database is opened.
  15979.  
  15980.      If you have a large database, packing may take a long time.
  15981.      This will vary depending on the number of records removed, the
  15982.      complexity of the indexes that need to be rebuilt, and the
  15983.      speed of your system. In this case, you may want to consider
  15984.      running the packing operation overnight.
  15985.  
  15986.      PC-File renames the original database files to names in the
  15987.      format TMPnnnn.xxx, where "nnnnn" is some number that will
  15988.      create unique file names and "xxx" is the appropriate
  15989.      extension (at minimum, .DBF and .HDB, also .DBT if the
  15990.      database has memo fields). PC-File does this as a security
  15991.      measure to ensure that the original database cannot be damaged
  15992.      if you lose power during the packing operation. The TMPnnnn
  15993.      name is displayed in a message that appears at the end of the
  15994.      packing operation. Write
  15995.      down the TMPnnnn name so you can delete the database with the
  15996.      Utilities, File Management option once you are certain the
  15997.      packing operation was successful.
  15998.  
  15999.      To be more secure, you may want to copy the TMP files to a
  16000.      backup disk and rename them to their original names before
  16001.      deleting them. Assuming the files will fit on the drive you
  16002.      copy them to, you can copy and rename in one operation using a
  16003.      DOS command in the form:
  16004.  
  16005.      COPY c:\path\TMPnnnn.* d:\path\originalname.*
  16006.  
  16007.      where "c:\path" is the location of the original file,"TMPnnnn"
  16008.      is the name PC-File displayed at the end of the packing
  16009.      operation, "d:\path" is the drive and path you want to copy
  16010.      to, and "originalname" is the original name of the database.
  16011.      For example, if you packed a file named CLIENTS located on
  16012.      c:\pcfile\data that was renamed TMP27, you could copy and
  16013.      rename the original files to your A drive using this command:
  16014.  
  16015.      COPY c:\pcfile\data\TMP27.* a:CLIENTS.*
  16016.  
  16017.      NOTE: This command only renames the copied files on drive A,
  16018.      the TMP27 files would remain in c:\pcfile\data and those are
  16019.      the files you would delete to free disk space.
  16020.  
  16021.  
  16022.  
  16023.  
  16024.      PC-File Version 7 Users Guide                            269
  16025.  
  16026.  
  16027.  
  16028.      As an alternative to this procedure, you may want to backup
  16029.      your database files before packing.
  16030.  
  16031.      To pack a database:
  16032.  
  16033.      1.Open the database you want to pack. If no database is open
  16034.        when you choose the Pack option, PC-File will prompt you to
  16035.        choose the database you want to pack using the Open a File
  16036.        dialog box.
  16037.  
  16038.      2.Choose Utilities. C
  16039.  
  16040.      3.hoose Pack.
  16041.  
  16042.      4.Choose Yes to start the packing process.
  16043.  
  16044.      5.Note the TMP name of the original database and delete it
  16045.        with the Utilities, File Management option once you are
  16046.        certain that packing was successful. Alternatively, copy all
  16047.        files with this name (.HDB, .DBF, and possibly .DBT) as a
  16048.        backup, before deleting them.
  16049.  
  16050.  
  16051.  
  16052.  
  16053.      PC-File Version 7 Users Guide                            270
  16054.  
  16055.  
  16056.  
  16057.      Repairing a Database
  16058.  
  16059.      The Repair utility exists to correct certain kinds of damage
  16060.      that can occur to a database file. However, you should not
  16061.      assume that the Repair utility can correct all forms of file
  16062.      damage, or that this means you do not have to maintain regular
  16063.      backups of your files. Above all else, making regular backups
  16064.      of your database-ideally as often as the database is modified-
  16065.      is your best means of data security. See "Backing Up Your
  16066.      Database" for some suggestions on ways to back up databases.
  16067.  
  16068.      Even if you backup regularly, there may be times a database
  16069.      file becomes damaged before it has been backed up. In this
  16070.      case, the following procedures might allow you to reclaim a
  16071.      damaged database.
  16072.  
  16073.      Some of the signs that indicate your database file may be
  16074.      damaged are:
  16075.  
  16076.        "Garbage" characters (characters other than letters, numbers
  16077.        or punctuation) appear in your data, or data is lost.
  16078.  
  16079.        PC-File will not open your database (typically PC-File
  16080.        displays an error message with error code 4097 in this
  16081.        case).
  16082.  
  16083.        PC-File displays an error message (typically with error code
  16084.        4097) when making new indexes or re-building old indexes.
  16085.  
  16086.        PC-File indicates fewer records than should be in the
  16087.        database.
  16088.  
  16089.        PC-File cannot locate records you know exist.
  16090.  
  16091.      Preliminary Steps
  16092.  
  16093.      In many cases, the problem lies not in the data file, but in
  16094.      problems with one or more of the index files. This can be
  16095.      caused by someone turning off the computer without properly
  16096.      exiting PC-File (using Exit on the File menu), or by power
  16097.      loss or a power surge while PC-File is running.
  16098.  
  16099.      If PC-File can't open your database, follow the procedures
  16100.      described under "To Repair a Database" below. If PC-File can
  16101.      open the database, try rebuilding the indexes using the
  16102.      following steps before trying anything else:
  16103.  
  16104.      To rebuild all indexes
  16105.  
  16106.      1.Open the database.
  16107.  
  16108.      2.Choose File.
  16109.  
  16110.      3.Choose Index Maintenance.
  16111.  
  16112.  
  16113.  
  16114.  
  16115.      PC-File Version 7 Users Guide                            271
  16116.  
  16117.  
  16118.      4.Choose Rebuild All.
  16119.  
  16120.      If your database continues to have problems, the next thing to
  16121.      check is to make sure that the problem is not due to an error
  16122.      in the way DOS is storing the data file. For example, if DOS's
  16123.      file information indicates that the data file is smaller than
  16124.      it actually is, PC-File will not be able to read all the
  16125.      records in the database. To cover this possibility, the next
  16126.      thing to try is to run the DOS CHKDSK utility using the /F
  16127.      parameter to make sure that DOS's file information is correct.
  16128.  
  16129.      WARNING: Before running CHKDSK /F, you MUST quit all the way
  16130.      out of PC-File using Exit on the File menu and exit any other
  16131.      program running "on top" DOS, such as Microsoft Windows or a
  16132.      menu program. Failure to do so can damage files.
  16133.  
  16134.      To run CHKDSK against your database:
  16135.  
  16136.      1.Make a backup of your database.
  16137.  
  16138.      2.Exit all the way out of PC-File (using Exit on the File
  16139.        menu. DO NOT use CTRL-D or Drop to DOS on the Tools menu)
  16140.        and exit any program running "on top" of DOS such as
  16141.        Microsoft Windows or a menu program.
  16142.  
  16143.      3.Run the DOS CHKDSK /F command to correct logical file errors
  16144.        (refer to your DOS manual for details).
  16145.  
  16146.      4.Rebuild all indexes as described above.
  16147.  
  16148.      NOTE: As an alternative to the above procedure, you can use a
  16149.      third- party utility program (such as Norton Utilities, PC-
  16150.      Tools, SpinRite, etc.) to correct file and disk errors.
  16151.  
  16152.  
  16153.      Using Repair
  16154.  
  16155.      If your database still has problems after trying the two
  16156.      procedures above, damage may have occurred to your database's
  16157.      data files (.DBF and .DBT). The reasons this can happen are
  16158.      numerous, but are typically due to something that damages the
  16159.      magnetic information that is stored on your hard drive or
  16160.      floppy disk. For example:
  16161.  
  16162.      Loss of power during a disk operation.
  16163.  
  16164.      Wear and tear on the hard drive surface
  16165.  
  16166.      Physical shocks and poor handling of the hard drive can cause
  16167.      "head crashes" which literally scrape data from the hard
  16168.      drive's platters. Likewise, floppy disks can eventually wear
  16169.      out or become physically damaged.
  16170.  
  16171.      Magnetic damage, static discharge, or power surges
  16172.  
  16173.  
  16174.  
  16175.  
  16176.      PC-File Version 7 Users Guide                            272
  16177.  
  16178.  
  16179.      These environmental influences can erase or corrupt the
  16180.      magnetic information on a disk.
  16181.  
  16182.      "Track Drift" or old formatting
  16183.  
  16184.      When you first purchased your hard drive, it was either
  16185.      formatted at the factory or by a technician. The formatting is
  16186.      the filing system that shows your computer where it can store
  16187.      new files and keeps track of where old files are stored. Over
  16188.      time the tracks of the formatting can drift as the bearings of
  16189.      the hard drive wear, or the formatting (which is magnetic
  16190.      information itself) can fade or become damaged.
  16191.  
  16192.      Hardware errors in the disk controller
  16193.  
  16194.      The disk controller, the part of your computer which controls
  16195.      all access to disk drives, can damage or lose files if it
  16196.      isn't working properly.
  16197.  
  16198.      Program errors
  16199.  
  16200.      An error in any program, or conflicts between simultaneously
  16201.      running programs, can potentially damage disk information.
  16202.      Errors and conflicts which damage files can occur when
  16203.      software accesses the disk, or causes a conflict in RAM. This
  16204.      includes any of the following: application software, such as
  16205.      databases, spreadsheets, or word processors; errors or
  16206.      conflicts with memory-resident software (TSR's and device
  16207.      drivers) such as screen blankers, disk caching, task
  16208.      switching, menus or shells, memory
  16209.      management programs, or drivers for special hardware support;
  16210.      or errors in operating system software, DOS's or windowing
  16211.      OS's.
  16212.  
  16213.      If the damage was relatively minor, and there is no ongoing
  16214.      hardware problem or disk formatting error, you can generally
  16215.      repair damage with the following steps.
  16216.  
  16217.  
  16218.      To Repair a database:
  16219.  
  16220.      1.Make a backup copy of your database.
  16221.  
  16222.      2.Run the DOS CHKDSK /F command on the disk where your data
  16223.        resides directly from the DOS command line.
  16224.  
  16225.      3.WARNING: You MUST fully exit PC-File using Exit on the File
  16226.        menu-NOT CTRL-D or Drop to DOS on the Tools menu. Fully exit
  16227.        any other programs running "on top" of DOS, such as Windows
  16228.        or menu programs, before running the CHKDSK /F command-
  16229.        failure to do so could cause further problems.
  16230.  
  16231.      4.Correct any problems the CHKDSK command reports before
  16232.        proceeding. Refer to your DOS manual for details on the
  16233.        CHKDSK command.
  16234.  
  16235.  
  16236.  
  16237.  
  16238.      PC-File Version 7 Users Guide                            273
  16239.  
  16240.  
  16241.      5.Start PC-File and open the damaged database using the File,
  16242.        Open menu sequence. If PC-File will not open the database,
  16243.        proceed to step 4.
  16244.  
  16245.      6.Choose Utilities.
  16246.  
  16247.      7.Choose Repair. If you were unable to open the database in
  16248.        step 3, a file selection dialog box is displayed. Choose the
  16249.        database to repair at this point and choose OK.
  16250.  
  16251.      8.Choose Yes to scan for illegal characters.
  16252.  
  16253.      A status box displays showing the rate of progress. Some
  16254.      errors are automatically repaired. These errors and repairs
  16255.      are reported as they are encountered. Other errors present an
  16256.      option in this format:
  16257.  
  16258.           Error: This database has: problem
  16259.  
  16260.           PC-File can attempt to repair this problem, but doing so
  16261.           might further damage the database.
  16262.  
  16263.           If you have not made a backup of this database DO NOT
  16264.           choose Yes to proceed.
  16265.  
  16266.           If you have made a backup, you can safely choose Yes.
  16267.  
  16268.           Should PC-File attempt this repair? (Yes/No/Cancel)
  16269.  
  16270.      where "problem" is a brief description of the error in
  16271.      question. Correcting errors of this type might cause further
  16272.      damage to the database, because PC-File has to make certain
  16273.      assumptions that might be incorrect. You should only proceed
  16274.      with these options if you performed all preliminary steps:
  16275.      making a backup and correcting file errors with CHKDSK /F or a
  16276.      third-party utility program.
  16277.  
  16278.      An information box displays at the end of the Repair process
  16279.      indicating what repairs were done. PC-File tests the indexes
  16280.      and rebuilds them, if necessary.
  16281.  
  16282.      If your database still has problems after performing all of
  16283.      the above procedures, try packing the database as described in
  16284.      the section "Packing a Database." Only do this after trying
  16285.      all of the above procedures. If using Repair seemed to make
  16286.      the problems worse (this is possible if the assumptions Repair
  16287.      uses are inappropriate for the detected problem), restore a
  16288.      backup of your database before packing. Packing generates a
  16289.      new copy of the database, which can correct some problems that
  16290.      Repair
  16291.      does not correct due to risk to the original file.
  16292.  
  16293.  
  16294.  
  16295.  
  16296.      PC-File Version 7 Users Guide                            274
  16297.  
  16298.  
  16299.      If you still have problems after performing all the above,
  16300.      your file might be irrevocably damaged. Repair utilities such
  16301.      as Ashton-Tate's dBASE File Recovery, or other dBASE file
  16302.      recovery programs can perform more involved repair procedures
  16303.      that might allow you to reclaim the database. It is also
  16304.      possible that hardware or disk errors might be the source of
  16305.      the problem-run a diagnostic program or contact a technician
  16306.      if you suspect this is the source of your problem. Assuming
  16307.      your hardware is fine and your database cannot be recovered
  16308.      with PC-File's Repair command, Pack command, or a third- party
  16309.      repair utility, your only recourse is to restore your most
  16310.      recent backup of the database.
  16311.  
  16312.      Database Description
  16313.  
  16314.      PC-File lets you print a description of your database, listing
  16315.      the fields and the relevant information about each field. Data
  16316.      contained in the fields is not printed, just information on
  16317.      the fields. This feature can be useful when redefining or
  16318.      creating a database, or just as a reminder of field length and
  16319.      type. In fact, it's a good idea to keep on hand a printed
  16320.      description of each of your databases.
  16321.  
  16322.      The Datebase Description has five main parts:
  16323.  
  16324.      Database Structure
  16325.  
  16326.      This section shows the database's field names, a letter for
  16327.      the field type (C=Character, N=Numeric, D=Date, L=Logical, and
  16328.      M=Memo), the data length, and decimal place (only for numeric
  16329.      fields).
  16330.  
  16331.      Indexes
  16332.  
  16333.      This section shows the index search field, followed by the
  16334.      description with the index dBASE expression under it.
  16335.  
  16336.      Field Attributes
  16337.  
  16338.      This section lists any fields that have field attributes
  16339.      assigned, which attributes are associtated with the field, and
  16340.      the "when" assignments for the each attribute.
  16341.  
  16342.      List of Views
  16343.  
  16344.      This section lists all views in the database and their type.
  16345.  
  16346.      Pictures of Custom Record Views
  16347.  
  16348.      If there are any Custom Record views defined for the database
  16349.      a "picture" of each view is printed. If there are no Custom
  16350.      Record views, this section is omitted.
  16351.  
  16352.      The Database Description option gives you three output
  16353.      options:
  16354.  
  16355.  
  16356.  
  16357.  
  16358.      PC-File Version 7 Users Guide                            275
  16359.  
  16360.  
  16361.      Printer Prints your database's description using the printer
  16362.      indicated by the current profile.
  16363.  
  16364.      Screen Displays your database's description on screen
  16365.  
  16366.      Disk Stores your database's description in a disk file
  16367.  
  16368.      To produce a database description:
  16369.  
  16370.      1.Choose Utilities.
  16371.  
  16372.      2.Choose Ddatabase Description.
  16373.  
  16374.      3.Choose the database you want a description of, if no
  16375.        database is currently open.
  16376.  
  16377.      4.Choose Printer to print your database description. Or...
  16378.        Choose Screen to display your database description on
  16379.        screen. Or... Choose Disk to store your database description
  16380.        in a disk file, type the file name, and choose OK.
  16381.  
  16382.  
  16383.  
  16384.  
  16385.      PC-File Version 7 Users Guide                            276
  16386.  
  16387.  
  16388.  
  16389.      CHAPTER 14 PRINTING LABELS WITH PC-LABEL
  16390.  
  16391.      PC-Label is unique in that it can be accessed from both the
  16392.      menu and the DOS prompt. This chapter provides information on
  16393.      accessing and using PC-Label.
  16394.  
  16395.  
  16396.  
  16397.      Introduction
  16398.  
  16399.      A mailing label utility is one of the most-commonly used
  16400.      features of a database program. PC-File provides an easy-to-
  16401.      use labels program, PC- Label, that lets you produce mailing
  16402.      labels on almost any stock available. Over a dozen label
  16403.      templates are provided, and you can create your own for those
  16404.      that aren't.
  16405.  
  16406.      PC-Label is actually a separate program that runs with PC-
  16407.      File. In previous versions of PC-File, it was only accessible
  16408.      from the DOS prompt. You can now access PC-Label from the PC-
  16409.      File menu bar as well as from the DOS prompt.
  16410.  
  16411.      NOTE: The mouse is NOT functional within PC-Label, so don't be
  16412.      surprised if you don't see a pointer on the screen when using
  16413.      it.
  16414.  
  16415.      Creating and Printing Mailing Labels
  16416.  
  16417.      The ability to generate mailing labels is one of the most
  16418.      important and useful features of a database program. PC-File
  16419.      provides three options for producing mailing labels. You may
  16420.      find yourself using all three at different times. Choose the
  16421.      method that will do the job you want.
  16422.  
  16423.      Snapshot labels
  16424.  
  16425.      You can print out a single label while entering or displaying
  16426.      a record in a database. This is most useful when you want to
  16427.      print a label as needed or keep track of needed labels one at
  16428.      a time. See Chapter 11, "Utilities," to set up the snapshot
  16429.      label format in your configuration profile, and Chapter 13,
  16430.      "Tools," for information on printing a snapshot label.
  16431.  
  16432.      Single column labels in Reports
  16433.  
  16434.      Use the mailing label format in the Reports option to print
  16435.      out single column labels. Only a minimum amount of formatting
  16436.      is necessary, making this an easy way to print labels if you
  16437.      aren't using multi-column labels. See Chapter 7, "Creating
  16438.      Reports," for more information.
  16439.  
  16440.      PC-Label
  16441.  
  16442.  
  16443.  
  16444.  
  16445.      PC-File Version 7 Users Guide                            277
  16446.  
  16447.  
  16448.      This program, which can be run from the PC-File menu bar or
  16449.      from the DOS prompt, provides the most flexibility. You can
  16450.      set up a template for any label format, compress out lines and
  16451.      spaces, and add text to the labels. PC-Label also handles
  16452.      other kinds of files, not just those from PC-File databases;
  16453.      these include PC-Type, PC- Calc+, and comma-delimited files.
  16454.  
  16455.      This chapter covers only the PC-Label utility.
  16456.  
  16457.      Starting PC-Label
  16458.  
  16459.      PC-Label can be run from within PC-File or from the DOS
  16460.      prompt. If you start within PC-File, the program drops you out
  16461.      to PC-Label. The program works the same way, no matter where
  16462.      you start it from.
  16463.  
  16464.      To start PC-Label from the PC-File menu bar:
  16465.  
  16466.      1.Open the database you want to use.
  16467.  
  16468.      2.Choose Utilities from the menu bar
  16469.  
  16470.      3.Choose Labels from the Utilities menu. The PC-Label Main
  16471.        menu appears.
  16472.  
  16473.      To start PC-Label from the DOS prompt:
  16474.  
  16475.      1.Move to the directory that contains your PC-File program
  16476.        files.
  16477.  
  16478.      2.Type pclabel at the DOS prompt and press ENTER. You can add
  16479.        a file specification to your start command if you have an
  16480.        existing label definition and plan to use it immediately.
  16481.        For example, you might enter pclabel c:\pcfile\members.lbl
  16482.        to start up the label program and load the members.lbl label
  16483.        definition at the same time. Otherwise, you can load the
  16484.        defined label once you start the label program.
  16485.  
  16486.      If you have a graphics monitor that doesn't support color (not
  16487.      just a standard monochrome screen), enter pclabel /green at
  16488.      the prompt to set your colors to black and white.
  16489.  
  16490.      Once you start PC-Label, the PC-Label Main Menu appears.
  16491.  
  16492.      The PC-Label Main Menu
  16493.  
  16494.      All options necessary to create and print labels are provided
  16495.      from the Main Menu. The options are defined as follows:
  16496.  
  16497.      Load existing setup
  16498.  
  16499.      If you have created a label definition in the past, you can
  16500.      load that definition and start printing labels.
  16501.  
  16502.      Define/modify setup
  16503.  
  16504.  
  16505.  
  16506.  
  16507.      PC-File Version 7 Users Guide                            278
  16508.  
  16509.  
  16510.      Use this option to define the parameters for a label. The
  16511.      parameters include the label dimensions, number of labels
  16512.      across the page, label layout, number of copies of each label
  16513.      you want printed, and several other factors that determine how
  16514.      your labels will look.
  16515.  
  16516.      Print labels
  16517.  
  16518.      Once you have loaded or defined a label definition, you can
  16519.      print the labels.
  16520.  
  16521.      Save current setup
  16522.  
  16523.      Unless you know you will never print labels again, save your
  16524.      label definition for future use. The label definition is saved
  16525.      to a file with the extension .LBL. Like a report file, this
  16526.      file contains the definition only (essentially a list of the
  16527.      parameters you defined in the setup), not the actual data that
  16528.      prints on each label.
  16529.  
  16530.      Quit/Exit PC-Label
  16531.  
  16532.      Exit from PC-Label when you have finished. You will return to
  16533.      where you came from, either the PC-File menu bar or the DOS
  16534.      prompt.
  16535.  
  16536.      The first four options on the menu are covered in detail
  16537.      below.
  16538.  
  16539.      Loading an Existing Label Setup
  16540.  
  16541.      Use the Load existing setup option to load a label definition
  16542.      that has been previously defined. Once the setup is loaded,
  16543.      choose Define/modify setup to modify the setup. Choose Print
  16544.      labels to print a set of labels.
  16545.  
  16546.      If you want to use an existing label setup with a new
  16547.      database, load that setup and change only the Label source
  16548.      location (database path and name) parameter on the setup
  16549.      screen. Then save the setup and give it a new name.
  16550.  
  16551.      To load an existing label setup:
  16552.  
  16553.      Choose Load existing setup on the PC-Label Main Menu.
  16554.  
  16555.      Enter the path and label filename in the edit box. You don't
  16556.      need to enter the .LBL extension. If the label file resides on
  16557.      the current directory, just enter the file name, without a
  16558.      path. The program assumes the current directory. As an
  16559.      alternative, just enter the path for the label file. The
  16560.      program displays a list of the label files on that directory,
  16561.      from which you can choose the one you want.
  16562.  
  16563.      Defining or Modifying a Setup
  16564.  
  16565.  
  16566.  
  16567.  
  16568.      PC-File Version 7 Users Guide                            279
  16569.  
  16570.  
  16571.      You must define a setup before you can print labels. A label
  16572.      setup is defined on the setup screen, a menu of over a dozen
  16573.      parameters that determine the format and look of your labels.
  16574.      To display the setup screen, choose Define/modify setup on the
  16575.      PC-Label Main Menu.
  16576.  
  16577.      The settings for each parameter are shown in the center of the
  16578.      screen. A window of helpful information appears on the right.
  16579.      The information is pertinent to the setting currently
  16580.      highlighted, and changes as you move through the settings.
  16581.  
  16582.      Most of the parameters have default settings already in place.
  16583.      You can leave or change these defaults. To change a default or
  16584.      enter new information, highlight the appropriate field, then
  16585.      press ENTER. Pressing ENTER activates the field. Once you do
  16586.      this, one of four things happens:
  16587.  
  16588.        An edit window displays, allowing you to enter information
  16589.  
  16590.        The field toggles to another option
  16591.  
  16592.        A menu of options displays, allowing you to choose one
  16593.  
  16594.        A new screen appears, allowing further input
  16595.  
  16596.      It is important that you check each parameter and make sure
  16597.      the settings are correct for your needs. At the bare minimum,
  16598.      however, give attention to three parameters:
  16599.  
  16600.        Label Source Location
  16601.  
  16602.        Label Sheet definition
  16603.  
  16604.        Label layout
  16605.  
  16606.      You can't print a label unless you have defined these
  16607.      parameters. All the parameters are covered in detail below.
  16608.  
  16609.      To define a label setup:
  16610.  
  16611.      1.Choose Define label setup from the PC-Label Main Menu.
  16612.  
  16613.      2.Choose a Label Source Type and enter a Label Source
  16614.        Location, if it isn't filled in already. PC-Label won't
  16615.        allow you to make other changes or entries without first
  16616.        choosing the database you are using.
  16617.  
  16618.      3.Define any other options according to your needs. Most
  16619.        important are the Label Sheet definition and Label layout
  16620.        options. You can't print labels without laying out the
  16621.        label. For all options on the Setup screen, highlight the
  16622.        option and press ENTER to make any changes to it.
  16623.  
  16624.      4.Press F10 when you finish to return to the PC-Label Main
  16625.        Menu.
  16626.  
  16627.  
  16628.  
  16629.  
  16630.      PC-File Version 7 Users Guide                            280
  16631.  
  16632.  
  16633.      5.Unless you know you will use this setup only once, save it
  16634.        by choosing Save current setup from the Main Menu.
  16635.  
  16636.      To modify a label setup:
  16637.  
  16638.      1.Choose Load existing setup from the PC-Label Main Menu.
  16639.  
  16640.      2.Choose the label file you want to modify.
  16641.  
  16642.      3.Choose Define/modify setup from the PC-Label Main Menu.
  16643.  
  16644.      4.Make your changes to the setup.
  16645.  
  16646.      5.Press F10 to return to the Main Menu.
  16647.  
  16648.      6.Choose Save current setup from the menu.
  16649.  
  16650.      7.Press ENTER twice to save the setup with the same name.
  16651.  
  16652.      An explanation of each parameter on the setup screen follows.
  16653.  
  16654.      Label Source Type
  16655.  
  16656.      Choose the type of data file that you are using for your
  16657.      source. In most cases, you will use the default of PC-File,
  16658.      which includes all recent versions of PC-File and dBASE.
  16659.  
  16660.      PC-Label lets you use any of the following types of data
  16661.      files:
  16662.  
  16663.      PC-File 7
  16664.  
  16665.      This is the default option that is used to print labels with
  16666.      PC- File 7 databases. The following options are only used with
  16667.      files produced by other ButtonWare programs and ASCII files.
  16668.  
  16669.      PC-File 6
  16670.  
  16671.      Along with databases created in PC-File 6.0, 5.0, and PC-
  16672.      File:dB, this format includes dBASE III, dBASE III Plus, and
  16673.      dBASE IV files. PC-Label looks for a file with a .DBF
  16674.      extension.
  16675.  
  16676.      PC-File+
  16677.  
  16678.      This earlier version of PC-File used files with extensions
  16679.      .DTA, .HDR, and .INX. PC-Label looks for all three types of
  16680.      files when you use this format.
  16681.  
  16682.      PC-Calc+
  16683.  
  16684.      ButtonWare's spreadsheet program files use the file extension
  16685.      .PCC.
  16686.  
  16687.      Comma-delimited
  16688.  
  16689.  
  16690.  
  16691.  
  16692.      PC-File Version 7 Users Guide                            281
  16693.  
  16694.  
  16695.      Files of this type consist of data fields separated by commas.
  16696.      Often, double quotation marks are used around each field in
  16697.      addition to the commas. A carriage return ends each record,
  16698.      occasionally with a line feed as well.
  16699.  
  16700.      ASCII-L
  16701.  
  16702.      Files of this type consist of fixed length fields with no
  16703.      separators between them. Each record ends with a carriage
  16704.      return and sometimes a line feed. PC-Label prompts you to set
  16705.      the length of each field when you get ready to print. Indicate
  16706.      the length of each field by filling the space with a different
  16707.      character (letter) from the keyboard.
  16708.  
  16709.      ASCII-C
  16710.  
  16711.      Files of this type consist of one field on each line. Each
  16712.      record is separated by one or more blank lines.
  16713.  
  16714.      To set the Label Source Type:
  16715.  
  16716.      1.Highlight the Label Source type field.
  16717.  
  16718.      2.Press ENTER repeatedly to toggle through the list of source
  16719.        types. PC-File is the default.
  16720.  
  16721.      Label Source Location
  16722.  
  16723.      The Label Source Location is the actual file that contains the
  16724.      data for the labels. PC-Label requires both the path and the
  16725.      database name. Don't use any file extension.
  16726.  
  16727.      If you opened a database before starting Labels from the menu
  16728.      bar in PC-File, the path and database name are displayed here
  16729.      already.
  16730.  
  16731.      To enter the label source:
  16732.  
  16733.      1.Highlight the Label Source Location field and press ENTER.
  16734.  
  16735.      2.Enter the path and database name in the edit window at the
  16736.        bottom of the screen. The file extension is not necessary
  16737.        unless PC-Label prompts you for it. For example, type
  16738.        c:\pcfile\sample\members.  As an alternative, enter just the
  16739.        path and press ENTER. A list of the databases in the
  16740.        directory displays. Choose the database you want.
  16741.  
  16742.      3.If the database is in the current directory, press ENTER to
  16743.        bypass the edit window and display the menu of databases; or
  16744.        just type the name of the database in the edit window.
  16745.  
  16746.      NOTE: If you select comma-delimited, ASCII-L, or ASCII-C as
  16747.      the source type, you have to indicate a file extension. For
  16748.      example, if your comma-delimited file has the extension .WS,
  16749.      type ws when prompted for the extension.
  16750.  
  16751.  
  16752.  
  16753.  
  16754.      PC-File Version 7 Users Guide                            282
  16755.  
  16756.  
  16757.      Define Search (and switch indexes)
  16758.  
  16759.      PC-Label lets you print all the records in the database, or a
  16760.      selected group of them. The default is to print all the
  16761.      records. To print a selected group, choose this option and
  16762.      define the group you want to select.
  16763.  
  16764.      The Define Search option also lets you change indexes for a
  16765.      PC-File database. If you have multiple indexes, use this
  16766.      option to select an alternate index. The new index changes the
  16767.      order of the labels during printing.
  16768.  
  16769.      The procedures for defining the search vary slightly,
  16770.      depending on the type of database file you are using. The
  16771.      procedures for a PC-File file are spelled out first, followed
  16772.      by the procedures for all other types of files.
  16773.  
  16774.      To define the search for PC-File databases or to change
  16775.      indexes:
  16776.  
  16777.      1.Highlight the Define Search field and press ENTER. A menu
  16778.        listing the indexes in your database appears. The current
  16779.        index is highlighted.
  16780.  
  16781.      2.Choose the index for the order you want to print in. A menu
  16782.        appears, providing options for selecting records. If you
  16783.        just wanted to change indexes, press ENTER to return to the
  16784.        setup screen. Otherwise, proceed to the next step.
  16785.  
  16786.      3.Choose the type of search you want to conduct. For Simple
  16787.        searches, highlight the appropriate field and press ENTER.
  16788.        Enter the string of data you want the program to search for
  16789.        in selecting records. For Formula searches, enter the search
  16790.        command in the edit window at the bottom of the screen.
  16791.  
  16792.      PC-Label supports all of the search capabilities of PC-File.
  16793.      See Chapter 5, "Finding and Modifying Data," for more
  16794.      information on conducting searches.
  16795.  
  16796.      To define the search for other types of databases:
  16797.  
  16798.      1.Highlight the Define Search field and press ENTER. A menu
  16799.        appears, providing search options.
  16800.  
  16801.      2.Choose the type of search you want to conduct. For Simple
  16802.        searches, highlight the appropriate field and press ENTER.
  16803.        Enter the string of data you want the program to search for
  16804.        in selecting records. For Formula searches, enter the search
  16805.        command in the edit window at the bottom of the screen.
  16806.  
  16807.      Output Destination
  16808.  
  16809.      PC-Label lets you print to a printer or to a file. Use the
  16810.      Output destination option to set the port to which your
  16811.      printer is connected or to name the file.
  16812.  
  16813.  
  16814.  
  16815.  
  16816.      PC-File Version 7 Users Guide                            283
  16817.  
  16818.  
  16819.      The default for this field is LPT1, the first parallel port.
  16820.      Most dot matrix and laser printers use LPT1. However, printers
  16821.      can be connected to LPT2 or to a serial (COM) port.
  16822.  
  16823.      Printing your labels to a file can be useful for a couple of
  16824.      reasons. You can edit the labels with a word processing
  16825.      program. You can also print the labels directly from the file
  16826.      using the DOS PRINT command and continue working in the
  16827.      database at the same time.
  16828.  
  16829.      NOTE: Be sure you have enough space on your disk if you print
  16830.      labels to a file. A large database of names can take up a lot
  16831.      of space.
  16832.  
  16833.      To set an alternative printer port:
  16834.  
  16835.      1.Highlight the Output destination field and press ENTER.
  16836.  
  16837.      2.Press ENTER again when asked for a file extension.
  16838.  
  16839.      3.When prompted for the path, press ENTER.
  16840.  
  16841.      4.When prompted for the file name, enter the printer port
  16842.        device name. For example, type lpt2 to print to the second
  16843.        parallel port.
  16844.  
  16845.      NOTE: If you want to print to a serial port, such as COM1, be
  16846.      sure to initialize your printer by using the DOS MODE command.
  16847.      Consult your DOS manual for further instructions on this
  16848.      procedure.
  16849.  
  16850.      To print to a file:
  16851.  
  16852.      1.Highlight the Output destination field and press ENTER.
  16853.  
  16854.      2.Enter the file extension (without the period) of the file to
  16855.        which you want to print the labels. For example, type txt in
  16856.        the edit window and press ENTER. Leave this blank if no file
  16857.        extension is desired. Just be sure that if you want to
  16858.        access the file with a word processing program, the
  16859.        extension is compatible with that program.
  16860.  
  16861.      3.Enter the path name when prompted. Press ENTER to bypass the
  16862.        path if you want to be in the current directory.
  16863.  
  16864.      4.Choose a file from the list that PC-Label displays. Normally
  16865.        you'll choose New File from this list.
  16866.  
  16867.      5.Name the file if you are creating a new file, and press
  16868.        ENTER.
  16869.  
  16870.      No. of Copies
  16871.  
  16872.      You can print up to 99 copies of your labels. If you want to
  16873.      print more copies than that, you will have to choose the print
  16874.      option more than once.
  16875.  
  16876.  
  16877.  
  16878.  
  16879.      PC-File Version 7 Users Guide                            284
  16880.  
  16881.  
  16882.  
  16883.      The default is 1.
  16884.  
  16885.      To define the number of copies:
  16886.  
  16887.      1.Highlight the No. of copies field and press ENTER.
  16888.  
  16889.      2.Enter the number of copies in the edit window at the bottom
  16890.        of your screen.
  16891.  
  16892.      Copies Definition
  16893.  
  16894.      PC-Label ignores this option unless you choose to print more
  16895.      than one copy of your labels. If you do print multiple copies,
  16896.      you can print them one of two ways: By Group or By Label.
  16897.  
  16898.      By Group
  16899.  
  16900.      PC-Label prints all of the records once, then prints the
  16901.      entire group again, repeating until the desired number of
  16902.      copies has been printed. Thus, if you decided to print five
  16903.      copies of your labels, the entire set of labels would print
  16904.      out once, then again and again until you had printed it five
  16905.      times. By Group is the default.
  16906.  
  16907.      By Label
  16908.  
  16909.      PC-Label prints the first record the desired number of times,
  16910.      then prints the second record the desired number of times, and
  16911.      so on until all records are printed the specified number of
  16912.      times. Thus, if you decided to print five copies of your
  16913.      labels, the first record would print five times, then the
  16914.      second record would print five times, and so on.
  16915.  
  16916.      No matter which way you choose, consider changing the Formfeed
  16917.      option (described below) to End of each set. By doing that,
  16918.      the printer kicks out the last sheet of each set of labels
  16919.      before beginning the next set. That way each set of labels
  16920.      would be on separate sheets. However, that option can also
  16921.      prove to be wasteful of labels.
  16922.  
  16923.      To define how additional copies are printed:
  16924.  
  16925.      Highlight the Copies definition field. Press ENTER to toggle
  16926.      between the two options.
  16927.  
  16928.      Compress Blank Lines
  16929.  
  16930.      Line compression is important for maintaining the appearance
  16931.      of your labels. Without line compression, you can end up with
  16932.      blank lines in many of the labels. For example, if you're
  16933.      printing five lines of information, and one line is empty for
  16934.      a particular record, line compression prevents PC-Label from
  16935.      leaving a gaping hole in that label.
  16936.  
  16937.  
  16938.  
  16939.  
  16940.      PC-File Version 7 Users Guide                            285
  16941.  
  16942.  
  16943.      Line compression removes blank lines from within a label and
  16944.      replaces them at the end of the label. That way the number of
  16945.      lines in a label remains constant, maintaining the proper
  16946.      formatting for the entire sheet.
  16947.  
  16948.      The sample labels below illustrate the differences between
  16949.      printing labels with line compression and without line
  16950.      compression.
  16951.  
  16952.      Compress Blank Lines YES
  16953.           Janet Ratite
  16954.  
  16955.           438 Savannah Way
  16956.           Seattle, WA 98103
  16957.  
  16958.           Robert T. Hare
  16959.           Rapid Flo Corp.
  16960.           8900 Brushwood Avenue
  16961.           Redmond, WA 98052
  16962.  
  16963.      Compress Blank Lines NO
  16964.  
  16965.  
  16966.           Janet Ratite
  16967.           438 Savannah Way
  16968.           Seattle, WA 98103
  16969.  
  16970.  
  16971.           Robert T. Hare
  16972.           Rapid Flo Corp.
  16973.           8900 Brushwood Avenue
  16974.           Redmond, WA 98052
  16975.  
  16976.  
  16977.      To set the line compression option:
  16978.  
  16979.      1.Highlight the Compress blank lines field.
  16980.  
  16981.      2.Press ENTER to toggle between YES and NO The default is YES
  16982.        (line compression is on).
  16983.  
  16984.      Centering
  16985.  
  16986.      This option lets you center each record vertically and
  16987.      horizontally on the label, based on the longest line and the
  16988.      number of lines within each record. If you leave centering
  16989.      off, PC-Label starts each label at the same place on the same
  16990.      line.
  16991.  
  16992.      Centering overrides the fixed placement of fields which you
  16993.      establish when you lay out a label. Label layout is covered
  16994.      later in this chapter.
  16995.  
  16996.      However, centering does not mean centering each line of an
  16997.      address on the label. PC-Label doesn't do that. Each record is
  16998.      centered as a whole.
  16999.  
  17000.  
  17001.  
  17002.  
  17003.      PC-File Version 7 Users Guide                            286
  17004.  
  17005.  
  17006.  
  17007.      Whether or not you center is largely an aesthetic decision.
  17008.      However, centering can sometimes cause problems with alignment
  17009.      of multi-column labels. If you want to center multi-column
  17010.      labels, leave the centering option off until you make sure the
  17011.      labels are aligned, then turn the centering option on.
  17012.  
  17013.      To set the centering option:
  17014.  
  17015.      1.Highlight the Centering field.
  17016.  
  17017.      2.Press ENTER to toggle between YES and NO. The default is
  17018.        YES.
  17019.  
  17020.      Pause If Truncation
  17021.  
  17022.      Data that doesn't fit within the space you have defined on a
  17023.      label will be truncated (cut off). You can ask PC-Label to
  17024.      alert you every time that occurs while you are printing.
  17025.  
  17026.      You may want to set this option ON the first time you run a
  17027.      set of labels in order to check for any field length problems.
  17028.      Truncated addresses can result in mail being returned because
  17029.      of incomplete addresses. Once you are satisfied that all your
  17030.      data fits, turn this option OFF.
  17031.  
  17032.      To set the Pause if truncation option:
  17033.  
  17034.      1.Highlight the Pause if truncation field.
  17035.  
  17036.      2.Press ENTER to toggle between YES and NO. The default is NO.
  17037.  
  17038.      Escape Code Toggle
  17039.  
  17040.      You may want to print the first line of your mailing labels in
  17041.      bold face, or perhaps include a return address in italics. To
  17042.      use a type style other than regular type, follow these steps:
  17043.  
  17044.      1.Toggle the Escape Code Toggle ON.
  17045.  
  17046.      2.Set the escape codes for your printer.
  17047.  
  17048.      3.Place the codes on the label when you lay it out.
  17049.  
  17050.      Setting the escape codes is explained in the following section
  17051.      (Print Escape Code) and placing the codes on the label is
  17052.      explained in the section on Label Layout later in this
  17053.      chapter.
  17054.  
  17055.      To set the Escape code toggle:
  17056.  
  17057.      1.Highlight the Escape code toggle field.
  17058.  
  17059.      2.Press ENTER to toggle the Escape codes ON and OFF. The
  17060.        default is ON.
  17061.  
  17062.  
  17063.  
  17064.  
  17065.      PC-File Version 7 Users Guide                            287
  17066.  
  17067.  
  17068.      If you don't use any escape codes in your label format, this
  17069.      feature is ignored, whether it is on or off.
  17070.  
  17071.      NOTE: If you print to a file, escape codes appear as garbled
  17072.      text. If you have used escape codes in your label, turn the
  17073.      toggle OFF when printing to a file, unless you will be
  17074.      printing the file later and wish to retain the escape codes.
  17075.  
  17076.      Print Escape Code
  17077.  
  17078.      Printers print in normal typeface unless they are told
  17079.      otherwise. To tell a printer to use bold face, you must send
  17080.      the printer an escape code. Then you must send another escape
  17081.      code to tell it to return to normal type. Each printer
  17082.      understands specific escape codes for each of the various
  17083.      character formats (bold, italic, underline, subscript, etc.)
  17084.      and different printers understand different codes. If you want
  17085.      to use various character formats in your labels, you must tell
  17086.      PC- Label what codes
  17087.      your printer understands. To do that, you use the Print Escape
  17088.      Code option on the Setup menu.
  17089.  
  17090.      NOTE: Any print codes set in the configuration profile don't
  17091.      apply to PC-Label.
  17092.  
  17093.      Highlight the Print Escape Code field and press ENTER. A
  17094.      dialog box appears.
  17095.  
  17096.      The Print Escape Code Menu displays escape codes for all Epson
  17097.      dot matrix printers and any other printers set to an Epson
  17098.      mode. If you are using this type of printer, your work is
  17099.      probably done. If you are using a different printer, consult
  17100.      the printer manual for the printer escape codes.
  17101.  
  17102.      The menu has two parts. At the top is the setup code. This is
  17103.      the field that is highlighted when the menu first appears.
  17104.      Below that is a listing of five individual character formats
  17105.      and the printer escape codes that turn them on and off. The
  17106.      two parts are discussed separately.
  17107.  
  17108.      Setup Code
  17109.  
  17110.      The setup code field lets you enter an all-encompassing escape
  17111.      code for your labels. If you wanted to print your entire label
  17112.      in italics or condensed type, for example, you would enter the
  17113.      appropriate escape code here. You would not have to place a
  17114.      code on the label definition itself.
  17115.  
  17116.      Character Formats
  17117.  
  17118.      You can access and change the information in any of the three
  17119.      columns on the menu. The center column lists the character
  17120.      format, the left column indicates the printer escape code that
  17121.      turns that character format on and the right column indicates
  17122.      the printer escape code that turns it off.
  17123.  
  17124.  
  17125.  
  17126.  
  17127.      PC-File Version 7 Users Guide                            288
  17128.  
  17129.  
  17130.      To make changes to the formats and codes, highlight the
  17131.      appropriate entry and type your change into the edit window
  17132.      that appears. Press ENTER to replace the previous entry with
  17133.      your change.
  17134.  
  17135.      You only need to correct those codes that you plan to use. If
  17136.      your printer reads different codes than the ones shown, but
  17137.      you only plan to use the bold format in your labels, you need
  17138.      only change the escape codes for bold. The other formats and
  17139.      their escape codes will be ignored.
  17140.  
  17141.      If you want to use a format that is not listed, such as small
  17142.      capitals or double wide letters (available on some dot matrix
  17143.      printers), enter the format name in the center column over one
  17144.      of the current formats. Then enter the escape codes listed in
  17145.      your printer manual that turn the format on and off.
  17146.  
  17147.      Escape codes normally consist of two or three characters.
  17148.      These characters can be entered as decimal values between
  17149.      braces, or the actual character can be entered using ALT and
  17150.      the numeric keypad. For example, the Epson dot matrix code to
  17151.      turn off bold face is {27}{65} in decimal and _A using the ALT
  17152.      key and keypad. You can also mix the two ({27}A), as the
  17153.      default values indicate.
  17154.  
  17155.      Label Sheet Definition
  17156.  
  17157.      PC-Label provides 14 templates from which you can choose the
  17158.      one that matches your label stock. If none of them match, you
  17159.      can design a layout that will.
  17160.  
  17161.      To select a template:
  17162.  
  17163.      1.Highlight the Label Sheet definition field and press ENTER.
  17164.        A window listing the label template options appears.
  17165.  
  17166.      2.Highlight the template that matches your label stock. The
  17167.        dimensions of your label stock should be listed on the side
  17168.        of the box containing the labels. Choose User-defined if
  17169.        none of the templates match your label stock.
  17170.  
  17171.      3.Press ENTER to close the window.
  17172.  
  17173.      If you selected a template, you return to the Setup menu. The
  17174.      template you selected is now listed on the screen.
  17175.  
  17176.      If you selected User-defined, a label definition screen
  17177.      displays on which you can create your own template.
  17178.  
  17179.      NOTE: If your labels are 1" high, use the 15/16" equivalent.
  17180.      The other sixteenth of an inch is the space between each
  17181.      label.
  17182.  
  17183.      Creating your Own Template
  17184.  
  17185.  
  17186.  
  17187.  
  17188.      PC-File Version 7 Users Guide                            289
  17189.  
  17190.  
  17191.      To create your own template, first choose the template that
  17192.      most closely resembles the template you have in mind. Then,
  17193.      when you choose User-defined, the values for that template
  17194.      display as the defaults.
  17195.  
  17196.      For example, if you are working with labels that are 4 x 1 1/3
  17197.      (2- up), choose a template like 4 x 1 7/16 (2-up). That way
  17198.      you have to change fewer values when you define the template.
  17199.  
  17200.      The procedures for creating a user-defined template are
  17201.      explained below, followed by a description of the Label Sheet
  17202.      Format Definition screen.
  17203.  
  17204.      To create a User-defined label template:
  17205.  
  17206.      1.Highlight the option Label Sheet definition and press ENTER.
  17207.  
  17208.      2.Choose the template that most closely resembles the template
  17209.        you want to design.
  17210.  
  17211.      3.Press ENTER to display the list of template options again.
  17212.  
  17213.      4.Choose User-defined from the menu of templates. The Label
  17214.        Sheet Format Definition screen appears. It is here you
  17215.        create a template.
  17216.  
  17217.      5.Highlight each option you want to change and press ENTER to
  17218.        activate it.
  17219.  
  17220.      6.Fill in the proper dimension in the edit window that appears
  17221.        at the bottom of the screen for each option.
  17222.  
  17223.      7.Test your answers by printing out a test sheet of labels.
  17224.  
  17225.      8.Make any necessary changes to the label dimensions.
  17226.  
  17227.      9.Press F10 when you finish to return to the setup screen.
  17228.  
  17229.      The User-defined Template Options
  17230.  
  17231.      Each of the options on the template is described below.
  17232.  
  17233.      Number of labels across
  17234.  
  17235.      Indicate the number of labels printed across your label sheet.
  17236.      The minimum is one, the maximum is 25.
  17237.  
  17238.      Width of label and space between
  17239.  
  17240.      Enter the number of characters from the left edge of one label
  17241.      to the left edge of the next label. This field is ignored with
  17242.      single column labels.
  17243.  
  17244.      Label width
  17245.  
  17246.  
  17247.  
  17248.  
  17249.      PC-File Version 7 Users Guide                            290
  17250.  
  17251.  
  17252.      Enter the number of characters that represent the width of a
  17253.      label. Most printers are set up to print 10 characters per
  17254.      inch, but this is not always the case, particularly if you are
  17255.      using condensed or elite type. Check your printer fonts if you
  17256.      have problems with this dimension.
  17257.  
  17258.      Top margin
  17259.  
  17260.      Enter the number of lines at the top of each sheet of labels.
  17261.      This option is only in effect when you feed sheets of labels
  17262.      manually and have set the Feed method (the next option on the
  17263.      setup menu) to By Sheet. Continuous feeding ignores this
  17264.      option.
  17265.  
  17266.      Number of labels down
  17267.  
  17268.      Enter the number contained in one column of one page of
  17269.      labels.
  17270.  
  17271.      Height of label and space between
  17272.  
  17273.      Enter the number of lines from the top of one label to the top
  17274.      of the next label. This is normally one line more than the
  17275.      label height.
  17276.  
  17277.      Label height
  17278.  
  17279.      Enter the number of lines on one label.
  17280.  
  17281.      Run a test
  17282.  
  17283.      Press ENTER with the Make template field highlighted to print
  17284.      a test sheet. Follow the directions on the screen to check
  17285.      your dimensions. If they are not correct, make the necessary
  17286.      changes and run another test.
  17287.  
  17288.  
  17289.      Feed Method
  17290.  
  17291.      PC-Label lets you choose between two methods of paper feed:
  17292.      Continuous and By Sheet. The default is Continuous, as this is
  17293.      the normal method for most printers, including laser printers.
  17294.      However, if you must feed each sheet of labels manually, or
  17295.      want a pause between each page, choose the By Sheet method.
  17296.  
  17297.      To set the feed method:
  17298.  
  17299.      Highlight the Feed method field Press ENTER to toggle between
  17300.      Continuous and By Sheet.
  17301.  
  17302.      Formfeed
  17303.  
  17304.  
  17305.  
  17306.  
  17307.      PC-File Version 7 Users Guide                            291
  17308.  
  17309.  
  17310.      This option lets you add an extra form feed for specific
  17311.      instances where it might be necessary. There are three
  17312.      settings: None, End of each sheet, and End of each set. Which
  17313.      setting you choose depends partly on the feed method you
  17314.      selected in the previous option.
  17315.  
  17316.      None
  17317.  
  17318.      In most cases you want to leave the formfeed off (set to
  17319.      None). More than likely your printer will formfeed
  17320.      automatically after each sheet and at the end of the printing.
  17321.  
  17322.      End of each sheet
  17323.  
  17324.      Choose this option only if you are using the By Sheet feed
  17325.      method. This forces the last page or any other pages that are
  17326.      not fully printed to kick out of the printer.
  17327.  
  17328.      End of each set
  17329.  
  17330.      Choose this option if you are using continuous feed and are
  17331.      printing more than one set (copy) of labels. This option will
  17332.      kick out a page at the end of each set, thus forcing the next
  17333.      set to start on a new page. A set consists of one "print" of
  17334.      labels, whether printed By Group or By Label (see Copies
  17335.      Definition above).
  17336.  
  17337.      To set the formfeed:
  17338.  
  17339.      1.Highlight the Formfeed field.
  17340.  
  17341.      2.Press ENTER to toggle between None, End of each sheet, and
  17342.        End of each set. The default is None.
  17343.  
  17344.      Label Layout
  17345.  
  17346.      Use the Label Layout option to design how your labels will
  17347.      look. Designing a label encompasses locating the fields,
  17348.      adding text, defining the borders, and adding character
  17349.      formatting.
  17350.  
  17351.      There is no default layout or template for the design of an
  17352.      individual label, so you must define this option. Your labels
  17353.      will not print unless you do.
  17354.  
  17355.      To layout a label, highlight the option and press ENTER.
  17356.  
  17357.      The edit window in the center of the screen is sized according
  17358.      to the dimensions you selected under the Label Sheet
  17359.      Definition option. It is within this window that you define
  17360.      your label. This operation is explained below.
  17361.  
  17362.      Locating Fields and Text
  17363.  
  17364.  
  17365.  
  17366.  
  17367.      PC-File Version 7 Users Guide                            292
  17368.  
  17369.  
  17370.      All the fields in the database are listed at the top of the
  17371.      screen. Each field is numbered; use the numbers to locate the
  17372.      fields on the label rather than the names.
  17373.  
  17374.      The last four fields listed are system fields. These fields
  17375.      can be used for all labels. They are explained in detail
  17376.      later.
  17377.  
  17378.      Text intended to appear on all labels can be entered directly
  17379.      onto the label definition. For example, if your labels are
  17380.      large enough, you could enter a return address in the top left
  17381.      corner.
  17382.  
  17383.      All fields, including system fields, and text must be preceded
  17384.      by either of two location markers: the at sign (@) or the
  17385.      question mark (?). These markers are used as follows:
  17386.  
  17387.      At sign (@)
  17388.  
  17389.      Fix the data or text at a specific location by preceding it
  17390.      with the @. The field or text that follows the @ will always
  17391.      start in the spot where you have placed it on the label. The @
  17392.      itself marks the beginning of the field.
  17393.  
  17394.      Question mark (?)
  17395.  
  17396.      Precede fields or text with a ? when you want the data to
  17397.      slide to the left until it encounters other data, the left
  17398.      margin of the label as defined by the left bracket ( [ ), or
  17399.      the left edge of the label. The use of brackets is explained
  17400.      later in this section.
  17401.  
  17402.  
  17403.      I
  17404.      Using System Fields
  17405.  
  17406.      The four system fields provide extra features that can be
  17407.      added to your labels. The system fields are located on a label
  17408.      definition in the same way as a data field, using the number
  17409.      in place of the field name and preceding the field number with
  17410.      an @ or ?.
  17411.  
  17412.      Recno
  17413.  
  17414.      This field lets you print the current record number on each
  17415.      label, based on the current index.
  17416.  
  17417.      Date
  17418.  
  17419.      Use this field to print the current date, taken from the
  17420.      system calendar.
  17421.  
  17422.      Time
  17423.  
  17424.      Use this field to print the current time, taken from the
  17425.      system clock.
  17426.  
  17427.  
  17428.  
  17429.  
  17430.      PC-File Version 7 Users Guide                            293
  17431.  
  17432.  
  17433.  
  17434.      Keyin
  17435.  
  17436.      Use this field to enable you to enter data from the keyboard
  17437.      onto each label. The printer pauses when it encounters this
  17438.      field in each label. Press ENTER when you finish keying in
  17439.      data to continue printing.
  17440.  
  17441.      Unlike other fields, you must define the size of a keyin
  17442.      field. You do this by following the keyin field number with
  17443.      any character from the keyboard, repeated until the end of the
  17444.      field. For example, if you want to define a keyin field eight
  17445.      characters long, you might enter
  17446.  
  17447.      @18aaaaaa
  17448.  
  17449.      Note that the "18" is considered part of the eight character
  17450.      spaces following the @ or ?. You can replace the a's with any
  17451.      other keyboard characters, other than those reserved for other
  17452.      use on the label, such as the @, ?, and the brackets used
  17453.      around field names.
  17454.  
  17455.      Centering the Label and Compressing Lines
  17456.  
  17457.      Use square brackets [ ] to define specific areas within a
  17458.      label for centering and line compression. Follow these
  17459.      guidelines for using brackets.
  17460.  
  17461.        If Centering and Line compression are turned off, brackets
  17462.        have no effect.
  17463.  
  17464.        If either centering or line compression, or both, are turned
  17465.        on, the entire label is affected if you do not use brackets.
  17466.  
  17467.        If either or both functions are turned on, and you do use
  17468.        brackets, only the part of the label enclosed by brackets is
  17469.        affected.
  17470.  
  17471.      Thus, not using brackets is the same as using brackets around
  17472.      the entire label (if centering or line compression is turned
  17473.      on).
  17474.  
  17475.      Adding Character Formatting
  17476.  
  17477.      You can add character formatting to a label if you have
  17478.      toggled the Escape code ON and defined the printer escapes
  17479.      codes for your printer. If so, the character formats for which
  17480.      you have defined escape codes are displayed at the bottom of
  17481.      your screen, below the edit window. Each one is indicated by a
  17482.      print marker, such as <<1>> or <<4>>. Use these print markers
  17483.      to indicate character format changes on the label.
  17484.  
  17485.      To indicate a change in character formatting, place the print
  17486.      marker at the spot where the change occurs. For example, to
  17487.      make a particular field bold, you might locate a field like
  17488.      this:
  17489.  
  17490.  
  17491.  
  17492.  
  17493.      PC-File Version 7 Users Guide                            294
  17494.  
  17495.  
  17496.  
  17497.           ?<<1>>9<<2>>
  17498.  
  17499.      Note that the print marker follows the ? or @ for the field it
  17500.      affects.
  17501.  
  17502.      Use no more than 16 different print markers in one label
  17503.      definition, and only one for each field or text entry. In
  17504.      other words, you cannot combine bold and italic formatting for
  17505.      a particular field or text entry. Also, do not change the type
  17506.      size when printing multi-column labels.
  17507.  
  17508.      Workspace Drive
  17509.  
  17510.      PC-Label uses a small amount of temporary work space when
  17511.      printing labels. This work space, amounting to eight bytes per
  17512.      label, is placed in a temporary file. Use this option to
  17513.      indicate the drive on which that file is placed.
  17514.  
  17515.      To set the workspace drive:
  17516.  
  17517.      1.Highlight the Workspace drive field and press ENTER.
  17518.  
  17519.      2.Enter the drive in the edit window that appears. The default
  17520.        is C.
  17521.  
  17522.      NOTE: The temporary file is removed from your disk when PC-
  17523.      Label has finished processing. However, be sure you have
  17524.      enough space to accommodate the temporary file when printing
  17525.      labels.
  17526.  
  17527.  
  17528.      Printing Labels
  17529.  
  17530.      When you first start printing a set of labels, you need to
  17531.      make sure the label stock is correctly aligned in the printer
  17532.      and that the parameters you have defined for the label
  17533.      definition are correct. PC- Label lets you check these by
  17534.      providing a test option at the start of printing. Use this
  17535.      option to make sure everything is lined up correctly.
  17536.  
  17537.      When you choose Print labels on the PC-Label Main Menu, your
  17538.      labels are printed to the printer or to a file, depending on
  17539.      the output destination you chose on the Setup screen. The two
  17540.      operations are handled in different ways by the program and
  17541.      are covered separately below.
  17542.  
  17543.      To print labels to a printer:
  17544.  
  17545.      1.Choose Print labels from the PC-Label Main Menu.
  17546.  
  17547.  
  17548.  
  17549.  
  17550.      PC-File Version 7 Users Guide                            295
  17551.  
  17552.  
  17553.      2.Choose Yes or No to position your label sheet in the
  17554.        printer. Choose Yes if you are unsure of the placement of
  17555.        the label stock in your printer. PC-Label goes through a set
  17556.        of screens that will help you position the first sheet
  17557.        properly. Choose No if you are familiar with placing the
  17558.        label stock in the printer.
  17559.  
  17560.      3.If you chose Yes to the previous step, choose Yes or No when
  17561.        the program prompts you to align the labels again. Choose
  17562.        Yes to test the alignment again. Choose No if you feel
  17563.        certain the alignment is correct.
  17564.  
  17565.      4.Choose Yes, No, or Yes & don't ask, or press ESC, when PC-
  17566.        Label displays the first label and asks if you want to print
  17567.        it. Choose Yes to print it. Choose No to skip this label and
  17568.        continue to next label. Choose Yes & don't ask to print all
  17569.        the labels without reviewing them on the screen. Press ESC
  17570.        to display the following prompts: Abort-to abort the
  17571.        printing process (to return to the main menu) Backup-to
  17572.        backup to the previous label Continue-continue the printing
  17573.        process Choose the appropriate response.
  17574.  
  17575.      To print labels to a file:
  17576.  
  17577.      1.Choose Print labels on the PC-Label Main Menu.
  17578.  
  17579.      2.Enter the extension, then the path and file name to which
  17580.        you want to print the labels.
  17581.  
  17582.      3.Choose Yes, No, or Yes & don't ask when PC-Label displays
  17583.        the first label and asks if you want to print it. Choose Yes
  17584.        to print the label to the file. Choose No to abort the
  17585.        process. Choose Yes & don't ask to print all the labels
  17586.        without reviewing them on the screen. Press ESC to display
  17587.        the following prompts: Abort-to abort the printing process
  17588.        (to return to the main menu) Backup-to backup to the
  17589.        previous label Continue-continue the printing process Choose
  17590.        the appropriate response.
  17591.  
  17592.      Saving the Current Setup
  17593.  
  17594.      Once you have defined a label setup, you should save it for
  17595.      future use. You can save it before or after you print labels
  17596.      with it, but be sure to save it before you exit from PC-Label
  17597.      or it will be lost.
  17598.  
  17599.      A label setup is saved in a file with an .LBL extension. PC-
  17600.      Label adds this extension automatically when you name the
  17601.      file.
  17602.  
  17603.      To save the current setup:
  17604.  
  17605.      1.Choose Save current setup on the PC-Label Main Menu.
  17606.  
  17607.  
  17608.  
  17609.  
  17610.      PC-File Version 7 Users Guide                            296
  17611.  
  17612.  
  17613.      2.Enter the path (drive and directory) where you want the file
  17614.        to be stored. Do NOT include the file name. If you want to
  17615.        store the file on the current directory, press ENTER to
  17616.        bypass this box.
  17617.  
  17618.      3.Choose New File.LBL from the list that displays to save the
  17619.        setup with a new name. Choose another file name if you want
  17620.        to save the setup to a current file, overwriting that file
  17621.        in the process.
  17622.  
  17623.      4.Enter the name of the file if you chose New File.LBL. Follow
  17624.        DOS filename rules in naming the file. You don't need to
  17625.        enter the extension, as PC-Label adds it automatically.
  17626.  
  17627.  
  17628.  
  17629.  
  17630.      PC-File Version 7 Users Guide                            297
  17631.  
  17632.  
  17633.  
  17634.      CHAPTER 15 TOOLS
  17635.  
  17636.      PC-File includes four small utilities, all easily accessible
  17637.      from the Tools menu or with a hot key. You can have PC-File
  17638.      dial a phone number for you, drop to the DOS prompt, print a
  17639.      single label, or perform a calculation. PC-File also has a
  17640.      spell checking utility for correcting spelling errors in
  17641.      fields and letters. This chapter explains how to use these
  17642.      features.
  17643.  
  17644.  
  17645.      Overview
  17646.  
  17647.      PC-File provides several options on the Tools menu that
  17648.      perform small but very useful tasks. For example, you can
  17649.      temporarily drop out of PC- File, grab almost all of the
  17650.      memory used by the program, run another program, then return
  17651.      to the same spot without losing a step.
  17652.  
  17653.      PC-File also treats you like a CEO. Display a record on the
  17654.      screen and the program will dial the phone for you and tell
  17655.      you when to pick up the receiver.
  17656.  
  17657.      The Tools options are explained briefly below and in more
  17658.      detail in the sections that follow.
  17659.  
  17660.      Option Hot key Action
  17661.  
  17662.      Drop to DOS CTRL-D Lets you issue DOS commands and run other
  17663.      programs Telephone Dialer CTRL-J Dials the phone number
  17664.      selected on the current record Snapshot Label CTRL-L Prints a
  17665.      mailing label for the current record Calculator CTRL-C Lets
  17666.      you enter and memorize a calculation
  17667.  
  17668.  
  17669.      Dropping to DOS
  17670.  
  17671.      The Drop to DOS option lets you exit from PC-File temporarily.
  17672.      You can then issue DOS commands or even run another program.
  17673.      When you return to PC-File, you are in the same place you left
  17674.      off.
  17675.  
  17676.      You may want to copy a file or group of files to another
  17677.      directory, or perhaps delete files to make more room for data.
  17678.      Or you may want to open another program, such as a
  17679.      spreadsheet, and look at a file from which you are about to
  17680.      import data.
  17681.  
  17682.      Before you drop to DOS, determine what action you intend to
  17683.      take. There are two forks in the road as you drop to DOS, and
  17684.      the action you intend to take determines the forks you should
  17685.      follow. The two forks involve:
  17686.  
  17687.      Issuing single or multiple DOS commands Deciding whether you
  17688.      need to free up memory
  17689.  
  17690.  
  17691.  
  17692.  
  17693.      PC-File Version 7 Users Guide                            298
  17694.  
  17695.  
  17696.  
  17697.      Single or Multiple DOS Commands?
  17698.  
  17699.      When you choose Drop to DOS from the Tools menu (or press
  17700.      CTRL-D), PC- File displays a dialog box.
  17701.  
  17702.      To issue a single DOS command, type the command in the dialog
  17703.      box. Once DOS completes the command, press any key to return
  17704.      to PC-File.
  17705.  
  17706.      To issue multiple commands, leave the text box empty and
  17707.      choose OK. PC- File takes you to the DOS prompt, from which
  17708.      you can enter multiple commands. When you are ready to return
  17709.      to PC-File, type exit at the DOS prompt and press ENTER.
  17710.  
  17711.      If you want to open another program, you can do it either from
  17712.      the dialog box or from the DOS prompt. If you have to change
  17713.      directories first, you need to move to the DOS prompt, as
  17714.      multiple commands are needed.
  17715.  
  17716.      Free Up Memory?
  17717.  
  17718.      Once you enter a command in the dialog box, PC-File asks if
  17719.      you want to free up memory. In most cases, answer Yes if you
  17720.      plan to run another program, or answer No if you are just
  17721.      issuing DOS commands.
  17722.  
  17723.      In rare cases, the opposite may be true. If your computer has
  17724.      a lot of memory, you may not have to free up memory to run
  17725.      some programs. If you have a minimum of memory, you may have
  17726.      to free up some just to run a series of DOS commands.
  17727.  
  17728.      PC-File frees up memory by writing a temporary file to disk.
  17729.      The temporary file contains the actions you have taken in PC-
  17730.      File, so you can return to where you left off. All but just
  17731.      over 20K of memory that PC-File normally uses is freed up.
  17732.  
  17733.      NOTE: Be sure you don't delete the temporary file written by
  17734.      PC-File. Temporary files are named TEMPxxxx.PCF, with the x's
  17735.      being any combination of characters.
  17736.  
  17737.      NOTE: Though dropping to DOS should not interfere with PC-
  17738.      File, it is recommended that you save whatever you are
  17739.      currently working on. For example, if you are creating a
  17740.      report, save the report, then drop to DOS. While unlikely, it
  17741.      is possible you could run out of memory and have to reboot.
  17742.  
  17743.  
  17744.      Autodialing a Phone Number
  17745.  
  17746.      Along with its main function as a database program, PC-File
  17747.      includes several important features of a communications
  17748.      program. If you have a modem, you can display records that
  17749.      include phone numbers and use PC- File to dial the phone.
  17750.  
  17751.  
  17752.  
  17753.  
  17754.      PC-File Version 7 Users Guide                            299
  17755.  
  17756.  
  17757.      As an added bonus, PC-File keeps track of your phone calls.
  17758.      After a call ends, an entry is made in a telephone log file,
  17759.      which you can later use to verify the charges on your phone
  17760.      bill.
  17761.  
  17762.      NOTE: You can't use PC-File to "talk" to another computer,
  17763.      such as a bulletin board, or to a fax machine. It's only
  17764.      useful for talking to another person (or listening to an
  17765.      answering machine or voice mail).
  17766.  
  17767.      Autodialing Requirements
  17768.  
  17769.      To make use of the autodialing feature, you need the following
  17770.      equipment and data:
  17771.  
  17772.      Communications port
  17773.  
  17774.      You must have a serial communications port on your computer.
  17775.      This can be COM1, COM2, COM3, or COM4.
  17776.  
  17777.      Modem
  17778.  
  17779.      You must have a "Hayes compatible" modem connected to your
  17780.      communications port. It doesn't have to actually be a Hayes
  17781.      modem. It just has to be able to recognize a few of the Hayes
  17782.      modem commands. Most modems can do this.
  17783.  
  17784.      The modem is essential because PC-File uses it to actually
  17785.      place the phone call. After the phone number has been dialed,
  17786.      the modem is no longer needed. PC-File bypasses the modem so
  17787.      you can talk on your handset.
  17788.  
  17789.      Handset
  17790.  
  17791.      This is the actual telephone. Plug the telephone into the
  17792.      modem. There's usually a connector on the modem that says "to
  17793.      phone" or "handset", or something similar.
  17794.  
  17795.      You can use a dial (pulse) or touch-tone phone. PC-File
  17796.      assumes you have a dial phone unless you specify you have a
  17797.      touch-tone phone by changing the modem dialing command in your
  17798.      configuration profile. See Chapter 13, "Utilities," for
  17799.      information.
  17800.  
  17801.      Database
  17802.  
  17803.      You must have some phone numbers that PC-File can use to place
  17804.      the call. The phone numbers come from a field in a database.
  17805.      The database might be a "customer" database, or a "sales
  17806.      leads" database, or any type of database that contains phone
  17807.      numbers. The phone number must be in a field named "phone", or
  17808.      have "phone" as part of the name. You can have multiple phone
  17809.      fields in a database, as PC-File prompts you for the number
  17810.      you want to call if it detects more than one phone number
  17811.      field.
  17812.  
  17813.  
  17814.  
  17815.  
  17816.      PC-File Version 7 Users Guide                            300
  17817.  
  17818.  
  17819.  
  17820.      Setting Up a Database for Autodialing
  17821.  
  17822.      If you intend to use the autodialing features of PC-File,
  17823.      check your configuration profile to make sure the modem port
  17824.      and dialer settings are correct. (See the section on
  17825.      configuration in Chapter 13, "Utilities," for information.)
  17826.      Then follow these guidelines when defining your database:
  17827.  
  17828.      The phone field
  17829.  
  17830.      When the telephone dialer is activated, it looks at each of
  17831.      the field names in the database. If any field name includes
  17832.      the characters "phone", that field is assumed to contain a
  17833.      phone number. Be sure to use the word "phone" in the
  17834.      appropriate field(s).
  17835.  
  17836.      If you have multiple phone fields, PC-File will prompt you to
  17837.      select one of them when you make a call.
  17838.  
  17839.      The phone number
  17840.  
  17841.      The phone numbers should normally be entered as numeric digits
  17842.      (though the field should be a character-type field). Some
  17843.      modems can translate characters to digits, but many can't.
  17844.      Thus, it is recommended that you enter (800)J-BUTTON as
  17845.      (800)528-8866. You can include spaces, parentheses, or hyphens
  17846.      for clarity, although they aren't required.
  17847.  
  17848.      Embedded commands
  17849.  
  17850.      You can include Hayes modem commands in the phone number
  17851.      field, though they are normally unnecessary. PC-File
  17852.      automatically sends the ATD command to alert the modem that
  17853.      you are about to use it. Other commands, such as including a 9
  17854.      before the number to dial out of an office, should be included
  17855.      in the phone access commands in the configuration profile. See
  17856.      Chapter 13, "Utilities," for information on setting up your
  17857.      phone profile. See your modem manual for information on Hayes
  17858.      modem commands.
  17859.  
  17860.      Comments
  17861.  
  17862.      If you want to include a comment (information that will not be
  17863.      sent to the modem) in a phone number field, precede the
  17864.      comment with a semicolon. For example, you might type 528-
  17865.      8866; ask for Janet.
  17866.  
  17867.      Long distance codes
  17868.  
  17869.      For long distance calls outside of your area code, don't
  17870.      include the "1" (long distance access code) with the phone
  17871.      number. You do need to include the area code, however. PC-File
  17872.      automatically adds the 1 for all phone numbers that are 10
  17873.      digits or longer, unless the number starts with a zero (calls
  17874.      outside the U.S. and Canada).
  17875.  
  17876.  
  17877.  
  17878.  
  17879.      PC-File Version 7 Users Guide                            301
  17880.  
  17881.  
  17882.  
  17883.      For long distance calls within your area code, you must
  17884.      include the "1," unless your local phone company requires you
  17885.      to dial the area code for long distance calls within your area
  17886.      code. In that case, treat it like any other long distance
  17887.      number and enter the area code into your phone field.
  17888.  
  17889.      Here are some valid phone numbers:
  17890.  
  17891.      528-8866 a local call
  17892.  
  17893.      1-528-8866 long distance within the area code
  17894.  
  17895.      1 528 8866 same as above
  17896.  
  17897.      (206) 528-8866 long distance to a different area code
  17898.  
  17899.      206-528-8866 same as above
  17900.  
  17901.      011-312-322-1 foreign call (PC-File doesn't send a 1)
  17902.  
  17903.  
  17904.  
  17905.      Placing a Call
  17906.  
  17907.      Be sure the modem and telephone are hooked up correctly and
  17908.      the port and access codes are properly configured in the
  17909.      database configuration profile.
  17910.  
  17911.      To place a call:
  17912.  
  17913.      1.Display the record containing the phone number you wish to
  17914.        call. You can be in either Modify mode or Read-only mode. If
  17915.        you are in a Table view, highlight the record. You do not
  17916.        have to highlight the phone field itself. You must have the
  17917.        record itself displayed. You can't place a call from a
  17918.        letter or report that contains phone number data.
  17919.  
  17920.      2.Choose Tools from the menu bar.
  17921.  
  17922.      3.Choose Telephone dialer from the Tools menu. As an
  17923.        alternative to steps 2 and 3, press CTRL-J to activate
  17924.        autodial. To recall this hot key, remember that the J stands
  17925.        for Jingle.
  17926.  
  17927.      4.Choose the phone number to call if there is more than one
  17928.        phone field in the record. PC-File displays a dialog box
  17929.        listing the phone numbers when multiple phone fields are
  17930.        defined in a record.
  17931.  
  17932.      5.Wait while the call is being made. Normally you can hear the
  17933.        modem dialing and the rings or busy signal that follow.
  17934.  
  17935.  
  17936.  
  17937.  
  17938.      PC-File Version 7 Users Guide                            302
  17939.  
  17940.  
  17941.      6.Pick up the handset and press ENTER as instructed on the
  17942.        screen. Pressing ENTER starts the timer that records the
  17943.        length of the call. Picking up the handset releases the
  17944.        modem from the phone line. Do NOT pick up the handset until
  17945.        the dialing is completed, as it interrupts the dialing
  17946.        process.
  17947.  
  17948.      7.Press ENTER again when you finish the call to stop the
  17949.        timer, then replace the handset. If you need to use your
  17950.        computer while you're talking on the phone, you can stop the
  17951.        timer whenever you want. This removes the timing message
  17952.        from the screen, but allows you to continue the phone
  17953.        conversation. Of course, the entry in your phone log will
  17954.        reflect a shorter call duration due to the early stoppage of
  17955.        the call timer.
  17956.  
  17957.      The Phone Log
  17958.  
  17959.      A different phone log is kept for each database. The log is
  17960.      called databasename.CDS.
  17961.  
  17962.      PC-File adds a new entry in the .CDS file for each call. The
  17963.      entry always includes the current date, phone number dialed,
  17964.      starting time and call duration, and the port to which the
  17965.      modem is connected. The program also picks up information from
  17966.      any fields which include the characters "name", "company",
  17967.      "city", "state", and "country".
  17968.  
  17969.      Printing and Displaying a Phone Log
  17970.  
  17971.      All of the information in the phone log is in ASCII character
  17972.      format. Thus, you can display or print out your phone log
  17973.      using any program that reads ASCII files. This includes most
  17974.      text editors and word processing programs.
  17975.  
  17976.      NOTE: If you have to change the extension .CDS to a different
  17977.      extension in order to display the file in a word processing
  17978.      program, be sure to save it back as a text file if you want to
  17979.      continue adding phone calls to it.
  17980.  
  17981.      You can also print the log directly by using the DOS PRINT
  17982.      command. At the DOS prompt, type print databasename.cds and
  17983.      press ENTER. Be sure you are in the same directory as the
  17984.      file. The log prints to the default printer.
  17985.  
  17986.      Deleting a Phone Log
  17987.  
  17988.      Each phone call made is added to the end of the current
  17989.      database phone log. If you want to clean out the phone log and
  17990.      start a fresh one, just delete the file using the DOS DELETE
  17991.      or ERASE command. For example, type del databasename.cds at
  17992.      the DOS prompt and press ENTER.
  17993.  
  17994.      PC-File automatically creates a new log for the database the
  17995.      next time you make a call.
  17996.  
  17997.  
  17998.  
  17999.  
  18000.      PC-File Version 7 Users Guide                            303
  18001.  
  18002.  
  18003.  
  18004.      Taking Snapshot Labels
  18005.  
  18006.      Snapshot labels let you print a single mailing label for the
  18007.      currently displayed record. This can be a handy feature,
  18008.      particularly for those users that take phone orders or for one
  18009.      reason or another want to print out labels one at a time.
  18010.  
  18011.      You can also print snapshot labels to a file, then print them
  18012.      out all at once at a later time. That might be a better way to
  18013.      do it, if you are not set up for printing single labels.
  18014.  
  18015.      You can also use this feature to save snippets of information
  18016.      other than mailing labels. In fact, the snapshot label feature
  18017.      can be used for a wide variety of possibilities. For example,
  18018.      you can set up a phone log format to remember who called. You
  18019.      can format envelopes with both a mailing and return address,
  18020.      using the Free form format in Reports. You can format a COD
  18021.      label or invoicing form for quick printing. You can even print
  18022.      snapshot letters if you want.
  18023.  
  18024.      Snapshot Label Procedures
  18025.  
  18026.      "Snapping" a snapshot label is a simple process, but there are
  18027.      several preliminary steps before you can actually take the
  18028.      snapshot.
  18029.  
  18030.      To define and take a snapshot label:
  18031.  
  18032.      1.Define a report structure for your snapshot label. Reports
  18033.        are normally defined using the Mail label format of the
  18034.        Report generator, though you can use any format. See
  18035.        "Defining the Snapshot Structure" below for more
  18036.        information.
  18037.  
  18038.      2.Assign a report to a snapshot number. You do that in your
  18039.        configuration profile. See Chapter 13, "Utilities," for
  18040.        information.
  18041.  
  18042.      3.Select the output for the snapshot. You can print to a
  18043.        printer or to a file. This decision is also entered in your
  18044.        configuration profile.
  18045.  
  18046.      4.Display a record on the screen. You can be in Record view or
  18047.        Table view. In Table view, the record currently highlighted
  18048.        is used.
  18049.  
  18050.      5.Take the snapshot. Choose Tools from the menu bar and
  18051.        Snapshot label from the Tools menu. As an alternative, press
  18052.        CTRL-L. If you have multiple snapshot label formats attached
  18053.        to the current database, PC-File prompts you to choose one.
  18054.        If printing to a printer, be sure it is properly hooked up
  18055.        and turned on.
  18056.  
  18057.      Defining the Snapshot Structure
  18058.  
  18059.  
  18060.  
  18061.  
  18062.      PC-File Version 7 Users Guide                            304
  18063.  
  18064.  
  18065.      A snapshot label is a report incorporating just one record
  18066.      from your database. Like a report, you must first outline the
  18067.      structure of the snapshot before you can print it.
  18068.  
  18069.      You can use any of the report formats for defining a snapshot
  18070.      report, though for actual mailing labels, the Mail label
  18071.      format is probably the easiest. If you use the Free form or
  18072.      Language formats, you can only use the Detail section. A
  18073.      snapshot does not read any other section in a report.
  18074.  
  18075.      You can use a report for snapshots that you also use for
  18076.      printing a regular report. For example, if you have created a
  18077.      report for printing mailing labels, you can use the same
  18078.      structure for snapshots. You can also create reports for just
  18079.      using with snapshots.
  18080.  
  18081.      Once you have defined the report structure, you must assign it
  18082.      to a snapshot. You can define up to five snapshot reports in
  18083.      each database. At the same time, you must tell PC-File whether
  18084.      you want to print that snapshot to a file or to the printer.
  18085.      Both operations are handled in the configuration profile. See
  18086.      Chapter 13, "Utilities," for information on these operations.
  18087.  
  18088.      NOTE: You can't use a mailing label defined in the PC-Label
  18089.      utility for a snapshot.
  18090.  
  18091.      Using the Calculator
  18092.  
  18093.      The Calculator option on the Tools menu emulates a standard 4-
  18094.      function calculator which responds to either the mouse or the
  18095.      keyboard (including the keypad). You can perform any type of
  18096.      calculation that is functional within PC-File, including
  18097.      arithmetic and date calculations, string calculations, and
  18098.      relational lookups. See Chapter 17, "Calculations," for more
  18099.      details on performing calculations.
  18100.  
  18101.      If a calculation includes one or more field names, the data
  18102.      from the currently displayed or highlighted record is used in
  18103.      the calculation.
  18104.  
  18105.      Choosing the Calculator option on the Tools menu, or pressing
  18106.      CTRL-C displays the calculator dialog box.
  18107.  
  18108.      The text box at the top of the window displays the calculation
  18109.      as a formula reading left to right, for example, 123.4 + 567.8
  18110.      - 901. If the calculation exceeds the length of the text box,
  18111.      the display will scroll up to a total of 120 characters. You
  18112.      can enter any valid PC-File calculation containing numbers,
  18113.      field names, and all supported functions:
  18114.  
  18115.      Date calculations (@TODAY#), (@DAY#,mask), and (@DATE,mask)
  18116.  
  18117.      Relational lookups (@shared field in current db, lookup
  18118.      database, shared field in lookup db, lookup field)
  18119.  
  18120.  
  18121.  
  18122.  
  18123.      PC-File Version 7 Users Guide                            305
  18124.  
  18125.  
  18126.      Logical expressions Comparisons using any of the following
  18127.      operators:
  18128.  
  18129.      < Less than
  18130.  
  18131.      > Greater than
  18132.  
  18133.      & And
  18134.  
  18135.      | Or
  18136.  
  18137.      ( ) Parentheses
  18138.  
  18139.      NOTE: Logical operators which use the = sign cannot be typed
  18140.      in directly because pressing the = key causes the calculator
  18141.      to display its result. It is possible to copy a logical
  18142.      expression from an editing window or text box in another area
  18143.      of PC-File with CTRL-INS and paste it into the calculation
  18144.      text box with SHIFT-INS.
  18145.  
  18146.      Math functions + Addition
  18147.  
  18148.      - Subtraction
  18149.  
  18150.      * Multiplication
  18151.  
  18152.      / Division
  18153.  
  18154.      ^ Exponentiation
  18155.  
  18156.      % Modulo (Remainder)
  18157.  
  18158.  
  18159.      String functions UPCASE( ), LOWCASE( ), MIXCASE( ), LASTWORD(
  18160.      ), FIRSTWORD( ), TRIM( ), and ; (semicolon) the concatenation
  18161.      operator.
  18162.  
  18163.      The result of your calculation is not displayed until you
  18164.      click = on the calculator, press the = key, or press ENTER.
  18165.      The result does not automatically clear, allowing you to
  18166.      display an intermediate result and continue, incorporating the
  18167.      result into subsequent calculations, if you want.
  18168.  
  18169.      In addition to standard number, decimal, add, subtract,
  18170.      multiply, divide and equals keys, there are seven other keys :
  18171.  
  18172.      clr
  18173.  
  18174.      The Clear key clears the calculation text box. Also, if the
  18175.      contents of the text box has been memorized with the Store
  18176.      (sto) key, pressing it a second time after clearing the text
  18177.      box clears the memorized contents.
  18178.  
  18179.      sto
  18180.  
  18181.  
  18182.  
  18183.  
  18184.      PC-File Version 7 Users Guide                            306
  18185.  
  18186.  
  18187.      The Store key memorizes the full contents of the calculation
  18188.      text box. This can be the result of a calculation (after
  18189.      pressing =) or a calculation formula itself (before pressing
  18190.      =). As much of the memorized contents as possible displays
  18191.      above the calculation text box. Choosing Store with something
  18192.      already memorized replaces the previously memorized value.
  18193.  
  18194.      rcl
  18195.  
  18196.      The Recall key retrieves the value or calculation stored with
  18197.      the Store key.
  18198.  
  18199.      cpy
  18200.  
  18201.      The Copy key copies the full contents of the calculation text
  18202.      box to a memory buffer allowing you to "paste" it with SHIFT-
  18203.      INS. This is generally used to copy the result of a
  18204.      calculation into a field after exiting the calculator window.
  18205.  
  18206.      exit
  18207.  
  18208.      The Exit key removes the calculator window.
  18209.  
  18210.      fld
  18211.  
  18212.      The Field key displays a dialog box that allows you to choose
  18213.      data from any field and copies it to the end of the contents
  18214.      of the calculation text box. This key does not appear when the
  18215.      Calculator is invoked with no database open.
  18216.  
  18217.      LU
  18218.  
  18219.      The Lookup key displays two dialog boxes that allows you to
  18220.      retrieve data from a field in a related database. See Defining
  18221.      Relational Lookups, below, for details on how to use the
  18222.      Lookup dialog boxes. This key does not appear when the
  18223.      Calculator is invoked when no database is open.
  18224.  
  18225.      NOTE: The Store key and the Copy key differ slightly in
  18226.      function. Each stores its memorized information to a separate
  18227.      memory buffer. The Store key can only be used to memorize and
  18228.      copy information within the Calculator window, and must be
  18229.      used in conjunction with the Recall key. The Copy key copies
  18230.      the current contents of the calculaton text box to the same
  18231.      buffer used for the CTRL-INS, SHIFT-DEL, and SHIFT-INS edit
  18232.      keys, and is used to copy the memorized information to any
  18233.      active field or text
  18234.      box used in PC-File.
  18235.  
  18236.      Additionally, both the Store and Copy keys only copy the
  18237.      entire contents of the calculation text box, to copy a portion
  18238.      of the text box: highlight the desired portion, press CTRL-
  18239.      INS, move the cursor to the location you want to copy to and
  18240.      press SHIFT-INS.
  18241.  
  18242.      To perform a calculation:
  18243.  
  18244.  
  18245.  
  18246.  
  18247.      PC-File Version 7 Users Guide                            307
  18248.  
  18249.  
  18250.  
  18251.      1.Choose Tools from the menu bar.
  18252.  
  18253.      2.Choose Calculator from the Tools menu. As an alternative to
  18254.        steps 1 and 2, press CTRL-C.
  18255.  
  18256.      3.Enter the calculation into the text box using any of the
  18257.        following methods:
  18258.  
  18259.           Using the keyboard
  18260.  
  18261.           Using the numeric keypad
  18262.  
  18263.           Clicking the key buttons on the Calculator window with
  18264.           the mouse.
  18265.  
  18266.      4.Press ENTER or click = to display the answer.
  18267.  
  18268.      5.Choose the Copy key or press CTRL-P if you want to save the
  18269.        answer to the cut-and-paste buffer.
  18270.  
  18271.      6.Choose Exit to remove the Calculator window.
  18272.  
  18273.      To write an answer saved to the cut-and-paste buffer to a
  18274.      field or text box, move the cursor to the desired location and
  18275.      press SHIFT-INS.
  18276.  
  18277.      The cut-and-paste buffer is shared by the Copy key and the
  18278.      edit keys: CTRL-INS and SHIFT-DEL. The cut-and-paste buffer
  18279.      only holds one memorized item at a time. Subsequent uses of
  18280.      the Copy key, CTRL-INS, or SHIFT-DEL replaces whatever was
  18281.      previously in the cut-and-paste buffer.
  18282.  
  18283.  
  18284.      Using the Spell Checker
  18285.  
  18286.      The Spell Checker is available in many areas of the program.
  18287.      You can check data in memo fields or the text of letters used
  18288.      in a mail merge. The Spell Checker is accessed as a tool on
  18289.      the button bar or by pressing CTRL-Q. You cannot access the
  18290.      spell checker from the Tools menu, but it is included in this
  18291.      part of the documentation because it is used like a tool.
  18292.  
  18293.      There are two ways to invoke the spell checker.
  18294.  
  18295.        Press CTRL-Q.
  18296.  
  18297.        Click on the Spell Button with the mouse.
  18298.  
  18299.      When a misspelled word is encountered a dialog box displays.
  18300.  
  18301.      The spell checker in PC-File is similar to any spell checker
  18302.      you may have used in a word processor. When you spell check
  18303.      text in PC-File, it pauses and displays any misspelled word.
  18304.      You then have four options:
  18305.  
  18306.  
  18307.  
  18308.  
  18309.      PC-File Version 7 Users Guide                            308
  18310.  
  18311.  
  18312.      Option: Function
  18313.  
  18314.      Ignore :  Ignore the misspelled word and continue the spell
  18315.      checking.
  18316.  
  18317.      Suggest:  Suggest options for the misspelled word.
  18318.  
  18319.      Add:  Add the current word to the user dictionary.
  18320.  
  18321.      Re-type:  Re-type the current word in the edit box, making the
  18322.      proper corrections.
  18323.  
  18324.      Ignore
  18325.  
  18326.      Use this option when you use a word or acronym such as NASA.
  18327.      You might want to include NASA in a memo, but not add it to
  18328.      the user dictionary. Choose Ignore to skip the current word
  18329.      and continue spell checking.
  18330.  
  18331.      Suggest
  18332.  
  18333.      Use this option when you want to see various options for
  18334.      corrected spellings. After using the Suggest option, you can
  18335.      select one of the suggestions from the list and then choose
  18336.      Replace to replace the misspelled word with that selection. If
  18337.      the correct word is not among the suggestions, you can re-type
  18338.      the word, making any changes necessary. You can then Replace
  18339.      the word or Add the word. Adding the word will both replace
  18340.      the word and add it to the user dictionary.
  18341.  
  18342.      Add
  18343.  
  18344.      This is used to add frequently used words to the user
  18345.      dictionary that are not found in a common dictionary. Proper
  18346.      names are common additions to the user dictionary. The name
  18347.      "Frankie Angelosi" is not in the dictionary. "Frankie
  18348.      Angelosi" could be added to the user dictionary so that PC-
  18349.      File will not stop each time it found the name. Choose Add to
  18350.      add the current word to the user dictionary.
  18351.  
  18352.      Re-typing
  18353.  
  18354.      You can also edit the current word, making the correction by
  18355.      hand as opposed to having PC-File make any suggestions. For
  18356.      example, PC- file would stop on the word "aftr." It may be
  18357.      easier to simply add "e" to the current word in the edit box
  18358.      and make "after" instead of pressing Suggest and then Replace.
  18359.      Re-type the current word in the edit box to make changes by
  18360.      hand.
  18361.  
  18362.      After you have made changes to a word, you can replace the
  18363.      original word with the changed word by choosing Replace. You
  18364.      can also choose Add to add the changed word to the user
  18365.      dictionary and replace the original word with the newly added
  18366.      word.
  18367.  
  18368.  
  18369.  
  18370.  
  18371.      PC-File Version 7 Users Guide                            309
  18372.  
  18373.  
  18374.      You can stop the spell checker at anytime by choosing CANCEL.
  18375.  
  18376.      Spell Checking Memo Fields
  18377.  
  18378.      You can use the spell checker in memo fields. You can use it
  18379.      at anytime: when you first enter the data or later, when
  18380.      examining your data.
  18381.  
  18382.      To use the spell checker in a memo field:
  18383.  
  18384.      1.Expand the memo field by pressing CTRL-E or clicking on the
  18385.        up arrow button to the right of the memo field.
  18386.  
  18387.      2.Choose Spell. PC-File begins spell checking the entire memo
  18388.        field. When a misspelled word is encountered the Spell Check
  18389.        dialog box displays.
  18390.  
  18391.      3.Make the appropriate corrections using: Ignore, Suggest, Add
  18392.        or re- typing for all misspelled words.
  18393.  
  18394.      Spell Checking in the Letter Writer
  18395.  
  18396.      The Spell Checker is available in the Letter Writing part of
  18397.      PC-File. You can check the spelling at any point in the
  18398.      document. The Spell Checker always starts at the point of the
  18399.      cursor and moves through the document to the end. To check an
  18400.      entire document, move the cursor the top of the document and
  18401.      choose Spell.
  18402.  
  18403.      To use the spell checker in a letter:
  18404.  
  18405.      1.Move the cursor to the first word to spell check, or move
  18406.        the cursor to the beginning of the letter to spell check the
  18407.        whole letter.
  18408.  
  18409.      2.Choose Spell. PC-File begins spell checking the letter. When
  18410.        a misspelled word is encountered the Spell Check dialog box
  18411.        displays.
  18412.  
  18413.      3.Make the appropriate corrections using: Ignore, Suggest, Add
  18414.        or re- typing for all misspelled words.
  18415.  
  18416.      Spell Checking Other Fields or Text
  18417.  
  18418.      You can invoke the spell checker in other fields or anywhere
  18419.      the "I- beam" text cursor is active. For example, the spell
  18420.      checker will check the contents of any text box including
  18421.      fields.
  18422.  
  18423.      To spell check other fields or text:
  18424.  
  18425.      1.Place the cursor in any field or area the text cursor is
  18426.        active.
  18427.  
  18428.  
  18429.  
  18430.  
  18431.      PC-File Version 7 Users Guide                            310
  18432.  
  18433.  
  18434.      2.Press CTRL-Q. PC-File begins spell checking the letter. When
  18435.        a misspelled word is encountered, the Spell Check dialog box
  18436.        displays.
  18437.  
  18438.      3.Make the appropriate corrections using: Ignore, Suggest, Add
  18439.        or re- typing for all misspelled words.
  18440.  
  18441.  
  18442.  
  18443.  
  18444.      PC-File Version 7 Users Guide                            311
  18445.  
  18446.  
  18447.  
  18448.      CHAPTER 16 USING MACROS
  18449.  
  18450.      A macro is a shortcut around repetitive work. Instead of
  18451.      typing out the name of your company repeatedly, you can record
  18452.      a macro and enter it with just two keystrokes. Or you could
  18453.      set up a macro to run out a weekly report. Macros are easy to
  18454.      set up and easy to use. This chapter explains how.
  18455.  
  18456.  
  18457.  
  18458.      Why Use Macros?
  18459.  
  18460.      Recording a macro is similar to using a tape recorder. You
  18461.      turn on the record option, make the recording, then turn it
  18462.      off. Later you can play it back just as it was recorded.
  18463.  
  18464.      Macros are essentially a tool to help you cut down on
  18465.      repetitive tasks. Any PC-File operation that you perform often
  18466.      is a good candidate to become a macro.
  18467.  
  18468.      For example, if you find yourself typing out your name and
  18469.      address repeatedly while using PC-File's letter writing
  18470.      feature, record the operation as a macro. You won't have to
  18471.      ever type it again.
  18472.  
  18473.      You could also set up a macro to print out a weekly or monthly
  18474.      report. Record every step, from opening the appropriate
  18475.      database to printing. You can even record a printer setup
  18476.      change, switching from a default dot matrix printer to the
  18477.      laser printer, then switching back again when the printing is
  18478.      completed.
  18479.  
  18480.      PC-File also lets you insert a pause in a macro that allows
  18481.      user input from the keyboard. Thus, you could enter a new
  18482.      title for a report from the keyboard in the middle of
  18483.      executing a macro.
  18484.  
  18485.      A macro can also be useful for making changes to your records.
  18486.      If you have imported a database, for example, and want to
  18487.      divide the information in a particular field into two fields,
  18488.      a recursive macro can save you a lot of time and effort. With
  18489.      a recursive macro, PC-File loops through every record, making
  18490.      the requested changes.
  18491.  
  18492.      Macro Guidelines
  18493.  
  18494.      A macro is a single command that represents a sequence of
  18495.      previously- recorded commands and keystrokes. Executing the
  18496.      macro results in the entire sequence of commands being played
  18497.      back.
  18498.  
  18499.      PC-File makes it easy to record and execute macros. Follow
  18500.      these guidelines when creating and using macros:
  18501.  
  18502.      Macro identifiers
  18503.  
  18504.  
  18505.  
  18506.  
  18507.      PC-File Version 7 Users Guide                            312
  18508.  
  18509.  
  18510.  
  18511.      In PC-File, macros are identified by one of the 26 letters of
  18512.      the alphabet. You can also create a special startup macro and
  18513.      identify with an asterisk (*).
  18514.  
  18515.      Macro descriptions
  18516.  
  18517.      Along with choosing an identifier, you can enter a macro
  18518.      description. Enter a description that will remind you what
  18519.      operation the macro performs. Descriptions can be up to 30
  18520.      characters long.
  18521.  
  18522.      Macro window
  18523.  
  18524.      PC-File lists all macros in a window. The window displays
  18525.      after you record a macro, allowing you to choose an
  18526.      identifier. You also display the window to execute, modify, or
  18527.      delete a macro.
  18528.  
  18529.      Macro files
  18530.  
  18531.      Each window of macros is stored in a separate file. Macros
  18532.      created with no database open are stored in PCFILE.MAC. This
  18533.      file loads automatically when you start PC-File. Macros
  18534.      created within a database are stored in a file called
  18535.      databasename.MAC. A different file is created for each
  18536.      database. The file loads when you open the database. If you
  18537.      need more than the 26 macros allowed within one file, you can
  18538.      set up an additional file and load it into the database
  18539.      whenever it's needed.
  18540.  
  18541.      Macro limits
  18542.  
  18543.      A macro can contain up to 1000 characters. Some keystrokes,
  18544.      such as entering a single letter, require only one character.
  18545.      Others, such as pressing ENTER, require up to seven or eight
  18546.      characters. Thus, it is impossible to say how many commands
  18547.      can be entered in a single macro, but the limit of 1000
  18548.      characters is large enough to include most operations. If you
  18549.      suspect that an operation will need more than the limit
  18550.      allows, you can divide the operation between two macros,
  18551.      starting the second macro as part of the operation in the
  18552.      first macro.
  18553.  
  18554.      Planning a Macro
  18555.  
  18556.      Before you record a macro, plan out what you want to do. You
  18557.      might want to list the steps involved and run through them
  18558.      once. This can save you from having to edit or re-record the
  18559.      macro later on.
  18560.  
  18561.      Among the points to consider before you record a macro:
  18562.  
  18563.      Consider the starting point
  18564.  
  18565.  
  18566.  
  18567.  
  18568.      PC-File Version 7 Users Guide                            313
  18569.  
  18570.  
  18571.      Think about where you will be in PC-File when you run the
  18572.      macro in the future. For example, if you set up a macro to run
  18573.      a weekly report, do you start the macro with the database open
  18574.      or do you include the opening of the database in the macro?
  18575.  
  18576.      Mouse commands are ignored
  18577.  
  18578.      Macros do not record mouse commands. Thus, if you use a mouse
  18579.      with PC-File, learn the keyboard commands for those steps that
  18580.      you normally perform with a mouse. Then, when you record the
  18581.      macro, record only keyboard commands. Mouse commands are
  18582.      ignored during recording and skipped over when playing back
  18583.      the macro.
  18584.  
  18585.      Mistakes are recorded
  18586.  
  18587.      If you make a mistake while recording a macro, the mistake and
  18588.      your correction become part of the macro. For example, if you
  18589.      spell a word wrong while typing it in, the mistake, the
  18590.      deletion, and the correction all become part of the macro.
  18591.      Though the end result is correct, you may want to edit the
  18592.      macro after you finish recording it to remove the mistake.
  18593.  
  18594.      Arrow keys can be dangerous in macros
  18595.  
  18596.      When possible, avoid using the arrow keys to make selections
  18597.      from lists. After all, lists change. Whether it is a list of
  18598.      files or a list of fields, the options are variable and can
  18599.      change from week to week. For example, you can create a new
  18600.      report or delete an old one, changing the lineup of report
  18601.      files. Or you could redefine the fields in a database.
  18602.  
  18603.      Thus, instead of using the arrow keys to highlight a field or
  18604.      file, type the field or file name in the text box within the
  18605.      respective dialog box. That ensures that any changes to the
  18606.      order of the options on the list don't affect the macro.
  18607.  
  18608.      Menu option availability can also change, as the result of
  18609.      some options being grayed out. It is recommended that you
  18610.      press the underlined letter of an option rather than using
  18611.      arrow keys to choose it.
  18612.  
  18613.      The Macro Options
  18614.  
  18615.      Use the options on the Macros menu (or the hot keys, if
  18616.      available) to create and use Macros.
  18617.  
  18618.      Option: Explanation
  18619.  
  18620.      Execute: (CTRL-M or right Display macro window to select and
  18621.      run a mouse button) macro
  18622.  
  18623.      Begin recording: (CTRL-Y) Start recording a macro
  18624.  
  18625.      End recording: (CTRL-Y) Stop recording a macro
  18626.  
  18627.  
  18628.  
  18629.  
  18630.      PC-File Version 7 Users Guide                            314
  18631.  
  18632.  
  18633.      Modify: Edit a macro description or definition
  18634.  
  18635.      Delete: Erase a macro
  18636.  
  18637.      Load new set: Create or load a macro file
  18638.  
  18639.  
  18640.  
  18641.      Recording a Macro
  18642.  
  18643.      You must use the keyboard when recording a macro. Mouse
  18644.      commands are ignored during the recording and skipped over
  18645.      during execution of the macro.
  18646.  
  18647.      PC-File indicates that a macro is being recorded by making an
  18648.      audible sound every time you depress a key.
  18649.  
  18650.      To record a macro:
  18651.  
  18652.      1.Choose Macros from the menu bar.
  18653.  
  18654.      2.Choose Begin recording from the Macros menu. As an
  18655.        alternative to steps above, press CTRL-Y.
  18656.  
  18657.      3.Press ENTER to remove the message window and begin
  18658.        recording.
  18659.  
  18660.      4.Perform the operation you want to record.
  18661.  
  18662.      5.Choose End recording from the Macros menu, or press CTRL-Y
  18663.        again.
  18664.  
  18665.      6.Identify the macro by choosing a letter from the window that
  18666.        displays.
  18667.  
  18668.      7.Enter a description of the macro. The description is
  18669.        optional, but recommended. You can enter a description of up
  18670.        to 30 characters.
  18671.  
  18672.      8.Edit the macro contents if necessary. The macro contents
  18673.        display the keystrokes you made during the recording of the
  18674.        macro in a written format. You can edit the macro by editing
  18675.        the written definition. See the section on modifying a macro
  18676.        below.
  18677.  
  18678.      9.Choose OK when you have finished.
  18679.  
  18680.      Pausing for User Input
  18681.  
  18682.      You can force a macro to pause and accept keyboard input from
  18683.      an operator during execution. This can be handy for entering a
  18684.      new title for a report each time you run it, or to include
  18685.      specific criteria as part of a formula search.
  18686.  
  18687.      To include a pause in a macro:
  18688.  
  18689.  
  18690.  
  18691.  
  18692.      PC-File Version 7 Users Guide                            315
  18693.  
  18694.  
  18695.      Type {INPUT} at the point where you want keyboard input.
  18696.  
  18697.      In most cases, you should be able to insert the pause while
  18698.      recording the macro. For example, to force a pause allowing
  18699.      the user to enter a report title, you could enter {INPUT} as
  18700.      the report title when recording the macro. Obviously, the
  18701.      report you print out during the macro recording process would
  18702.      have a rather unusual title, but presumably the main purpose
  18703.      is to record the macro for future use. As an alternative, you
  18704.      could enter a legitimate title, then edit the macro afterwards
  18705.      and replace the title keystrokes with {INPUT}.
  18706.  
  18707.      The following example illustrates a macro that allows the user
  18708.      to enter a new page number on which to start printing after a
  18709.      paper jam:
  18710.  
  18711.      plrdonation{ENTER}{TAB}{TAB}{TAB}{TAB}{INPUT}{ENTER}{ENTER}
  18712.  
  18713.      The macro assumes the sample database Member is open. In the
  18714.      first part of the macro, plrdonation, PC-File chooses Print
  18715.      from the menu bar (p), Letters from the Print menu (l), and
  18716.      Run from the dialog box (r), then types in the name of the
  18717.      letter (donation) in the text box of the file selection dialog
  18718.      box. {ENTER} closes the file selection dialog box and opens
  18719.      the Print options dialog box. The four {TAB}s move the cursor
  18720.      to the Start at page # text box, where the user can enter a
  18721.      new page number over the default of 1. {ENTER} pressed twice
  18722.      resumes the printing.
  18723.  
  18724.      During execution of a macro, PC-File beeps twice to indicate
  18725.      that information is requested from the user. The message
  18726.      "Pausing" displays on the information line when the {INPUT}
  18727.      command is in effect. Pressing ENTER causes the macro to
  18728.      resume playing.
  18729.  
  18730.      Slowing Down a Macro
  18731.  
  18732.      If you have a problem when running a macro, it can be
  18733.      difficult to see where the problem is occurring when the macro
  18734.      is playing back at normal speed. PC-File has a command to slow
  18735.      down macro execution to allow you to more easily "debug"
  18736.      macros. This command can also be useful to slow down a macro
  18737.      for demonstration purposes, so that your audience can see more
  18738.      clearly what operations the macro is performing.
  18739.  
  18740.      The format of the delay command is:
  18741.  
  18742.           {DELAY-nn}
  18743.  
  18744.      where "nn" is approximately the number of tenths of seconds
  18745.      you want PC-File to delay the execution of each step in the
  18746.      macro.
  18747.  
  18748.  
  18749.  
  18750.  
  18751.      PC-File Version 7 Users Guide                            316
  18752.  
  18753.  
  18754.      Like the INPUT command, in many cases you can insert a DELAY
  18755.      command while recording a macro, but more typically you would
  18756.      edit a macro and insert it. See "Modifying a Macro" for
  18757.      details on editing macros.
  18758.  
  18759.      Once issued, a DELAY command continues to take effect for the
  18760.      rest of the program session, or until a DELAY command to reset
  18761.      macro speed to normal is issued. For this reason, you would
  18762.      typically insert or record a DELAY command at the point you
  18763.      want the macro to slow down, and then add another DELAY
  18764.      command at the end of the macro to reset macro speed to
  18765.      normal. For example:
  18766.  
  18767.      {DELAY-10} macro commands {DELAY-0}
  18768.  
  18769.      where "macro commands" is your macro definition.
  18770.  
  18771.      To slow down a macro while recording a macro:
  18772.  
  18773.      1.Type {DELAY-nn} (where "nn" is the number of tenths of
  18774.        seconds you want to delay each macro step) at the point you
  18775.        want PC-File to slow down your macro.
  18776.  
  18777.      2.Type {DELAY-0} at the point you want normal macro execution
  18778.        speed to resume.
  18779.  
  18780.      NOTE: If you do not include a {DELAY-0} command following a
  18781.      DELAY command to slow down macro execution, the execution of
  18782.      all other macros during that session will be slowed down.
  18783.  
  18784.      Defining a Startup Macro
  18785.  
  18786.      You can define a startup macro to run automatically when you
  18787.      start PC- File or open a database. A startup macro is useful
  18788.      for those procedures that you find yourself repeating at the
  18789.      beginning of each session. For example, you could use the
  18790.      startup macro to make sure a particular index is in effect
  18791.      when you open the database, or to print the daily report.
  18792.  
  18793.      The startup macro is identified by the asterisk (*). You can
  18794.      define a separate startup macro for each database.
  18795.  
  18796.      To record a startup macro:
  18797.  
  18798.      1.Follow the procedures described above for recording any
  18799.        other macro.
  18800.  
  18801.      2.When you choose the identifier, choose * instead of a
  18802.        letter.
  18803.  
  18804.      Only use the startup identifier for a macro that you want to
  18805.      run EVERY time you open the database. Otherwise, leave it
  18806.      unused.
  18807.  
  18808.  
  18809.  
  18810.  
  18811.      PC-File Version 7 Users Guide                            317
  18812.  
  18813.  
  18814.      If you do create a startup macro, you can also choose that
  18815.      macro from the window, just as you would any other macro, if
  18816.      you want to perform the actions that it executes.
  18817.  
  18818.      NOTE: Startup macros only run when you open a database. They
  18819.      are NOT programmed to run when you load a new macro file into
  18820.      memory that includes a startup macro. Loading macro files is
  18821.      covered at the end of the chapter.
  18822.  
  18823.      Nesting Macros
  18824.  
  18825.      You can nest a macro within another macro. You do that by
  18826.      recording a macro, then including the execution of that macro
  18827.      in the recording of another macro. When you run the parent
  18828.      macro, the nested macro plays out as part of the operation.
  18829.  
  18830.      Use nested macros to:
  18831.  
  18832.        Run a macro as part of the operation of several other macros
  18833.  
  18834.        Run a recursive macro (used to loop through records) as part
  18835.        of a larger process
  18836.  
  18837.        Handle long operations that stretch beyond the limits of a
  18838.        single macro
  18839.  
  18840.      Nested macros can be used anywhere within their parent macros:
  18841.      at the start, in the middle, or at the end. You can nest
  18842.      macros down to several levels if you want.
  18843.  
  18844.      To include one macro within another, just run the child macro
  18845.      as one of the steps while recording the parent macro. A child
  18846.      macro takes this format: {CTRL-M}x. The keystroke {CTRL-M}
  18847.      displays the macro window. The letter x represents the
  18848.      identifier (A through Z or the *) of the nested macro. Thus a
  18849.      nested macro looks something like this:
  18850.  
  18851.      ...{ENTER}{CTRL-M}B{ALT-E}...
  18852.  
  18853.      In this example, the nested macro listed as B in the current
  18854.      macro file is executed between the macro keystrokes {ENTER}
  18855.      and {ALT-E}.
  18856.  
  18857.      Recursive Macros
  18858.  
  18859.      A recursive macro is a macro that loops back on itself. It
  18860.      works on the same principle as a nested macro, except that
  18861.      instead of calling another macro, the macro calls itself. In
  18862.      that way, it repeats itself over and over.
  18863.  
  18864.      A recursive macro is most useful for modifying records,
  18865.      repeating the same change over and over. You define the macro
  18866.      so that it modifies a record, then repeats itself, in the
  18867.      process moving on to the next record.
  18868.  
  18869.  
  18870.  
  18871.  
  18872.      PC-File Version 7 Users Guide                            318
  18873.  
  18874.  
  18875.      You can use recursive macros to add or delete data from
  18876.      records or move data after splitting or combining fields. For
  18877.      example, if you split a name field into first name and last
  18878.      name fields, you could use a recursive macro to move data to
  18879.      the appropriate fields for each record in the database.
  18880.  
  18881.      Recursive macros can be used with all the records in a
  18882.      database, or just some of the records.
  18883.  
  18884.      Defining a Recursive Macro
  18885.  
  18886.      In creating a macro that loops over and over, you want to
  18887.      repeat only those steps that are necessary. Therefore, start
  18888.      recording a recursive macro with the first record on the
  18889.      screen. Don't record those steps involved with searching or
  18890.      defining the records you want to see, as the program will loop
  18891.      through that process every time it repeats.
  18892.  
  18893.      You can, however, create a recursive macro and then nest it
  18894.      into another macro that performs the operations necessary to
  18895.      bring up the first record, or perhaps into a macro that
  18896.      defines the current index.
  18897.  
  18898.      To define a recursive macro:
  18899.  
  18900.      1.Decide whether you are going to modify all records or some
  18901.        records. If modifying all records, display the beginning
  18902.        record on the screen. If modifying some records, conduct a
  18903.        simple or formula search for the records you want to modify.
  18904.        Display the first selected record on the screen.
  18905.  
  18906.      2.Make sure you are in Modify mode.
  18907.  
  18908.      3.Press CTRL-Y or choose Begin recording from the Macros menu.
  18909.  
  18910.      4.Choose OK to remove the message window from the screen and
  18911.        begin recording.
  18912.  
  18913.      5.Modify the first record. If necessary, use  TAB to move to
  18914.        the field or fields you want to modify. Don't use the mouse.
  18915.  
  18916.      6.Display the next record, either by pressing CTRL-N (if you
  18917.        chose all records) or CTRL-S (if you chose some records).
  18918.  
  18919.      7.Type {CTRL-M}x (where "x" is the letter you want to save the
  18920.        macro under in step 9).
  18921.  
  18922.      8.Press CTRL-Y to stop recording.
  18923.  
  18924.      9.Identify the macro by choosing a letter typed for "x" in
  18925.        step 7.
  18926.  
  18927.      10.  Enter a description of the macro.
  18928.  
  18929.      Executing a Macro
  18930.  
  18931.  
  18932.  
  18933.  
  18934.      PC-File Version 7 Users Guide                            319
  18935.  
  18936.  
  18937.      Before running a macro, make sure you are at the same place in
  18938.      the program as you were when you started recording the macro.
  18939.  
  18940.      To execute a macro:
  18941.  
  18942.      1.Press CTRL-M. As an alternative, choose Execute from the
  18943.        Macros menu or press the right mouse button.
  18944.  
  18945.      2.Choose the macro from the window. You can choose the macro
  18946.        by pressing the letter key that identifies it, by
  18947.        highlighting the macro and pressing ENTER, or by clicking on
  18948.        it. The macro plays out the recorded steps of the operation
  18949.        as you watch.
  18950.  
  18951.      If you decide to stop a macro during operation, press ESC.
  18952.      However, you can't continue the macro once you stop it. You
  18953.      must start over again from the beginning.
  18954.  
  18955.      Modifying a Macro
  18956.  
  18957.      Each keystroke in a macro is recorded by PC-File in written
  18958.      form. You can edit the macro definition to modify or fix a
  18959.      macro, thus saving yourself the trouble of having to re-record
  18960.      it.
  18961.  
  18962.      You can edit the macro description at the same time as you
  18963.      edit the macro definition.
  18964.  
  18965.      To edit a macro:
  18966.  
  18967.      1.Choose Macros from the menu bar.
  18968.  
  18969.      2.Choose Modify from the Macros menu.
  18970.  
  18971.      3.Choose the macro you want to edit from the macro window. A
  18972.        dialog box displays, showing both the macro description and
  18973.        the definition.
  18974.  
  18975.      4.Make your changes. You can change both the description and
  18976.        the definition in this dialog box.
  18977.  
  18978.      5.Choose OK when you finish.
  18979.  
  18980.      Letters, numbers, and punctuation marks are displayed as you
  18981.      type them. As illustrated in the above screen, letters appear
  18982.      in lowercase, just as they are typed. For example, if you
  18983.      press o to choose the option Open from the File menu, it
  18984.      displays in the macro definition as o. Other keys are
  18985.      indicated by their name enclosed in braces. For example, ENTER
  18986.      is indicated like this: {ENTER}. Operations such as choosing
  18987.      menu options and using dialog boxes are indicated by the
  18988.      keystrokes used to perform them.
  18989.  
  18990.      The following table lists many of the keys and how they appear
  18991.      in a macro:
  18992.  
  18993.  
  18994.  
  18995.  
  18996.      PC-File Version 7 Users Guide                            320
  18997.  
  18998.  
  18999.      KEY             MACRO DEFINITION
  19000.  
  19001.      ENTER                {ENTER}
  19002.  
  19003.      ESC             {ESC}
  19004.  
  19005.      BACKSPACE       {BKSP}
  19006.  
  19007.      DELETE          {DEL}
  19008.  
  19009.      INSERT          {INS}
  19010.  
  19011.      Down arrow           {DOWN}
  19012.  
  19013.      Up arrow        {UP}
  19014.  
  19015.      Right arrow          {RIGHT}
  19016.  
  19017.      Left arrow           {LEFT}
  19018.  
  19019.      HOME            {HOME}
  19020.  
  19021.      END             {END}
  19022.  
  19023.      Function key    {Fn}
  19024.       where n = number
  19025.  
  19026.      PAGE UP         {PGUP}
  19027.  
  19028.      PAGE DOWN       {PGDN}
  19029.  
  19030.      TAB             {TAB}
  19031.  
  19032.  
  19033.  
  19034.      Though key names appear in uppercase letters, you can enter
  19035.      them in lowercase or mixed-case letters when editing the macro
  19036.      definition.
  19037.  
  19038.      Key combinations that include the SHIFT, CTRL, and ALT keys
  19039.      appear as follows:
  19040.  
  19041.      {ALT-F}{CTRL-D}{SHIFT-TAB}
  19042.  
  19043.      However, when you edit key combinations, you can enter them in
  19044.      any of the following formats:
  19045.  
  19046.      {c D}{CTRL-D}{CNTL+D}{CONTROL D}
  19047.  
  19048.      You can use a space, hyphen, or plus as a separator between
  19049.      the keys. For ALT, CTRL, and SHIFT, you can spell the word
  19050.      out, use just the initial letter, or use an acceptable
  19051.      shortened form (like CTRL and CNTL).
  19052.  
  19053.  
  19054.  
  19055.  
  19056.      PC-File Version 7 Users Guide                            321
  19057.  
  19058.  
  19059.      NOTE: Though a key combination like SHIFT-TAB displays the
  19060.      entire combination, uppercase letters and punctuation that
  19061.      require you to use the SHIFT key don't display the SHIFT in
  19062.      the macro definition. For example, $ displays as $, not as
  19063.      {SHIFT-4}, and T displays as T, not as SHIFT-t.
  19064.  
  19065.      Macro files are ASCII files, so you can also edit them with
  19066.      any text editor. Maintain the same formatting as displayed.
  19067.      You might want to make a backup copy of your file before you
  19068.      make too many changes.
  19069.  
  19070.      Deleting a Macro
  19071.  
  19072.      If you decide you no longer need a macro, you can delete the
  19073.      macro. You can then reuse the macro identifier for another
  19074.      macro.
  19075.  
  19076.      To delete a macro:
  19077.  
  19078.      1.Choose Macros from the menu bar.
  19079.  
  19080.      2.Choose Delete from the Macros menu.
  19081.  
  19082.      3.Choose the macro you want to delete from the macro window.
  19083.  
  19084.      4.Choose Y when asked to confirm the deletion.
  19085.  
  19086.        The macro and its description is deleted.
  19087.  
  19088.      Macro Files
  19089.  
  19090.      There are three types of macro files:
  19091.  
  19092.        PCFILE.MAC
  19093.  
  19094.        Database macro files
  19095.  
  19096.        Auxiliary macro files
  19097.  
  19098.      Each macro file can contain up to 26 macros labeled A through
  19099.      Z, plus a startup macro (*). The macro file name is displayed
  19100.      on the title bar of the macro window.
  19101.  
  19102.      PC-FILE.MAC loads into memory automatically when you start PC-
  19103.      File. It remains in memory until you open a database. You can
  19104.      define separate macros in PCFILE.MAC to start each database,
  19105.      and even use it as a menu for novice users. If you create a
  19106.      startup macro in PCFILE.MAC, it executes automatically when
  19107.      you start PC-File. If you want to use it as a menu for novice
  19108.      users, define the startup macro as {CTRL-M}, which would open
  19109.      the macro window.
  19110.  
  19111.  
  19112.  
  19113.  
  19114.      PC-File Version 7 Users Guide                            322
  19115.  
  19116.  
  19117.      Once you open a database, PC-File replaces PCFILE.MAC in
  19118.      memory with a file named databasename.MAC. Any macro you
  19119.      create with a database open is saved to the macro file named
  19120.      after the database. Macros saved to this file perform
  19121.      operations within the database.
  19122.  
  19123.      You can create auxiliary macro files, as well. Once created,
  19124.      you can load auxiliary files into memory whenever you need
  19125.      them.
  19126.  
  19127.      Creating an Auxiliary Macro File
  19128.  
  19129.      There are several reasons for defining additional macro files:
  19130.  
  19131.        You define more than the maximum number of macros in a
  19132.        particular database
  19133.  
  19134.        You want to use certain macros in more than one database
  19135.  
  19136.        You want to create macros for operations that occur prior to
  19137.        opening a database, or that include the opening of a
  19138.        database as part of the macro.
  19139.  
  19140.      To create a new macro file:
  19141.  
  19142.      1.Choose Macros from the menu bar.
  19143.  
  19144.      2.Choose Load new set from the Macros menu. A file selection
  19145.        dialog box displays.
  19146.  
  19147.      3.Enter a name for the new macro file in the file selection
  19148.        dialog box. Be sure the new name doesn't conflict with a
  19149.        current macro file. You can locate the new macro file in the
  19150.        current directory or in another directory if you want.
  19151.  
  19152.      4.Choose OK.
  19153.  
  19154.      You have created a new macro file with a new name. It is
  19155.      currently empty of macros, but is loaded into memory. Any
  19156.      macros you define now are stored in this file.
  19157.  
  19158.      Loading a Macro File
  19159.  
  19160.      To use macros located in a file other than the current file,
  19161.      you need to load that file into memory. When you load another
  19162.      macro file, the current macro file closes. Only one macro file
  19163.      can be open at a time.
  19164.  
  19165.      1.To load another macro file:
  19166.  
  19167.      2.Choose Macros from the menu bar.
  19168.  
  19169.      3.Choose Load new set from the Macros menu. The file selection
  19170.        dialog box displays.
  19171.  
  19172.  
  19173.  
  19174.  
  19175.      PC-File Version 7 Users Guide                            323
  19176.  
  19177.  
  19178.      4.Choose the macro file you want to load. All macro files use
  19179.        the extension .MAC.
  19180.  
  19181.      The new macro file is loaded into memory. The macros in that
  19182.      file are now available to you.
  19183.  
  19184.  
  19185.  
  19186.  
  19187.      PC-File Version 7 Users Guide                            324
  19188.  
  19189.  
  19190.  
  19191.      CHAPTER 17 CALCULATIONS
  19192.  
  19193.      One way to create data in a database is through a calculation.
  19194.      This chapter covers the different types of calculations you
  19195.      can use in PC-File.
  19196.  
  19197.  
  19198.  
  19199.      Introduction
  19200.  
  19201.      Calculations and lookups are a fundamental and important part
  19202.      of database management. In PC-File, they can be used during
  19203.      any of several operations, including:
  19204.  
  19205.        Defining a database
  19206.  
  19207.        Searching for a record
  19208.  
  19209.        Creating Formula Indexes
  19210.  
  19211.        Creating a report
  19212.  
  19213.        Creating a letter
  19214.  
  19215.        Using the calculator (from the Tools menu or by pressing
  19216.        CTRL-C)
  19217.  
  19218.      This chapter takes an overall look at calculations and
  19219.      lookups. An attempt is made to give you a fairly complete look
  19220.      at the various types of calculations and some of the ways they
  19221.      are used in PC-File. The types of calculations that are
  19222.      functional for any particular operation within PC-File are
  19223.      described in the section on that operation.
  19224.  
  19225.      Calculations include mathematical, date, conditional, and
  19226.      random number calculations, string functions and relational
  19227.      lookups. They are defined as follows:
  19228.  
  19229.      Mathematical calculations let you add, subtract, multiply,
  19230.      divide, exponentiate, and find the modulo.
  19231.  
  19232.      Date calculations let you perform calculations on dates to
  19233.      determine the number of days between dates or a future date.
  19234.  
  19235.      Conditional calculations let you make decisions based on the
  19236.      contents of a field.
  19237.  
  19238.      Random number calculations let you create random numbers and
  19239.      use them in further calculations.
  19240.  
  19241.      String functions let you convert letters to different cases,
  19242.      and manipulate strings of alphanumeric characters.
  19243.  
  19244.      Relational lookups let you retrieve data from other databases.
  19245.  
  19246.  
  19247.  
  19248.  
  19249.      PC-File Version 7 Users Guide                            325
  19250.  
  19251.  
  19252.      Each type of calculation is covered separately in this
  19253.      chapter.
  19254.  
  19255.      Calculation Guidelines
  19256.  
  19257.      Calculations can include field data, system fields, constants,
  19258.      functions, and, in reports only, buckets. Normally you use
  19259.      only numeric and date fields in calculations, but you can use
  19260.      character and logical fields.
  19261.  
  19262.      Follow these basic guidelines when using a calculation:
  19263.  
  19264.      Punctuation
  19265.  
  19266.      With one exception, always start a calculation with a left
  19267.      parenthesis and end it with a right parenthesis, like this:
  19268.  
  19269.      (Total - Balance)
  19270.  
  19271.      The only exception to this rule is with the calculator, which
  19272.      you can display by choosing Calculator from the Tools menu or
  19273.      pressing CTRL- C. Outside parentheses are not necessary in
  19274.      that case, but are permitted.
  19275.  
  19276.      Parentheses should always be matched. This means the number of
  19277.      left parentheses should equal the number of right parentheses.
  19278.      However, if they are not matched, PC-File will still perform
  19279.      the calculation. The results may or may not be correct.
  19280.  
  19281.      Normally, you must enclose constants within quotation marks.
  19282.      Constants can be enclosed in the scan across (~) or sounds-
  19283.      like (?) characters in place of quotation marks in searches
  19284.      and comparisons. For example, to search for all names that
  19285.      sound like Riley, you might enter the expression
  19286.  
  19287.           Name = ?Riley?
  19288.  
  19289.      Spaces
  19290.  
  19291.      You can use spaces freely within a calculation to make the
  19292.      formula more readable. For example, each of the following will
  19293.      produce the same result:
  19294.  
  19295.           (Total-Balance)
  19296.           (Total - Balance)
  19297.           ( Total - Balance )
  19298.  
  19299.      Field Names
  19300.  
  19301.      Field names used in calculations only have to contain enough
  19302.      of the name to uniquely identify the field. Each of these
  19303.      calculations is functionally the same:
  19304.  
  19305.           (Total - Balance)
  19306.           (Tot - Bal)
  19307.  
  19308.  
  19309.  
  19310.  
  19311.      PC-File Version 7 Users Guide                            326
  19312.  
  19313.  
  19314.      Sequence Order
  19315.  
  19316.      Actions enclosed within parentheses are performed first within
  19317.      a calculation, starting with the innermost nested action. For
  19318.      example, in the calculation
  19319.  
  19320.      ((Washington + Oregon) * 128.25)
  19321.  
  19322.      the addition within the inner parentheses (Washington +
  19323.      Oregon) is performed first, followed by the multiplication.
  19324.  
  19325.      Within a pair of parentheses, the sequence of calculation
  19326.      follows this order:
  19327.  
  19328.      1.Exponentiation (^)
  19329.  
  19330.      2.Multiplication (*), division (/), and modulo (%), each with
  19331.        equal priority
  19332.  
  19333.      3.Addition (+) and subtraction (-), each with equal priority
  19334.  
  19335.      For example, in the calculation
  19336.  
  19337.      (1 + 2 * 3 ^ 2 + 1)
  19338.  
  19339.      You first square the 3 (3 ^ 2) to produce 9, then multiply by
  19340.      2 to get 18, and finally add 1 twice to equal 20.
  19341.  
  19342.  
  19343.  
  19344.      Operators
  19345.  
  19346.      There are three types of operators: mathematical operators,
  19347.      comparison operators, and connecting operators.
  19348.  
  19349.      Mathematical operators are used to compute values. They
  19350.      include:
  19351.  
  19352.      +     Addition
  19353.  
  19354.      -     Subtraction
  19355.  
  19356.      *     Multiplication
  19357.  
  19358.      /     Division
  19359.  
  19360.      ^     Exponentiation
  19361.  
  19362.      %     Modulo
  19363.  
  19364.  
  19365.      The ^ character is SHIFT-6 on most keyboards.
  19366.  
  19367.      Exponentiation and modulo are explained in the section on
  19368.      mathematical calculations below.
  19369.  
  19370.  
  19371.  
  19372.  
  19373.      PC-File Version 7 Users Guide                            327
  19374.  
  19375.  
  19376.      Comparison operators determine whether a relationship exists
  19377.      between two values. They include:
  19378.  
  19379.      =     Equal to
  19380.  
  19381.      !=    Not equal to
  19382.  
  19383.      >     Greater than
  19384.  
  19385.      <     Less than
  19386.  
  19387.      >=    Greater than or equal to
  19388.  
  19389.      <=    Less than or equal to
  19390.  
  19391.  
  19392.  
  19393.      The connecting operators link multiple conditions within a
  19394.      calculation. There are two connecting operators defined in PC-
  19395.      File:
  19396.  
  19397.      &     And
  19398.  
  19399.      |     Or
  19400.  
  19401.  
  19402.      The symbol for Or is called the pipe character and is SHIFT-\
  19403.      on most keyboards. It is not a colon.
  19404.  
  19405.      Mathematical Calculations
  19406.  
  19407.      The most common type of calculations used in databases are
  19408.      basic mathematical computations. These involve the arithmetic
  19409.      operations of addition, subtraction, multiplication, and
  19410.      division, as well as exponentiation and modulo.
  19411.  
  19412.      Mathematical calculations can include fields and/or constants.
  19413.      Normally you will use numeric fields in your calculations, but
  19414.      you can use character fields as well.
  19415.  
  19416.      The following are examples of basic mathematical calculations:
  19417.  
  19418.           (Gross - Cost)
  19419.           (Price * Tax)
  19420.           (Yr_income / 12)
  19421.           (Sales * Commission)
  19422.  
  19423.      Modulo is the process of determining the remainder after
  19424.      dividing one number by another. For example, if you divide 5
  19425.      by 2, you get 2 with 1 left over. The 1 left over is the
  19426.      modulo. If you divide 2 by 3, you get 0 with 2 left over. The
  19427.      modulo is 2. Divide 18 by 6 and you get 3 with 0 left over.
  19428.      The modulo is 0. You can use a modulo for a number of
  19429.      different purposes. The following example illustrates a modulo
  19430.      used in a calculation to skip a line in a report every five
  19431.      records during printing:
  19432.  
  19433.  
  19434.  
  19435.  
  19436.      PC-File Version 7 Users Guide                            328
  19437.  
  19438.  
  19439.  
  19440.           .IF([COUNT*]%5 = 0)
  19441.           /1
  19442.           .ENDIF
  19443.  
  19444.      In this conditional calculation, a line feed (/1) is entered
  19445.      whenever the count of records is evenly divisible by 5.
  19446.  
  19447.      Exponentiation is used to raise a number to a certain power.
  19448.      Use the carot (SHIFT-6 on most keyboards) to indicate an
  19449.      exponential calculation. For example, 4 ^ 3 means 4 to the
  19450.      third power, or 4 * 4 * 4. The calculation 10 ^ 4 means 10 *
  19451.      10 * 10 * 10. You can use n ^ .5 to find the square root for
  19452.      any number (n).
  19453.  
  19454.      Date and Time Calculations
  19455.  
  19456.      Use date calculations to compute the number of days between
  19457.      two dates and to generate new dates by adding and subtracting
  19458.      days from a given date. Date calculations are performed by
  19459.      figuring out the "day number" of a date, which is the number
  19460.      of days between January 1, 1901 and the date in question.
  19461.  
  19462.      Date calculations can be performed on both date and character
  19463.      type fields.
  19464.  
  19465.      PC-File also has a time function to return the current system
  19466.      time.
  19467.  
  19468.      Date Functions
  19469.  
  19470.      PC-File supports three date functions to help you perform date
  19471.      calculations. The functions carry out the work of converting
  19472.      dates to day numbers and day numbers to dates. They are
  19473.      explained below and their use illustrated in a number of
  19474.      sample calculations that follow.
  19475.  
  19476.      (@TODAY#)
  19477.  
  19478.      Creates today's day number based on the date provided by your
  19479.      computer or network. That number could then be used as part of
  19480.      a calculation.
  19481.  
  19482.      For example, the day number for July 4, 1992 is 33,423, which
  19483.      means that is the number of days between 1/1/1901 and
  19484.      7/4/1992.
  19485.  
  19486.      (@DAY#,mask)
  19487.  
  19488.      This function is similar to the previous function, but
  19489.      converts any given date to a day number. The date to be
  19490.      converted always appears before the function, either as a
  19491.      constant or as a field containing dates.
  19492.  
  19493.  
  19494.  
  19495.  
  19496.      PC-File Version 7 Users Guide                            329
  19497.  
  19498.  
  19499.      The mask indicates the format of the date that is to be
  19500.      converted. Without it the program could get confused in the
  19501.      process of converting to a day number. Valid masks are:
  19502.  
  19503.           ymd
  19504.           ydm
  19505.           mdy
  19506.           myd
  19507.           dmy
  19508.           dym
  19509.           yymmdd
  19510.           yyyymmdd
  19511.  
  19512.      The letter y represents year, m represents month, and d
  19513.      represents day.
  19514.  
  19515.      The three-character masks assume that your dates have at least
  19516.      one separator character between month, day, and year. It
  19517.      doesn't matter what the separator is. The date conversion
  19518.      capabilities are very flexible. Here are some examples of
  19519.      dates that will be handled correctly by 3-character masks:
  19520.  
  19521.           10/16/91
  19522.           10.16.91
  19523.           10-16-1991
  19524.           Oct. 16, '91
  19525.           October 16, 1991
  19526.           16 Oct 1991
  19527.  
  19528.      The six-character mask yymmdd is used for character type
  19529.      fields in which the date has no separator characters. These
  19530.      fields are assumed to contain six adjacent digits, two each
  19531.      for year, month, and day. For example: 911016.
  19532.  
  19533.      The eight-character mask is used for character type fields in
  19534.      which the date is entered without separator characters in the
  19535.      yyyymmdd format. For example: 19911016.
  19536.  
  19537.      (@DATE,mask)
  19538.  
  19539.      Converts a day number to a date. This function is normally
  19540.      used when you want the calculation to result in an actual
  19541.      date.
  19542.  
  19543.      The mask indicates the format in which you want the date
  19544.      output. You can use any of the three-, six-, or eight-
  19545.      character masks used with the previous function, but you must
  19546.      include a separator character after the three-character masks.
  19547.      For example, use mdy/ to produce a date like 10/16/91 or dmy-
  19548.      to produce a date like 16- 10-91. You can also use periods as
  19549.      the separator.
  19550.  
  19551.  
  19552.  
  19553.  
  19554.      PC-File Version 7 Users Guide                            330
  19555.  
  19556.  
  19557.      You can also replace the y with the number 4 to print a four-
  19558.      digit year, such as 1992 or 2001. This is especially handy for
  19559.      dates that run into the next century. Enter the mask in the
  19560.      format md4/ or md4- to produce dates like this: 09/18/1992 or
  19561.      09-18-1992.
  19562.  
  19563.      Follow the three-character mask with any letter to produce a
  19564.      date that includes the month abbreviated to three letters. For
  19565.      example, the mask mdyX produces a date like OCT 16, 1991 and
  19566.      the mask dmyX produces 16 OCT 91.
  19567.  
  19568.      The date functions must be surrounded by parentheses, as shown
  19569.      above. TODAY, DATE and DAY must be uppercase and the mask must
  19570.      be lowercase. All the functions must be preceded by the at (@)
  19571.      sign and the functions TODAY and DAY must be followed by the
  19572.      pound (#) sign.
  19573.  
  19574.      NOTE: The system field [DATE*] can be used in reports and
  19575.      letters to print today's date as determined by your computer.
  19576.      [DATE*] is not a function in the same sense as those listed
  19577.      above and cannot be used in calculations, as it does not
  19578.      produce a day number.
  19579.  
  19580.      Sample Date Calculations
  19581.  
  19582.      Several date calculations illustrate the use of date
  19583.      functions.
  19584.  
  19585.      Finding Elapsed Number of Days
  19586.  
  19587.      You can determine the number of days that have gone by since a
  19588.      certain day, or the number of days between two dates.
  19589.  
  19590.      For example, you can determine how many days have elapsed
  19591.      since Buy_date. Assume that Buy_date is in the format "mdy".
  19592.  
  19593.      ((@TODAY#) - (Buy_date (@DAY#,mdy)))
  19594.  
  19595.      The function (@TODAY#) determines the day number for the
  19596.      current date. A day number is also calculated for the date
  19597.      held in the Buy_date field. The second day number is then
  19598.      subtracted from the first to compute the number of days
  19599.      elapsed.
  19600.  
  19601.      You can also find out how many days it took a customer to pay
  19602.      his bill by subtracting Buy_date from Pay_date. Assume that
  19603.      both dates are in "mdy" format.
  19604.  
  19605.      ((Pay_date (@DAY#,mdy)) - (Buy_date (@DAY#,mdy)))
  19606.  
  19607.      First, the date in Pay_date is retrieved and converted to a
  19608.      day number. Then, the date in Buy_date is retrieved and
  19609.      converted to a day number. Finally, the Buy_date day number is
  19610.      subtracted from the Pay_date day number to produce the
  19611.      difference in days between the two dates.
  19612.  
  19613.  
  19614.  
  19615.  
  19616.      PC-File Version 7 Users Guide                            331
  19617.  
  19618.  
  19619.      Comparing dates
  19620.  
  19621.      The following two examples show you how to compare one date to
  19622.      another date. These examples can be used for searching and
  19623.      selecting records.
  19624.  
  19625.      The first example selects records where Due_date is later than
  19626.      today's date.
  19627.  
  19628.      ((Due_date(@DAY#,mdy)) > (@TODAY#))
  19629.  
  19630.      The second example selects records where Due_date is earlier
  19631.      than the constant of 01/02/91.
  19632.  
  19633.      ((Due_date(@DAY#,mdy)) < ("01/02/91"(@DAY#,mdy)))
  19634.  
  19635.      Always enclose dates used as constants within quotation marks
  19636.      when performing calculations.
  19637.  
  19638.      Calculating a future date
  19639.  
  19640.      The following example calculates a new date 60 days after the
  19641.      CONTACT date.
  19642.  
  19643.      (((Contact(@DAY#,mdy))+60) (@DATE,mdy/))
  19644.  
  19645.      First, the date in the Contact field is converted to a day
  19646.      number. Then 60 is added to the day number. Finally, the day
  19647.      number is converted back to a date in the "mdy" format. If
  19648.      Contact contained the date 1/2/91, the result would be
  19649.      03/03/91.
  19650.  
  19651.      The Time Function
  19652.  
  19653.      PC-File also provides a time function that returns the current
  19654.      system time in military time format (24-hour) for hours and
  19655.      minutes (HH:MM). The time function is (@TIMENOW). You can use
  19656.      (@TIMENOW) as a calculation in a character field to return the
  19657.      current time. Or you can use it in the pop-up calculator
  19658.      (CTRL-C) to produce an on-demand time stamp.
  19659.  
  19660.      The time function only returns a character result and cannot
  19661.      be used in mathematical calculations.
  19662.  
  19663.      Conditional Calculations
  19664.  
  19665.      You often have situations where you want to perform an
  19666.      operation, but only under certain conditions. For example, you
  19667.      may want to add sales tax to a price only when the customer
  19668.      lives in the state of Washington. Or you may want to issue a
  19669.      refund, but only if an item is returned within 10 days. For
  19670.      these types of situations, use conditional calculations.
  19671.  
  19672.      Conditional calculations use IF commands in reports and
  19673.      letters, but elsewhere they must be set up to work without
  19674.      them. IF commands always follow a set format:
  19675.  
  19676.  
  19677.  
  19678.  
  19679.      PC-File Version 7 Users Guide                            332
  19680.  
  19681.  
  19682.  
  19683.           .IF (comparison statement)
  19684.           Things to do if true
  19685.           .ELSE
  19686.           Things to do if false
  19687.           .ENDIF
  19688.  
  19689.      You can use IF commands in reports or letters only. Every .IF
  19690.      statement must have a matching .ENDIF statement. The .ELSE
  19691.      statement is optional. Place each part of the command on a
  19692.      separate line by itself.
  19693.  
  19694.      To determine the price of items in which some items are
  19695.      taxable and some are not, you might set up a conditional
  19696.      calculation like this:
  19697.  
  19698.           .IF (Taxable = "Y")
  19699.           (Qty * Amt * 1.06)
  19700.           .ELSE
  19701.           (Qty * Amt)
  19702.           .ENDIF
  19703.  
  19704.      This calculation assumes you have a field called Taxable in
  19705.      which you can enter Y or N, as well as fields Qty and Amt. If
  19706.      the data in the field Taxable is Y, the calculation determines
  19707.      the total price including the tax of 6 percent. (If you just
  19708.      multiply the amount by the quantity by .06, you determine only
  19709.      the tax; multiplying the amount by the quantity by 1.06 gives
  19710.      you the total price.) If the data in the field Taxable is not
  19711.      Y, the tax is not multiplied in.
  19712.  
  19713.      You can simulate an IF command for use in defining a field. To
  19714.      simulate the above example in a field, you might enter this
  19715.      calculation to define a field:
  19716.  
  19717.      (((Tax ="Y")*Qty*Amt*1.06)+((Tax ="N")*Qty*Amt))
  19718.  
  19719.      This calculation works because PC-File assigns a value of 1 to
  19720.      true statements and a value of 0 to false statements. Thus, if
  19721.      the data in the field called Tax is Y, the first half of the
  19722.      equation is true and the second half of the equation is false.
  19723.      In that case the tax is applied, because the first half of the
  19724.      equation is multiplied by 1 and the second half by 0.
  19725.      Multiplying a number by 0 results in 0. If the data in the
  19726.      field called Tax is N, then the first half of the equation is
  19727.      false and
  19728.      no tax is included.
  19729.  
  19730.      Random Number Calculations
  19731.  
  19732.      Use random number calculations to pull records from your
  19733.      database at random. Random record searches are particularly
  19734.      handy for market research or to pull up a random selection of
  19735.      your members, say to set up a tennis tournament.
  19736.  
  19737.  
  19738.  
  19739.  
  19740.      PC-File Version 7 Users Guide                            333
  19741.  
  19742.  
  19743.      PC-File provides the function (@RANDOM#) to do much of the
  19744.      work for you. This function creates a random number between 0
  19745.      and 1.
  19746.  
  19747.      The easiest way to use the Random number function is to define
  19748.      a separate random number field within your database. Then
  19749.      enter the function as a calculation in the field
  19750.      characteristics dialog box. The field should be numeric and
  19751.      contain several characters to the right of the decimal. The
  19752.      data in the field displays as a random number, like .05324 and
  19753.      .00812. You can then sort on this field and choose the first
  19754.      so many records to give yourself a random selection.
  19755.  
  19756.      Though you can sort on a field that contains random numbers,
  19757.      random number calculations can't be used in a Formula index.
  19758.  
  19759.      String Functions
  19760.  
  19761.      The term string is used as shorthand for the phrase "string of
  19762.      characters"-a group or row of alphanumeric characters
  19763.      (letters, numbers, spaces, and punctuation characters). For
  19764.      example, anything you might enter into a field can be
  19765.      considered a string, such as: names, part numbers, phone
  19766.      numbers, prices, dates, or zip codes. The plural, "strings",
  19767.      refers to separate groups of characters from more than one
  19768.      source. In PC-File, sources of strings are:
  19769.  
  19770.        The contents of a field
  19771.  
  19772.        A "substring" or portion of a field, such as [DATE,7,2]
  19773.  
  19774.        A string of characters surrounded by quotes, such as "ab"
  19775.  
  19776.        A report command language system field, such as [DATE*]
  19777.  
  19778.        A report command language total or string bucket, such as
  19779.        [`ABC] or [`$ABC]
  19780.  
  19781.        The result of a calculation that produces a string, such as
  19782.        some date calculations, or the string calculations described
  19783.        below
  19784.  
  19785.      The term "string" also implies processing data solely as a
  19786.      series characters-not as numeric values, dates, or logical
  19787.      values. For example, the string "123" is processed differently
  19788.      from the numeric value "123." The string "123" is processed as
  19789.      the character "one" followed by the characters "two" and
  19790.      "three." Whereas, the numeric value "123" is processed as the
  19791.      value "one hundred and twenty-three." This does not mean that
  19792.      the source of a string can only be a character- type field or
  19793.      the result
  19794.      of an operation on characters. PC-File can process the
  19795.      contents of any field type as a string, even the results of
  19796.      numeric calculations can be treated as strings.
  19797.  
  19798.      PC-File's string functions let you:
  19799.  
  19800.  
  19801.  
  19802.  
  19803.      PC-File Version 7 Users Guide                            334
  19804.  
  19805.  
  19806.  
  19807.        Convert letters to upper-, lower-, or mixed case
  19808.  
  19809.        Isolate the first or last word in a string of words
  19810.  
  19811.        Trim spaces in a string
  19812.  
  19813.        Join strings of characters
  19814.  
  19815.      String functions can be used wherever PC-File calculations can
  19816.      be entered: field calculations, report calculations, .IF
  19817.      statement conditions, formula searches, with the pop-up
  19818.      calculator, and when redefining databases. Except, string
  19819.      functions cannot be used when defining a formula index, use
  19820.      dBASE equivalents-such as UPPER( ) or LOWER( )-instead. String
  19821.      function names must be entered in uppercase.
  19822.  
  19823.      "Argument" in following information refers to any of the
  19824.      following:
  19825.  
  19826.        A field name
  19827.  
  19828.        A "substring" or portion of a field, such as [DATE,7,2]
  19829.  
  19830.        A string of characters surrounded by quotation marks, for
  19831.        example: "This is a string of characters"
  19832.  
  19833.        A report language system field, such as [DATE*]
  19834.  
  19835.        A report language total bucket or string bucket, such as
  19836.        [`total] or [`$string]
  19837.  
  19838.        A nested calculation, such as (UPCASE(LAST(field1)))
  19839.  
  19840.      System field names must be in uppercase letters and surrounded
  19841.      with square [ ] brackets. Bucket names must be surrounded with
  19842.      square [ ] brackets. Nested calculations must have properly
  19843.      balanced parentheses.
  19844.  
  19845.      When using a report Language format, the entire string
  19846.      calculation must be contained on one line (which is true of
  19847.      any calculation in a report format). When using PC-File's
  19848.      Language Editor, this limits your calculations to 78
  19849.      characters, the maximum width the Language Editor can handle.
  19850.      However, you can edit a report .REP file with an editor or
  19851.      word processor outside of PC-File that allows for longer lines
  19852.      as long as that program can save unformatted files (sometimes
  19853.      referred to as "ASCII
  19854.      files" or "DOS text files").
  19855.  
  19856.      UPCASE(argument)
  19857.  
  19858.      This function converts all letter characters in a string to
  19859.      uppercase. Numbers and punctuation are not affected.
  19860.  
  19861.  
  19862.  
  19863.  
  19864.      PC-File Version 7 Users Guide                            335
  19865.  
  19866.  
  19867.      For example, if a field COMPANY contained the entry "Zippy-
  19868.      Cleen-2u," the calculation
  19869.  
  19870.      (UPCASE(COMPANY))
  19871.  
  19872.      would return "ZIPPY-CLEEN-2U."
  19873.  
  19874.      LOWCASE(argument)
  19875.  
  19876.      This function converts all letter characters in a string to
  19877.      lowercase. Numbers and punctuation are not affected.
  19878.  
  19879.      For example, if a field COMPANY contained the entry "Zippy-
  19880.      Cleen-2U," the calculation
  19881.  
  19882.      (LOWCASE(COMPANY))
  19883.  
  19884.      would return "zippy-cleen-2u."
  19885.  
  19886.      MIXCASE(argument)
  19887.  
  19888.      This function converts the first letter in each word in a
  19889.      string into uppercase and all following letters in each word
  19890.      to lowercase. For this purpose, a word is defined as a string
  19891.      of letters separated by anything other than a letter. Numbers
  19892.      and punctuation are not affected. This function is commonly
  19893.      used to change a name field with all upper case letters into
  19894.      mixed case.
  19895.  
  19896.      For example, if a field NAME contained the entry "JANE SMITH-
  19897.      JONES," the calculation
  19898.  
  19899.      (MIXCASE(NAME))
  19900.  
  19901.      would return "Jane Smith-Jones." Note that "Jones" in the
  19902.      hyphenated last name is left as an uppercase letter. If the
  19903.      result from the previous example, "zippy-cleen-2u" were used:
  19904.  
  19905.      (MIXCASE(COMPANY))
  19906.  
  19907.      would return "Zippy-Cleen-2U." Note that the "u" following "2"
  19908.      is made uppercase, because both the hyphen and "2" are treated
  19909.      as space between words.
  19910.  
  19911.      LASTWORD(argument)
  19912.  
  19913.      This function isolates the last word in a string. For this
  19914.      purpose, unlike MIXCASE, a word is defined as any string of
  19915.      characters separated by at least one space.
  19916.  
  19917.      For example, if a field NAME contained the entry "Jane Smith-
  19918.      Jones," the calculation
  19919.  
  19920.      (LASTWORD(NAME))
  19921.  
  19922.  
  19923.  
  19924.  
  19925.      PC-File Version 7 Users Guide                            336
  19926.  
  19927.  
  19928.      would return "Smith-Jones." Note that in this case the full
  19929.      hyphenated name is treated as one word, where the MIXCASE
  19930.      function would treat it as two separate words.
  19931.  
  19932.      FIRSTWORD(argument)
  19933.  
  19934.      This function isolates the first word in a string. For this
  19935.      purpose, a word is defined as any string of characters
  19936.      separated by at least one space.
  19937.  
  19938.      For example, if a field COMPANY contained the entry "Wilton-
  19939.      Smythe & Barney," the calculation
  19940.  
  19941.      (FIRSTWORD(COMPANY))
  19942.  
  19943.      would return "Wilton-Smythe." Note that in this case the full
  19944.      hyphenated name is treated as one word, where the MIXCASE
  19945.      function would treat it as two separate words.
  19946.  
  19947.      TRIM(argument)
  19948.  
  19949.      This function removes all space characters from the right end
  19950.      of a string. Most commonly this function is used to remove
  19951.      trailing spaces from the contents of a field when joining two
  19952.      or more strings together (see below).
  19953.  
  19954.      Concatenation or Joining of Strings
  19955.  
  19956.      "Concatenation" in programming and application languages
  19957.      refers to joining strings of characters together. PC-File
  19958.      symbolizes this operation with the semicolon (;), which is
  19959.      used like plus or minus signs in arithmetic calculations by
  19960.      placing the semicolon between strings or string calculations
  19961.      you want joined.
  19962.  
  19963.      For example, to join the two fields FIRST and LAST with a
  19964.      space between them, trimming any trailing spaces from FIRST,
  19965.      you would use the calculation
  19966.  
  19967.      (TRIM(FIRST);" ";LAST)
  19968.  
  19969.      which for a record containing "John" in FIRST and "Jones" in
  19970.      LAST would return "John Jones."
  19971.  
  19972.      Note that " " is used to put a space between the two fields
  19973.      because TRIM removes all trailing spaces from FIRST.
  19974.  
  19975.      Without using the TRIM function and " ", the full field length
  19976.      of FIRST (including trailing spaces) would appear before LAST.
  19977.      For example, if FIRST is a 10-character long field, the
  19978.      calculation:
  19979.  
  19980.      (FIRST;LAST)
  19981.  
  19982.      using the same data returns "John Jones."
  19983.  
  19984.  
  19985.  
  19986.  
  19987.      PC-File Version 7 Users Guide                            337
  19988.  
  19989.  
  19990.      You can use any of the string functions listed above as
  19991.      arguments. For example, the calculation:
  19992.  
  19993.      ("MR. ";UPPER(TRIM(FIRST));" ";UPPER(LAST))
  19994.  
  19995.      returns "MR. JOHN JONES."
  19996.  
  19997.      NOTE: You do not have to use the outermost set of parentheses
  19998.      when entering a string calculation into a field, when using
  19999.      the pop-up calculator, or when entering a calculation in a
  20000.      Free Form report. A set of parentheses is assumed in these
  20001.      areas of the program. For example, in any of the
  20002.      aforementioned areas you could type:
  20003.  
  20004.      TRIM(FIRST);" ";LAST
  20005.  
  20006.      However, you must use an outermost set of parentheses when
  20007.      entering string calculations into a report command format with
  20008.      the Language Editor. When using the Language Editor, the same
  20009.      calculation would have to be entered:
  20010.  
  20011.      (TRIM(FIRST);" ";LAST)
  20012.  
  20013.      Also, using square brackets around field names is optional in
  20014.      the Language editor. For example,
  20015.  
  20016.      (TRIM([FIRST]);" ";[LAST])
  20017.  
  20018.      is accepted by PC-File. However, do not use angle brackets
  20019.      around field names in any calculations.
  20020.  
  20021.      Relational Lookups
  20022.  
  20023.      Relational lookups are calculations only in the broadest sense
  20024.      of the word. They don't involve the mathematics associated
  20025.      with other calculations, but they do go through some
  20026.      contortions to provide an answer for you.
  20027.  
  20028.      Relational lookups establish a link between two databases and
  20029.      allow you to copy data from one database into another. For
  20030.      example, you could look up a company name and address in a
  20031.      database and copy it into another database to print out with
  20032.      each invoice.
  20033.  
  20034.      Relational lookups require that the two databases share common
  20035.      data. In other words, both databases must have a field with
  20036.      the same field type and contain records that have matching
  20037.      data. You can only perform a lookup for matching data in one
  20038.      shared field.
  20039.  
  20040.      For example, to copy a name and address from a database, you
  20041.      might use a customer number field shared by both databases. Or
  20042.      you could have a shared company name field, and copy the
  20043.      address from the second database.
  20044.  
  20045.  
  20046.  
  20047.  
  20048.      PC-File Version 7 Users Guide                            338
  20049.  
  20050.  
  20051.      NOTE: If a relational lookup field calculation finds no
  20052.      matching record, spaces are returned. This will write over,
  20053.      that is, "blank out" any current field entry and prevent you
  20054.      from overriding the lookup. If you need to prevent this from
  20055.      happening, choose Only When Field is Empty when prompted "When
  20056.      to apply this operation?" when entering the lookup. Also, if
  20057.      more than one record matches, only data from the first record
  20058.      found is returned.
  20059.  
  20060.      There are two types of lookups in PC-File: a basic lookup and
  20061.      a fast lookup. You can use the fast lookup only after you have
  20062.      used a basic lookup.
  20063.  
  20064.      Defining Basic Lookups
  20065.  
  20066.      You can define basic lookups using either of two methods:
  20067.  
  20068.        The dialog box method
  20069.  
  20070.        The formula method
  20071.  
  20072.      The simplest and most reliable way of defining a basic lookup
  20073.      is using the dialog box method. The main reason to enter
  20074.      relational lookups using the formula method is to enter
  20075.      specialized forms of lookups such as a fast lookup.
  20076.  
  20077.      Using the Dialog Box Method
  20078.  
  20079.      You can define basic lookups using the dialog box method
  20080.      throughout PC- File in most places lookups can be used:
  20081.  
  20082.        When creating and redefining databases
  20083.  
  20084.        When defining Free Form and Language format reports
  20085.  
  20086.        When writing Letters
  20087.  
  20088.        When using the pop-up calculator (CTRL-C)
  20089.  
  20090.      Depending on what area of the PC-File you are in, you either
  20091.      press a command button (the Lookup button when defining,
  20092.      redefining, or using the Language format; the LU button on the
  20093.      pop-up calculator; and the L button after choosing the Insert
  20094.      button when writing a letter) or make a menu selection (when
  20095.      using the Free Form format) to invoke the first lookup dialog
  20096.      box. The rest of the defining process works identically for
  20097.      all program areas.
  20098.  
  20099.      Choosing the Lookup Database
  20100.  
  20101.  
  20102.  
  20103.  
  20104.      PC-File Version 7 Users Guide                            339
  20105.  
  20106.  
  20107.      Relational lookups are defined using two dialog boxes. The
  20108.      first dialog box is used to pick which database you want to
  20109.      copy data from. This database is called the lookup database.
  20110.      The dialog box used to choose the lookup database looks and
  20111.      works same as the file selection boxes used throughout PC-File
  20112.      to open databases and other files. See Chapter 1, "Selecting a
  20113.      File" for details on how to use the features of a file
  20114.      selection dialog box.
  20115.  
  20116.      Defining the Fields to Match With and Copy From
  20117.  
  20118.      Once you chose the database to copy from, a second dialog box
  20119.      displays.
  20120.  
  20121.      The top two lines of the dialog box list the two databases
  20122.      affected by the lookup. The Current file is the database
  20123.      currently open into which the lookup data will be copied. The
  20124.      Lookup file is the database selected with the previous dialog
  20125.      box from which the lookup data will be copied.
  20126.  
  20127.      The two list boxes on either side of "MATCH WITH" determine
  20128.      which fields link the two databases. Generally this is a field
  20129.      that contains something that is uniquely in common between the
  20130.      two databases, such as a part number, ID number, or social
  20131.      security number. The two fields don't have to have the same
  20132.      name, but they do have to be of the same field type and
  20133.      length. Choose the field to match with from the current
  20134.      database with the left "Field" list box. Choose the field to
  20135.      match with from the lookup database with the right "Lookup
  20136.      field" list box.
  20137.  
  20138.      Choose which field to retrieve the lookup data from with the
  20139.      "Retrieve field" list box in the lower right corner of the
  20140.      Define Lookup dialog box.
  20141.  
  20142.      What appears below the heading "Current Field" in the lower
  20143.      left corner depends on what area of the program you are in:
  20144.  
  20145.        The field that the lookup data will be copied into displays,
  20146.        if you are entering a calculation when defining or
  20147.        redefining a database.
  20148.  
  20149.        "Calculator" displays when using the LU button on the pop-up
  20150.        calculator.
  20151.  
  20152.        "Report" displays when defining a relational lookup for a
  20153.        report.
  20154.  
  20155.      Choosing OK either defines the relational lookup formula for
  20156.      the field or report, or displays the result when using the
  20157.      pop-up calculator.
  20158.  
  20159.      To define a basic lookup using the dialog box method:
  20160.  
  20161.  
  20162.  
  20163.  
  20164.      PC-File Version 7 Users Guide                            340
  20165.  
  20166.  
  20167.      1.Depending on what area of the PC-File you are in, either
  20168.        choose the Lookup command button or choose the Lookup menu
  20169.        selection to invoke the first lookup dialog box.
  20170.  
  20171.      2.Choose the Lookup database from the Files list box. Use the
  20172.        directories list box or the Search buttons if the database
  20173.        you want to copy from is not in the current directory.
  20174.  
  20175.      3.Choose the field in the current database to match with from
  20176.        the upper left-hand list box.
  20177.  
  20178.      4.Choose the field in the lookup database to match with from
  20179.        the upper right-hand list box.
  20180.  
  20181.      5.Choose the field to copy from using the lower right-hand
  20182.        list box.
  20183.  
  20184.      6.Choose OK to continue.
  20185.  
  20186.  
  20187.      Using the Formula Method
  20188.  
  20189.      You can define basic lookups using the formula method wherever
  20190.      you can type other PC-File calculations, such as: in field
  20191.      calculations, in reports and letters, and when using the pop-
  20192.      up calculator. You can even use relational lookups as part of
  20193.      a formula search or an .IF statement condition.
  20194.  
  20195.      To perform a lookup, you need to know four things:
  20196.  
  20197.        the name of the shared field in the current database
  20198.  
  20199.        the name of the lookup database
  20200.  
  20201.        the name of the shared field in the lookup database
  20202.  
  20203.        the name of the lookup field in the lookup database
  20204.  
  20205.      The lookup field is the field from which you want to pull data
  20206.      into the current database.
  20207.  
  20208.      To use a lookup, follow this format:
  20209.  
  20210.           (@shared field in current database,lookup database,shared
  20211.           field in lookup database,lookup field)
  20212.  
  20213.      Enclose relational lookups in parentheses, and always use the
  20214.      at (@) sign at the beginning of the lookup expression. Then
  20215.      list the shared field in the current database, the lookup
  20216.      database, the shared field in the lookup database, and finally
  20217.      the lookup field.
  20218.  
  20219.      A relational lookup might look something like this:
  20220.  
  20221.           (@member_no,member,member_no,firstname)
  20222.  
  20223.  
  20224.  
  20225.  
  20226.      PC-File Version 7 Users Guide                            341
  20227.  
  20228.  
  20229.      You could read that lookup like this:
  20230.  
  20231.      "Using the Member_no field in the current database, go to the
  20232.      Members database and find the record with the same data in the
  20233.      Member_no field in that database. Then retrieve the data from
  20234.      the Firstname field."
  20235.  
  20236.      The shared fields don't have to have the same name, though
  20237.      they do have to be of the same field type and length. The
  20238.      lookup could look like this instead:
  20239.  
  20240.      (@member_no,member,number,firstname)
  20241.  
  20242.      The Member_no and Number fields contain the same data.
  20243.  
  20244.      The lookup database name can include a path if necessary. For
  20245.      example, if the Members database were on a different
  20246.      directory, you could enter the lookup like this:
  20247.  
  20248.      (@member_no,\pcfile\member,member_no,firstname)
  20249.  
  20250.      You can include a drive name if necessary, but do NOT include
  20251.      a file extension.
  20252.  
  20253.      Fast Lookups
  20254.  
  20255.      When you want to retrieve two or more fields from the same
  20256.      record of the same database, you can use a fast lookup for all
  20257.      fields after the first lookup. For the first lookup, use a
  20258.      basic lookup defined with either method outlined above. For
  20259.      all subsequent lookups from that database use the format:
  20260.  
  20261.      (@*,lookup data)
  20262.  
  20263.      With the Member database, subsequent lookups might look like
  20264.      this:
  20265.  
  20266.           (@*,lastname)
  20267.           (@*,address1)
  20268.           (@*,city)
  20269.  
  20270.      The fast lookup assumes that you are looking in the same
  20271.      database and the same record as you used in the first lookup.
  20272.      Each time PC-File performs a basic lookup, it memorizes the
  20273.      entire matching record. Subsequent fast lookups can pull any
  20274.      fields from that memorized record without having to search the
  20275.      lookup database. In that way you could pull in the complete
  20276.      name and address contained in another database quickly and
  20277.      easily.
  20278.  
  20279.  
  20280.  
  20281.  
  20282.      PC-File Version 7 Users Guide                            342
  20283.  
  20284.  
  20285.      NOTE: Fast lookups will only work correctly if a basic lookup
  20286.      has been performed as the first lookup within the same record.
  20287.      PC-File performs field calculations in the same order fields
  20288.      are accessed. For this reason, you must make sure that the
  20289.      field that you entered the basic lookup into is accessed
  20290.      before any fields containing fast lookups. See Chapter 3,
  20291.      "Modifying a Database Structure" if you need to change this.
  20292.      For the same reason, when entering the lookups make sure that
  20293.      all lookups are
  20294.      performed at the same time. If you have any doubts about any
  20295.      of these requirements, do not use Fast lookups.
  20296.  
  20297.      Troubleshooting Calculations
  20298.  
  20299.      If the calculations in your database don't give you the
  20300.      correct results, investigate the following:
  20301.  
  20302.        Check field names to make sure they are spelled correctly.
  20303.        If you have abbreviated field names, make sure PC-File can
  20304.        tell which fields you mean.
  20305.  
  20306.        Make sure you have used the correct operator. Use the
  20307.        asterisk for multiplication, not an x. Use != for "not equal
  20308.        to" and the pipe character, which is SHIFT-backslash on most
  20309.        keyboards, for "or."
  20310.  
  20311.        Check your expression to see that you have an equal number
  20312.        of left and right parentheses.
  20313.  
  20314.        Make sure date, time, and random number functions are
  20315.        entered in uppercase letters and that the functions are
  20316.        preceded by the at (@) sign. The mask following an @DAY#
  20317.        function, e.g. mdy/, must be in lowercase. All but the
  20318.        (@DATE) and (@TIMENOW) functions must be followed by the
  20319.        pound (#) sign.
  20320.  
  20321.        For relational lookups, make sure the lookup database
  20322.        contains the data you think it does. If necessary, conduct a
  20323.        search in the lookup database to confirm that it does in
  20324.        fact contain the data.
  20325.  
  20326.        Lookup data may not be returned if the index in the lookup
  20327.        database is damaged. Rebuild the indexes if necessary.
  20328.  
  20329.      For explanations of error messages, see Appendix D.
  20330.  
  20331.  
  20332.  
  20333.  
  20334.      PC-File Version 7 Users Guide                            343
  20335.  
  20336.  
  20337.  
  20338.      CHAPTER 18 BATCH POSTING
  20339.  
  20340.      The Batch Post command on the Utilities menu is a powerful
  20341.      feature that lets you to update a remote or "destination"
  20342.      database with information from the current or "source"
  20343.      database. This operation is referred to as "posting." Also,
  20344.      for added security, PC-File has a Batch Post "undo" feature
  20345.      that allows you to restore data changed by your last posting.
  20346.  
  20347.      What is Batch Posting?
  20348.  
  20349.      Batch posting sends data from the current or source database
  20350.      to a remote or destination database. Most typically, the
  20351.      source database is a database used to keep track of
  20352.      transactions liking billing or invoicing. Likewise, the
  20353.      destination database is a "master" database used to track
  20354.      items such as account balances or inventory. In order for
  20355.      systems like this to work properly, you must have a field
  20356.      containing data held in common between both databases that can
  20357.      be used to establish the desired
  20358.      link-such as an account number, social security number, ID
  20359.      number, part number, or SKU number.
  20360.  
  20361.      Just like a relational lookup, PC-File establishes the link
  20362.      between the two databases by matching the data held in common
  20363.      between the two databases. Only one field in each database can
  20364.      be used to establish the link. For example, an account number
  20365.      field in one database can be used as a link to post to any
  20366.      other database with a field containing matching account
  20367.      numbers.
  20368.  
  20369.      Unlike a relational lookup, posting cannot be used like a
  20370.      field calculation that is performed whenever a record is added
  20371.      or modified. Posting must be performed as a "batch" operation
  20372.      by running a post definition on demand using the Run option on
  20373.      the Batch Post dialog box. You are also given the option to
  20374.      run a posting immediately after you define it. This batch mode
  20375.      of operation distinguishes PC-File's Batch Post from "fully
  20376.      relational" programs that will automatically post data
  20377.      whenever the
  20378.      linked data in the source database is changed.
  20379.  
  20380.      You must run a Batch Post from the source database-the
  20381.      database in which the posting was originally defined. When
  20382.      running a Batch Post you have the option to post from all or
  20383.      selected records in the source database.
  20384.  
  20385.      A Batch Post definition can only post from one source database
  20386.      to one destination database. However, you can define as many
  20387.      Batch Post definitions as you want to allow you to post from
  20388.      one database to any number of destination databases. And, if
  20389.      you wish, you could automate the process by defining a macro
  20390.      to run each Batch Post definition in succession.
  20391.  
  20392.      Which Records Are Affected?
  20393.  
  20394.  
  20395.  
  20396.  
  20397.      PC-File Version 7 Users Guide                            344
  20398.  
  20399.  
  20400.  
  20401.      When posting, the relationship between records in the source
  20402.      and destination databases can be:
  20403.  
  20404.      One to One
  20405.  
  20406.      One matching record from the source database posts to one
  20407.      record in the destination database. This assumes each matching
  20408.      record is unique in its respective database, or that you have
  20409.      selected to post only records from the source database that
  20410.      have a unique match in the destination database.
  20411.  
  20412.      One to Many
  20413.  
  20414.      One record from the source database posts to one or more
  20415.      matching records in the destination database. This assumes
  20416.      that each record in the source database matches one or more
  20417.      records in the destination database. Or, that you have
  20418.      selected a set of non- duplicate records that have one or more
  20419.      matches each in the destination database.
  20420.  
  20421.      Many to One
  20422.  
  20423.      Many matching records from the source database post to one
  20424.      matching record in the destination database. This assumes that
  20425.      there is at least one set of records with duplicate match
  20426.      fields in the source database that match a unique record in
  20427.      the source database.
  20428.  
  20429.      The form the relationship between the databases involved in a
  20430.      Batch Post operation takes depends on either how the data is
  20431.      entered, or which records you select when posting. For
  20432.      example, let's say you want to post only last month's receipts
  20433.      from database A to database B. Either database A must contain
  20434.      only last month's records-you deleted or archived any previous
  20435.      month's records-or you must choose Some when running the
  20436.      posting and search on a date field to select only last month's
  20437.      records.
  20438.  
  20439.  
  20440.      NOTE: When performing a One to Many posting, make sure that
  20441.      the matching field in the destination database is indexed.
  20442.      Otherwise, all matches won't be found and posted. This is a
  20443.      good idea as a general rule, as this will also speed up the
  20444.      searches performed when posting.
  20445.  
  20446.  
  20447.      Post Actions
  20448.  
  20449.      A Batch Post operation can consist of one or more post
  20450.      actions. A post action is a transaction between one field in
  20451.      the source database and one field in the destination database.
  20452.      Each post action can perform one of the following operations
  20453.      on the designated destination database field:
  20454.  
  20455.      Replace
  20456.  
  20457.  
  20458.  
  20459.  
  20460.      PC-File Version 7 Users Guide                            345
  20461.  
  20462.  
  20463.      Replaces with data from the source database
  20464.  
  20465.      Add
  20466.      Adds the value from the source database
  20467.  
  20468.      Subtract From
  20469.      Subtracts the value from the source database
  20470.  
  20471.      Multiply
  20472.      Multiplies by the value from the source database
  20473.  
  20474.      Divide Into
  20475.      Divides by the value from the source database
  20476.  
  20477.      The last four options are mathematical operations, which are
  20478.      only appropriate for numeric values.
  20479.  
  20480.      For example, you could update an Inventory database from a
  20481.      Transactions database by choosing to match on the part number
  20482.      field, then define your post action to subtract the Quantity
  20483.      field in the Transactions database from the Quantity field in
  20484.      the Inventory database.
  20485.  
  20486.      Likewise, an Accounts database can be updated by using Add,
  20487.      for credits, or Subtract From, for debits, as post actions
  20488.      from a Transactions database.
  20489.  
  20490.  
  20491.      Defining a Batch Post
  20492.  
  20493.      To define a Batch Post operation, you must first open the
  20494.      database you want to post from. Then choose the Batch Post
  20495.      option from the Utilities menu which displays the Destination
  20496.      File dialog box. This dialog box works identically to the Open
  20497.      dialog box that you use to open a database. See "Selecting a
  20498.      File" in Chapter 1 for details on how to use a file selection
  20499.      dialog box. The database you choose with the Destination File
  20500.      dialog box is the destination database-the database the source
  20501.      database (the database currently open) posts to.
  20502.  
  20503.      Once you have chosen the destination database, the Define
  20504.      Posting dialog is displayed.
  20505.  
  20506.      This dialog box is organized into two columns of list boxes to
  20507.      define post actions, with a large list box at the bottom that
  20508.      summarizes the post actions defined. The two list boxes in the
  20509.      left column list fields from the source database and the two
  20510.      list boxes in the right column lists fields from the
  20511.      destination database.
  20512.  
  20513.      Choosing the "Match to" Fields
  20514.  
  20515.  
  20516.  
  20517.  
  20518.      PC-File Version 7 Users Guide                            346
  20519.  
  20520.  
  20521.      The first list box in each column (the "match to" list boxes)
  20522.      defines which field from each database to match on. You can
  20523.      only choose one field from the source database to match on one
  20524.      field from the destination database. Choose a field from each
  20525.      "match to" list box by clicking on the desired field, or
  20526.      highlighting the field and pressing ENTER. A checkmark appears
  20527.      to the left indicating the field is selected.
  20528.  
  20529.      Defining Post Actions
  20530.  
  20531.      The second list box in each column (the "post to" list boxes)
  20532.      and the radio buttons between them define how each post action
  20533.      is performed. Defining a post action is a four-step process:
  20534.  
  20535.      1.Choosing the source field from the left list box.
  20536.  
  20537.      2.Choosing the radio button to determine how to post the
  20538.        source data: Replace, Add, Subtract, Multiply, or Divide.
  20539.  
  20540.      3.Choosing the destination field to post to from the right
  20541.        list box.
  20542.  
  20543.      4.Choosing the Accept command button to define the post
  20544.        action.
  20545.  
  20546.      After you choose the Accept command button, the defined post
  20547.      action appears in the Post Actions list box. Continue this
  20548.      four-step process to define as many post actions as you
  20549.      desire. If you define more post actions than can be displayed
  20550.      at once in the list box, use the scroll bar to the right of
  20551.      the post actions list box to review your post actions. If you
  20552.      make a mistake when defining a post action, highlight its
  20553.      description in the post actions list box and choose Undo 1.
  20554.  
  20555.      Choose OK to complete the posting definition. You are then
  20556.      asked if you want to save the post definition. Choose Yes and
  20557.      save the file, if you intend to run this post operation more
  20558.      than once, or if you will not being running it immediately
  20559.      after it is defined. Choose No if you want to run this post
  20560.      operation immediately after defining it and do not need to
  20561.      save it.
  20562.  
  20563.  
  20564.      To define a Batch Post:
  20565.  
  20566.      1.Choose Utilities from the menu bar.
  20567.  
  20568.      2.Choose Batch Post.
  20569.  
  20570.      3.Choose Define a New Posting.
  20571.  
  20572.      4.Choose the destination database using the file selection
  20573.        dialog box. Choose OK to continue.
  20574.  
  20575.      5.Choose the Match to field for the source database from the
  20576.        first list box on the left.
  20577.  
  20578.  
  20579.  
  20580.  
  20581.      PC-File Version 7 Users Guide                            347
  20582.  
  20583.  
  20584.  
  20585.      6.Choose the Match to field for the destination database from
  20586.        the first list box on the right.
  20587.  
  20588.      7.Perform the following four steps using the Post to list
  20589.        boxes and radio buttons between them for each post action
  20590.        you want to define:
  20591.  
  20592.        Choose the source field from the left-hand list box.
  20593.  
  20594.        Choose the radio button to determine how to post the source
  20595.        data.
  20596.  
  20597.        Choose the destination field to post to from the right-hand
  20598.        list box.
  20599.  
  20600.        Choose the Accept command button to define the post action.
  20601.        Repeat these steps for every post action you want to define.
  20602.  
  20603.      8.Choose OK to proceed.
  20604.  
  20605.      9.Save your posting definition, if you want to use it again in
  20606.        the future.
  20607.  
  20608.      10.  Choose to run the post definition, if desired.
  20609.  
  20610.      Running a Batch Post
  20611.  
  20612.      You can run your post operation either immediately after
  20613.      defining it, or if you have saved the post definition, by
  20614.      choosing the Run option on the Batch Post dialog box. You must
  20615.      be in the source database you originally defined the posting
  20616.      from to run a previously defined posting.
  20617.  
  20618.      When running a posting you can post from all or some records.
  20619.      If you choose All records, every record in the source database
  20620.      is checked for a match or matches in the destination database-
  20621.      when a match is found the post action or actions are performed
  20622.      on that record. This continues until all records in the source
  20623.      database are processed. If you choose Some records, you enter
  20624.      a Simple, Formula, or Global search to select which records
  20625.      from the source database will be processed. Again, only
  20626.      matching records are posted.
  20627.  
  20628.  
  20629.  
  20630.  
  20631.      PC-File Version 7 Users Guide                            348
  20632.  
  20633.  
  20634.      Regardless of whether you choose to post from All or Some
  20635.      records, the first record you are presented with displays a
  20636.      dialog box with the prompt, "Post from this record?" with Yes,
  20637.      No, All, or Quit buttons. Generally you will choose All to
  20638.      have PC-File automatically process your records. However, you
  20639.      can use the Yes and No buttons to manually choose which of the
  20640.      records to process. Choosing Yes accepts that record and
  20641.      proceeds to the next one. Answering Yes does not necessarily
  20642.      mean that the records data will be posted to the destination
  20643.      database- data will be posted only if the two "match to"
  20644.      fields' data matches. Choosing No omits that record and
  20645.      proceeds to the next one. Choosing Quit stops the posting
  20646.      process.
  20647.  
  20648.      To run a previously defined Batch Post:
  20649.  
  20650.      1.Choose Utilities.
  20651.  
  20652.      2.Choose Batch Post.
  20653.  
  20654.      3.Choose the desired post definition.
  20655.  
  20656.      4.Choose All or Some.
  20657.  
  20658.      5.If you chose All above, the first record to post from is
  20659.        displayed, prompting "Post from this record?
  20660.        Yes/No/All/Quit." Answer appropriately to post data.
  20661.  
  20662.      6.If you chose Some proceed to next step.
  20663.  
  20664.      7.If you chose Some above, choose the method to select records
  20665.        with and enter your selection criteria. Refer to the
  20666.        appropriate section under "Conducting a Search" for details.
  20667.  
  20668.      8.Answer the "Post from this Record?" prompt appropriately to
  20669.        post data.
  20670.  
  20671.      UnPost-Undoing a Batch Post
  20672.  
  20673.      The UnPost option on the Batch Post dialog box allows you to
  20674.      "undo" the last posting you performed on a database. PC-File
  20675.      maintains a log file of all data that is changed by a post
  20676.      operation. This log file is saved under the same name as the
  20677.      affected database with a .LOG extension. For example, a
  20678.      database named BALANCE would have an UnPost log file named
  20679.      BALANCE.LOG. To undo the most recent posting to a database,
  20680.      you must be in the database that was posted to (not the
  20681.      database the posting was defined from) and choose the UnPost
  20682.      option on the Batch Post dialog box.
  20683.  
  20684.      The UnPost log file only keeps track of the changes made by
  20685.      the last posting. Therefore, if you perform a posting in error
  20686.      you must immediately restore changes before performing any
  20687.      other posting operation on that database.
  20688.  
  20689.  
  20690.  
  20691.  
  20692.      PC-File Version 7 Users Guide                            349
  20693.  
  20694.  
  20695.      For additional security, you can make backup copies of .LOG
  20696.      files before performing additional postings to a database.
  20697.      Then, if you need to restore changed data, you can copy the
  20698.      backup copy of the .LOG file into the same directory as the
  20699.      affected database and use the UnPost option to restore data.
  20700.      Note that the .LOG file only keeps track of data changed in a
  20701.      single post operation. If you have made several postings and
  20702.      wish to restore all data changed across all those postings,
  20703.      you must have backed up .LOG files between every posting
  20704.      (either to separate floppies or by renaming each .LOG file to
  20705.      a unique name). Then you must UnPost each .LOG file in order
  20706.      from the most recent posting back to the earliest posting you
  20707.      want to undo.
  20708.  
  20709.      For the greatest level of security, back up the entire
  20710.      database before any posting.
  20711.  
  20712.      To undo a Batch Post:
  20713.  
  20714.      1.Open the database that you want to UnPost.
  20715.  
  20716.      2.Choose Utilities.
  20717.  
  20718.      3.Choose UnPost. A dialog box displays showing the date the
  20719.        database was last changed. If this date later than the time
  20720.        of the posting you want to undo, proceeding probably will
  20721.        not restore the desired data. You must either copy the
  20722.        appropriate databasename.LOG file into your data directory
  20723.        and repeat steps 1-3, or restore a backup of the database
  20724.        itself.
  20725.  
  20726.      4.Choose Yes to continue.
  20727.  
  20728.      When the UnPost operation is finished an information box
  20729.      displays showing the number of records restored.
  20730.  
  20731.  
  20732.  
  20733.  
  20734.      PC-File Version 7 Users Guide                            350
  20735.  
  20736.  
  20737.  
  20738.      CHAPTER 19 MEMORY USAGE AND PERFORMANCE
  20739.  
  20740.      PC-File performance has been sped up using a number of
  20741.      different methods. Some improvements relate to specifically to
  20742.      the program's internal workings: reworking and optimization of
  20743.      the way the program displays screen images and improvements in
  20744.      the compiler technology. Other improvements have been made in
  20745.      the way PC-File exploits your system's memory and disk
  20746.      resources.
  20747.  
  20748.  
  20749.  
  20750.      Kinds of Memory
  20751.  
  20752.      Before discussing how PC-File uses memory, let's briefly cover
  20753.      the various kinds of memory available on PC systems.
  20754.  
  20755.      A PC system can have up to 3 kinds of RAM memory storage:
  20756.  
  20757.      Conventional memory
  20758.  
  20759.      The memory that standard DOS programs can use, up to a maximum
  20760.      of 640K. DOS COMMAND.COM uses some conventional memory, any
  20761.      device drivers or memory-resident programs (TSR's) listed in
  20762.      your CONFIG.SYS and AUTOEXEC.BAT files use additional memory.
  20763.      The amount of conventional memory you have available to run
  20764.      programs in after booting your computer is displayed on the
  20765.      last line of the report listed by running the DOS CHKDSK
  20766.      command.
  20767.  
  20768.      Extended memory (XMS)
  20769.  
  20770.      Memory in addition to conventional memory, not available on
  20771.      8086/88 computers, only on 80286 or higher models. Available
  20772.      through the use of add-on hardware cards, and directly on the
  20773.      motherboard on many newer model computers.
  20774.  
  20775.      Expanded memory (EMS)
  20776.  
  20777.      Memory in addition to conventional memory, so-called "paged"
  20778.      memory based on standards established by Lotus, Intel and
  20779.      Microsoft (LIM EMS). Generally available through the use of an
  20780.      add-on hardware card. 386 and 486 computers can make extended
  20781.      memory act as expanded memory using device drivers such as
  20782.      EMM386.EXE (which is included with MS-DOS 5.0).
  20783.  
  20784.      How PC-File Uses Memory
  20785.  
  20786.      When PC-File is running, pressing CTRL-Z displays an
  20787.      information window.
  20788.  
  20789.      Each number listed has the following significance:
  20790.  
  20791.      Available RAM
  20792.  
  20793.  
  20794.  
  20795.  
  20796.      PC-File Version 7 Users Guide                            351
  20797.  
  20798.  
  20799.      The total amount of conventional memory currently available
  20800.      within PC-File, not counting memory for Overlay Buffer or Disk
  20801.      Buffer (if any).
  20802.  
  20803.      Minimum RAM
  20804.  
  20805.      The lowest amount of conventional memory available at any
  20806.      point within a session.
  20807.  
  20808.      Overlay Buffer
  20809.  
  20810.      The amount of conventional memory set aside to swap "overlays"
  20811.      in and out of memory. Overlays are portions of the program
  20812.      that are ordinarily loaded from disk whenever they are
  20813.      required. When the overlay buffer is active, the first time
  20814.      PC-File requires an overlay it copies the overlay from disk
  20815.      into the overlay buffer. Once an overlay has been copied to
  20816.      memory, PC-File can make subsequent accesses much more
  20817.      quickly.
  20818.  
  20819.      Disk Buffer
  20820.  
  20821.      The amount of conventional memory set aside to cache data
  20822.      records and index entries for faster database access. This
  20823.      number will vary from 0 to 16000 depending on how much
  20824.      conventional memory is available when PC-File is started.
  20825.  
  20826.      Using Extended (or Expanded) Memory
  20827.  
  20828.      If PC-File has detected either extended or expanded memory on
  20829.      your system, the last line in the box will read either "Using
  20830.      extended memory" or "Using expanded memory." PC-File will not
  20831.      use both kinds of memory at the same time. If your machine has
  20832.      both kinds of memory, PC-File will use expanded memory because
  20833.      it is less likely to conflict with other programs. PC-File
  20834.      does not list the amount of extended or expanded memory in
  20835.      use. It uses as much as it needs, typically not more than
  20836.      500K.
  20837.  
  20838.      PC-File can use this additional memory to swap overlays in the
  20839.      same fashion described under "Overlay Buffer." Additionally,
  20840.      PC-File can use expanded memory to swap the contents of
  20841.      conventional memory when using the Drop to DOS command on the
  20842.      Tools menu and choosing to free memory, when using the Labels
  20843.      command on the Utilities menu, or when graphing.
  20844.  
  20845.      Memory Usage Configuration Commands
  20846.  
  20847.  
  20848.  
  20849.  
  20850.      PC-File Version 7 Users Guide                            352
  20851.  
  20852.  
  20853.      Two configuration commands have been added to PC-File to allow
  20854.      you to control whether or not PC-File will use expanded or
  20855.      extended memory: /NOXMS and /NOEMS. These can be used like all
  20856.      configuration commands, either directly from the DOS prompt
  20857.      when starting PC-File, or by editing your .PRO file with any
  20858.      editor or word processor that can save unformatted ASCII
  20859.      files. See Chapter 13, "Advanced Profile Parameters" for
  20860.      details on editing a profile or using configuration commands
  20861.      at the DOS prompt.
  20862.  
  20863.      /NOXMS
  20864.      Prevents PC-File from using extended memory
  20865.  
  20866.      /NOEMS
  20867.      Prevents PC-File from using expanded memory
  20868.  
  20869.      You might need to use these commands if PC-File's use of
  20870.      extended or expanded memory appears to be in conflict with
  20871.      other programs. Also, if your systems has both kinds of
  20872.      memory, PC-File will use expanded (EMS) memory by default.
  20873.      Using just the /NOEMS configuration command forces PC-File to
  20874.      use extended memory instead.
  20875.  
  20876.      APPENDIX A
  20877.  
  20878.      IF YOU NEED TECHNICAL SUPPORT
  20879.  
  20880.  
  20881.  
  20882.      If you are unable to find the answers to your questions in the
  20883.      manuals or help windows, we invite you to call our Technical
  20884.      Support department. They will be happy to answer any technical
  20885.      questions you have about PC-File.
  20886.  
  20887.      To receive technical support, call 1-900-454-8000 Monday
  20888.      through Friday. If you are unable to use the 900 number for
  20889.      technical support or would prefer a prepaid support plan that
  20890.      provides for unlimited technical support on an annual basis,
  20891.      please contact us at 1-800-528-8866 for information on
  20892.      purchasing a Product Support Plan.
  20893.  
  20894.      If you have a modem, you can also contact our Technical
  20895.      Support department on our bulletin board or on CompuServe. Our
  20896.      bulletin board operates 24 hours a day, 7 days a week. The
  20897.      bulletin board phone number is 206-454-7875. There is no
  20898.      charge to use our bulletin board, other than your long
  20899.      distance charge. You can reach our Technical Support
  20900.      department on CompuServe in Section 1 of the PCVENA forum.
  20901.      Type go pcvena at the CompuServe ! prompt to access the PCVENA
  20902.      forum. Regular connect charges apply when using CompuServe.
  20903.  
  20904.      To help us help you, please be prepared to provide the
  20905.      following information when you call.
  20906.  
  20907.        Computer brand and model
  20908.  
  20909.  
  20910.  
  20911.  
  20912.      PC-File Version 7 Users Guide                            353
  20913.  
  20914.  
  20915.        Available RAM (as reported by DOS CHKDSK or MEM)
  20916.  
  20917.        DOS version being used
  20918.  
  20919.        Memory resident programs installed
  20920.  
  20921.        Printer brand and model
  20922.  
  20923.        Monitor brand and model
  20924.  
  20925.        Exact wording of any error message(s)
  20926.  
  20927.      If possible, be at your computer when you call, with your
  20928.      computer on. Also, it often helps if you have available the
  20929.      database description printout (produced using Database
  20930.      Description on the Utilities menu) for the database in
  20931.      question, as well as a printout of any report format you are
  20932.      having problems with.
  20933.  
  20934.  
  20935.  
  20936.  
  20937.      PC-File Version 7 Users Guide                            354
  20938.  
  20939.  
  20940.  
  20941.      APPENDIX B
  20942.  
  20943.  
  20944.      PROGRAM AND DATABASE FILES
  20945.  
  20946.  
  20947.  
  20948.      PC-File consists of over a dozen program files. All of these
  20949.      files are loaded when you install the program. Two of the
  20950.      files--PCF.EXE and PCF.HLP--are absolutely essential for
  20951.      running PC-File. The other program files can be erased if
  20952.      necessary. Refer to the list below to see what you lose if you
  20953.      delete a file.
  20954.  
  20955.      PC-File creates a variety of files for each database that you
  20956.      define. Some of these, such as the header and data files, are
  20957.      an integral part of the database. Others, like report and
  20958.      letter files, are added as you define those features in the
  20959.      database.
  20960.  
  20961.      Your PC-File disks also contain several dozen sample files.
  20962.      The examples in the manuals refer to these sample files.
  20963.  
  20964.      All of the program files and each type of database file are
  20965.      explained below.
  20966.  
  20967.  
  20968.  
  20969.      PROGRAM FILES
  20970.  
  20971.      FCONVERT.COM
  20972.  
  20973.      This is a standalone program that converts PC-File III, PC-
  20974.      File/R, and PC-File+ databases into the new PC-File (dBASE III
  20975.      PLUS) format. You can delete this program after you have no
  20976.      further use for it.
  20977.  
  20978.      INSTALL.EXE
  20979.  
  20980.      The PC-File install program. It comes on Disk One, but is not
  20981.      copied onto your hard disk.
  20982.  
  20983.      MSHERC.COM
  20984.  
  20985.      This program must be run before you can produce graphs on a
  20986.      Hercules monitor. If you have a VGA, EGA, or CGA monitor, you
  20987.      can delete this file.
  20988.  
  20989.      PCF.DIC
  20990.  
  20991.      This file contains the 100,000 word dictionary used by PC-
  20992.      File's spell checker. You can delete this file if you will not
  20993.      be using the spell checker.
  20994.  
  20995.      PCF.EXE
  20996.  
  20997.  
  20998.  
  20999.  
  21000.      PC-File Version 7 Users Guide                            355
  21001.  
  21002.  
  21003.  
  21004.      The main program module of PC-File. Don't impinge the
  21005.      integrity of this file at all. You must start PC-File from the
  21006.      directory that contains this file or place PC-File on your DOS
  21007.      path.
  21008.  
  21009.      PCF.HLP
  21010.  
  21011.      This is another main file, without which PC-File will not run.
  21012.      This file contains not only the Help window text, but most of
  21013.      the other screen text as well. Place this file on the same
  21014.      drive and in the same subdirectory with PCF.EXE.
  21015.  
  21016.      PCF.PIF
  21017.  
  21018.      The Windows PIF (Program Information File) used to run PC-File
  21019.      in Graphics mode under Microsoft Windows. Run this file
  21020.      directly from the File Manager, or use New on the File menu of
  21021.      the Program Manager to define it as a Program Item.
  21022.  
  21023.      PCF.SUP
  21024.  
  21025.      The "supplemental" dictionary file that is created when you
  21026.      use the Add function in the spell checker to add words to your
  21027.      personal dictionary file.
  21028.  
  21029.      PCFCHAR.PIF
  21030.  
  21031.      The Windows PIF (Program Information File) used to run PC-File
  21032.      in Character mode under Microsoft Windows. Run this file
  21033.      directly from the File Manager, or use New on the File menu of
  21034.      the Program Manager to define it as a Program Item.
  21035.  
  21036.      PCFLOGO.IMG
  21037.  
  21038.      This file contains the PC-File "paper clip" logo that displays
  21039.      when you first start PC-File in Graphics mode. You can delete
  21040.      this file if you want.
  21041.  
  21042.      PCFILE.MAC
  21043.  
  21044.      The master macro file. You can create macros in this file to
  21045.      open your databases or perform other operations outside of
  21046.      individual databases. This file is not required to use PC-
  21047.      File.
  21048.  
  21049.      PCFILE.PRO
  21050.  
  21051.      The master configuration profile file. This file controls the
  21052.      operating environment of PC-File, including the mode of
  21053.      operation, screen colors, passwords, and telephone dialing
  21054.      codes. This file is not required to use PC-File.
  21055.  
  21056.      PCG2.EXE
  21057.  
  21058.  
  21059.  
  21060.  
  21061.      PC-File Version 7 Users Guide                            356
  21062.  
  21063.  
  21064.      This is the graphing display program. If you will be producing
  21065.      graphs, this program must be in the same subdirectory as your
  21066.      other PC-File programs. If you will not be producing graphs,
  21067.      you can delete this program.
  21068.  
  21069.      PCG2.ASP
  21070.  
  21071.      This file is created when you set colors or a different aspect
  21072.      ratio for graphing. This file is not required to use PC-File.
  21073.  
  21074.      PCLABEL.EXE
  21075.  
  21076.      An external/internal utility that allows you to print mailing
  21077.      labels in a one-up or multi-up format. You can delete this
  21078.      file if you have no intentions of using PC-Label.
  21079.  
  21080.      READ.ME
  21081.  
  21082.      A text file provided for additional information. You can view
  21083.      this file with any word processor that reads ASCII files, or
  21084.      print it on your printer by typing copy a:read.me prn at the
  21085.      DOS prompt. You can then delete the file.
  21086.  
  21087.      SHOWR.EXE
  21088.  
  21089.      A file viewer program used to display the READ.ME file at the
  21090.      end of installation process. You can run this program as a
  21091.      standalone DOS application to view ASCII files, if you wish.
  21092.      You can safely delete this file.
  21093.  
  21094.  
  21095.      DATABASE FILES
  21096.  
  21097.      databasename.CDS
  21098.  
  21099.      This is the telephone log that is kept whenever you tell PC-
  21100.      File to dial a telephone number. Delete this file whenever you
  21101.      want to start a new log.
  21102.  
  21103.      databasename.DBF
  21104.  
  21105.      This file contains the actual data you enter into your
  21106.      database.
  21107.  
  21108.      databasename.DBT
  21109.  
  21110.      Data entered in memo fields is contained in this file. All
  21111.      memo data within a database is stored in this file, even if
  21112.      you have two or more memo fields.
  21113.  
  21114.      databasename.DBH
  21115.  
  21116.  
  21117.  
  21118.  
  21119.      PC-File Version 7 Users Guide                            357
  21120.  
  21121.  
  21122.      The header file is created when you define a database. It
  21123.      contains information about the structure and contents of the
  21124.      database. This file is also created by PC-File when you open a
  21125.      dBASE-type database that was created by some other program,
  21126.      such as dBASE or FoxPRO.
  21127.  
  21128.      databasename.MAC
  21129.  
  21130.      This file is created if you define any macros for a database.
  21131.      It contains the macro definitions for use with the database.
  21132.  
  21133.      databasename.PRO
  21134.  
  21135.      This file is created if you define a separate configuration
  21136.      profile for a particular database.
  21137.  
  21138.      databasename.ND9
  21139.  
  21140.      This is the Subgroup index file for the database. You can have
  21141.      only one Subgroup index within a particular database.
  21142.  
  21143.      databasename.NDn (Where "n" is 1 through 8)
  21144.  
  21145.      Each index for a database is saved to a separate file under
  21146.      the same name as the database with an .NDn extention. For
  21147.      example, if your database has two indexes they would have .ND1
  21148.      and .ND2 extensions.
  21149.  
  21150.      filename.ANS
  21151.  
  21152.      This file stores your Print options dialog box settings for
  21153.      each report. When you reprint a report, the appropriate ANS
  21154.      file is used to set the printing defaults.
  21155.  
  21156.      filename.GR
  21157.  
  21158.      This file is created when you define a graph. It contains the
  21159.      commands that define the structure of the graph. A different
  21160.      file is created for each graph. If you change the file
  21161.      extension to .REP, you can edit this file with the Language
  21162.      editor.
  21163.  
  21164.      filename.LBL
  21165.  
  21166.      This file is created by PC-Label when you save the label
  21167.      setup. It contains the commands that define the structure and
  21168.      defaults of the label.
  21169.  
  21170.      filename.LTR
  21171.  
  21172.      This file is created when you define a mail-merge letter. It
  21173.      contains the commands that define the structure of the letter.
  21174.      A different file is created for each letter.
  21175.  
  21176.      filename.MAC
  21177.  
  21178.  
  21179.  
  21180.  
  21181.      PC-File Version 7 Users Guide                            358
  21182.  
  21183.  
  21184.      This file is created if you define any auxiliary macro files.
  21185.  
  21186.      filename.REP
  21187.  
  21188.      This file is created when you define a report. It contains the
  21189.      commands that define the structure of the report. A different
  21190.      file is created for each report.
  21191.  
  21192.      GRAPH.ME
  21193.  
  21194.      This file contains the data for the most-recently created
  21195.      graph. The data in the file changes every time you create a
  21196.      new graph, as the new data replaces the old data. It's an
  21197.      ASCII text file which you can edit with any text editor or
  21198.      word processing program.
  21199.  
  21200.      TMPnn.DBF, .DBH, .DBT, .PRO, and .MAC
  21201.  
  21202.      These files are created as a backup copy of your database when
  21203.      choosing to Update the current database when redefining using
  21204.      the Paint method, and when packing your database. All file
  21205.      types that existed for the original database are created:
  21206.      .DBH, .DBF, .DBT, .PRO, and .MAC. You can safely delete these
  21207.      files, after confirming that your redefine or packing
  21208.      operation was successful.
  21209.  
  21210.      TMPnn.OLD
  21211.  
  21212.      This file is created as a temporary work file when you define
  21213.      a report, letter, or graph without saving them. Ordinarily,
  21214.      you will not see these files, they will be deleted when PC-
  21215.      File is through with these operations. They might be left on
  21216.      your disk if your machine loses power or locks while the
  21217.      program is running. They can be safely deleted.
  21218.  
  21219.      TEMPnnnn.PCF
  21220.  
  21221.      This file is created when you choose to free up memory when
  21222.      dropping to DOS from within PC-File. The file allows you to
  21223.      return to where you were in PC-File. Don't delete the file
  21224.      while temporarily dropping to DOS from PC-File.
  21225.  
  21226.  
  21227.  
  21228.  
  21229.      PC-File Version 7 Users Guide                            359
  21230.  
  21231.  
  21232.  
  21233.      APPENDIX C
  21234.  
  21235.      ASCII TABLE
  21236.  
  21237.  
  21238.      Listed below is an ASCII table. The ASCII table includes the
  21239.      decimal and hexadecimal values for each ASCII character, as
  21240.      well as the ASCII character itself. To enter an ASCII
  21241.      character not found on your keyboard in a field, text window
  21242.      or edit window, hold down ALT while keying in the ASCII
  21243.      decimal value of the character using the numeric keypad. Then
  21244.      release the ALT key. For example, to enter u in a field, hold
  21245.      down ALT and key in the numbers 1 2 9, using the numeric
  21246.      keypad on the right side of the keyboard. Then release the ALT
  21247.      key. Note that you cannot use the number keys on the top row
  21248.      of the keyboard.
  21249.  
  21250.  
  21251.  
  21252.  
  21253.      PC-File Version 7 Users Guide                            360
  21254.  
  21255.  
  21256.  
  21257.      APPENDIX D
  21258.  
  21259.      ERROR/INFORMATION MESSAGES
  21260.  
  21261.  
  21262.  
  21263.      Listed below are various PC-File error and information
  21264.      messages, explanations and recommended actions. The messages
  21265.      are listed in alphabetical order.
  21266.  
  21267.      ?????
  21268.  
  21269.      Question marks printed in a report or letter indicate that PC-
  21270.      File doesn't recognize the field name(s) included in the
  21271.      report or letter. See Chapter 9,"Printing Reports and
  21272.      Letters," for more information.
  21273.  
  21274.      ?BAD ANSKEY
  21275.  
  21276.      The "lookup field" referenced in a relational lookup is not a
  21277.      valid field in the lookup database. Make sure that the field
  21278.      name is spelled correctly. The "lookup field" is the field in
  21279.      the lookup database containing the value to return, and is the
  21280.      fourth parameter in a relational lookup.
  21281.  
  21282.      ?BAD DB
  21283.  
  21284.      The "lookup database" referenced in a relational lookup is not
  21285.      a valid PC-File database. The "lookup database" is the
  21286.      database containing the data to retrieve, and is the second
  21287.      parameter in a relational lookup.
  21288.  
  21289.      ?BAD DB ID
  21290.  
  21291.      PC-File had problems opening the "lookup database" specified
  21292.      in a relational lookup. Make sure the database name is spelled
  21293.      properly and exists on the specified drive and subdirectory.
  21294.  
  21295.      ?BAD DBKEY
  21296.  
  21297.      The "shared field in lookup database" field referenced in a
  21298.      relational lookup is not a valid field in the lookup database.
  21299.      Make sure that the field name is spelled correctly. The
  21300.      "shared field in lookup database" is the field in the lookup
  21301.      database containing the lookup value, and is the third
  21302.      parameter in a relational lookup.
  21303.  
  21304.      ?BAD KEY1
  21305.  
  21306.      The "shared field in the current database" referenced in a
  21307.      relational lookup is not a valid field in the current
  21308.      database. Make sure the field name is spelled correctly. The
  21309.      "shared field in the current database" is the field in the
  21310.      current database containing the value to lookup, and is the
  21311.      first parameter in a relational lookup.
  21312.  
  21313.  
  21314.  
  21315.  
  21316.      PC-File Version 7 Users Guide                            361
  21317.  
  21318.  
  21319.  
  21320.      ?BAD USAGE
  21321.  
  21322.      The syntax of a relational lookup is incorrect. Relational
  21323.      lookups must be entered in the format (@shared field in
  21324.      current database, lookup database, shared field in lookup
  21325.      database, lookup field) or (*,lookup field).
  21326.  
  21327.      ?CANCELED
  21328.  
  21329.      The relational lookup operation was canceled by pressing ESC.
  21330.  
  21331.      ?NO RAM
  21332.  
  21333.      The computer does not have enough RAM memory to perform a
  21334.      relational lookup. See the error "Out of Memory."
  21335.  
  21336.      Beginning of file
  21337.  
  21338.      You are trying to display the previous record while viewing
  21339.      the first record in the database.
  21340.  
  21341.      Can't create (filename)
  21342.  
  21343.      PC-File has encountered an error when creating a new file.
  21344.      (The file name is included in the message.) This message may
  21345.      indicate that the data disk is full, that there are too many
  21346.      files on the disk, that there is a hardware or disk error,
  21347.      your network rights won't allow you to create files, or the
  21348.      FILES statement in your CONFIG.SYS file needs to be increased.
  21349.  
  21350.      Can't delete (filename or data)
  21351.  
  21352.      PC-File has encountered an error deleting a file or data in a
  21353.      file. This usually indicates a hardware error or a disk error.
  21354.      If the message refers to a file, it could mean that the file
  21355.      is marked by DOS as a read-only file.
  21356.  
  21357.      Can't get memo
  21358.  
  21359.      PC-File has encountered an error reading the memo file. This
  21360.      indicates that the memo file is missing, or there is a
  21361.      hardware error or a disk error. The memo file (.DBT) must have
  21362.      the same name as the data file (.DBF), and must be stored on
  21363.      the same drive and subdirectory as the data file.
  21364.  
  21365.      Can't open (filename)
  21366.  
  21367.      The file named in the message cannot be opened for processing.
  21368.      There could be several reasons for this:
  21369.  
  21370.        The file could not be found, because you gave the wrong name
  21371.        for it.
  21372.  
  21373.        The file could not be found, because you specified the wrong
  21374.        disk drive or subdirectory.
  21375.  
  21376.  
  21377.  
  21378.  
  21379.      PC-File Version 7 Users Guide                            362
  21380.  
  21381.  
  21382.  
  21383.        The file is in use by someone else on your system.
  21384.  
  21385.        You are having hardware or disk errors.
  21386.  
  21387.        The FILES= statement in your CONFIG.SYS file is too small.
  21388.        Increase it to 20 or more.
  21389.  
  21390.        The file may have been damaged in some way. See Chapter 12,
  21391.        "External/Internal Utilities," for information on repairing
  21392.        a database.
  21393.  
  21394.      Can't open .LOG file
  21395.  
  21396.      PC-File can't open the file that keeps track of changes made
  21397.      during a posting. If the destination database resides on a
  21398.      network drive, you might not have "rights" to open or create
  21399.      the files. There may be an insufficient number of file handles
  21400.      available to open a file--try increasing the number after
  21401.      FILES= in your CONFIG.SYS file, reboot and try running the
  21402.      posting again. Also, there may be insufficient disk space to
  21403.      open the .LOG file.
  21404.  
  21405.      Can't open .PST file
  21406.  
  21407.      The batch post definition file can't be opened. The file might
  21408.      be damaged. If the file resides on a network drive, you might
  21409.      not have "rights" to open the file. There may be an
  21410.      insufficient number of file handles available to open a file--
  21411.      try increasing the number after FILES= in your CONFIG.SYS
  21412.      file, reboot and try opening the .PST file again.
  21413.  
  21414.      Can't run DOS
  21415.  
  21416.      You've tried to run a DOS command from within PC-File and the
  21417.      DOS command cannot be processed. There could be several
  21418.      reasons for this:
  21419.  
  21420.      COMMAND.COM cannot be found on the disk, or is damaged.
  21421.  
  21422.      If you told PC-File to free up all memory, PC-File requires
  21423.      about 700K of disk space. The disk may be too full.
  21424.  
  21425.      Not enough RAM is available to execute the command; or the
  21426.      available memory has been corrupted.
  21427.  
  21428.      Can't write (filename)
  21429.  
  21430.      PC-File has encountered an error writing to a file. This
  21431.      usually indicates a full disk, hardware error, a disk error,
  21432.      or that the file is marked by DOS as a read-only file.
  21433.  
  21434.      Cancel changes to this record?
  21435.  
  21436.  
  21437.  
  21438.  
  21439.      PC-File Version 7 Users Guide                            363
  21440.  
  21441.  
  21442.      You selected the Cancel Changes option from the Edit menu, or
  21443.      pressed ESC after modifying a records. If you answer Yes to
  21444.      the question, PC-File ignores all changes made to the current
  21445.      record and restores the record to the original data before you
  21446.      began editing the record.
  21447.  
  21448.      Contains reference to unknown field
  21449.  
  21450.      When you select a report or letter to print, PC-File compares
  21451.      the field names referenced in the report or letter with those
  21452.      in the current database. If the report or letter contains a
  21453.      reference to a field name that doesn't exist in the current
  21454.      database, PC-File displays this message. You should modify the
  21455.      report or letter to include the correct field name references.
  21456.      If you don't, PC-File prints question marks where the field
  21457.      data is to be printed.
  21458.  
  21459.      Creation error
  21460.  
  21461.      PC-File has encountered an error trying to create a new file.
  21462.      This error usually indicates a full disk or a hardware or disk
  21463.      error. If PC-File displays this message when defining a
  21464.      database, make sure that the database definition is valid,
  21465.      i.e., make sure field names, types, and lengths are valid.
  21466.  
  21467.      Data length wrong
  21468.  
  21469.      The record length indicated in the .DBF header does not match
  21470.      the calculated record length (the sum of field lengths). The
  21471.      Repair command cannot correct this type of damage. Try using
  21472.      Pack on the Utilities menu to correct this.
  21473.  
  21474.      DBH doesn't match DBF
  21475.  
  21476.      Both the .DBH and .DBF files store the number of fields, and
  21477.      each field's length and type. There is a discrepancy between
  21478.      the number of fields or one or more fields' length or type.
  21479.      You can redefine the database to create a new database with
  21480.      matching .DBH and .DBF files. Alternatively, you can delete
  21481.      the .DBH file and let PC-File adopt to the database. If you
  21482.      change the database structure with a program other than PC-
  21483.      File, you must delete the .DBH file and let PC-File adopt it.
  21484.  
  21485.      Decimals must be less than number
  21486.  
  21487.      When defining or redefining a database, you can provide the
  21488.      number of decimal places for each numeric field. The maximum
  21489.      number of decimal places is the field length minus 2. For
  21490.      example, if you have a numeric field of length 8, the maximum
  21491.      number of decimal positions is 6.
  21492.  
  21493.      Drive not available or drive door is open
  21494.  
  21495.  
  21496.  
  21497.  
  21498.      PC-File Version 7 Users Guide                            364
  21499.  
  21500.  
  21501.      You are attempting to access an unavailable drive. If the
  21502.      drive you are trying to access is a floppy drive, make sure
  21503.      that the drive contains a formatted disk and that the drive
  21504.      door is closed.
  21505.  
  21506.      End of file
  21507.  
  21508.      You are attempting to display the next record while viewing
  21509.      the last record in the database. If you receive this message
  21510.      unexpectedly, it may mean that one or more of the indexes is
  21511.      damaged. You should rebuild all indexes using the Index option
  21512.      on the File menu.
  21513.  
  21514.      Error 0
  21515.  
  21516.      PC-File has encountered an error reading or writing to a file.
  21517.      This usually indicates a full disk or invalid path. It can
  21518.      also indicate a hardware error or a disk error.
  21519.  
  21520.      Error adopting dBASE file
  21521.  
  21522.      You selected a data file (.DBF) that doesn't have a
  21523.      corresponding header file (.DBH) and there is a problem
  21524.      creating the header file. PC-File reads dBASE III Plus
  21525.      compatible data files. If your data file is not dBase III Plus
  21526.      compatible, PC-File can't adopt it.
  21527.  
  21528.      Error deleting database record
  21529.  
  21530.      PC-File has encountered an error deleting a record. This
  21531.      usually indicates a damaged index, hardware error, or a disk
  21532.      error.
  21533.  
  21534.      Error during posting
  21535.  
  21536.      An error has occurred while PC-File was trying to post
  21537.      information to the destination file. This might indicate
  21538.      insufficient disk space, a disk error, or if the destination
  21539.      database resides on a network drive, you might not have
  21540.      "rights" to open and write to the files.
  21541.  
  21542.      Error making index (16386)
  21543.  
  21544.      This error will occur if you are attempting to define a
  21545.      Formula Index using a logical field without converting its
  21546.      data to a string using the TOSTR function. For example:
  21547.  
  21548.      UPPER(fieldname) **Incorrect**
  21549.  
  21550.      TOSTR(fieldname) **Correct**
  21551.  
  21552.      See "Defining a Formula Index" in Chapter 8 for details.
  21553.  
  21554.      Error reading (filename)
  21555.  
  21556.  
  21557.  
  21558.  
  21559.      PC-File Version 7 Users Guide                            365
  21560.  
  21561.  
  21562.      PC-File can't read the named file. The message can indicate
  21563.      that the file has been damaged in some way. You may be having
  21564.      difficulties with the disk itself. Either the data disk has a
  21565.      bad sector, or errors are occurring in the disk controller
  21566.      card.
  21567.  
  21568.      Error reading DBF field table
  21569.  
  21570.      The .DBF header can't be read, or the .DBF can't be opened.
  21571.      The file might be damaged. If the file resides on a network
  21572.      drive, you might not have "rights" to open the file. There may
  21573.      be an insufficient number of file handles available to open a
  21574.      file. Increase the number after FILES= in your CONFIG.SYS file
  21575.      and reboot.
  21576.  
  21577.      Error reading DBF header
  21578.  
  21579.      The .DBF header can't be read, or the .DBF can't be opened.
  21580.      The file might be damaged. If the file resides on a network
  21581.      drive, you might not have "rights" to open the file. There may
  21582.      be an insufficient number of file handles available to open a
  21583.      file--try increasing the number after FILES= in your
  21584.      CONFIG.SYS file, reboot and try repair again.
  21585.  
  21586.      Error reading memo (fieldname)
  21587.  
  21588.      This error will occur if PC-File encounters a memo field that
  21589.      it can't read:
  21590.  
  21591.      In "interactive" situations like viewing and editing in Record
  21592.      view and Table view, PC-File leaves the unavailable memo blank
  21593.      and displays an error message in this format:
  21594.  
  21595.      ----------------------------
  21596.  
  21597.      Error reading memo (fieldname)
  21598.  
  21599.      This database may be damaged
  21600.  
  21601.      [ OK ] [CANCEL]
  21602.  
  21603.      ----------------------------
  21604.  
  21605.      In "batch" situations like reports and export, PC-File prints
  21606.      or exports:
  21607.  
  21608.      Memo data not available
  21609.  
  21610.      in place of the damaged memo information. An error message in
  21611.      the following format will also display on the screen for 2
  21612.      seconds:
  21613.  
  21614.      ----------------------------
  21615.  
  21616.      Error reading memo (fieldname)
  21617.  
  21618.  
  21619.  
  21620.  
  21621.      PC-File Version 7 Users Guide                            366
  21622.  
  21623.  
  21624.      This database may be damaged
  21625.  
  21626.      -----------------------------
  21627.  
  21628.      You might be able to correct this problem using either the
  21629.      Repair or the Pack options on the Utilities menu. See
  21630.      "Repairing a Database" and "Packing a Database" for details.
  21631.  
  21632.      Error writing on (filename)
  21633.  
  21634.      PC-File can't write to the named file. Also, make sure that
  21635.      the disk isn't already full. If it is full, no more data can
  21636.      be written to it. You may be having difficulties with the disk
  21637.      itself. Either the data disk has a bad sector, or errors are
  21638.      occurring in the disk controller card. If writing to a floppy
  21639.      disk, make sure the disk doesn't have a write-protect tab on
  21640.      it.
  21641.  
  21642.      Exit memo without saving changes?
  21643.  
  21644.      When editing a memo field, PC-File displays this message when
  21645.      you choose Cancel. If you exit without saving, PC-File ignores
  21646.      all changes made to the memo field during the current editing
  21647.      session.
  21648.  
  21649.      Field display length exceeds 65 characters
  21650.  
  21651.      The maximum number of characters you can display for any field
  21652.      on one line is 65. However, the actual data length for
  21653.      character and memo fields can be much longer. Character fields
  21654.      can contain up to 254 characters. Memo fields can contain up
  21655.      to 5000 characters. When creating or modifying a View, you
  21656.      cannot use more than 65 characters for a field's display
  21657.      length.
  21658.  
  21659.      Field type (type) invalid for field length (length)
  21660.  
  21661.      You are defining or redefining a database and have provided an
  21662.      invalid field length. Character fields must be 1 to 254
  21663.      characters long. Numeric fields must be 1 to 19 characters
  21664.      long. Date fields must be 8 or 10 characters long. Logical
  21665.      fields must be 1 character long. Memo fields must be 5000
  21666.      characters long. Before you can proceed with the database
  21667.      definition or redefinition, you must either change the field
  21668.      type or field length.
  21669.  
  21670.      In the output database (databasename), The "Match to" field
  21671.      (fieldname) is not indexed. Posting may be slow. Continue?
  21672.  
  21673.      For PC-File to perform posting as quickly as possible, the
  21674.      field to match on in the database you are posting to should be
  21675.      indexed, so PC-File can perform a fast search on the index. If
  21676.      the match field is not indexed, PC-File performs a much slower
  21677.      sequential search.
  21678.  
  21679.      Incompatible memo format
  21680.  
  21681.  
  21682.  
  21683.  
  21684.      PC-File Version 7 Users Guide                            367
  21685.  
  21686.  
  21687.  
  21688.      The .DBF file has memo fields that are stored in dBASE IV
  21689.      format--PC-File can only use dBASE III or III+ format memos.
  21690.  
  21691.      Index expression too long. Ignoring excess.
  21692.  
  21693.      This error message can occur when you are defining a Simple
  21694.      Index (see "Creating an Index" for details) and you choose too
  21695.      many fields to index. All fields indexed up to the point you
  21696.      receive this message will be used if you continue. PC-File
  21697.      generates a dBase index expression which cannot be more than
  21698.      100 characters long. The total number of fields you can index
  21699.      will vary depending on the lengths of the field names, the
  21700.      types of fields indexed, and how many fields are indexed in
  21701.      descending or
  21702.      ascending sequence. Depending on the situation, you may be
  21703.      able to produce the index you want by defining a Formula Index
  21704.      (see "Creating an Index" for details).
  21705.  
  21706.      Index key exceeded 100 characters
  21707.  
  21708.      Due to limitations of the dBASE index structure, PC-File can't
  21709.      index on more than 100 characters of data. For example, PC-
  21710.      File can't sort five fields of 30 characters each, because the
  21711.      total length would be 150 characters. You need to specify
  21712.      fewer fields to index, or index on portions of fields. See
  21713.      Chapter 6, "Sorting and Indexing Data" for information on
  21714.      indexing portions of fields.
  21715.  
  21716.      Invalid field name (name)
  21717.  
  21718.      When defining a database, you included invalid characters in a
  21719.      field name, or you selected a field and typed a field name
  21720.      that doesn't exist. Field names can contain only letters,
  21721.      numbers and the underscore ( _ ) character. No punctuation,
  21722.      spaces, or other characters are allowed. Field names must
  21723.      start with a letter.
  21724.  
  21725.      Invalid key expression
  21726.  
  21727.      There is an error in the expression you entered for a formula
  21728.      index. It could be a misspelled field name or function name,
  21729.      or a missing parenthesis.
  21730.  
  21731.      Invalid PST file (1st record bad)
  21732.  
  21733.      The first line in the .PST file is not in a valid format. The
  21734.      .PST might be damaged or has been incorrectly edited. This
  21735.      line in the .PST file indicates the "post from" (source)
  21736.      database, and should be in this format:
  21737.  
  21738.      PCF6,D:\path\databasename
  21739.  
  21740.  
  21741.  
  21742.  
  21743.      PC-File Version 7 Users Guide                            368
  21744.  
  21745.  
  21746.      where "D" is the drive and "path" is the subdirectory where
  21747.      the source database resides, and "databasename" is the name of
  21748.      the source database with no extension. For example, posting
  21749.      from a database named SALES on drive C in the \PCFILE\DATA
  21750.      subdirectory the first line of the .PST file would read:
  21751.  
  21752.      PCF6,C:\PCFILE\DATA\SALES
  21753.  
  21754.      To correct this problem: Edit the first line of the .PST file
  21755.      to the format above, restore a backup copy of the .PST file,
  21756.      or redefine the posting from scratch.
  21757.  
  21758.      Invalid PST file (2nd rcd bad)
  21759.  
  21760.      The second line in the .PST file is not in a valid format. The
  21761.      .PST might be damaged or has been incorrectly edited. This
  21762.      line in the .PST file indicates the "post to" (destination)
  21763.      database, and should be in this format:
  21764.  
  21765.      TO:D:\path\databasename.DBH
  21766.  
  21767.      where "D" is the drive and "path" is the subdirectory where
  21768.      the destination database resides, and "databasename" is the
  21769.      name of the destination database. For example, posting to a
  21770.      database named INVENTORY on drive C in the \PCFILE\DATA
  21771.      subdirectory, the second line of the .PST file would read:
  21772.  
  21773.      TO:C:\PCFILE\DATA\INVENTORY.DBH
  21774.  
  21775.      To correct this problem: Edit the second line of the .PST file
  21776.      to the format above, restore a backup copy of the .PST file,
  21777.      or redefine the posting from scratch.
  21778.  
  21779.      Invalid PST file (MATCH command expected)
  21780.  
  21781.      The third line in the .PST file is not in a valid format. The
  21782.      .PST might be damaged or has been incorrectly edited. This
  21783.      line in the .PST file indicates which fields to match on, and
  21784.      should be in this format:
  21785.  
  21786.      MATCH sourcefield to destinationfield
  21787.  
  21788.      where "sourcefield" is the match field from the source
  21789.      database and "destinationfield" is the match field from
  21790.      destination database. For example, matching on a field named
  21791.      PART_NO in both databases the third line of the .PST file
  21792.      would read:
  21793.  
  21794.      MATCH PART_NO to PART_NO
  21795.  
  21796.      To correct this problem: Edit the third line of the .PST file
  21797.      to the format above, restore a backup copy of the .PST file,
  21798.      or redefine the posting from scratch.
  21799.  
  21800.      Line length >>80. Truncate the line?
  21801.  
  21802.  
  21803.  
  21804.  
  21805.      PC-File Version 7 Users Guide                            369
  21806.  
  21807.  
  21808.      You are printing a list of duplicate records and the length of
  21809.      the line of data to be printed is greater than 80 characters.
  21810.      If you are printing to a wide carriage printer or are using a
  21811.      condensed font, you may not want to truncate the line.
  21812.      However, if your printer can only print 80 characters per
  21813.      line, you do want to truncate the data so that your printer
  21814.      doesn't wrap the data from one line to the next.
  21815.  
  21816.      LOG file missing: (filename)
  21817.  
  21818.      This message appears when using the UnPost command on the
  21819.      Batch Post dialog box. Either the .LOG file for the database
  21820.      was deleted, or you may be in the wrong database when trying
  21821.      to UnPost--you must be in the database that was posted to, not
  21822.      the database that was posted from.
  21823.  
  21824.      Match To Field isn't indexed
  21825.  
  21826.      This message indicates that the field to match on in the
  21827.      destination database is not indexed. This does not prevent the
  21828.      posting from being performed, but posting will be slower.
  21829.      Index the "match to" field for better performance.
  21830.  
  21831.      Memo N/A
  21832.  
  21833.      You can't use a memo field in a relational lookup.
  21834.  
  21835.      Name invalid
  21836.  
  21837.      When saving files, you must specify a valid DOS file name.
  21838.      Refer to your DOS manual for the valid file name characters.
  21839.      Also make sure that you don't have a default drive, path and
  21840.      file in the database.PRO file.
  21841.  
  21842.      Need a Match Destination field
  21843.  
  21844.      You need to choose a field from the "post to" (destination)
  21845.      database to match with before you can proceed with your Batch
  21846.      post definition.
  21847.  
  21848.      Need a Match field from Lookup file
  21849.  
  21850.      You need to choose a "match with" field from the Lookup
  21851.      database (the database you are retrieving data from) before
  21852.      you can proceed.
  21853.  
  21854.      Need a Match Source field
  21855.  
  21856.      You need to choose a field from the current (source) database
  21857.      to match with before you can proceed with your Batch post
  21858.      definition.
  21859.  
  21860.      Need a POST action
  21861.  
  21862.  
  21863.  
  21864.  
  21865.      PC-File Version 7 Users Guide                            370
  21866.  
  21867.  
  21868.      You need to define a post action before you can proceed with
  21869.      your Batch post definition. See "Defining Post Actions" for
  21870.      details.
  21871.  
  21872.      Need a Post Destination field
  21873.  
  21874.      You need to choose a field from the "post to" (destination)
  21875.      database to post to before you can proceed with your Post
  21876.      action definition.
  21877.  
  21878.      Need a Post Source field
  21879.  
  21880.      You need to choose a field from the current (source) database
  21881.      to post from before you can proceed with your Post action
  21882.      definition.
  21883.  
  21884.      Need a Source field
  21885.  
  21886.      You need to choose a "match with" field from the current
  21887.      (source) database before you can proceed.
  21888.  
  21889.      Need an Answer field from Lookup file
  21890.  
  21891.      You need to choose the field to retrieve data from in the
  21892.      Lookup database before you can proceed.
  21893.  
  21894.      No phone number
  21895.  
  21896.      To use the telephone dialer option, you must have a field name
  21897.      containing the word "phone." You can use the Redefine option
  21898.      on the File menu to change the name of the field(s) containing
  21899.      your phone number(s) to include the word "phone". See Chapter
  21900.      13, "Tools," for more information on the telephone dialer.
  21901.  
  21902.      No repairs were performed
  21903.  
  21904.      PC-File found no errors that it could correct, or the user has
  21905.      answered No to a repair message.
  21906.  
  21907.      No snapshot defined
  21908.  
  21909.      To use the snapshot label option, you must have a snapshot
  21910.      label defined in the current profile. See Chapter 13, "Tools,"
  21911.      for more information on snapshot labels.
  21912.  
  21913.      Not a compatible DBF file
  21914.  
  21915.      The file you are trying to repair is probably a dBASE II file.
  21916.      PC-File only uses dBASE III and dBASE III+ .DBF files.
  21917.  
  21918.      Not a valid extension
  21919.  
  21920.  
  21921.  
  21922.  
  21923.      PC-File Version 7 Users Guide                            371
  21924.  
  21925.  
  21926.      You have added an invalid file extension in the file selection
  21927.      dialog box. For example, when opening a database, if you
  21928.      provide an extension other than DBF, PC-File displays this
  21929.      message. In most cases, PC-File adds the extension
  21930.      automatically, so you don't have to.
  21931.  
  21932.      Not a valid path or file name
  21933.  
  21934.      The path or file name you have entered in the file selection
  21935.      dialog box doesn't exist or is incorrectly spelled. Also, make
  21936.      sure you select the appropriate drive.
  21937.  
  21938.      Not found
  21939.  
  21940.      PC-File can't find a record matching the search criteria.
  21941.  
  21942.      Numeric field exceeds 19
  21943.  
  21944.      The maximum field length for numeric fields is 19. You need to
  21945.      reduce the size of the numeric field to 19 characters or less.
  21946.  
  21947.      Out of Memory
  21948.  
  21949.      PC-File has run out of RAM memory (not disk space). To
  21950.      determine how much RAM memory is available on your machine,
  21951.      refer to the "Getting Started" section.
  21952.  
  21953.      PC-File may display an "Out of Memory" message when performing
  21954.      an operation which worked earlier in the current session.
  21955.      While you are in PC-File, memory can become fragmented, such
  21956.      that a large enough block of memory can't be found to perform
  21957.      an operation. There are two ways to work around this problem.
  21958.      First, quit all the way out of PC-File, then restart PC-File
  21959.      and immediately retry the operation that failed. This frees
  21960.      all memory, eliminating fragmentation. Second, make more
  21961.      memory available by either installing more conventional memory
  21962.      in your machine (if you don't have 640K) or by disabling
  21963.      memory resident programs. Extended and expanded memory will
  21964.      not help avoid this error.
  21965.  
  21966.      Another, less common cause of this message is an invalid
  21967.      calculation, complex search criteria or .IF statement in a
  21968.      report or letter. Examples include angle brackets around field
  21969.      names, missing or extra parentheses, and missing or illegal
  21970.      operators such as $, << or =. See Chapter 5,"Finding and
  21971.      Modifying Data," and Chapter 15, "Calculations," for more
  21972.      information.
  21973.  
  21974.      Output (post to) file doesn't exist
  21975.  
  21976.      PC-File can't find the destination database indicated in the
  21977.      .PST file. Either the database has been moved, deleted or
  21978.      renamed; or the .PST has been incorrectly edited.
  21979.  
  21980.  
  21981.  
  21982.  
  21983.      PC-File Version 7 Users Guide                            372
  21984.  
  21985.  
  21986.      To correct this problem: Redefine the posting from scratch, or
  21987.      edit the first line in the .PST file to the format described
  21988.      under "Invalid PST file (1st record bad)."
  21989.  
  21990.      Overwrite data. Are you sure?
  21991.  
  21992.      When importing data, you can append the imported records to
  21993.      the database without affecting the existing data or you can
  21994.      overwrite the existing data. Overwriting deletes the original
  21995.      data and replaces it with the imported data. Confirm or cancel
  21996.      your decision to overwrite all records in the current database
  21997.      to continue.
  21998.  
  21999.      Overwrite existing (filename)
  22000.  
  22001.      If you are saving a file to an existing file name, PC-File
  22002.      asks if you want to overwrite the existing file. If you answer
  22003.      Yes, PC-File deletes the existing file and saves the current
  22004.      file with the same name.
  22005.  
  22006.      Repaired (number)
  22007.  
  22008.      This message is displayed at the end of the repair process to
  22009.      indicate how many records have been repaired.
  22010.  
  22011.      Should be memos, but there aren't
  22012.  
  22013.      The .DBF header has a "flag" that indicates if a database has
  22014.      memo fields. This message is displayed if the flag indicates
  22015.      memos, but there are no fields that show memo type. PC-File
  22016.      gives you the option to attempt to repair this problem, if you
  22017.      answer Yes to repair, PC-File turns off the flag. The .DBT
  22018.      file, if any, is not affected.
  22019.  
  22020.      Shouldn't be memos, but there are
  22021.  
  22022.      The .DBF header has a "flag" that indicates if a database has
  22023.      a memo file (.DBT). This message is displayed if the flag
  22024.      indicates no memos, but there are fields that show memo type.
  22025.      PC-File gives you the option to attempt to repair this
  22026.      problem, if you answer Yes to repair, PC-File resets the
  22027.      "flag" to indicate the presence of memos and creates a new
  22028.      empty memo file (.DBT), if it is missing.
  22029.  
  22030.      The "Match From" Field doesn't exist.
  22031.  
  22032.      PC-File can't find the match field for the source database
  22033.      indicated in the .PST file. The .PST file might be damaged or
  22034.      incorrectly edited, or the field's name might have been
  22035.      changed. Redefining the Batch post definition should correct
  22036.      this problem.
  22037.  
  22038.      The disk is full.
  22039.  
  22040.  
  22041.  
  22042.  
  22043.      PC-File Version 7 Users Guide                            373
  22044.  
  22045.  
  22046.      There is insufficient space on the destination drive PC-File
  22047.      is attempting to write the redefined database on. Either
  22048.      eliminate unnecessary files, or try redefining to a higher
  22049.      capacity disk, if possible.
  22050.  
  22051.      The UNDO file is dated: date Are you sure you want to undo the
  22052.      posting?
  22053.  
  22054.      This is to inform you the date of the last posting to this
  22055.      database. Only records posted to at that time will be
  22056.      restored.
  22057.  
  22058.      There were (number) transactions for which no matching records
  22059.      were found.
  22060.  
  22061.      "Number" is the number of records posted from that have no
  22062.      matches in the database you are posting to.
  22063.  
  22064.      This Post file is incompatible with the current database.
  22065.  
  22066.      The .PST file was probably defined for another database, or
  22067.      field names might have been changed. Redefining the posting
  22068.      should correct the problem.
  22069.  
  22070.      Too many fields
  22071.  
  22072.      PC-File allows up to 128 fields per database. You are trying
  22073.      to define a database with more than 128 fields. If your
  22074.      database has more than 128 fields, you should consider
  22075.      reorganizing your database structure, or linking multiple
  22076.      databases together using relational lookups.
  22077.  
  22078.      Unsuccessful ADD operation
  22079.  
  22080.      This message usually indicates a damaged index. Rebuild all
  22081.      indexes for the database using the Index Maintenance option on
  22082.      the File menu. The message could also indicate a damaged data
  22083.      file, full disk, or disk error.
  22084.  
  22085.      User Canceled
  22086.  
  22087.      The user pressed ESC or chose Cancel while running a Batch
  22088.      post.
  22089.  
  22090.      WARNING: correcting field decimal places
  22091.  
  22092.      This message displays when PC-File finds a discrepancy between
  22093.      the decimal places for numeric fields indicated in the .DBH
  22094.      file and .DBF header. PC-File assumes the .DBF header is
  22095.      correct and updates the .DBH's values for decimal places to
  22096.      the .DBF header's values.
  22097.  
  22098.      WARNING: correcting field length
  22099.  
  22100.  
  22101.  
  22102.  
  22103.      PC-File Version 7 Users Guide                            374
  22104.  
  22105.  
  22106.      This message displays when PC-File finds a discrepancy between
  22107.      the field lengths indicated in the .DBH file and .DBF header.
  22108.      PC-File assumes the .DBF header is correct and updates the
  22109.      .DBH's field lengths to the .DBF header's values.
  22110.  
  22111.      WARNING: correcting field type
  22112.  
  22113.      This message displays when PC-File finds a discrepancy between
  22114.      the field types indicated in the .DBH file and .DBF header.
  22115.      PC-File assumes the .DBF header is correct and the .DBH's
  22116.      field types are updated to the .DBF header's values.
  22117.  
  22118.      WARNING: correcting number of records
  22119.  
  22120.      This message displays when PC-File finds a discrepancy between
  22121.      the number of records indicated in the .DBF header and the
  22122.      calculated number of records (DBF Length divided by Record
  22123.      Length). PC-File assumes the calculated value is correct and
  22124.      updates the number of records indicated in the .DBF header to
  22125.      the calculated value.
  22126.  
  22127.      WARNING: Database may be damaged
  22128.  
  22129.      PC-File has detected an error with the data file. You should
  22130.      first rebuild all indexes using the Index option on the File
  22131.      menu. If the problem persists, repair the database using the
  22132.      Repair option on the Utilities menu.
  22133.  
  22134.      WARNING: No DBF header termination; continuing
  22135.  
  22136.      The end of the .DBF header does not have an end marker. The
  22137.      .DBF file is probably from a third-party program. This should
  22138.      not affect PC-File's ability to repair and use the file. PC-
  22139.      File does not add an end marker, and continues the repair
  22140.      process.
  22141.  
  22142.      WARNING: PCF.EXE failed integrity check
  22143.  
  22144.      PC-File detects a discrepancy while performing an integrity
  22145.      check. To correct the problem, you should ensure that your
  22146.      data disk(s) are not infected with any viruses, and that there
  22147.      are no errors with your data disk(s), then reinstall PC-File.
  22148.  
  22149.      WARNING: This index may be damaged
  22150.  
  22151.      The index file does not match the data file. You should
  22152.      rebuild the index. Make sure you haven't used the same index
  22153.      file name for more than one index field. See Chapter 6,
  22154.      "Sorting and Indexing Data," for more information on
  22155.      rebuilding indexes and naming index files.
  22156.  
  22157.      What to print in place of ???????
  22158.  
  22159.      PC-File wants to know what field or system data you want to
  22160.      print at the current data location in your Free form report.
  22161.  
  22162.  
  22163.  
  22164.  
  22165.      PC-File Version 7 Users Guide                            375
  22166.  
  22167.  
  22168.      Writing corrected DBF header
  22169.  
  22170.      This message displays when a discrepancy is found between the
  22171.      number of records indicated in the .DBF header and the
  22172.      calculated number of records (DBF Length divided by Record
  22173.      Length). The calculated value is assumed to be correct and the
  22174.      number of records indicated in the .DBF header is updated to
  22175.      that value.
  22176.  
  22177.      Writing corrected DBH file
  22178.  
  22179.      This message displays when a discrepancy is found between
  22180.      field types, field lengths, and numeric field decimal places
  22181.      stored in the .DBH file and .DBF header. The .DBF header is
  22182.      assumed to be correct and its field definitions are used to
  22183.      update the .DBH file.
  22184.  
  22185.      Wrong password
  22186.  
  22187.      A password is required before you can perform the operation
  22188.      you attempted. You provided the wrong password.
  22189.  
  22190.      You can't have more than 9 indexes
  22191.  
  22192.      PC-File allows up to 9 indexes per database. You already have
  22193.      9 indexes. You must delete at least one index before you can
  22194.      build another one.
  22195.  
  22196.      You must define at least 1 field
  22197.  
  22198.      You are telling PC-File you have finished defining or
  22199.      redefining a database, but have not defined any fields. Before
  22200.      you can proceed with the database definition or redefinition,
  22201.      you must define at least one field.
  22202.  
  22203.      Your new database has been created. The indexes will be built
  22204.      the first time you use the new database.
  22205.  
  22206.      This message appears after choosing Build New at the end of
  22207.      the Redefine process.
  22208.  
  22209.      Your old database had been renamed to: TMPnnnn Your new
  22210.      (redefined) database keeps the name that it was redefined
  22211.      from. The indexes for your new database will now be created.
  22212.  
  22213.      This message appears after choosing Update Current at end of
  22214.      the Redefine process. TMPnnnn (where "nnnn" is some number) is
  22215.      the name PC-File assigns to the backup copy of the database
  22216.      before redefining it.
  22217.  
  22218.  
  22219.      ABOUT THE AUTHOR
  22220.  
  22221.  
  22222.  
  22223.  
  22224.      PC-File Version 7 Users Guide                            376
  22225.  
  22226.  
  22227.      In 1982, Jim Button started a revolution. He wrote a software
  22228.      program that was so easy to use, even beginners could master
  22229.      it. Yet it was powerful enough to manage information for the
  22230.      largest corporations. Its price was less than half its
  22231.      competition. Jim was so certain that people would love his
  22232.      product, he gave it away for free-requesting payment only if
  22233.      they were completely satisfied. He called it PC-File.
  22234.  
  22235.      Today, 750,000 copies later, Jim's revolutionary software is
  22236.      managing data nationwide. From IBM to the local PTA. Kodak to
  22237.      the cub scouts. Nike to your neighborhood sporting goods
  22238.      store. And it's not alone. PC-File shares the spotlight with a
  22239.      family of powerful products. All are backed by a team
  22240.      committed to quality software, personal service and features
  22241.      that fit the need.
  22242.