home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / pbase.zip / PBASE1.REF < prev    next >
Text File  |  1985-10-07  |  48KB  |  1,915 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.                                   TTTaaabbbllleee   ooofff   CCCooonnnttteeennntttsss
  10.  
  11.  
  12.                 1. Introduction..........................................1
  13.                    1.1. Disclaimer.......................................1
  14.                    1.2. Overview.........................................2
  15.                    1.3. Highlights.......................................2
  16.                         1.3.1. Querying Data.............................2
  17.                         1.3.2. Writing Reports...........................2
  18.                         1.3.3. Application Programs......................2
  19.                    1.4. Operational Requirements.........................3
  20.  
  21.                 2. Quick Tutorial........................................4
  22.                    2.1. Relational Model.................................4
  23.                         2.1.1. Tables....................................4
  24.                         2.1.2. Operations on Tables......................4
  25.                         2.1.3. Data Types................................4
  26.                         2.1.4. Indexes...................................4
  27.                    2.2. Structured Query Language (SQL)..................5
  28.                         2.2.1. Creating and Removing a Table.............5
  29.                         2.2.2. Retrieving Table Data.....................5
  30.                         2.2.3. Adding Table Data.........................5
  31.                         2.2.4. Updating Table Data.......................6
  32.                         2.2.5. Deleting Table Data.......................6
  33.                         2.2.6. Creating and Removing an Index............6
  34.                         2.2.7. Multiple Tables...........................6
  35.                         2.2.8. The Catalog...............................6
  36.  
  37.                 3. Reference Section.....................................7
  38.                    3.1. How to Use the Reference Section.................7
  39.                    3.2. Terminology......................................8
  40.                         3.2.1. Special Symbols...........................8
  41.                         3.2.2. Logical Operators.........................9
  42.                         3.2.3. Arithmetic Operators.....................10
  43.                    3.3. Reserved Words..................................11
  44.                    3.4. Macros..........................................12
  45.                         3.4.1. Basic Macro Substitution.................12
  46.                         3.4.2. Program Argument Macros..................12
  47.                         3.4.3. SQL Command "Bind" Macros................13
  48.                    3.5. Memory Variables................................14
  49.                    3.6. Application Commands............................15
  50.                         3.6.1. *........................................18
  51.                         3.6.2. :........................................19
  52.                         3.6.3. ASSIGN...................................20
  53.                         3.6.4. CANCEL...................................21
  54.                         3.6.5. CLEAR LINE...............................22
  55.                         3.6.6. CLEAR MESSAGE............................23
  56.                         3.6.7. CLEAR SCREEN.............................24
  57.                         3.6.8. CREATE WINDOW............................25
  58.                         3.6.9. DOCASE...................................26
  59.  
  60.                                           i
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.                         3.6.10. DOMENU..................................27
  77.                         3.6.11. DOREPORT................................29
  78.                         3.6.12. DOWHILE.................................32
  79.                         3.6.13. DROP FORM...............................33
  80.                         3.6.14. DROP VARIABLE...........................34
  81.                         3.6.15. DROP WINDOW.............................35
  82.                         3.6.16. ENTER...................................36
  83.                         3.6.17. FILECLOSE...............................37
  84.                         3.6.18. FILECLOSE...............................38
  85.                         3.6.19. FILEREAD................................39
  86.                         3.6.20. FILEWRITE...............................40
  87.                         3.6.21. FORM....................................41
  88.                         3.6.22. IF......................................43
  89.                         3.6.23. PAUSE...................................44
  90.                         3.6.24. POSITION................................45
  91.                         3.6.25. QUIT....................................46
  92.                         3.6.26. RESET FORM..............................47
  93.                         3.6.27. RESET REPORT............................48
  94.                         3.6.28. RETURN..................................49
  95.                         3.6.29. RUN.....................................50
  96.                         3.6.30. SHOW ERROR..............................51
  97.                         3.6.31. SHOW MESSAGE............................52
  98.                         3.6.32. SHOW VARIABLE...........................53
  99.                         3.6.33. SHOW (text).............................54
  100.                         3.6.34. SOUND...................................55
  101.                         3.6.35. STATUS SWITCH...........................56
  102.                         3.6.36. STATUS VARIABLE.........................57
  103.                         3.6.37. SUSPEND.................................58
  104.                         3.6.38. SWITCH DEFAULT..........................59
  105.                         3.6.39. SWITCH ECHO.............................60
  106.                         3.6.40. SWITCH ERROR............................61
  107.                         3.6.41. SWITCH STEP.............................62
  108.                         3.6.42. SWITCH TALK.............................63
  109.                         3.6.43. USE WINDOW..............................64
  110.                         3.6.44. VERSION.................................65
  111.                    3.7. Data Base Commands..............................66
  112.                         3.7.1. CREATE CURSOR............................68
  113.                         3.7.2. CREATE DATABASE..........................69
  114.                         3.7.3. CREATE INDEX.............................70
  115.                         3.7.4. CREATE TABLE.............................71
  116.                         3.7.5. DELETE...................................72
  117.                         3.7.6. DROP CURSOR..............................73
  118.                         3.7.7. DROP DATABASE............................74
  119.                         3.7.8. DROP INDEX...............................75
  120.                         3.7.9. DROP TABLE...............................76
  121.                         3.7.10. EXPORT..................................77
  122.                         3.7.11. FETCH...................................78
  123.                         3.7.12. IMPORT..................................79
  124.                         3.7.13. INSERT..................................80
  125.  
  126.                                          ii
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.                         3.7.14. RESET DATABASE..........................81
  142.  
  143.                         3.7.15. SELECT..................................82
  144.                         3.7.16. SET PRINT...............................83
  145.                         3.7.17. SHOW....................................84
  146.                         3.7.18. STATUS CURSOR...........................85
  147.                         3.7.19. STATUS TABLE............................86
  148.                         3.7.20. TEMPLATE PRINT..........................87
  149.                         3.7.21. UPDATE..................................88
  150.                         3.7.22. USE CURSOR..............................89
  151.                         3.7.23. Predicate...............................90
  152.                    3.8. Functions.......................................91
  153.                         3.8.1. String Functions.........................91
  154.                         3.8.2. Boolean Status Functions.................92
  155.                         3.8.3. Status Functions.........................93
  156.                    3.9. Form Processor..................................94
  157.                         3.9.1. Commands.................................94
  158.                         3.9.2. Programming with Forms...................95
  159.                         3.9.3. Examples.................................97
  160.                         3.9.4. Processing Individual Fields............103
  161.                         3.9.5. Programming Shortcuts...................104
  162.                    3.10. Report Writer.................................106
  163.                          3.10.1. Commands..............................106
  164.                          3.10.2. Runtime Execution.....................107
  165.                          3.10.3. Simple Reports........................108
  166.                          3.10.4. Professional-Looking Reports..........109
  167.                                  3.10.4.1. Positioning with TAB and S..109
  168.                                  3.10.4.2. Page Headings and Footings..110
  169.                                  3.10.4.3. Element Formatting..........111
  170.                          3.10.5. Summaries and Control Breaks..........113
  171.                                  3.10.5.1. Counting Example............114
  172.                                  3.10.5.2. Totaling Example............115
  173.                                  3.10.5.3. Summary Example.............116
  174.                          3.10.6. Cross-tabulations.....................117
  175.  
  176.                 4. Appendices..........................................118
  177.                    4.1. Error Messages.................................118
  178.                    4.2. Limits.........................................126
  179.                    4.3. Defaults.......................................127
  180.                    4.4. Console Format.................................128
  181.                    4.5. Backup (and Restore)...........................129
  182.                    4.6. Catalog........................................130
  183.                    4.7. Command Line Arguments.........................131
  184.  
  185.                  Index.................................................133
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.                                          iii
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.                                           Introduction
  206.  
  207.           1. Introduction
  208.  
  209.           1.1. Disclaimer
  210.  
  211.           The information contained in this document is subject to change without
  212.           notice.
  213.  
  214.           THE AUTHOR OR SUPPLIER MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS
  215.           MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  216.           MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  The author or
  217.           supplier shall not be liable for errors contained herein or for incidental
  218.           or consequential damages in connection with the furnishing, performance or
  219.           use of this material.
  220.  
  221.           This document contains proprietary information which is protected by
  222.           copyright laws.  All rights are reserved.  No part of this document may be
  223.           reproduced without the prior written concept of the author.
  224.  
  225.                                 (C) COPYRIGHT 1985 4B Associates
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.                                           1
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.                                           Introduction
  272.  
  273.           1.2. Overview
  274.  
  275.           pBASE is a "programmable relational data base management system designed for
  276.           programmers. pBASE provides facilities for querying and manipulating data as
  277.           well as report writing.
  278.  
  279.           pBASE represents all data as a table.  For example, a sample table of two
  280.           rows and four columns:
  281.  
  282.                -----------------------------------------------------
  283.                |CHK_NUMBER|DATE    |PAYEE               |AMOUNT    |
  284.                |----------|--------|--------------------|----------|
  285.                |1000      |01/02/85|Utility Company     |    123.45|
  286.                |1001      |01/10/85|Grocery Store       |     66.77|
  287.                -----------------------------------------------------
  288.  
  289.           1.3. Highlights
  290.  
  291.           1.3.1. Querying Data
  292.  
  293.           pBASE may be used to access data, using pBASE commands, without the need for
  294.           user-written computer programs.  pBASE commands are available to:
  295.  
  296.                - select and update data
  297.  
  298.                - sort retrieved data in a specified sequence
  299.  
  300.                - do calculations using data values
  301.  
  302.           1.3.2. Writing Reports
  303.  
  304.           pBASE provides formatting commands that control how queried data is
  305.           displayed.
  306.  
  307.           1.3.3. Application Programs
  308.  
  309.           pBASE provides commands to develop application programs.  Procedural and
  310.           non-procedural commands control program logic flow and interface to external
  311.           hardware devices.
  312.  
  313.           Commands may be stored in files and executed.
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.                                           2
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.                                           Introduction
  338.  
  339.           1.4. Operational Requirements
  340.  
  341.                IBM PC 256K or equivalent
  342.  
  343.                PCDOS 2.0+
  344.  
  345.                Hard disk preferred
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.                                           3
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.                                          Quick Tutorial
  404.  
  405.           2. Quick Tutorial
  406.  
  407.           This section presents a quick introduction to pBASE.  It is a VERY basic
  408.           tutorial on relational data base concepts.
  409.  
  410.           2.1. Relational Model
  411.  
  412.           pBASE utilizes the relational model of data. A RELATION is defined as a
  413.           simple two-dimensional table having a specific number of columns and zero or
  414.           more unordered rows.  Each row represents one entry in a table and
  415.           corresponds to a record in a traditional file format.  Each row contains a
  416.           value or NULL entry in each column.
  417.  
  418.           2.1.1. Tables
  419.  
  420.           2.1.2. Operations on Tables
  421.  
  422.           Many operations may be performed on a table and include:
  423.  
  424.                - Creating/droping tables
  425.  
  426.                - Retrieving data.  An entire table, row, or partial row may be
  427.                retrieved.
  428.  
  429.                - Updating data.
  430.  
  431.                - Adding data.
  432.  
  433.                - Deleting data.
  434.  
  435.                - Combining of tables based on table content value.  This operation is
  436.                called "joining."
  437.  
  438.           2.1.3. Data Types
  439.  
  440.           pBASE supports two data types:
  441.  
  442.                - NUMBER
  443.  
  444.                - CHARACTER
  445.  
  446.           2.1.4. Indexes
  447.  
  448.           pBASE also provides an indexing facility.  Indexes are NOT required to
  449.           access data.  They may be used to improve the performance of accessing table
  450.           rows.  A request to access or update data makes no explicit reference to an
  451.           index.  pBASE always decides which indexes, if any, to use to satisfy a
  452.           request.  Commands are provided to create and drop indexes.
  453.  
  454.  
  455.  
  456.                                           4
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.                                          Quick Tutorial
  470.  
  471.           2.2. Structured Query Language (SQL)
  472.  
  473.           pBASE is based on the STRUCTURED QUERY LANGUAGE (SQL).  pBASE is a non-
  474.           procedural language because data access requests specify the desired
  475.           results, not how to do it.
  476.  
  477.           pBASE commands consist of a command verb, one or more optional clauses,
  478.           language keywords, and parameter operands.  The most common pBASE commands
  479.           include:
  480.  
  481.                (retrieval)
  482.                     SELECT         Fetches data from one or more tables
  483.  
  484.                (manipulation)
  485.                     INSERT         Adds a new table row
  486.                     UPDATE         Changes data in one or more table rows
  487.                     DELETE         Deletes one or more table rows
  488.  
  489.                (definition)
  490.                     CREATE TABLE   Defines a new table and it's column attributes
  491.                     DROP TABLE     Removes a table
  492.                     CREATE INDEX   Defines a table index (on a column)
  493.                     DROP INDEX     Removes a table index
  494.  
  495.           2.2.1. Creating and Removing a Table
  496.  
  497.           Before data can be stored, updated, or retrieved, a table must be created.
  498.           The CREATE TABLE command is used to create a table and define it's format.
  499.           The command does not add a data to the table.
  500.  
  501.           2.2.2. Retrieving Table Data
  502.  
  503.           Retrieving data is the most common request of pBASE. The SELECT command is
  504.           used to specify what data is to be retrieved.  The basic form of the SELECT
  505.           command is:
  506.  
  507.                SELECT <data>
  508.                FROM <table>
  509.                WHERE <condition>
  510.  
  511.           2.2.3. Adding Table Data
  512.  
  513.  
  514.           The INSERT command allows the user to pass a row of values to be placed into
  515.           a table.  For example:
  516.  
  517.                INSERT INTO <table> (<column-list>) VALUES(<value-list>)
  518.  
  519.  
  520.  
  521.  
  522.                                           5
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.                                          Quick Tutorial
  536.  
  537.           2.2.4. Updating Table Data
  538.  
  539.           The UPDATE command specifies which column(s) should be updated and on which
  540.           rows the updating should take place.  For example:
  541.  
  542.                UPDATE <table> SET <column-name>=<value> ...
  543.  
  544.           A single UPDATE command can affect more than one row in a table and more
  545.           than one field in those rows.
  546.  
  547.           2.2.5. Deleting Table Data
  548.  
  549.           The DELETE command specifies which rows should be deleted from a table.  The
  550.           WHERE clause determines which rows are affected.  For example:
  551.  
  552.                DELETE FROM <table>
  553.                  WHERE <predicate>
  554.  
  555.           2.2.6. Creating and Removing an Index
  556.  
  557.           Query and manipulation of tables can be handled by pBASE without any
  558.           explicit specification from the user.  However, better performance is
  559.           possible when indexes are defined for appropriate table columns.  For
  560.           example:
  561.                CREATE INDEX <index> ON <table> (<column-list>)
  562.  
  563.           The index is never referenced when using pBASE commands.  pBASE analyzes
  564.           commands and indexes and uses the best access path to the table(s).
  565.  
  566.           2.2.7. Multiple Tables
  567.  
  568.           pBASE allows data stored in different tables to be combined.  This
  569.           technique, called joining, causes pBASE to merge data from different tables
  570.           and present the data.  (The merged data is not stored in the data base.)
  571.           For example:
  572.  
  573.                SELECT <column-list> FROM <table>,<table> WHERE <predicate>
  574.  
  575.  
  576.           2.2.8. The Catalog
  577.  
  578.           pBASE maintains several system tables that collectively "catalog" the
  579.           contents of the database.  These tables contain information about objects
  580.           that are of interest to the execution of the system itself.  Examples of
  581.           such objects includes base tables, indexes, column types, column sizes, etc.
  582.           Because the catalog itself consists of tables, just like ordinary user
  583.           tables, a subset of pBASE commands may be used to view the contents of these
  584.           tables.
  585.  
  586.  
  587.  
  588.                                           6
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.                                        Reference Section
  602.  
  603.           3. Reference Section
  604.  
  605.           3.1. How to Use the Reference Section
  606.  
  607.           This section contains the formal definition of all pBASE commands.  It
  608.           includes:
  609.  
  610.                - the proper syntax
  611.  
  612.                - a definition
  613.  
  614.                - one or more examples
  615.  
  616.           The commands are subdivided by type, application and data base.  In
  617.           addition, reserved words and terminology are listed and special features are
  618.           covered in detail:
  619.  
  620.                macros, memory variables, functions, forms, report writer
  621.  
  622.  
  623.           A typical example of command syntax is:
  624.  
  625.                SHOW ERROR '<text>'
  626.  
  627.           where capitalized words are pBASE keywords and lower case words are general
  628.           terms for what should be entered.  Square brackets ([]) mean that anything
  629.           within the square brackets is an optional entry.  Curly brackets ({}) mean
  630.           that within the curly brackets there are two or more mutually exclusive
  631.           items that may be entered.  The choices are separated by a vertical bar (|).
  632.  
  633.           pBASE keywords may NOT be abbreviated.
  634.  
  635.           Command lines may extend over several lines.  Lines may be continued by
  636.           appending a semicolon (;) at the end of the line.  Continuation is valid in
  637.           interactive and program modes.  For example:
  638.  
  639.                pBASE> SELECT column1,column2 FROM table;
  640.                pBASE> WHERE column3>45;
  641.                pBASE> ORDER BY column2,column1
  642.  
  643.  
  644.           A literal string is indicated by enclosing the string in single (') or
  645.           double (") quotation marks.  Embedded single quotes are indicated by
  646.           specifying two single quotes with no intervening characters ('').
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.                                           7
  655.  
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.                                 Reference Section - Terminology
  668.  
  669.           3.2. Terminology
  670.  
  671.  
  672.           3.2.1. Special Symbols
  673.  
  674.  
  675.                <attribute> - an integer between 1 and 255
  676.  
  677.                <arguments> - a list of blank-separated identifiers
  678.  
  679.                <base-col> - a number between 1 and the maximum width of the display 
  680.                screen
  681.  
  682.                <base-row> - a number between 1 and the maximum depth of the display 
  683.                screen
  684.  
  685.                <border-type> - 1 (single line) or 2 (double line)
  686.  
  687.                <bottom-margin> - a number between 1 and the size of a printed page
  688.  
  689.                <column#> - a number between 1 and the width of a display screen or 
  690.                printed page
  691.  
  692.                <column-definition> - a list of comma-separated <column-name>  <column-
  693.                type> pairs
  694.  
  695.                <column-name> - an identifier
  696.  
  697.                <column-type> - CHAR(<size>) or NUMBER
  698.  
  699.                <command-line> - a program name with optional trailing <arguments>
  700.  
  701.                <comment> - any meaningful <text>
  702.  
  703.                <constant> - a literal number or string
  704.  
  705.                <cursor#> - a number between 1 and maximum cursors
  706.  
  707.                <database-name> - 1-8 characters valid for a DOS filename
  708.  
  709.                <depth> - a number between 1 and maximum <depth>
  710.  
  711.                <expression> - an identifier or group of identifiers and operators 
  712.                whose value can be determined
  713.  
  714.                <field#> - a number between 1 and maximum fields
  715.  
  716.                <filename> - a valid DOS file specification
  717.  
  718.  
  719.  
  720.                                           8
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.                                 Reference Section - Terminology
  734.  
  735.  
  736.                <index-name> - an identifier name
  737.  
  738.                <line#> - a number between 1 and maximum lines
  739.  
  740.                <picture> - (see Reference Section - Report Writer Element Formatting)
  741.  
  742.                <predicate> - (see Reference Section - Predicate)
  743.  
  744.                <program-name> - a valid DOS file specification with a ".COM", ".EXE",
  745.                     ".BAT" or ".PRG"
  746.  
  747.                <row#> - a number between 1 and maximum rows
  748.  
  749.                <skeleton> - a wildcard specification containing characters and "?"
  750.  
  751.                <table-name> - an identifier
  752.  
  753.                <template-file> - a DOS file with a ".TMP" extension
  754.  
  755.                <text> - any "printable" ascii characters
  756.  
  757.                <title> - string value
  758.  
  759.                <top-margin> - a number between 1 and the depth of a console screen or
  760.                     printed page
  761.  
  762.                <variable-name> - an identifier
  763.  
  764.                <width> - a number between 1 and the width of a console screen or 
  765.                printed page
  766.  
  767.                <window#> - integer between 1 and maximum concurent windows
  768.  
  769.           3.2.2. Logical Operators
  770.  
  771.                (listed in order of precedence)
  772.  
  773.                ()   parentheses for grouping
  774.  
  775.                NOT  logical not (unary operator)
  776.  
  777.                AND  logical and
  778.  
  779.                OR   logical or
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.                                           9
  787.  
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.                                 Reference Section - Terminology
  800.  
  801.           3.2.3. Arithmetic Operators
  802.  
  803.                (listed in order or precedence)
  804.  
  805.                ()   parentheses for grouping
  806.  
  807.                *    multiplication
  808.  
  809.                /    division
  810.  
  811.                +    addition
  812.  
  813.                -    subtraction
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823.  
  824.  
  825.  
  826.  
  827.  
  828.  
  829.  
  830.  
  831.  
  832.  
  833.  
  834.  
  835.  
  836.  
  837.  
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.                                          10
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.                                Reference Section - Reserved Words
  866.  
  867.           3.3. Reserved Words
  868.  
  869.           The following "words" are reserved by pBASE.  They may NOT be used as memory
  870.           variable names or identifiers:
  871.  
  872.           AND            ASC            ALL            AND            ASSIGN
  873.           AT             BOOLEAN        BREAK          BY             CANCEL
  874.           CASE           CHAR           CLEAR          COLOR          COLUMN
  875.           CONCAT         CONSOLE        COUNT          CREATE         CURSOR
  876.           DATABASE       DBRET          DEBUG          DEFAULT        DEL
  877.           DELETE         DESC           DETAIL         DISPLAY        DOCASE
  878.           DOMENU         DOREPORT       DOWHILE        DROP           ECHO
  879.           EJECT          ELSE           END            ENDCASE        ENDIF
  880.           ENDMENU        ENDONERROR     ENDREPORT      ENDWHILE       ENTER
  881.           ERASE          ERROR          EXIT           EXPORT         FALSE
  882.           FETCH          FIELD          FILECLOSE      FILEOPEN       FILEREAD
  883.           FILEWRITE      FINAL          FOOTING        FOR            FORM
  884.           FORMAT         GETDATE        GETENV         GETTIME        HEADING
  885.           HORZ           IF             IMPORT         INDEX          INS
  886.           INSERT         INTO           ISEOF          ISFEOF         ISFILE
  887.           ISNUMBER       ISYES          KEY            KEYPRESS       LIKE
  888.           LINE           LOCK           LOOP           MATCH          MENUCHOICE
  889.           MENUOPTION     MENUTITLE      MENUTYPE       MESSAGE         NOT
  890.           NULL           NUMBER         OFF            ON             ONERROR
  891.           OR             ORDER          OTHERWISE      OUTPUT         PAGE
  892.           PAUSE          PICTURE        POSITION       PRINT          PRINTER
  893.           PROMPT         QUIT           READ           REP            REPORT
  894.           RESET          RETURN         ROW            RUN            SCREEN
  895.           SELECT         SET            SHOW           SKIP           SOUND
  896.           STATUS         STEP           SUBCOUNT       SUBSTR         SUBTOTAL
  897.           SUSPEND        SWITCH         SYSDATE        SYSOTHER       SYSPAGE
  898.           SYSTIME        SYSTOTAL       TAB            TABLE          TALK
  899.           TEMPLATE       TEXT           TO             TOLOWER        TOTAL
  900.           TOUPPER        TRUE           UNLOCK         UPDATE         UPDPOS
  901.           USE            VALUES         VARIABLE       VERSION        VERT
  902.           WHERE          WIDTH          WINDOW         XTAB
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.                                          11
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.                                    Reference Section - Macros
  932.  
  933.           3.4. Macros
  934.  
  935.  
  936.           3.4.1. Basic Macro Substitution
  937.  
  938.  
  939.           Whenever an ampersand (&) followed by the name of a memory variable is
  940.           encountered in a command, pBASE replaces the &<variable-name> with the
  941.           string value of the variable.  If an ampersand is NOT followed by a valid
  942.           memory variable name no substitution takes place (and the ampersand remains
  943.           within the command line).
  944.  
  945.           Basic macros are very useful for dynamic modification of commands during the
  946.           actual execution of pBASE programs.  They may also be used to pass
  947.           parameters between programs.
  948.  
  949.           Example:
  950.  
  951.                pBASE> ENTER dest PROMPT 'Destination filename of output'
  952.                pBASE> SET PRINT TO &dest     (at execution time this becomes
  953.                                              "SET PRINT TO temp.prt" if "temp.prt"
  954.                                              was entered in response to the ENTER
  955.                                              command)
  956.  
  957.  
  958.           3.4.2. Program Argument Macros
  959.  
  960.  
  961.           A "special" form of the basic ampersand macro replacement facility is the
  962.           program argument macro.  Whenever an ampersand followed by an integer number
  963.           is encountered, pBASE replaces the ampersand and the number with the
  964.           relative argument corresponding to the number.
  965.  
  966.           Example:
  967.  
  968.                pBASE> HELP CREATE                 (command HELP with argument CREATE)
  969.                pBASE> IF TOUPPER('&1')='CREATE'   (At execution time within program
  970.                                                   HELP.PRG this becomes:
  971.                                                   "IF TOUPPER('CREATE')='CREATE'")
  972.                pBASE>    SHOW 'CREATE argument'
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.                                          12
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.                                    Reference Section - Macros
  998.  
  999.           3.4.3. SQL Command "Bind" Macros
  1000.  
  1001.  
  1002.           A third form of macro substitution is a special case limited to
  1003.           specification of data base data manipulation command field values and exists
  1004.           to maintain compatibility with SQL programming conventions.  Whenever a
  1005.           colon (:) is encountered within a SQL data manipulation command, the colon
  1006.           and the concatenated memory variable name are replaced by the string value
  1007.           of the memory variable.
  1008.  
  1009.           Example:
  1010.  
  1011.                pBASE> UPDATE SUP SET item=:item,descr=':descr';
  1012.                pBASE> WHERE id=:id                (At execution time this becomes
  1013.                                                   "UPDATE SUP SET item=12,descr=
  1014.                                                    'Red box' WHERE id=1001" assuming
  1015.                                                   that memory variables item, descr,
  1016.                                                   and id contained "12", "Red box",
  1017.                                                   and 12 respectively)
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.                                          13
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.                               Reference Section - Memory Variables
  1064.  
  1065.           3.5. Memory Variables
  1066.  
  1067.  
  1068.           Memory variables are temporary elements that are created and destroyed by
  1069.           commands.  pBASE memory variables do NOT have any notion of TYPE, such as
  1070.           numeric or character.  Their so-called type is implicit based on the content
  1071.           (value) and usage.
  1072.  
  1073.           Memory variables are used to contain constants, results of computations, and
  1074.           (macro) symbolic substitution strings.  Commands that manipulate memory
  1075.           variables include:
  1076.  
  1077.                ASSIGN <expression> TO <variable-name>
  1078.  
  1079.                DROP VARIABLE {<variable-name>|ALL|LIKE <skeleton>}
  1080.  
  1081.                ENTER <variable-name> PROMPT <text>
  1082.  
  1083.                EXPORT VARIABLE {ALL|LIKE <skeleton>} TO <filename>
  1084.  
  1085.                IMPORT VARIABLE FROM <filename>
  1086.  
  1087.                SHOW <variable-name>
  1088.  
  1089.                STATUS VARIABLE
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.                                          14
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.                             Reference Section - Application Commands
  1130.  
  1131.           3.6. Application Commands
  1132.  
  1133.           Application commands support the development and execution of pBASE
  1134.           applications.  Also within this general framework are commands that provide
  1135.           operator assistance.  Following are application commands grouped
  1136.           functionally:
  1137.  
  1138.           Display:
  1139.  
  1140.                CLEAR LINE - Clear a display line
  1141.  
  1142.                CLEAR MESSAGE - Clear display message area
  1143.  
  1144.                CLEAR SCREEN - Clear entire display
  1145.  
  1146.                CREATE WINDOW - Open a window
  1147.  
  1148.                DROP WINDOW - Close a window
  1149.  
  1150.                ENTER - Enter value into memory variable
  1151.  
  1152.                DROP FORM - Remove form window
  1153.  
  1154.                FORM - Non-procedural forms data entry
  1155.  
  1156.                POSITION - Move display cursor to coordinates
  1157.  
  1158.                RESET FORM - Free form resources
  1159.  
  1160.                SHOW ERROR - Display error message
  1161.  
  1162.                SHOW MESSAGE - Display informational message
  1163.  
  1164.                SHOW (text) - Display text string
  1165.  
  1166.                USE WINDOW - Specify "current" window
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.                                          15
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.                             Reference Section - Application Commands
  1196.  
  1197.           File Input/Output:
  1198.  
  1199.                FILECLOSE - Close a DOS file.
  1200.  
  1201.                FILEOPEN - Open a DOS file.
  1202.  
  1203.                FILEREAD - Read a line into a memory variable.
  1204.  
  1205.                FILEWRITE - Write an expression.
  1206.  
  1207.           Memory Variables:
  1208.  
  1209.                ASSIGN - Assign the value of an expression to a memory variable
  1210.  
  1211.                DROP VARIABLE - Destroy a memory variable
  1212.  
  1213.                EXPORT VARIABLE - "Save" variable(s)
  1214.  
  1215.                IMPORT VARIABLE - "Restore" variable(s)
  1216.  
  1217.                SHOW VARIABLE - Display the value of a memory variable
  1218.  
  1219.                STATUS VARIABLE - Display status of memory variable pool
  1220.  
  1221.  
  1222.           Programming:
  1223.  
  1224.                * - Comment line
  1225.  
  1226.                : - DOS command
  1227.  
  1228.                CANCEL - Stop execution of program(s)
  1229.  
  1230.                DOCASE - Execute commands with one of several CASEs
  1231.  
  1232.                DOMENU - Non-procedural menu
  1233.  
  1234.                DOREPORT - Non-procedural report writer
  1235.  
  1236.                DOWHILE - Repeat while condition true
  1237.  
  1238.                IF - Execute commands when condition true
  1239.  
  1240.                PAUSE - Suspend execution temporarily
  1241.  
  1242.                RESET REPORT - Free report writer resources
  1243.  
  1244.                RETURN - Exit program
  1245.  
  1246.                RUN - Execute program
  1247.  
  1248.                                          16
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.                             Reference Section - Application Commands
  1262.  
  1263.  
  1264.                SUSPEND - Temporary interactive mode
  1265.  
  1266.  
  1267.           Other:
  1268.  
  1269.                QUIT - Exit pBASE
  1270.  
  1271.                SOUND - "Beep" the console.
  1272.  
  1273.                STATUS SWITCH - Display current switch status
  1274.  
  1275.                SWITCH DEFAULT - Reset all switches to their defaults
  1276.  
  1277.                SWITCH ECHO - Display executed commands ON|OFF
  1278.  
  1279.                SWITCH ERROR - Display errors ON|OFF
  1280.  
  1281.                SWITCH STEP - Single step execution ON|OFF
  1282.  
  1283.                SWITCH TALK - Echo command results ON|OFF
  1284.  
  1285.                VERSION - Display pBASE version
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.                                          17
  1315.  
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.                              Reference Section - Data Base Commands
  1328.  
  1329.  
  1330.           3.7. Data Base Commands
  1331.  
  1332.           Data base commands either operate on a data base or provide operator
  1333.           assistance for data base related tasks.  Following are data base commands
  1334.           grouped functionally:
  1335.  
  1336.           Data Retrieval:
  1337.  
  1338.                EXPORT - Move table data to external DOS file
  1339.  
  1340.                FETCH - Retrieve SELECTed data into memory variables
  1341.  
  1342.                SELECT - Specify data to be queued for retrieval
  1343.  
  1344.                SHOW - Display queued data at console
  1345.  
  1346.                TEMPLATE PRINT - Template replacement report writer
  1347.  
  1348.  
  1349.           Data Manipulation:
  1350.  
  1351.                DELETE - Delete rows
  1352.  
  1353.                IMPORT - Move external DOS file data into a table
  1354.  
  1355.                INSERT - Add a row to a table
  1356.  
  1357.                UPDATE - Update table rows that satisfy condition
  1358.  
  1359.  
  1360.           Data Definition:
  1361.  
  1362.                CREATE DATABASE - Create an empty data base
  1363.  
  1364.                CREATE INDEX - Create a table column index
  1365.  
  1366.                CREATE TABLE - Create a table
  1367.  
  1368.                DROP DATABASE - Destroy an entire data base
  1369.  
  1370.                DROP INDEX - Destroy an index
  1371.  
  1372.                DROP TABLE - Destroy an entire table
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.                                          66
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.                              Reference Section - Data Base Commands
  1394.  
  1395.           Other:
  1396.  
  1397.                CREATE CURSOR - "Open" an access path to a data base
  1398.  
  1399.                DROP CURSOR - "Close" an access path to a data base
  1400.  
  1401.                RESET DATABASE - Drop all active cursors
  1402.  
  1403.                SET CURSOR - Specify current active cursor
  1404.  
  1405.                SET PRINT - Specify TEMPLATE PRINT output device
  1406.  
  1407.                STATUS CURSOR - Display cursor status
  1408.  
  1409.                STATUS TABLE - Display table(s) status
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416.  
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.                                          67
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.                                  Reference Section - Functions
  1460.  
  1461.           3.8. Functions
  1462.  
  1463.  
  1464.           Functions are special purpose operations that occur during run-time of a
  1465.           command.  A function performs a specific operation on the (sub)value of an
  1466.           expression.  A function does not occur alone, rather it appears with its
  1467.           related expression in the general form:
  1468.  
  1469.                FUNCTION([expression])
  1470.  
  1471.           Note that all start positions and offsets are relative to one (1).
  1472.  
  1473.           3.8.1. String Functions
  1474.  
  1475.  
  1476.                <concatenated-string> = CONCAT(<string1> <string2>)
  1477.                     Returns concatenation of string1 and string2.
  1478.  
  1479.                <modified-string> = DEL(<string> <count> <start>)
  1480.                     Returns substring of <string> after removing <count> characters at
  1481.                     position <start>.
  1482.  
  1483.                <date> = GETDATE()
  1484.                     Returns system date in mmddyy format.
  1485.  
  1486.                <string> = GETENV(<environment-name>)
  1487.                     Returns environment value.
  1488.  
  1489.                <time> = GETTIME()
  1490.                     Returns system time in hhmmss format.
  1491.  
  1492.                <modified-string> = INS(<string1> <string2> <start>)
  1493.                     Returns expanded string after inserting <string2> into   <string1>
  1494.                     at position <start>.
  1495.  
  1496.                <modified-string> = TOLOWER(<expression>)
  1497.                     Converts the expression to all lower case.
  1498.  
  1499.                <modified-string> = TOUPPER(<expression>)
  1500.                     Converts the expression to all upper case.
  1501.  
  1502.                <index> = MATCH(<string1> <string2> <start>)
  1503.                     Returns the <index> of where <string2> starts within <string1>
  1504.                     relative to <start>.
  1505.  
  1506.                <modified-string> = REP(<string1> <string2> <start>)
  1507.                     Returns modified string after replacing part of <string1> with
  1508.                     <string2> at <start>.
  1509.  
  1510.  
  1511.  
  1512.                                          91
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.                                  Reference Section - Functions
  1526.  
  1527.  
  1528.                <string> = SUBSTR(<expression> <start> <length>)
  1529.                     Extracts a substring of the specified starting position and
  1530.                     length.
  1531.  
  1532.           3.8.2. Boolean Status Functions
  1533.  
  1534.  
  1535.  
  1536.                <boolean> = ISEOF()
  1537.                     Returns TRUE if (data base) END OF FETCH else FALSE.
  1538.  
  1539.                <boolean> = ISFEOF()
  1540.                     Returns TRUE if END OF FILE else FALSE.
  1541.  
  1542.                <boolean> = ISFILE(<filename>)
  1543.                     Returns TRUE if <filename> exists else FALSE.
  1544.  
  1545.                <boolean> = ISNUMBER(<expression>)
  1546.                     Returns TRUE if <expression> is numeric else FALSE.
  1547.  
  1548.                <boolean> = ISYES(<text>)
  1549.                     Displays a menu prompt and returns operator response (TRUE or
  1550.                     FALSE).
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.  
  1567.  
  1568.  
  1569.  
  1570.  
  1571.  
  1572.  
  1573.  
  1574.  
  1575.  
  1576.  
  1577.  
  1578.                                          92
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.                                  Reference Section - Functions
  1592.  
  1593.           3.8.3. Status Functions
  1594.  
  1595.  
  1596.                <return-code> = DBRET()
  1597.                     Returns the current data base status code.
  1598.  
  1599.                <key-value> = KEYPRESS()
  1600.                     Returns the last key pressed by operator.
  1601.  
  1602.  
  1603.  
  1604.  
  1605.  
  1606.  
  1607.  
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644.                                          93
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.                                          Form Processor
  1658.  
  1659.           3.9. Form Processor
  1660.  
  1661.           3.9.1. Commands
  1662.  
  1663.           Form processing commands specify what and when data field(s) are entered.
  1664.           Following are form processor commands grouped functionally:
  1665.  
  1666.           Form content:
  1667.  
  1668.                FORM FIELD - Entry field location and size
  1669.  
  1670.                FOR FOR TABLE - Default form text and fields
  1671.  
  1672.                FORM HEADING - Background text heading
  1673.  
  1674.                FORM SHOW FIELD - Display entry field
  1675.  
  1676.                FORM SHOW TEXT - Display background text
  1677.  
  1678.                FORM TEXT - Background text definition
  1679.  
  1680.           Form run-time:
  1681.  
  1682.                FORM CLEAR FIELD - Clear entry field to all blanks
  1683.  
  1684.                FORM ERASE FIELD - Remove entry field from console display
  1685.  
  1686.                FORM LOCK FIELD - Disallow data entry
  1687.  
  1688.                FORM READ FIELD - Read data
  1689.  
  1690.                FORM UNLOCK FIELD - Allow data entry
  1691.  
  1692.           Other:
  1693.  
  1694.                DROP FORM - Close form window
  1695.  
  1696.                RESET FORM - Free form resources
  1697.  
  1698.                FORM DELETE - Auto-DELETE
  1699.  
  1700.                FORM SELECT - Auto-SELECT
  1701.  
  1702.                FORM SELECT - Auto-SELECT
  1703.  
  1704.                FORM UPDATE - Auto-UPDATE
  1705.  
  1706.  
  1707.  
  1708.  
  1709.  
  1710.                                          94
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.                                          Report Writer
  1724.  
  1725.  
  1726.           3.10. Report Writer
  1727.  
  1728.           3.10.1. Commands
  1729.  
  1730.           Report writer commands specify how, what, and when the contents of a report
  1731.           are printed.  Their actual usage is very hierarchically structured and is
  1732.           graphically represented as follows:
  1733.  
  1734.  
  1735.                <Report-group> ::=
  1736.                     DOREPORT
  1737.                       REPORT XXXX
  1738.                         <Command-group>
  1739.                         END
  1740.                       ENDREPORT
  1741.  
  1742.  
  1743.                <Command-group> ::=
  1744.                      pBASE commands
  1745.                     <Report-group>
  1746.                     <Output-group> (REPORT OUTPUT only)
  1747.  
  1748.  
  1749.                <Print-group> ::=
  1750.                     TAB n
  1751.                     SKIP [n]
  1752.                     EJECT
  1753.                     <string> [PICTURE <picture>]
  1754.                     <variable-name> [PICTURE <picture>]
  1755.                     SYSDATE
  1756.                     SYSTIME
  1757.                     SYSPAGE
  1758.  
  1759.  
  1760.                <Output-group> ::=
  1761.                     TO { CONSOLE | PRINTER | <filename> }
  1762.                     PAGE FORMAT <depth><width><top-margin><bottom-margin>
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.                                          106
  1777.  
  1778.  
  1779.  
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.                                       Appendicies - Limits
  1790.  
  1791.           4.2. Limits
  1792.  
  1793.  
  1794.                string length - 255
  1795.  
  1796.                command line length - 510
  1797.  
  1798.                identifier length - 20
  1799.  
  1800.                DOCASE nesting - 10
  1801.  
  1802.                IF nesting - 10
  1803.  
  1804.                DOWHILE nesting - 10
  1805.  
  1806.                max table columns - 255
  1807.  
  1808.                max length CHAR column size - 255
  1809.  
  1810.                max precision NUMBER column type - 18 decimal digits
  1811.  
  1812.                max memory variables - 64
  1813.  
  1814.                Nesting of programs - 5
  1815.  
  1816.                Concurrent cursors - 5
  1817.  
  1818.                Screen size 25X80
  1819.  
  1820.                Forms - text, fields
  1821.  
  1822.                Menus - options - 9
  1823.  
  1824.                SELECT fields - 20
  1825.  
  1826.                Concurrent windows - 10
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.                                          126
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.           Appendicies - Catalog
  1856.  
  1857.           4.6. Catalog
  1858.  
  1859.           The pBASE catalog consists of system tables.  These tables are just like
  1860.           ordinary user data tables although access to them is somewhat restricted.
  1861.           The system tables consist of:
  1862.  
  1863.                SYSTABLES
  1864.                This table contains a row for every table in the data base.  For each
  1865.                table, it contains the table name, column count, creator, and
  1866.                authorization.
  1867.  
  1868.                SYSCOLUMNS
  1869.                This table contains a row for every table row in the data base.  For
  1870.                each such column, it gives the table name, column name, relative column
  1871.                number, column type and column length.
  1872.  
  1873.                SYSINDEXES
  1874.                This table contains a row for every index in the data base.  For each
  1875.                such index, it gives the table name, column name, index name, and
  1876.                creator.
  1877.  
  1878.                SYSUSERAUTH
  1879.                This table contains a row for each authorized data base user.  For each
  1880.                column, it gives the user identifier, password, and authorization.
  1881.  
  1882.           Since the catalog consists of tables, just like ordinary user tables, it can
  1883.           be queried (and reported) by means of the SELECT command just as ordinary
  1884.           tables can.  For example, to find out what table(s) contain an 'USERID'
  1885.           column:
  1886.  
  1887.                > SELECT tbname FROM syscolumns WHERE colname='USERID'
  1888.  
  1889.           Although the catalog tables can be queried with the SELECT command they
  1890.           CANNOT be updated with UPDATE, DELETE or INSERT commands.  Updating is
  1891.           limited to the DATA DEFINITION commands: CREATE/DROP table, CREATE/DROP
  1892.           INDEX, etc.
  1893.  
  1894.  
  1895.  
  1896.  
  1897.  
  1898.  
  1899.  
  1900.  
  1901.  
  1902.  
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908.                                          130
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.