home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
pbase.zip
/
PBASE1.REF
< prev
next >
Wrap
Text File
|
1985-10-07
|
48KB
|
1,915 lines
TTTaaabbbllleee ooofff CCCooonnnttteeennntttsss
1. Introduction..........................................1
1.1. Disclaimer.......................................1
1.2. Overview.........................................2
1.3. Highlights.......................................2
1.3.1. Querying Data.............................2
1.3.2. Writing Reports...........................2
1.3.3. Application Programs......................2
1.4. Operational Requirements.........................3
2. Quick Tutorial........................................4
2.1. Relational Model.................................4
2.1.1. Tables....................................4
2.1.2. Operations on Tables......................4
2.1.3. Data Types................................4
2.1.4. Indexes...................................4
2.2. Structured Query Language (SQL)..................5
2.2.1. Creating and Removing a Table.............5
2.2.2. Retrieving Table Data.....................5
2.2.3. Adding Table Data.........................5
2.2.4. Updating Table Data.......................6
2.2.5. Deleting Table Data.......................6
2.2.6. Creating and Removing an Index............6
2.2.7. Multiple Tables...........................6
2.2.8. The Catalog...............................6
3. Reference Section.....................................7
3.1. How to Use the Reference Section.................7
3.2. Terminology......................................8
3.2.1. Special Symbols...........................8
3.2.2. Logical Operators.........................9
3.2.3. Arithmetic Operators.....................10
3.3. Reserved Words..................................11
3.4. Macros..........................................12
3.4.1. Basic Macro Substitution.................12
3.4.2. Program Argument Macros..................12
3.4.3. SQL Command "Bind" Macros................13
3.5. Memory Variables................................14
3.6. Application Commands............................15
3.6.1. *........................................18
3.6.2. :........................................19
3.6.3. ASSIGN...................................20
3.6.4. CANCEL...................................21
3.6.5. CLEAR LINE...............................22
3.6.6. CLEAR MESSAGE............................23
3.6.7. CLEAR SCREEN.............................24
3.6.8. CREATE WINDOW............................25
3.6.9. DOCASE...................................26
i
3.6.10. DOMENU..................................27
3.6.11. DOREPORT................................29
3.6.12. DOWHILE.................................32
3.6.13. DROP FORM...............................33
3.6.14. DROP VARIABLE...........................34
3.6.15. DROP WINDOW.............................35
3.6.16. ENTER...................................36
3.6.17. FILECLOSE...............................37
3.6.18. FILECLOSE...............................38
3.6.19. FILEREAD................................39
3.6.20. FILEWRITE...............................40
3.6.21. FORM....................................41
3.6.22. IF......................................43
3.6.23. PAUSE...................................44
3.6.24. POSITION................................45
3.6.25. QUIT....................................46
3.6.26. RESET FORM..............................47
3.6.27. RESET REPORT............................48
3.6.28. RETURN..................................49
3.6.29. RUN.....................................50
3.6.30. SHOW ERROR..............................51
3.6.31. SHOW MESSAGE............................52
3.6.32. SHOW VARIABLE...........................53
3.6.33. SHOW (text).............................54
3.6.34. SOUND...................................55
3.6.35. STATUS SWITCH...........................56
3.6.36. STATUS VARIABLE.........................57
3.6.37. SUSPEND.................................58
3.6.38. SWITCH DEFAULT..........................59
3.6.39. SWITCH ECHO.............................60
3.6.40. SWITCH ERROR............................61
3.6.41. SWITCH STEP.............................62
3.6.42. SWITCH TALK.............................63
3.6.43. USE WINDOW..............................64
3.6.44. VERSION.................................65
3.7. Data Base Commands..............................66
3.7.1. CREATE CURSOR............................68
3.7.2. CREATE DATABASE..........................69
3.7.3. CREATE INDEX.............................70
3.7.4. CREATE TABLE.............................71
3.7.5. DELETE...................................72
3.7.6. DROP CURSOR..............................73
3.7.7. DROP DATABASE............................74
3.7.8. DROP INDEX...............................75
3.7.9. DROP TABLE...............................76
3.7.10. EXPORT..................................77
3.7.11. FETCH...................................78
3.7.12. IMPORT..................................79
3.7.13. INSERT..................................80
ii
3.7.14. RESET DATABASE..........................81
3.7.15. SELECT..................................82
3.7.16. SET PRINT...............................83
3.7.17. SHOW....................................84
3.7.18. STATUS CURSOR...........................85
3.7.19. STATUS TABLE............................86
3.7.20. TEMPLATE PRINT..........................87
3.7.21. UPDATE..................................88
3.7.22. USE CURSOR..............................89
3.7.23. Predicate...............................90
3.8. Functions.......................................91
3.8.1. String Functions.........................91
3.8.2. Boolean Status Functions.................92
3.8.3. Status Functions.........................93
3.9. Form Processor..................................94
3.9.1. Commands.................................94
3.9.2. Programming with Forms...................95
3.9.3. Examples.................................97
3.9.4. Processing Individual Fields............103
3.9.5. Programming Shortcuts...................104
3.10. Report Writer.................................106
3.10.1. Commands..............................106
3.10.2. Runtime Execution.....................107
3.10.3. Simple Reports........................108
3.10.4. Professional-Looking Reports..........109
3.10.4.1. Positioning with TAB and S..109
3.10.4.2. Page Headings and Footings..110
3.10.4.3. Element Formatting..........111
3.10.5. Summaries and Control Breaks..........113
3.10.5.1. Counting Example............114
3.10.5.2. Totaling Example............115
3.10.5.3. Summary Example.............116
3.10.6. Cross-tabulations.....................117
4. Appendices..........................................118
4.1. Error Messages.................................118
4.2. Limits.........................................126
4.3. Defaults.......................................127
4.4. Console Format.................................128
4.5. Backup (and Restore)...........................129
4.6. Catalog........................................130
4.7. Command Line Arguments.........................131
Index.................................................133
iii
Introduction
1. Introduction
1.1. Disclaimer
The information contained in this document is subject to change without
notice.
THE AUTHOR OR SUPPLIER MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS
MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The author or
supplier shall not be liable for errors contained herein or for incidental
or consequential damages in connection with the furnishing, performance or
use of this material.
This document contains proprietary information which is protected by
copyright laws. All rights are reserved. No part of this document may be
reproduced without the prior written concept of the author.
(C) COPYRIGHT 1985 4B Associates
1
Introduction
1.2. Overview
pBASE is a "programmable relational data base management system designed for
programmers. pBASE provides facilities for querying and manipulating data as
well as report writing.
pBASE represents all data as a table. For example, a sample table of two
rows and four columns:
-----------------------------------------------------
|CHK_NUMBER|DATE |PAYEE |AMOUNT |
|----------|--------|--------------------|----------|
|1000 |01/02/85|Utility Company | 123.45|
|1001 |01/10/85|Grocery Store | 66.77|
-----------------------------------------------------
1.3. Highlights
1.3.1. Querying Data
pBASE may be used to access data, using pBASE commands, without the need for
user-written computer programs. pBASE commands are available to:
- select and update data
- sort retrieved data in a specified sequence
- do calculations using data values
1.3.2. Writing Reports
pBASE provides formatting commands that control how queried data is
displayed.
1.3.3. Application Programs
pBASE provides commands to develop application programs. Procedural and
non-procedural commands control program logic flow and interface to external
hardware devices.
Commands may be stored in files and executed.
2
Introduction
1.4. Operational Requirements
IBM PC 256K or equivalent
PCDOS 2.0+
Hard disk preferred
3
Quick Tutorial
2. Quick Tutorial
This section presents a quick introduction to pBASE. It is a VERY basic
tutorial on relational data base concepts.
2.1. Relational Model
pBASE utilizes the relational model of data. A RELATION is defined as a
simple two-dimensional table having a specific number of columns and zero or
more unordered rows. Each row represents one entry in a table and
corresponds to a record in a traditional file format. Each row contains a
value or NULL entry in each column.
2.1.1. Tables
2.1.2. Operations on Tables
Many operations may be performed on a table and include:
- Creating/droping tables
- Retrieving data. An entire table, row, or partial row may be
retrieved.
- Updating data.
- Adding data.
- Deleting data.
- Combining of tables based on table content value. This operation is
called "joining."
2.1.3. Data Types
pBASE supports two data types:
- NUMBER
- CHARACTER
2.1.4. Indexes
pBASE also provides an indexing facility. Indexes are NOT required to
access data. They may be used to improve the performance of accessing table
rows. A request to access or update data makes no explicit reference to an
index. pBASE always decides which indexes, if any, to use to satisfy a
request. Commands are provided to create and drop indexes.
4
Quick Tutorial
2.2. Structured Query Language (SQL)
pBASE is based on the STRUCTURED QUERY LANGUAGE (SQL). pBASE is a non-
procedural language because data access requests specify the desired
results, not how to do it.
pBASE commands consist of a command verb, one or more optional clauses,
language keywords, and parameter operands. The most common pBASE commands
include:
(retrieval)
SELECT Fetches data from one or more tables
(manipulation)
INSERT Adds a new table row
UPDATE Changes data in one or more table rows
DELETE Deletes one or more table rows
(definition)
CREATE TABLE Defines a new table and it's column attributes
DROP TABLE Removes a table
CREATE INDEX Defines a table index (on a column)
DROP INDEX Removes a table index
2.2.1. Creating and Removing a Table
Before data can be stored, updated, or retrieved, a table must be created.
The CREATE TABLE command is used to create a table and define it's format.
The command does not add a data to the table.
2.2.2. Retrieving Table Data
Retrieving data is the most common request of pBASE. The SELECT command is
used to specify what data is to be retrieved. The basic form of the SELECT
command is:
SELECT <data>
FROM <table>
WHERE <condition>
2.2.3. Adding Table Data
The INSERT command allows the user to pass a row of values to be placed into
a table. For example:
INSERT INTO <table> (<column-list>) VALUES(<value-list>)
5
Quick Tutorial
2.2.4. Updating Table Data
The UPDATE command specifies which column(s) should be updated and on which
rows the updating should take place. For example:
UPDATE <table> SET <column-name>=<value> ...
A single UPDATE command can affect more than one row in a table and more
than one field in those rows.
2.2.5. Deleting Table Data
The DELETE command specifies which rows should be deleted from a table. The
WHERE clause determines which rows are affected. For example:
DELETE FROM <table>
WHERE <predicate>
2.2.6. Creating and Removing an Index
Query and manipulation of tables can be handled by pBASE without any
explicit specification from the user. However, better performance is
possible when indexes are defined for appropriate table columns. For
example:
CREATE INDEX <index> ON <table> (<column-list>)
The index is never referenced when using pBASE commands. pBASE analyzes
commands and indexes and uses the best access path to the table(s).
2.2.7. Multiple Tables
pBASE allows data stored in different tables to be combined. This
technique, called joining, causes pBASE to merge data from different tables
and present the data. (The merged data is not stored in the data base.)
For example:
SELECT <column-list> FROM <table>,<table> WHERE <predicate>
2.2.8. The Catalog
pBASE maintains several system tables that collectively "catalog" the
contents of the database. These tables contain information about objects
that are of interest to the execution of the system itself. Examples of
such objects includes base tables, indexes, column types, column sizes, etc.
Because the catalog itself consists of tables, just like ordinary user
tables, a subset of pBASE commands may be used to view the contents of these
tables.
6
Reference Section
3. Reference Section
3.1. How to Use the Reference Section
This section contains the formal definition of all pBASE commands. It
includes:
- the proper syntax
- a definition
- one or more examples
The commands are subdivided by type, application and data base. In
addition, reserved words and terminology are listed and special features are
covered in detail:
macros, memory variables, functions, forms, report writer
A typical example of command syntax is:
SHOW ERROR '<text>'
where capitalized words are pBASE keywords and lower case words are general
terms for what should be entered. Square brackets ([]) mean that anything
within the square brackets is an optional entry. Curly brackets ({}) mean
that within the curly brackets there are two or more mutually exclusive
items that may be entered. The choices are separated by a vertical bar (|).
pBASE keywords may NOT be abbreviated.
Command lines may extend over several lines. Lines may be continued by
appending a semicolon (;) at the end of the line. Continuation is valid in
interactive and program modes. For example:
pBASE> SELECT column1,column2 FROM table;
pBASE> WHERE column3>45;
pBASE> ORDER BY column2,column1
A literal string is indicated by enclosing the string in single (') or
double (") quotation marks. Embedded single quotes are indicated by
specifying two single quotes with no intervening characters ('').
7
Reference Section - Terminology
3.2. Terminology
3.2.1. Special Symbols
<attribute> - an integer between 1 and 255
<arguments> - a list of blank-separated identifiers
<base-col> - a number between 1 and the maximum width of the display
screen
<base-row> - a number between 1 and the maximum depth of the display
screen
<border-type> - 1 (single line) or 2 (double line)
<bottom-margin> - a number between 1 and the size of a printed page
<column#> - a number between 1 and the width of a display screen or
printed page
<column-definition> - a list of comma-separated <column-name> <column-
type> pairs
<column-name> - an identifier
<column-type> - CHAR(<size>) or NUMBER
<command-line> - a program name with optional trailing <arguments>
<comment> - any meaningful <text>
<constant> - a literal number or string
<cursor#> - a number between 1 and maximum cursors
<database-name> - 1-8 characters valid for a DOS filename
<depth> - a number between 1 and maximum <depth>
<expression> - an identifier or group of identifiers and operators
whose value can be determined
<field#> - a number between 1 and maximum fields
<filename> - a valid DOS file specification
8
Reference Section - Terminology
<index-name> - an identifier name
<line#> - a number between 1 and maximum lines
<picture> - (see Reference Section - Report Writer Element Formatting)
<predicate> - (see Reference Section - Predicate)
<program-name> - a valid DOS file specification with a ".COM", ".EXE",
".BAT" or ".PRG"
<row#> - a number between 1 and maximum rows
<skeleton> - a wildcard specification containing characters and "?"
<table-name> - an identifier
<template-file> - a DOS file with a ".TMP" extension
<text> - any "printable" ascii characters
<title> - string value
<top-margin> - a number between 1 and the depth of a console screen or
printed page
<variable-name> - an identifier
<width> - a number between 1 and the width of a console screen or
printed page
<window#> - integer between 1 and maximum concurent windows
3.2.2. Logical Operators
(listed in order of precedence)
() parentheses for grouping
NOT logical not (unary operator)
AND logical and
OR logical or
9
Reference Section - Terminology
3.2.3. Arithmetic Operators
(listed in order or precedence)
() parentheses for grouping
* multiplication
/ division
+ addition
- subtraction
10
Reference Section - Reserved Words
3.3. Reserved Words
The following "words" are reserved by pBASE. They may NOT be used as memory
variable names or identifiers:
AND ASC ALL AND ASSIGN
AT BOOLEAN BREAK BY CANCEL
CASE CHAR CLEAR COLOR COLUMN
CONCAT CONSOLE COUNT CREATE CURSOR
DATABASE DBRET DEBUG DEFAULT DEL
DELETE DESC DETAIL DISPLAY DOCASE
DOMENU DOREPORT DOWHILE DROP ECHO
EJECT ELSE END ENDCASE ENDIF
ENDMENU ENDONERROR ENDREPORT ENDWHILE ENTER
ERASE ERROR EXIT EXPORT FALSE
FETCH FIELD FILECLOSE FILEOPEN FILEREAD
FILEWRITE FINAL FOOTING FOR FORM
FORMAT GETDATE GETENV GETTIME HEADING
HORZ IF IMPORT INDEX INS
INSERT INTO ISEOF ISFEOF ISFILE
ISNUMBER ISYES KEY KEYPRESS LIKE
LINE LOCK LOOP MATCH MENUCHOICE
MENUOPTION MENUTITLE MENUTYPE MESSAGE NOT
NULL NUMBER OFF ON ONERROR
OR ORDER OTHERWISE OUTPUT PAGE
PAUSE PICTURE POSITION PRINT PRINTER
PROMPT QUIT READ REP REPORT
RESET RETURN ROW RUN SCREEN
SELECT SET SHOW SKIP SOUND
STATUS STEP SUBCOUNT SUBSTR SUBTOTAL
SUSPEND SWITCH SYSDATE SYSOTHER SYSPAGE
SYSTIME SYSTOTAL TAB TABLE TALK
TEMPLATE TEXT TO TOLOWER TOTAL
TOUPPER TRUE UNLOCK UPDATE UPDPOS
USE VALUES VARIABLE VERSION VERT
WHERE WIDTH WINDOW XTAB
11
Reference Section - Macros
3.4. Macros
3.4.1. Basic Macro Substitution
Whenever an ampersand (&) followed by the name of a memory variable is
encountered in a command, pBASE replaces the &<variable-name> with the
string value of the variable. If an ampersand is NOT followed by a valid
memory variable name no substitution takes place (and the ampersand remains
within the command line).
Basic macros are very useful for dynamic modification of commands during the
actual execution of pBASE programs. They may also be used to pass
parameters between programs.
Example:
pBASE> ENTER dest PROMPT 'Destination filename of output'
pBASE> SET PRINT TO &dest (at execution time this becomes
"SET PRINT TO temp.prt" if "temp.prt"
was entered in response to the ENTER
command)
3.4.2. Program Argument Macros
A "special" form of the basic ampersand macro replacement facility is the
program argument macro. Whenever an ampersand followed by an integer number
is encountered, pBASE replaces the ampersand and the number with the
relative argument corresponding to the number.
Example:
pBASE> HELP CREATE (command HELP with argument CREATE)
pBASE> IF TOUPPER('&1')='CREATE' (At execution time within program
HELP.PRG this becomes:
"IF TOUPPER('CREATE')='CREATE'")
pBASE> SHOW 'CREATE argument'
12
Reference Section - Macros
3.4.3. SQL Command "Bind" Macros
A third form of macro substitution is a special case limited to
specification of data base data manipulation command field values and exists
to maintain compatibility with SQL programming conventions. Whenever a
colon (:) is encountered within a SQL data manipulation command, the colon
and the concatenated memory variable name are replaced by the string value
of the memory variable.
Example:
pBASE> UPDATE SUP SET item=:item,descr=':descr';
pBASE> WHERE id=:id (At execution time this becomes
"UPDATE SUP SET item=12,descr=
'Red box' WHERE id=1001" assuming
that memory variables item, descr,
and id contained "12", "Red box",
and 12 respectively)
13
Reference Section - Memory Variables
3.5. Memory Variables
Memory variables are temporary elements that are created and destroyed by
commands. pBASE memory variables do NOT have any notion of TYPE, such as
numeric or character. Their so-called type is implicit based on the content
(value) and usage.
Memory variables are used to contain constants, results of computations, and
(macro) symbolic substitution strings. Commands that manipulate memory
variables include:
ASSIGN <expression> TO <variable-name>
DROP VARIABLE {<variable-name>|ALL|LIKE <skeleton>}
ENTER <variable-name> PROMPT <text>
EXPORT VARIABLE {ALL|LIKE <skeleton>} TO <filename>
IMPORT VARIABLE FROM <filename>
SHOW <variable-name>
STATUS VARIABLE
14
Reference Section - Application Commands
3.6. Application Commands
Application commands support the development and execution of pBASE
applications. Also within this general framework are commands that provide
operator assistance. Following are application commands grouped
functionally:
Display:
CLEAR LINE - Clear a display line
CLEAR MESSAGE - Clear display message area
CLEAR SCREEN - Clear entire display
CREATE WINDOW - Open a window
DROP WINDOW - Close a window
ENTER - Enter value into memory variable
DROP FORM - Remove form window
FORM - Non-procedural forms data entry
POSITION - Move display cursor to coordinates
RESET FORM - Free form resources
SHOW ERROR - Display error message
SHOW MESSAGE - Display informational message
SHOW (text) - Display text string
USE WINDOW - Specify "current" window
15
Reference Section - Application Commands
File Input/Output:
FILECLOSE - Close a DOS file.
FILEOPEN - Open a DOS file.
FILEREAD - Read a line into a memory variable.
FILEWRITE - Write an expression.
Memory Variables:
ASSIGN - Assign the value of an expression to a memory variable
DROP VARIABLE - Destroy a memory variable
EXPORT VARIABLE - "Save" variable(s)
IMPORT VARIABLE - "Restore" variable(s)
SHOW VARIABLE - Display the value of a memory variable
STATUS VARIABLE - Display status of memory variable pool
Programming:
* - Comment line
: - DOS command
CANCEL - Stop execution of program(s)
DOCASE - Execute commands with one of several CASEs
DOMENU - Non-procedural menu
DOREPORT - Non-procedural report writer
DOWHILE - Repeat while condition true
IF - Execute commands when condition true
PAUSE - Suspend execution temporarily
RESET REPORT - Free report writer resources
RETURN - Exit program
RUN - Execute program
16
Reference Section - Application Commands
SUSPEND - Temporary interactive mode
Other:
QUIT - Exit pBASE
SOUND - "Beep" the console.
STATUS SWITCH - Display current switch status
SWITCH DEFAULT - Reset all switches to their defaults
SWITCH ECHO - Display executed commands ON|OFF
SWITCH ERROR - Display errors ON|OFF
SWITCH STEP - Single step execution ON|OFF
SWITCH TALK - Echo command results ON|OFF
VERSION - Display pBASE version
17
Reference Section - Data Base Commands
3.7. Data Base Commands
Data base commands either operate on a data base or provide operator
assistance for data base related tasks. Following are data base commands
grouped functionally:
Data Retrieval:
EXPORT - Move table data to external DOS file
FETCH - Retrieve SELECTed data into memory variables
SELECT - Specify data to be queued for retrieval
SHOW - Display queued data at console
TEMPLATE PRINT - Template replacement report writer
Data Manipulation:
DELETE - Delete rows
IMPORT - Move external DOS file data into a table
INSERT - Add a row to a table
UPDATE - Update table rows that satisfy condition
Data Definition:
CREATE DATABASE - Create an empty data base
CREATE INDEX - Create a table column index
CREATE TABLE - Create a table
DROP DATABASE - Destroy an entire data base
DROP INDEX - Destroy an index
DROP TABLE - Destroy an entire table
66
Reference Section - Data Base Commands
Other:
CREATE CURSOR - "Open" an access path to a data base
DROP CURSOR - "Close" an access path to a data base
RESET DATABASE - Drop all active cursors
SET CURSOR - Specify current active cursor
SET PRINT - Specify TEMPLATE PRINT output device
STATUS CURSOR - Display cursor status
STATUS TABLE - Display table(s) status
67
Reference Section - Functions
3.8. Functions
Functions are special purpose operations that occur during run-time of a
command. A function performs a specific operation on the (sub)value of an
expression. A function does not occur alone, rather it appears with its
related expression in the general form:
FUNCTION([expression])
Note that all start positions and offsets are relative to one (1).
3.8.1. String Functions
<concatenated-string> = CONCAT(<string1> <string2>)
Returns concatenation of string1 and string2.
<modified-string> = DEL(<string> <count> <start>)
Returns substring of <string> after removing <count> characters at
position <start>.
<date> = GETDATE()
Returns system date in mmddyy format.
<string> = GETENV(<environment-name>)
Returns environment value.
<time> = GETTIME()
Returns system time in hhmmss format.
<modified-string> = INS(<string1> <string2> <start>)
Returns expanded string after inserting <string2> into <string1>
at position <start>.
<modified-string> = TOLOWER(<expression>)
Converts the expression to all lower case.
<modified-string> = TOUPPER(<expression>)
Converts the expression to all upper case.
<index> = MATCH(<string1> <string2> <start>)
Returns the <index> of where <string2> starts within <string1>
relative to <start>.
<modified-string> = REP(<string1> <string2> <start>)
Returns modified string after replacing part of <string1> with
<string2> at <start>.
91
Reference Section - Functions
<string> = SUBSTR(<expression> <start> <length>)
Extracts a substring of the specified starting position and
length.
3.8.2. Boolean Status Functions
<boolean> = ISEOF()
Returns TRUE if (data base) END OF FETCH else FALSE.
<boolean> = ISFEOF()
Returns TRUE if END OF FILE else FALSE.
<boolean> = ISFILE(<filename>)
Returns TRUE if <filename> exists else FALSE.
<boolean> = ISNUMBER(<expression>)
Returns TRUE if <expression> is numeric else FALSE.
<boolean> = ISYES(<text>)
Displays a menu prompt and returns operator response (TRUE or
FALSE).
92
Reference Section - Functions
3.8.3. Status Functions
<return-code> = DBRET()
Returns the current data base status code.
<key-value> = KEYPRESS()
Returns the last key pressed by operator.
93
Form Processor
3.9. Form Processor
3.9.1. Commands
Form processing commands specify what and when data field(s) are entered.
Following are form processor commands grouped functionally:
Form content:
FORM FIELD - Entry field location and size
FOR FOR TABLE - Default form text and fields
FORM HEADING - Background text heading
FORM SHOW FIELD - Display entry field
FORM SHOW TEXT - Display background text
FORM TEXT - Background text definition
Form run-time:
FORM CLEAR FIELD - Clear entry field to all blanks
FORM ERASE FIELD - Remove entry field from console display
FORM LOCK FIELD - Disallow data entry
FORM READ FIELD - Read data
FORM UNLOCK FIELD - Allow data entry
Other:
DROP FORM - Close form window
RESET FORM - Free form resources
FORM DELETE - Auto-DELETE
FORM SELECT - Auto-SELECT
FORM SELECT - Auto-SELECT
FORM UPDATE - Auto-UPDATE
94
Report Writer
3.10. Report Writer
3.10.1. Commands
Report writer commands specify how, what, and when the contents of a report
are printed. Their actual usage is very hierarchically structured and is
graphically represented as follows:
<Report-group> ::=
DOREPORT
REPORT XXXX
<Command-group>
END
ENDREPORT
<Command-group> ::=
pBASE commands
<Report-group>
<Output-group> (REPORT OUTPUT only)
<Print-group> ::=
TAB n
SKIP [n]
EJECT
<string> [PICTURE <picture>]
<variable-name> [PICTURE <picture>]
SYSDATE
SYSTIME
SYSPAGE
<Output-group> ::=
TO { CONSOLE | PRINTER | <filename> }
PAGE FORMAT <depth><width><top-margin><bottom-margin>
106
Appendicies - Limits
4.2. Limits
string length - 255
command line length - 510
identifier length - 20
DOCASE nesting - 10
IF nesting - 10
DOWHILE nesting - 10
max table columns - 255
max length CHAR column size - 255
max precision NUMBER column type - 18 decimal digits
max memory variables - 64
Nesting of programs - 5
Concurrent cursors - 5
Screen size 25X80
Forms - text, fields
Menus - options - 9
SELECT fields - 20
Concurrent windows - 10
126
Appendicies - Catalog
4.6. Catalog
The pBASE catalog consists of system tables. These tables are just like
ordinary user data tables although access to them is somewhat restricted.
The system tables consist of:
SYSTABLES
This table contains a row for every table in the data base. For each
table, it contains the table name, column count, creator, and
authorization.
SYSCOLUMNS
This table contains a row for every table row in the data base. For
each such column, it gives the table name, column name, relative column
number, column type and column length.
SYSINDEXES
This table contains a row for every index in the data base. For each
such index, it gives the table name, column name, index name, and
creator.
SYSUSERAUTH
This table contains a row for each authorized data base user. For each
column, it gives the user identifier, password, and authorization.
Since the catalog consists of tables, just like ordinary user tables, it can
be queried (and reported) by means of the SELECT command just as ordinary
tables can. For example, to find out what table(s) contain an 'USERID'
column:
> SELECT tbname FROM syscolumns WHERE colname='USERID'
Although the catalog tables can be queried with the SELECT command they
CANNOT be updated with UPDATE, DELETE or INSERT commands. Updating is
limited to the DATA DEFINITION commands: CREATE/DROP table, CREATE/DROP
INDEX, etc.
130