home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c163 / 1.ddi / $READ.ME < prev    next >
Encoding:
Text File  |  1993-06-09  |  38.7 KB  |  920 lines

  1.  
  2.  
  3.  
  4.       $read.me (c)Copyright Sequiter Software Inc., 1992-1993.
  5.       All rights reserved.
  6.       ----------------------------------------------------------
  7.       
  8.           README -  Table of Contents
  9.       
  10.       I.    Introduction
  11.       
  12.       II.   CodeBase Electronic Documentation Files       
  13.  
  14.       III.  CodeBase Manual and Code Revisions 
  15.       
  16.       IV.   Bit Optimization Query Technology
  17.  
  18.       V.    CodeBase Interactive for DOS (CID)
  19.       
  20.       VI.   Examples 
  21.    
  22.       VII.  Using CodeScreens with CodeBase 5.0 
  23.    
  24.       VIII. CodeBase Public-Access: Sequiter BBS and Compuserve Access 
  25.  
  26.       IX.   Accessing More Than 20 Files in DOS or Windows 
  27.       
  28.       ----------------------------------------------------------
  29.       
  30.       I.    Introduction
  31.       
  32.          CodeBase is a C library for database management.  Its compat-
  33.       ibility allows you to directly create, access, or change dBASE 
  34.       IV, dBASE III, FoxPro or Clipper data, index, or memo files.
  35.       
  36.          CodeBase has full multi-user capabilities.  When programs are 
  37.       run on a network, the network is automatically detected and 
  38.       used.  CodeBase allows both explicit and automatic record 
  39.       locking and file locking.  It is also possible to bypass the 
  40.       locking mechanism and read data locked by another user.
  41.       
  42.          All of the CodeBase functions work together to allow C 
  43.       programmers to program at a very high level.  Programs will 
  44.       execute very quickly, they will be readable and there will be no 
  45.       unnecessary lines of code.
  46.       
  47.          In order to use CodeBase, it is necessary to have a C 
  48.       compiler and it is necessary to have some knowledge of the C 
  49.       programming language.
  50.       
  51.          In addition, for C++ programmers, there is a C++ interface 
  52.       and functionality extension.  There are new string classes which
  53.       let you manipulate text easily.  Fields become strings so that 
  54.       you can manipulate data easily.  Finally, there is an object-
  55.       oriented interface to data and index files.
  56.  
  57.       
  58.          To accommodate users requiring DOS or UNIX screen management 
  59.       capabilities, a software library called 'CodeScreens' is 
  60.       available.  CodeScreens features pop-up and pull-down window 
  61.       support, color screen design capabilities, and print functions, 
  62.       plus much more.
  63.       
  64.          For information on either the CodeBase 5.0 portability 
  65.       version, or CodeScreens, contact Sequiter Software Inc.
  66.  
  67.          CodeBase 5.0 serial and version numbers can be found on the
  68.       inside-front covers of the supplied Reference Manual.
  69.       
  70.       ----------------------------------------------------------
  71.       
  72.       II.   CodeBase Electronic Documentation Files 
  73.       
  74.          It is highly recommended that any installed documentation
  75.       files be read in addition to the CodeBase manuals. 
  76.       
  77.          The various documentation files provide additional specific
  78.       information not found in the CodeBase manual.  Please note
  79.       that only documentation files relevant to the options
  80.       installed will be present on your drive after installation.
  81.       
  82.          All electronic documentation files have been suitably 
  83.       formatted for hard-copy printing.  To print any document, 
  84.       simply direct that file to your printer, using the 'print' 
  85.       command.
  86.       
  87.          The complete list of documentation files that are present 
  88.       on the CodeBase disk are:
  89.       
  90.       GENERAL DOCUMENTATION:
  91.       
  92.       $READ.ME        General user information, manual changes/updates,
  93.                       and installation information. Always installed.
  94.       
  95.       INSTALL.DOC     Information on CodeBase installation.  Includes
  96.                       manual unfolding documentation.
  97.       
  98.       PORT.DOC        Important information when using the CodeBase 5.0
  99.                       portability version.  Not included with the
  100.                       CodeBase 5.0 DOS/WINDOWS version.  Located on
  101.                       ANSI and K&R diskettes.
  102.       
  103.       CODEREP.DOC     Further information on CodeReporter.  Includes 
  104.                       important information regarding the building of
  105.                       the CodeReporter launch utility executables.
  106.       
  107.       COMPILER DOCUMENTATION:
  108.       
  109.       COMPILER.DOC    Borland Turbo C++ 1.01 specific information.
  110.       
  111.       EXAMPLES.DOC    Information on usage of the provided source code
  112.  
  113.                       examples.
  114.       
  115.       TEST.DOC        Information on usage of the CodeBase test
  116.                       programs
  117.       
  118.       45UPGRAD.DOC    CodeBase 4.5 to 5.0 translation information.
  119.       
  120.       ----------------------------------------------------------
  121.       
  122.       III.  CodeBase Manual and Code Revisions
  123.  
  124.       Following are corrections to the CodeBase 5.0 printed documentation:
  125.  
  126.       CODEBASE 5.0 USER'S GUIDE:
  127.  
  128.       1. .NTX Descending Order Tags (starting page 105)
  129.          DESCEND support for numeric or date tags are not currently
  130.          supported.  Ignore any reference to numeric or date tag use with
  131.          the DESCEND function wherever noted.  As a work-around, a tag can
  132.          be created by subtracting the numeric key from a large constant
  133.          numeral.
  134.          eg.  For Field 'NUM', index on '9999999999 - NUM'.
  135.  
  136.       2. Opening Index Files (page 115)
  137.          New Functions:     't4create' should be 'i4create'.
  138.  
  139.       CODEBASE 5.0 REFERENCE GUIDE:
  140.  
  141.       1. Conditional Compilation Switch addendum (page 8)
  142.          New Conditional Compilation Switch.  'S4FLUSH' may be defined
  143.          if a hard-flush is required when writing data to disk:
  144.  
  145.          S4FLUSH   This switch automatically calls function file4flush()
  146.                    whenever a write() occurs.  It is set automatically
  147.                    whenever S4WINDOWS, S4DLL or S4DLL_BUILD is defined.
  148.                    This switch is not usually required, since a write()
  149.                    should perform a flush, but some environments do not
  150.                    flush data immediately.  S4FLUSH is meant to be used
  151.                    with these environments.   See function file4flush().
  152.  
  153.  
  154.       2. CODE4.lock_attempts Clarification (page 17)
  155.  
  156.          If CODE4.lock_attempts is greater than zero, it is the
  157.          number of times a CodeBase function will attempt to lock before
  158.          returning r4locked.
  159.  
  160.          If CODE4.lock_attempts is (int) -1, CodeBase retries until
  161.          it succeeds.
  162.  
  163.          Any other value for CODE4.lock_attempts is undefined.
  164.  
  165.  
  166.       3. file4flush() (page 162)
  167.  
  168.  
  169.          The 'NOTE' at the bottom of the page is incorrect.  S4WINDOWS   
  170.          does not have to be defined.  file4flush() may be used under DOS
  171.          or other operating systems.
  172.                
  173.  
  174.       4. relate4lock() (page 226)
  175.  
  176.          Under 'Usage', please note that the return value of relate4lock()
  177.          is of type 'int'.
  178.                
  179.          Usage:  int relate4lock( RELATE4 *relate )
  180.  
  181.  
  182.       5. The Comparison Function (page 238)
  183.  
  184.          At the bottom of the page is a small table with 'Return' and
  185.          'Meaning' headings.  The '> 0' return should instead read:
  186.  
  187.          > 0          The value pointed to by p1 is greater than p2.
  188.  
  189.  
  190.       6. e4hook()  (page 319)
  191.  
  192.          'Description', third paragraph. The reference to switch 'S4HOOK'
  193.          should instead be 'S4ERROR_HOOK':
  194.  
  195.          Consequently, to turn off error reporting, just define 
  196.          'S4ERROR_HOOK' and do nothing else.
  197.  
  198.  
  199.       7. e4severe()  (page 320)
  200.  
  201.          The parameter listing under 'Usage' should not include
  202.          parameter 'CODE4':
  203.  
  204.          Usage:  void e4severe( int err_code, char *desc )
  205.  
  206.  
  207.       8. d4append_data()  (page 43)
  208.           
  209.          The use of this function is no longer recommended because of
  210.          the difficulty in updating the file headers. 
  211.  
  212.  
  213.       9. CODE4.mem_size_memo_expr   (page 21 )
  214.  
  215.          New CodeBase setting:
  216.  
  217.      Usage:    unsigned CODE4.mem_size_memo_expr
  218.          
  219.      Description:If a memo field has a length over 'CODE4.mem_size_memo_expr',
  220.                  the length over this value is ignored by the expression 
  221.                  evaluation functions.  
  222.  
  223.                  For example, function expr4len() assumes that the memo
  224.  
  225.                  field has exactly this length.  Functions expr4vary() 
  226.                  and expr4key() ignore the memo field information over
  227.                  this length.  In addition, if a memo field's length is
  228.                  less than 'CODE4.memo_size_memo_expr', then expr4vary() 
  229.                  and expr4key() add null characters to the end of the 
  230.                  result.  The number of null characters added to the end
  231.                  is 'CODE4.mem_size_memo_expr' minus the actual memo 
  232.                  field length.  This effect is the same as when dealing
  233.                  with trimed fields.
  234.  
  235.                  By default, CODE4.mem_size_memo_expr is 1024.
  236.       
  237.  
  238.       10.date4format_mdx() (page 116)
  239.  
  240.          In 'Description', the value returned should be '1.0E100', not
  241.          '1.0E300'.
  242.  
  243.  
  244.       CODEBASE SOURCE CODE CHANGES:
  245.       
  246.       Note: Notices of fixes to CodeBase 5.0 will be 
  247.             updated on files contained on Sequiter's BBS system. 
  248.             For more information, refer to section
  249.             "CodeBase Public-Access Bulletin Board System."
  250.  
  251.       ----------------------------------------------------------
  252.  
  253.       IV.   Bit Optimization Query Technology
  254.       
  255.       When CodeBase 5.0 is able to use Bit Optimization Query 
  256.       Technology (BOT) when performing queries, the performance
  257.       improvements can be staggering.  In addition, there are
  258.       specific things that you can do to ensure that CodeBase 5.0
  259.       is able to use BOT.
  260.       
  261.       First of all, BOT capabilities are built into the 
  262.       CodeBase 5.0 relate/query module, the report module and
  263.       into CodeReporter.  The principle of the technology involves
  264.       using index information to quickly return query results.
  265.       
  266.       For example, if you have an 500,000 record 
  267.       invoice item data file and you are interested in sales
  268.       of product "GIZMO".  Then the likely query expression
  269.       would be "product='GIZMO'".  In this case, if the
  270.       data file was indexed on field "PRODUCT", then CodeBase 5.0
  271.       would automatically take advantage of the index to 
  272.       immediately return the query results.
  273.       
  274.       So to use BOT, you need to do the following:
  275.       
  276.          1. Make sure that the master data file's index
  277.             file(s) are opened.
  278.          2. Specify a query expression containing, in whole or
  279.             in part, the tag key compared to a constant.
  280.  
  281.             The query expression is set using function
  282.             relate4query_set() or is set interactively
  283.             under CodeReporter.
  284.          3. BOT is effective only when the query expression
  285.             involves the master data file.
  286.       
  287.       Example:
  288.           
  289.           Assume that master data file CUSTOMER.DBF contains fields
  290.           L_NAME, F_NAME, AGE, DT and COMPANY.  It has a production
  291.           index file with the following tag key expressions:
  292.       
  293.              L_NAME             Type Character
  294.              UPPER(COMPANY)     Type Character
  295.              AGE                Type Numeric
  296.              DTOS(DT)           Expression DTOS(DT) returns a 
  297.                                 result of Character even though
  298.                                 field DT is of type Date.
  299.       
  300.           In this case the following queries can take 
  301.           advantage of BOT.
  302.       
  303.           Query Expression            Explanation
  304.       
  305.           L_NAME="SMITH"              L_NAME is a tag expression which
  306.                                       is compared to a constant.
  307.       
  308.           L_NAME>="S" .AND.           Again there are two comparisons 
  309.           L_NAME<="T"                 of a tag expression against a 
  310.                                       constant.  Both parts of the
  311.                                       expression are use BOT.
  312.       
  313.           L_NAME="SMITH" .AND.        Only the first part of the 
  314.           F_NAME="JOE"                expression can use BOT.  However,
  315.                                       as this first part narrows the 
  316.                                       query result down considerably,
  317.                                       the overall performance
  318.                                       will still be very exceptional.
  319.       
  320.           UPPER(COMPANY)="IBM"        Again, this is a tag expression
  321.                                       compared to a constant.  In this
  322.                                       case, the tag expression
  323.                                       is more complicated as it 
  324.                                       involves a function.
  325.                                       Regardless, BOT is used.
  326.       
  327.           UPPER(COMPANY)="IBM" .AND.  Both parts of the expression use
  328.           L_NAME="SMITH"              BOT.
  329.       
  330.           AGE>50                      Even though the type of AGE is 
  331.                                       Numeric, we still have an tag 
  332.                                       expression being compared to
  333.                                       a constant.
  334.       
  335.           AGE > 25*2                  25*2 is still a constant even 
  336.  
  337.                                       though it is a complicated 
  338.                                       constant.
  339.       
  340.           DTOS(DT)>="19930101"        This would return all records 
  341.                                       where the date value in DT is 
  342.                                       greater than or equal to 
  343.                                       January 1st, 1993.  If the
  344.                                       tag expression was DT instead of
  345.                                       DTOS(DT), then a query expression
  346.                                       such DT>=CTOD("01/01/93") would
  347.                                       also use BOT. However, you have 
  348.                                       to be careful when using CTOD 
  349.                                       because the format of its
  350.                                       parameter depends on the date
  351.                                       picture set in 
  352.                                       'CODE4.date_format'.
  353.       
  354.           Here are some expressions which cannot use BOT.
  355.       
  356.           Query Expression            Explanation
  357.       
  358.           F_NAME="JOE"                There is no tag based on F_NAME.
  359.       
  360.           L_NAME+F_NAME="SMITH"       There is no tag based on 
  361.                                       L_NAME+F_NAME. Even though there 
  362.                                       is a tag on L_NAME, it is not 
  363.                                       identical to the expression being
  364.                                       compared to "SMITH".
  365.       
  366.           COMPANY="IBM"               There is no tag based on COMPANY.
  367.                                       The tag is UPPER(COMPANY).  
  368.                                       Again, the tag expression must 
  369.                                       match the exression being 
  370.                                       compared to the constant exactly.
  371.       
  372.           L_NAME=F_NAME               This expression cannot use BOT 
  373.                                       because F_NAME is not a constant 
  374.                                       - it is a field.
  375.       
  376.       ----------------------------------------------------------
  377.  
  378.       V.    CodeBase Interactive for DOS (CID)
  379.       
  380.          Interactive CodeBase 5.0 for DOS (CID) is a CodeBase application
  381.       that allows the interactive manipulation of databases.  Interactive
  382.       CodeBase may be used to test the operation and consequence of
  383.       CodeBase functions, or as a tutorial aid to familiarize users with
  384.       CodeBase functions, or may be used as a quick and easy way to
  385.       manipulate databases without coding and compiling.  A 'FoxPro
  386.       format' DOS Interactive CodeBase executable is currently provided. 
  387.       The other formats are supported, but must be recompiled or
  388.       downloaded from the Sequiter BBS.
  389.       
  390.          Interactive CodeBase for DOS, known as 'CID', contains much of
  391.       the CodeBase functionality, as well as interactive browse and edit
  392.  
  393.       facilities.  
  394.       
  395.          To install Interactive CodeBase, select 'Interactive CodeBase
  396.       for DOS' during the CodeBase INSTALL.  Alternatively, you may
  397.       manually UNFOLD the 'interactive' files, contained in 'CID.FLD'.
  398.       
  399.       
  400.       Using CID:
  401.       
  402.         Each provided CID executable program can handle only one of the
  403.       CodeBase-supported index formats.  The file format can be determined
  404.       by examining the last three letters of the executables provided:
  405.       
  406.       eg.  CID_CDX.EXE  is the MDX file format of FoxPro
  407.            CID_MDX.EXE  is the CDX file format of dBASE IV 
  408.       
  409.          Also, during CID execution, the file format will be displayed on
  410.       the bottom row of CID's main screen.  Please ensure that the CID
  411.       being used is the proper CID for your file format.  If not, recompile
  412.       as directed, or contact the Sequiter BBS for the correct CID.
  413.       
  414.         You can run Interactive CodeBase for DOS in either color or
  415.       monochrome modes.  Pass the command line argument of MONO to select
  416.       monochrome mode or enter no arguments for color mode:
  417.       
  418.         Eg.         c:\CID_CDX  MONO          ** for  monochrome mode
  419.       
  420.         or          c:\CID_CDX                ** for color mode
  421.       
  422.       
  423.          Upon startup, Interactive CodeBase for DOS will display a
  424.       startup message.  Press any key to clear this message.  The main
  425.       menu bar will then be activated.  You can use the cursor keys to
  426.       move the highlighting over the item that you desire and press
  427.       [ENTER] to select.      
  428.       
  429.          In addition you can use the highlighted hot keys to select a menu
  430.       item.  Holding down the ALT key and pressing a letter will move to
  431.       appropriate menu.  For example, pressing [ALT D] will move you to
  432.       DATA4 menu.  Pressing the letter that is highlighted in an entry of
  433.       the current menu, will select that item.  For example, pressing
  434.       the [O] key while in the INDEX4 menu will select the i4open
  435.       function.
  436.       
  437.            After selecting a function from a menu, you will be presented
  438.       with a variety of menus, and input boxes, prompting you to enter in
  439.       the parameters of the function.  Most functions will present you
  440.       with a list of the databases that are currently open.  You can
  441.       press the [ESC] key to abort most operations.
  442.       
  443.            When all of the parameters have been entered, the function will
  444.       be executed.  If CodeBase encounters any errors, they will be
  445.       displayed in popup boxes.  After execution of a function, the return
  446.       value (if any) will be displayed.
  447.       
  448.  
  449.       Examples:
  450.       
  451.       To open a database:
  452.       
  453.            -select d4open from the DATA4 menu.  A file requester will then
  454.             appear.
  455.            -enter the directory containing the database you want to open.
  456.            -a list of the databases in that directory will appear.
  457.            -select the database moving the highlighting with the cursor
  458.             keys and press [ENTER]
  459.       
  460.       To set the CODE4.safety to FALSE
  461.       
  462.            -select the CODE4 menu.
  463.            -use the cursor keys to move the highlighting over CODE4.safety
  464.            -press the [ENTER] key to togle between true and false.
  465.       
  466.       
  467.       Using the Browser:
  468.       
  469.          InterActive CodeBase for DOS has a built-in Browser.  To browse a
  470.       database, either open it with d4data, or create it with d4create.  Then
  471.       select BROWSER from the main menu.  You will then be presented with a
  472.       list of open databases.  Select the database that you want to browse.
  473.       
  474.       NOTE: Memo field browsing and editing is not yet supported.
  475.       
  476.       Browse Mode:
  477.       
  478.            The following keys have special functions when in browse mode:
  479.       
  480.       
  481.               [UP ARROW]    : Selects the previous record
  482.               [DOWN ARROW]  : Selects the next record
  483.               [LEFT ARROW]  : Selects the previous field
  484.               [RIGHT ARROW] : Selects the next field
  485.               [ESC]         : Leaves Browse mode and activates the menu
  486.               [ENTER]       : Allows you to edit the field
  487.               [PAGE UP]     : Skips back one page of records
  488.               [PAGE DOWN]   : Skips forward one page of records
  489.               [HOME]        : Selects the first field
  490.               [END]         : Selects the last field
  491.               [CNTL HOME]   : Selects the first record
  492.               [CNTL END]    : Selects the last record
  493.               [INS]         : Inserts a new record
  494.               [DEL]         : Toggles the deletion flag
  495.       
  496.           Menu Items:
  497.       
  498.            BROWSE           : Reenters Browse mode
  499.               d4tag_select  : Select one of the database's tags
  500.               d4go          : go to the entered record number
  501.               d4seek        : seek using the currently selected tag
  502.               d4top         : goto the top of the database
  503.               d4bottom      : goto the bottom of the database
  504.  
  505.               QUIT BROWSER  : quit browser and return the main menu
  506.       
  507.       
  508.       Compiling the Source Code:
  509.       
  510.          Source code for InterActive CodeBase for DOS has been provided
  511.       along with batch files for Borland C++ (CIDBOR.BAT) and for
  512.       Microsoft (CIDMSC.BAT).  Note the special instructions at the top
  513.       of these batch files.  Usage of these batch files assumes that
  514.       a library, named C4BASE.LIB, has been created first.  Also, note
  515.       that the CodeBase 5.0 header files must be accessible.
  516.       
  517.          If you are using Microsoft C ,you will also have to rebuild the
  518.       CodeBase 5.0 library with the e4error and e4severe functions
  519.       commented out.  InterActive CodeBase for DOS has replacements for
  520.       those routines and the Microsoft C linker will not allow functions
  521.       in a library with the same names as those in the source code.
  522.  
  523.       ----------------------------------------------------------
  524.       
  525.       VI.   Examples
  526.       
  527.           There are four sources of CodeBase 5.0 examples:
  528.       
  529.           1.  The manual, for short examples of function (and class)
  530.               usage.
  531.       
  532.           2.  The examples present on the CodeBase 5.0 diskette.
  533.               All examples installed are placed on the CodeBase
  534.               \EXAMPLES subdirectory.  Examples from the manual
  535.               can be found in \EXAMPLES.
  536.       
  537.           3.  The testing and diagnostic code.  These programs test
  538.               the important CodeBase functions, and can also be
  539.               used to ensure that CodeBase 5.0 was installed
  540.               correctly.   Test code, if installed, can be found
  541.               in \TEST.
  542.       
  543.           4.  Our BBS, which contains new examples produced by our
  544.               developers and examples which users have uploaded.
  545.               Please see 'Section IX: The CodeBase Public-Access
  546.               Bulletin Board System (BBS)' for more information.
  547.       
  548.       ----------------------------------------------------------
  549.       
  550.       VII.  Using CodeScreens with CodeBase 5.0
  551.       
  552.          Sequiter's 'CodeScreens 1.0' is an add-on package that
  553.       contains screen management functions for DOS applications.
  554.       If you are interested in obtaining this screen management
  555.       library, please contact Sequiter Software for more 
  556.       information.
  557.       
  558.          You must have at least CodeScreens version 1.02.  Owners
  559.       of previous versions can contact Sequiter for upgrade 
  560.  
  561.       information.
  562.  
  563.          CodeScreens 1.02 functions are used by creating a separate
  564.       library, 'W4.LIB', which contains the screen functions.  
  565.  
  566.          When using any screen function, remember to include 'W4.H'
  567.       at the top of your program.  'W4.H' can be found with
  568.       CodeScreens.
  569.       
  570.          There are also provided batch files that can be used to 
  571.       compile and link a CodeBase 5.0. application using screen
  572.       functions.  These are named "C4?C.BAT", where '?' is replaced
  573.       by a specific letter denoting the compiler used.
  574.       
  575.       ----------------------------------------------------------
  576.       
  577.       VIII. CodeBase Public-Access: Sequiter BBS and Compuserve Access 
  578.       
  579.          Any user with a modem may connect with the Sequiter
  580.       Bulletin Board System.  Connection to the BBS is free, 
  581.       although all users are responsible for their own long-
  582.       distance toll charges.  The BBS operates twenty-four hours
  583.       a day, seven days-a-week, excluding maintenance periods.  
  584.       The BBS operates under the DOS environment, running
  585.       WildCat(c) communications software.
  586.       
  587.          Code updates for CodeBase 5.0 can be accessed from the BBS
  588.       through the use of patch files, which may be downloaded freely.  
  589.       These files are .ZIP files containing instructions and the patch 
  590.       utility.  The patch utility requires an existing copy of 
  591.       CodeBase 5.0 and works by updating your existing source and header
  592.       modules to the latest version.  The patch utility can also be
  593.       obtained from Compuserve (see below) .
  594.  
  595.          The BBS also contains several CodeBase-related files and
  596.       documents that may be downloaded.  There is also a message
  597.       system so that electronic correspondence may be left for
  598.       Sequiter staff, or other BBS users.  The files include example
  599.       programs, utilities, add-ons and enhancements, written by
  600.       both Sequiter developers and CodeBase users.  Users are
  601.       invited to upload interesting CodeBase-related files for the
  602.       use of all BBS users.  A list of the latest enhancements, fixes 
  603.       and additions for all Sequiter products is also maintained on
  604.       the Sequiter BBS.  Users are encouraged to periodically
  605.       download these files, and make the appropriate changes.
  606.       
  607.          The phone number for the BBS is found on the back outside
  608.       cover of the CodeBase manual.  The phone number is currently
  609.       (403)-437-2229.
  610.       
  611.          Settings for the connection are:
  612.       
  613.               1200, 2400 or 9600 baud
  614.               ANSI terminal type.
  615.               No parity.
  616.  
  617.               8 bits.
  618.               1 stop bit.
  619.       
  620.          Upon connection to the Sequiter BBS, a new user will be
  621.       prompted for some information and the selection of a private
  622.       password.  After selection of your password, please memorize
  623.       it since you will be asked for that password on future
  624.       connections to the BBS.
  625.  
  626.          Sequiter Software is a registered member of the 'Data Based
  627.       Advisor Forum' on CompuServe.  Through this forum, messages can
  628.       be sent to Sequiter Technical Support.  Also, support and demonstration 
  629.       files can be downloaded from the DBA library area.  To access the
  630.       DBA forum, type 'GO DBA' at any CompuServe exclamation (!) prompt.
  631.       Messages can be directed to Sequiter using the following CIS ID
  632.       number:
  633.  
  634.               71321,1306
  635.  
  636.          This account is monitored for messages a minimum of three times
  637.       a week.
  638.  
  639.          The patch file discussed above (paragraph two) can be obtained 
  640.       from the DBA library area.  
  641.  
  642.          The following are detailed instructions as to how our customers
  643.       can access Sequiter through the DBA Forum on Compuserv (CIS).
  644.       
  645.        1 - Once user is logged on to CIS, he can get to the DBA Forum
  646.            from any "!" prompt by entering the command "GO DBA".
  647.       
  648.        2 - This will bring him into the DBA top menu, at which time the
  649.            user selects menu item " 1 Data Based Advisor Forum ".
  650.       
  651.        3 - The next screen is the Welcome Screen, at which the user
  652.            presses the <ENTER>, which then takes the user into the "Forum
  653.            Menu".
  654.       
  655.        4 - If menu item " 3 LIBRARIES (Files) " is selected, the next
  656.            menu to come up is one which lists all 17 library areas.  All
  657.            Sequiter files will be located in area " 6 Libs, Addons, Tools".
  658.       
  659.        5 - After selecting this area, the user can then browse through
  660.            this area, searching by a key word which identifies our
  661.            packages (i.e. SEQUITER, CODEBASE, CODEBASIC, etc.), or if the
  662.            user knows the name of the file he wants to download, he can
  663.            simply select download.
  664.  
  665.       --------------------------------------------------------------------
  666.  
  667.       IX.   Accessing More Than 20 Files in DOS or Windows 
  668.  
  669.          Due to a default imposed by most compilers and DOS, no more
  670.       than  twenty files can be opened during the execution of any
  671.       one single process by default.  And since the file streams 'stdout',
  672.  
  673.       'stprn', 'stdin', 'stderr' and 'stdaux' count as files, and
  674.       your executing application counts as well, this leaves only
  675.       fourteen database, index  and memo files that are allowed to
  676.       be opened by any one application.  CodeBase has no inherent
  677.       limit to the number of files opened, but will display an error
  678.       because of the failure of the system function call 'sopen()'.      
  679.  
  680.          Several compilers have patches available for increasing the
  681.       file limit.  However, because of the nature of these patches,
  682.       Sequiter does not provide technical support regarding this issue.
  683.        Please consult  your compiler's manufacturer for information.
  684.        Again, CodeBase has no inherent file limit, but will produce
  685.       an error message when it receives an 'error' return from any
  686.       C library function that is called.     
  687.  
  688.          Don't forget to increase the number of file handles in your 
  689.       CONFIG.SYS file.  To open more than 20 files (eg. 100), you
  690.       need to also modify your CONFIG.SYS file :
  691.  
  692.                  eg.  set  'FILES=100'
  693.  
  694.       
  695.          Please note the above config.sys setting will only affect
  696.       files opened on your local drives.  If you are operating on
  697.       a network drive, note that there is a default setting to the
  698.       number of files specified by your network software.  For example,
  699.       Novell's default setting is 40 files. If you want to increase
  700.       this limit in Novell, create or edit the file 'SHELL.CFG',
  701.       which should be located together with 'IPX.COM' and 'NETX.COM'.
  702.        Add  'FILEHANDLES = n', where  'n' is the maximum number of
  703.       file handles required, into  SHELL.CFG.  Other LAN software
  704.       users should consult their LAN documentation.
  705.  
  706.          Under MicroSoft Windows 3.x, you need to also make a call
  707.       to the function SetHandleCount (eg. SetHandleCount( 100 )).
  708.       If you are using CodeBase 5.0 as a DLL, then you need to add
  709.       this function call to the beginning of the d4init function in
  710.       c4code.c.  This requires you to alter the source code, then 
  711.       to rebuild the DLL and its import library.  If you are using
  712.       CodeBase statically, then all you need to do is add the 
  713.       'SetHandleCount()' function call to your application program.         
  714.  
  715.          General outines of the patches provided by the more popular
  716.       compilers is provided below.  This includes MicroSoft C 6.00a
  717.       and 7.0, Borland C++ 2.0 and 3.0, Turbo C++ 1.01 and Turbo C 2.0.
  718.  
  719.       Microsoft C patch:
  720.       ------------------
  721.  
  722.          By default, MicroSoft is hardcoded to only allow 20 file handles.  
  723.       This limit can be increased by altering the 'startup' code in 
  724.       MicroSoft C and is outlined in the 'readme.doc' file supplied with
  725.       MicroSoft C.
  726.  
  727.          You will need to alter the following files:
  728.  
  729.  
  730.            _FILE.C      (source\startup)
  731.            crt0dat.asm  (source\startup\dos)
  732.       
  733.            1.   _FILE.C :
  734.                            line 18  :  from :  #define _NFILE_ 20
  735.                                        to   :  #define _NFILE_ 100
  736.       
  737.                 crt0dat.asm :
  738.                            line 17  :  from :  _NFILE_ = 20
  739.                                        to   :  _NFILE_ = 100
  740.       
  741.                            line 259 :  (comment this line out)
  742.                            line 731 :  (comment this line out)
  743.                                        - these were commented out because of
  744.                                          an unresolved external. This didn't 
  745.                                          seem to affect the example.
  746.       
  747.                            line 319 - 321 :  (uncomment these lines)
  748.       
  749.            2.   Compile _FILE.C and crt0dat.asm :
  750.       
  751.                  cl -c -AL -W2 -Gsw -Owd _FILE.C
  752.                  masm -Mx -Dmem_L crt0dat.asm
  753.  
  754.            3.   The compiled .OBJs need to be put in the appropriate library.
  755.  
  756.                  DLL :     lib ldllcew-+_FILE;     
  757.                            lib ldllcew-+crt0dat;
  758.             
  759.                  NONDLL :  lib llibcew-+_FILE;
  760.                            lib llibcew-+crt0dat;
  761.       
  762.  
  763.       Borland C++ 2.0, Turbo C++ 1.01 and Turbo C 2.0 patch:
  764.       ------------------------------------------------------
  765.  
  766.          Borland provides patches for both Borland C++ 2.0 and 3.0.  This
  767.       patch is not for Borland C++ 3.0.  See the next section for the 
  768.       Borland C++ 3.0 patch. 
  769.  
  770.          Note that in order for this method to work you must use
  771.       _close() instead of close().  Therefore in all versions of
  772.       CodeBase so far it is necessary to modify the CodeBase source
  773.       code so that close()'s are changed to _close()'s.    
  774.          
  775.          To increase the number of file handles to 50 under Borland 
  776.       compilers simply include the file "filehand.c" in your project
  777.       file (Turbo C 2.0 users must call the function setup() from
  778.       main).  If you wish the number of file handles to be different
  779.       then 50 than simply modify the define value at the beginning
  780.       of "filehand.c".    
  781.          
  782.          So far this fix has been tested using Borland C++ 2.0
  783.       on a simple program that opens 50 files locally without CodeBase
  784.  
  785.       and on the CodeBase 5.0 test programs.  It has not been tested
  786.       over the network yet.  
  787.       
  788.  
  789.       // * * * filehand.c * * *
  790.  
  791.       #include <fcntl.h>
  792.       #include <dos.h>
  793.       
  794.       #define MAX_HANDLES 50
  795.       
  796.       void set_up(void)
  797.       {
  798.          unsigned int _openfd[MAX_HANDLES];
  799.          int j;
  800.       
  801.          /* initialize table of handles and the first five reserved ones */
  802.          /* STDIN, STDOUT, STDPRN, STDAUX, STDERR */
  803.       
  804.          _openfd[0]  =  O_RDONLY |  O_DEVICE;
  805.          _openfd[1]  =  O_WRONLY |  O_DEVICE;
  806.          _openfd[2]  =  O_WRONLY |  O_DEVICE;
  807.          _openfd[3]  =  O_RDWR   |  O_DEVICE |  O_BINARY;
  808.          _openfd[4]  =  O_WRONLY |  O_DEVICE |  O_BINARY;
  809.       
  810.          /* fill remaining slots with -1 (0xFF) so DOS knows they're 
  811.                                                               available */
  812.          for (j=5; j < MAX_HANDLES; j++)
  813.             _openfd[j] = 0xFF;
  814.       
  815.          /* DOS function 58h to set allocation strategy to LAST_FIT.
  816.             FIRST_FIT   -  00h
  817.             BEST_FIT    -  01h
  818.             LAST_FIT    -  02h
  819.          */
  820.          _AH = 0x58;
  821.          _AL = 1;
  822.          _BX = 2;
  823.          geninterrupt(0x21);     /* call DOS */
  824.       
  825.          /* set DOS handle count with function 67h only 
  826.                                                  available in DOS >= 3.3 */
  827.          _AH = 0x67;
  828.          _BX = MAX_HANDLES;
  829.          geninterrupt(0x21);     /* call DOS */
  830.       
  831.          /* DOS function 58h to set allocation strategy to FIRST_FIT */
  832.          _AH = 0x58;
  833.          _AL = 1;
  834.          _BX = 0;
  835.          geninterrupt(0x21);     /* call DOS */
  836.       }
  837.       
  838.       #ifdef __TURBOC__ == 0x18D
  839.           In order to fix Turbo C 2.0 you must make an explicit function call
  840.  
  841.           to setup() at the beginning of main() (comment out these lines)
  842.       #else
  843.           #ifdef __TURBOC__ == 0x400
  844.               This fix does not work with Borland C++ 3.0.  It only works on
  845.               Turbo C 2.0, Turbo C++ 1.01, and Borland C++ 2.0
  846.           #else
  847.               #pragma startup set_up 64  /* automatically invokes set_up() at
  848.                                             program startup for Turbo C++ 1.01
  849.                                             and Borland C++ 2.0 */
  850.           #endif
  851.       #endif
  852.  
  853.  
  854.       Borland C++ 3.0 patch:
  855.       ----------------------
  856.  
  857.          This patch was obtained directly from Borland International Inc.
  858.       This patch involves changes to one file from the RTL ( Run-Time
  859.       Library ): _NFILE.H
  860.  
  861.       A change to this file affects these files: FILES.C and FILES2.C .    
  862.       Therefore, FILES.C and FILES2.C must be recompiled and re-linked.
  863.  
  864.          Please note that this fix has not been extensively tested
  865.       by Sequiter.       
  866.  
  867.  
  868.            1.   _NFILE.H:
  869.  
  870.                 // _NFILE.H
  871.                 // Copyright (C) 1992 Borland International, Inc.
  872.                 // All Rights Reserved
  873.  
  874.                 // Maximum number of open FILES
  875.                 #define _NFILE_ 20       /* change 20 to larger value */
  876.  
  877.                 //........................................................
  878.  
  879.  
  880.          You will now have to replace the files FILES.C and FILES2.C in
  881.       the standard library with the patched files.  You must first compile
  882.       FILES.C and FILES2.C.  You can do this as follows:
  883.  
  884.             bcc -c -mX FILES.C FILES2.C
  885.  
  886.      where the X in -mX is the memory model being used.  Each memory
  887.      model used must have these changes made to each repective memory model
  888.      library.
  889.  
  890.      eg.  For large model usage:
  891.  
  892.             bcc -c -ml FILES.C FILES2.C
  893.  
  894.  
  895.         Now link the new modules into the library.  For example, the large
  896.  
  897.      model link would be:
  898.  
  899.             tlib cX.lib -+FILES.OBJ -+FILES2.OBJ   
  900.             tlib cwX.lib -+FILES.OBJ -+FILES2.OBJ  
  901.  
  902.      where the X is the memory model being used.  Each memory
  903.      model used must have these changes made to each repective memory model
  904.      library.
  905.  
  906.      eg.  For large model usage:
  907.  
  908.             tlib cl.lib -+FILES.OBJ -+FILES2.OBJ   
  909.             tlib cwl.lib -+FILES.OBJ -+FILES2.OBJ  
  910.  
  911.  
  912.      Both of these lines should be executed.  'CL.LIB' is a Borland DOS   
  913.      library, and 'CWL.LIB' is a Borland Windows library.
  914.  
  915.         Once completed, you should now be able to open more than twenty
  916.      files.  
  917.  
  918.                   ------   END   ------
  919.  
  920.