
                               WORKBASE (tm)

              An interactive database management environment
                    Copyright 1991-1997 Rosemary K. West
                            All Rights Reserved

       OVERVIEW: Designed with database developers in mind, WORKBASE
replaces the dot prompt with over 200 "Xbase" commands and functions.
Create a DBF; append, edit and browse records; use MEM files; display
memory; display and modify structure; and many other commands necessary for
development and debugging. WORKBASE will also execute simple PRG files.
Anyone who uses dBASE-compatible data files will love this powerful
utility.

       USING THIS MANUAL:  It is assumed that you have at least a beginning
familiarity with one or more dialects of what is commonly referred to as
the "Xbase language". It is beyond the scope of this manual to provide a
tutorial or in-depth reference tool for dBASE, Clipper, etc. There are many
excellent books on the market geared to these products.
     GETTING STARTED: Before you begin, please make a backup copy of the
original distribution disk. Put the original in a safe place and use the
backup for your work. We recommend installing WORKBASE on your hard disk,
in a directory that's in the path. The executable file is called
WORKBASE.EXE, and the command to enter at the DOS prompt is WORKBASE. (You
may rename WORKBASE.EXE for convenience if you have DOS 3.0 or later. If
you have an earlier version of DOS, the program will not run correctly if
the EXE file is renamed.)
     Note: WORKBASE creates a file called WORKBASE.MEM. If you want
WORKBASE to save its MEM file in a particular subdirectory, simply set a
DOS environmental variable. For example, if WORKBASE resides in a directory
named UTIL, the environmental command will look like this:

                                SET WB=UTIL

This command can be entered at the DOS prompt before you run WORKBASE, or
it can be included in your AUTOEXEC.BAT file. Type the command in all upper
case, with no spaces before or after the equal sign and no additional
punctuation. If you do not enter this command, WORKBASE will save its MEM
file harmlessly in the root directory.

     COMMANDS: Below is a brief explanation of commands accepted by
WORKBASE. Details on most of these are in your Clipper or dBASE manual. If
you require more information about Xbase languages, there are excellent
books available, such as "The dBASE Language Handbook" by David M. Kalman.
      For information on new commands and functions or other channges in
the program that may have been made after this manual was completed, see
the file UPDATE.DOC on your distribution disk.

? / ??  -  Displays the value of an expression on the next line. ? by
itself prints a blank line. ?? displays the expression on the same line.

      Example: ? 3+2
      Returns: 5

@ - With CLEAR, indicates an area of the screen to be cleared.

      Examples: @ 10,10 CLEAR TO 15,20
                @ 23,0 CLEAR

Note: This is for use in PRG files only.

@ - With SAY, indicates a position on screen where an expression is to be
displayed. Requires coordinates for row and column.

      Example: @ 5,1 SAY "Hello"

@ - With GET, indicates a position on screen for an input field. To
complete a GET or a group of GETS, issue a READ command.

 Examples: memvar=SPACE(10)              memvar1=SPACE(10)
           @ 5,1 GET memvar              memvar2=SPACE(10)
           READ                          @ 5,1 SAY "Try this:" GET memvar1
                                         @ 6,1 SAY "And this:" GET memvar2
                                         READ

Note: This is for use in PRG files only.

*  - Indicates that the entire line is a comment and should be ignored by
the interpreter. The asterisk must be the first character in the line.

      Example:            ? "This line will be printed"
                          * This line is a comment and will be ignored
                          x=3 * This line will generate an error

Note: This is for use in PRG files only.

&& - Indicates that everything to the right of the double ampersand is a
comment and should be ignored by the interpreter.

 Example: ? "This line will be printed"  && This comment will be ignored
            && This comment will also be ignored

Note: This is for use in PRG files only.

ACCEPT - Allows the user to enter character data to a memory variable.

 Example: ACCEPT "Put something here" TO memvar
          ACCEPT TO memvar

Note: This is for use in PRG files only.

ALIAS - See USE, ALIAS()

APPEND - Adds a new record to the current database, displaying a screen
with field name prompts for the new record. As each new record is entered,
a new screen appears for the next new record, until you press <ESC> to end
the process. APPEND BLANK adds one new, empty record.

APPEND FROM - Adds records to the current database from another database.
May be used with a FOR or WHILE condition. Only appends fields with the
same names.

      Example: APPEND FROM MAILLIST FOR lname="Smith"

APPEND MEMO - Adds a text file to a memo field.

      Example: APPEND MEMO fieldname FROM filename

AVERAGE - Computes the arithmetic mean of numeric expressions. Averages all
records unless limited with a FOR or WHILE condition. Result must be placed
in a memory variable.

      Example: AVERAGE income TO memvar
      Example: AVERAGE price FOR lname="West" TO memvar

BOTTOM - Same as GOTO BOTTOM or GO BOTTOM.

BROWSE - Allows you to view and edit the records of the current database in
columnar form. The cursor keys allow you to move through the file in all
directions. If there are too many fields to view at one time on screen, you
may scroll from side to side. Press <INS> to add a new re-cord. Press <DEL>
to delete the current record. (If DELETED is OFF, you will be able to view
deleted records, in which case <DEL> will restore the current record.) When
the cursor is resting on a field, press <ENTER> to edit that field (this
includes memo fields). Press <F2> for full-screen editing of the entire
current record (except memo fields). Press <ESC> to leave the browse mode.

CANCEL - When used in a PRG file, the same as QUIT.

CHANGE/EDIT - CHANGE or EDIT allows full screen editing of the records in
the current database. As you complete each record, the program moves on to
the next record, until you press <ESC> to end the process.

CLEAR - Erases the screen.

CLEAR ALL - Releases all memory variables, closes all database files and
related files, and selects work area 1.

CLEAR GETS - Cancels all pending GET statements.

CLEAR MEMORY - Releases all memory variables.

CLEAR TYPEAHEAD - Empties the keyboard typeahead buffer.

CLOSE - Closes alternate, database and index files.

CLOSE ALTERNATE - Closes an alternate file.

CLOSE DATABASES - Closes all databases and index files.

CLOSE INDEX - Closes open indexes in the current work area.

COMMIT - Writes all active data buffers to disk.

CONTINUE - Continues the record-by-record search started by the previous
LOCATE command.

COPY - Copies records in the active database to a new database file. May be
limited with a FOR condition. The DBF extension is assumed.

      Example: COPY TO NEWFILE FOR city="Los Angeles"

With DELIMITED parameter, creates a comma-delimited file (without quotation
marks). No extension is assumed.

          Example: COPY TO NEWFILE DELIMITED
          Example: COPY TO NEWFILE FOR city="Los Angeles" DELIMITED

With SDF parameter, creates SDF-format file (same syntax as DELIMITED).

COPY FILE - Duplicates a closed file.

      Example: COPY FILE MYFILE.DBF TO YOURFILE.DBF

COPY MEMO - Copies contents of a memo field to a text file.

      Example: COPY MEMO fieldname TO filename

COPY STRUCTURE - Copies the structure of the active database to a new file
with no records.

      Example: COPY STRUCTURE TO NEWFILE

COPY STRUCTURE EXTENDED - Creates a database whose contents are the field
definition of the current database.

      Example: COPY STRUCTURE EXTENDED TO NEWFILE

COUNT - Counts the number of records that match a particular condition. The
result must be placed in a memory variable.

      Example: COUNT FOR city="New York" TO memvar
      Example: COUNT WHILE price>100 TO memvar

CREATE - Creates a new database. Enter this command with the name of the
new file.

      Example:  CREATE NEWFILE

A screen is displayed which allows you to enter the field names, specify
field type, length, and decimals (if applicable). Up to 200 fields may be
included. When you are finished, leave the field name blank and press
<ENTER>. You will be prompted to press <ENTER> to confirm that you want to
create the database, or <ESC> to abort the process.

You can also create a new database file from an existing "structure
extended" file.

      Example:  CREATE NEWFILE FROM STRUFILE

DELETE - Deletes a record or records from the current database. DELETE by
itself simply deletes the current record. Can be used with FOR or WHILE
conditions.

      Example: DELETE FOR EMPTY(lname)
      Example: DELETE ALL

DELETE FILE - deletes a closed file.

      Example: DELETE FILE YOURFILE.NTX

DIR / DIRECTORY - Displays a directory of all files with the DBF extension.
If used with a pattern, displays a directory of the types of files
specified. Can be sent TO PRINT.

      Example: DIR *.mem

DISPLAY - Displays on screen or printer selected records. DISPLAY by itself
shows all fields of the current record only. Can be used with a field list
and/or FOR or WHILE condition, and sent TO PRINT. OFF means don't display
the record number.

      Example: DISPLAY fname,lname FOR city="Los Angeles"
      Example: DISPLAY ALL OFF TO PRINT

DISPLAY FILES - Same as DIR.

DISPLAY HISTORY - Shows the latest commands in order (assuming SET HISTORY
is ON), with the most recent at the bottom. Up to 10 commands are saved.
Note that you can replay commands at the dot prompt by pressing the up
arrow key. Each time you press the up arrow, another command is displayed
(starting with the most recent and working backward). Press <ENTER> to
execute the displayed command.

DISPLAY MEMORY - Displays active memory variables, indicating type and
contents.

DISPLAY STATUS - Displays general information about the current work area
and the SET commands.

DISPLAY STRUCTURE - Shows the structure of the active database. Can be sent
TO PRINT.

DO - Begin execution of a PRG file:

      Example:  DO FILENAME

DO WHILE...ENDDO - The DO WHILE and ENDDO statements are paired, and cause
statements located between them to be repeated as long as the specified
condition is true.

      Example:     num=0
                   DO WHILE num < 4
                      num=num+1
                      ? num
                   ENDDO

Note: This is for use in PRG files only.

DOS / SHELL - Shells out of WORKBASE to a DOS prompt so that you can issue
DOS commands. Depending on your system, up to 100K RAM will be
available to run commands. DO NOT START TSRs from this shell. TO return
to WORKBASE, enter the command EXIT

DUPLICATE - Adds a specified number of records to the current database and
fills them with data matching the current record. Useful for testing.

EDIT - Allows full-screen editing of the active database. (Memo fields can
be edited in the BROWSE mode only.)

EJECT - Sends a form feed to the printer.

ERASE - Same as DELETE FILE.

EXIT - Quit WORKBASE and return to DOS. (When used in a PRG file, EXIT
terminates execution of the current DO / WHILE or FOR / NEXT loop.

FIND - Does a fast search on an indexed database using a character string
or numeric argument corresponding to the index key value.

      Example: FIND "West"

FLUSH - Same as COMMIT

FOR...NEXT - Repeats statements while incrementing a memory variable.

      Example:     FOR num = 1 TO 20
                      ? num
                   NEXT

Note: This is for use in PRG files only.

GENERATE - Adds a specified number of records to the current database and
fills them with random data. Used for testing purposes.

      Example: GENERATE 20
      Result:  appends 20 records to the database and fills the fields
                 with random data

GET - See @

GO / GOTO - Moves the record pointer to the specified record.

      Example: GO TOP
      Example: GO 37

You can also simply enter the record number by itself, or the word TOP or
BOTTOM.

HELP - Displays a general help screen listing available commands.

IF / ENDIF / ELSE / ELSEIF -

Note: This is for use in PRG files only.

INDEX - Creates an index file based on a key expression.

      Example: INDEX ON lname TO MYINDEX

Index files normally have the extension NTX and are Clipper-compatible. And
NDX (dBase-compatible) version of Workbase is available.

When you USE a database, you can specify which index files are to be used
with it.

      Example: USE MYDATA INDEX MYINDEX

LABEL FORM - Displays or prints mailing labels using the definition in a
LBL file. Can be used to print samples (with asterisks). Can be used with a
FOR or WHILE clause.

      Examples: LABEL FORM LABFILE
                LABEL FORM LABFILE SAMPLE TO PRINT
                LABEL FORM LABFILE FOR salary>500 TO PRINT

(see REPORT FORM)

LIST - Similar to DISPLAY, except that LIST by itself lists all records in
the database, instead of just the current one.

LIST FILES - Same as DISPLAY FILES.

LIST HISTORY - Same as DISPLAY HISTORY.

LIST MEMORY - Same as DISPLAY MEMORY.

LIST STATUS - Same as DISPLAY STATUS.

LIST STRUCTURE - Same as DISPLAY STRUCTURE.

LOCATE - Searches for the first record that matches the specified
condition.

      Example: LOCATE FOR lname="West" .AND. fname<>"Max"
      Example: LOCATE FOR price>29.99

LOOP - Returns program control to the top of the DO WHILE... ENDDO loop,
without executing the remaining commands.

      Example:     ikey=0
                   ? "Press <ESC>"
                   DO WHILE ikey=0
                      ikey=INKEY()
                      IF ikey = 27
                         ? "Thank You!"
                         EXIT
                    ELSEIF ikey <> 0
                       ? "That wasn't it!!"
                       ikey=0
                       LOOP
                    ENDIF
                     ? "I'm waiting..."
                  ENDDO

Note: This is for use in PRG files only.

MODIFY COMMAND - Same as MODIFY FILE

MODIFY FILE - Allows you to edit an ASCII text file. Unless specified,
assumes the extension PRG. Note that file size is limited to 64K, and may
be less, depending on how much RAM is available.

MODIFY STRUCTURE - Allows you to change the field structure of the current
database. You can add, delete, or change the parameters of fields. WORKBASE
makes a backup of the database. Data is appended from the backup only
for fields with matching names. You can add new fields to the database --
up to a limit of 10 more than it started with.

PACK - Purges deleted records from the active database file and rebuilds
active indexes; deleted records can no longer be RECALLed.

QUIT - Quit WORKBASE and return to DOS.

READ - Allows editing of all memory variables displayed with the GET
command. Once a READ has been issued and editing completed, the GETS are
cleared.

RECALL - Removes deletion marks from records in the active database. RECALL
by itself recalls the current record. Can be used with ALL or with FOR or
WHILE conditions.

      Example: RECALL FOR lname="West"

REINDEX - Rebuilds all active indexes associated with the active data-
base. Keys and UNIQUE settings remain the same as when the indexes were
first created.

RELEASE - Erases variables from memory. Must be used with a variable list.
Wildcards can be used to include or exclude a particular group of
variables.

      Example: RELEASE memvar
      Example: RELEASE ALL LIKE west*
      Example: RELEASE ALL EXCEPT my*

RENAME - Changes the name of a file.

      Example: RENAME MYFILE TO YOURFILE

REPLACE - Replaces the specified field in the active database with the
specified value.

      Examples:  REPLACE lname WITH "West"
                 REPLACE price WITH price*.10

REPORT FORM - Displays or prints a tabular report using a form defined in a
FRM file. Can be used with FOR or WHILE conditions. In WORKBASE this
command differs from this syntax of the command as described in your
Clipper or dBASE manual in that TO PRINT or TO FILE must always be the very
last argument on the command line.

      Examples:  REPORT FORM REPFILE NOEJECT TO PRINT
                 REPORT FORM REPFILE SUMMARY
                 REPORT FORM REPFILE FOR salary<500 PLAIN

RESTORE - Retrieves variables from a previously SAVEd memory file. (Memory
files have the extension MEM unless specified otherwise.) Without the
ADDITIVE clause, existing memory variables are erased.

      Example: RESTORE FROM MEMFILE ADDITIVE

RESTORE SCREEN - Restores a saved screen.

     Example:  RESTORE SCREEN FROM memvar

Note: This is for use in PRG files only.

RESTORE STATUS - Retrieve system attributes that were saved in a memory
file.

      Example: RESTORE STATUS FROM OLDSTAT

RETURN - Ends program execution and returns control to the calling
procedure.

RUN / !  - Executes applications or operating system commands from within
WORKBASE, provided sufficient RAM is available.

      Example: RUN DATE
      Example: ! WP

SAVE  - Stores memory variables in a file called a memory file. The default
file extension is MEM. The ALL LIKE and ALL EXCEPT options can be used to
include or exclude certain groups of variables.

      Example: SAVE TO BIGFILE
      Example: SAVE ALL LIKE good* TO GOODFILE
      Example: SAVE ALL EXCEPT bad* TO NICEFILE

SAVE DEFAULTS - Saves current system attributes as the defaults for future
sessions with WORKBASE.

SAVE SCREEN - Saves current screen in a memory variable.

      Example: SAVE SCREEN TO memvar

SAVE STATUS - Store system attributes in a memory file.

      Example: SAVE STATUS TO OLDSTAT

SAY - See @

SEEK  - Performs a fast search on an indexed database file for an
expression corresponding to the index key value.

      Example: SEEK memvar
      Example: SEEK "New York"

SELECT  - Choose a work area. Areas are designated by the numbers 1 through
10, the letters A through J, or the ALIAS of an open database file. You can
open a single database an its related index files in a single work area.
Memory variables are not affected by work area.

SET - Note that the status of most of the SET commands can been seen using
the DISPLAY STATUS command. The settings are saved from one use of WORKBASE
to the next, so that you do not have to spend time setting up your
preferred environment each time you use the program. Exceptions are
ALTERNATE, CURSOR, DATE, FILTER, INDEX, ORDER, UNIQUE.

SET ALTERNATE  - Redirects line-oriented screen output to an ASCII text
file. The default extension for the filename is TXT. After selecting the
alternate file, SETting ALTERNATE ON or OFF determines whether or not
output goes to the alternate file. To close the file, use SET ALTERNATE TO
with no file name, or CLOSE ALTERNATE.

      Example: SET ALTERNATE TO FILENAME
                SET ALTERNATE ON

SET BELL  - Toggles sound effects ON and OFF.

SET CENTURY - When ON, allows four-digit years in date fields.

SET COLOR - Invokes a menu to permanently change the screen colors in
WORKBASE.

SET COLOR TO - Without an attribute, sets screen to default colors. With
attributes, allows setting for standard, enhanced, border, background, and
unselected areas, following the standard Clipper format.

      Example: SET COLOR TO W+/B,B/W,B,B,N/W

SET CURSOR - Toggles cursor ON and OFF.

SET DATE - Selects format for date. Possibilities are: AMERICAN, ANSI,
BRITISH, FRENCH, GERMAN, ITALIAN.

SET DECIMALS - Determines how many decimal places appear in mathematical
functions.

SET DEFAULT - Specifies the drive for program and data files.

      Example: SET DEFAULT TO A

SET DELETED - When ON, keeps records marked for deletion invisible.

SET DELIMITERS - With ON or OFF, determines whether delimiters will appear 
during full screen editing. With TO, determines which characters will be 
used as delimiters.

          Example: SET DELIMITERS TO CHR(16)+CHR(17)

SET DOHISTORY  - Same as SET HISTORY.

SET EXCLUSIVE - Determines whether database files are opened in a shared or
reserved mode.

SET FILTER - Makes visible only records which match the specified
condition.

      Example:  SET FILTER TO lname="West"

SET FIXED - When ON, displays the number of decimals specified by the SET
DECIMALS command. Otherwise, displays numbers with their true number of
places.

SET FUNCTION - Programs the function keys.

      Example: SET FUNCTION 2 TO "? INDEXKEY(1)"

SET HELP - When ON, provides extra hints whenever an unrecognized command
is entered.

SET HISTORY - When ON, saves the 10 most recent commands in the history
buffer. You can replay commands at the dot prompt by pressing the up arrow
key. Each time you press the up arrow, another command is displayed
(starting with the most recent and working backward). Press <ENTER> to
execute the displayed command.

SET INDEX TO - Opens index associate with the active database. Up to seven
indexes can be opened. Indexes already open in the same work area are first
closed. Issue without any index names, this command closes all indexes in
the current work area.

      Example: SET INDEX TO MYNTX,YOURNTX,HISNTX

SET INTENSITY - ON/OFF sets whether input fields appear in enhanced or
standard video. Default is ON.

SET MARGIN  - Sets the left margin of the printer column.

SET MEMOWIDTH - Controls the width for editing memo fields, and for the
MODIFY FILE command.

SET NEAR - Same as SET SOFTSEEK

SET ORDER - Indicates a master index from the list of open index files.

      Example: SET INDEX TO YOURNTX,MYNTX,HISNTX
               SET ORDER TO 2

SET PATH - Indicates directory path to be searched for files not in the
current directory.

      Example: SET PATH TO C:\YOURDIR;A:\MYDIR

SET PROMPT - If you don't like the dot, you can change WORKBASE's prompt to
any valid character string.

   Example: SET PROMPT TO ">"

SET SAFETY  - When ON, issues warnings if a command is about to erase or
overwrite an existing file.

SET SCOREBOARD - When ON, allows certain system messages to appear on line
0.

SET SOFTSEEK  - When ON, SEEKing a nonexistent record moves the pointer to
the record with the next higher value.

SET TYPEAHEAD - Changes the size of the keyboard typeahead buffer. The
default is 20. The largest value is 32768.

      Example: SET TYPEAHEAD TO 80

SET UNIQUE  - Determines whether an index file will include records with
duplicate keys. With SET UNIQUE ON, the INDEX command will include only the
first record with a particular key value. SET UNIQUE is relevant only at
the time the index is created. An index created with UNIQUE on re- mains
unique, even when reindexed.

SKIP - Moves the record pointer the specified number of records. A negative
number can be used to move backwards. Without a number, SKIP moves forward
one record.

STORE - Assigns values to memory variables. If a variable already exists,
the new value replaces the old value. The value can be any valid
expression. The equal sign can be used instead of STORE.

      Example:  STORE "West" TO name
      Example:  name="West"

SUM - Computes the total of numeric expressions. Includes all records
unless limited with a FOR or WHILE condition. Result must be placed in a
memory variable.

      Example: SUM income TO memvar
      Example: SUM price FOR lname="West" TO memvar

TOP - Same as GOTO TOP or GO TOP.

TYPE - Lists the contents of a text file. Can be redirected TO PRINT.

      Example: TYPE NOTES.TXT

UNLOCK - Releases current record and file locks on the active database. 

USE - Opens a database file in the current work area. May include indexes
and an alias. Any previous open database and index files are closed.

      Example: USE YOURFILE
      Example: USE MYFILE INDEX GOODNTX,BADNTX ALIAS MINE

VIEW  - Allows full-screen viewing of database records without editing.

WAIT - Causes program execution to pause until the user presses a key.

Note: For use in PRG files only.

ZAP - Removes all records from the active database. Records cannot be
RECALLed. This is the same as issuing DELETE ALL followed by PACK, but is
much faster.

More commands and functions are in development for future upgrades.

                                 FUNCTIONS

ABS() - Returns the absolute value of a numeric expression.

      Example: ? ABS(-3)
      Returns: 3

ALIAS() - Returns the alias of an open database.

      Example: ? ALIAS(2)
      Returns: The alias name of the database in work area 2.

ALLTRIM() - Remove trailing and leading blanks from a character string.

      Example: ? ALLTRIM("     This is a string     ")
      Returns: This is a string

AMPM() - Converts a 24-hour time string to a 12-hour string with "am" or
"pm".

      Example: ? AMPM("23:30:22")
      Returns: 11:30:22 pm

ASC() - Returns the ASCII value of the first character in a string.

      Example: ? ASC("A")
      Returns: 65

AT() - Returns the position of the first occurrence of one character string
within another.

      Example: ? AT("def","abcdefg")
      Returns: 4

BOF() - Returns .t. if the record pointer of the active database is at the
beginning-of-file position.

CAP() - Returns a string with the first letter capitalized.

      Example: ? CAP("WHAT")         Example: ? CAP("thing")
      Returns: What                  Returns: Thing

CDOW() - Returns the day of the week for a date expression.

      Example: memdate=CTOD("02/08/91")
               ? CDOW(memdate)
      Returns: Friday

CHR() - Converts a number to a character in the IBM extended character set.

      Example: ? CHR(65)
      Returns: A

You can also use this for non-printable characters. For example, CHR(7)
returns a beep tone, and CHR(27) is the equivalent of the <ESC> key.

CMONTH() - Returns the name of the month for a date expression.

      Example: memdate=CTOD("12/31/91")
                ? CMONTH(memdate)
      Returns: December

COL() - Returns the column number of the cursor's current position. 

CTOD() - Converts a character expression into a date expression.

      Example: ? CTOD("05/25/92")

CURDIR() - Returns the name of the current DOS directory:

      Example: ? CURDIR()
      Returns: the name of the current directory on the default drive

      Example: ? CURDIR("D")
      Returns: the name of the current directory on the D drive

CURRENCY() - Returns a number in dollar format.

      Example: ? CURRENCY(3.2)
      Returns:  $      3.20

DATE() - Returns the system date.

DAY() - Give the day of the month as a number from a date expression.

      Example: ? DAY(CTOD("01/21/91"))
      Returns: 21

DAYS() - Converts seconds into days, rounded to the nearest day.

DBF() - Returns the alias of the active database file.

DBFILTER() - Returns the active filter expression from the current work
area.

      Example: SET FILTER TO name="West"
                ? DBFILTER()
      Returns: name="West"

DBRELATION() - Returns the relation expression from the current work area.

DBRSELECT() - Returns the work area number of the target database of a
SET RELATION command.

DELETED() - Returns .t. if the current record is marked for deletion.

DESCEND() - Used to create indexes in reverse order.

      Example: INDEX ON DESCEND(datevar) TO TEMP
      Creates: In index in reverse chronological order.

DISKSPACE() - Returns the number of available bytes on the current disk
drive.

DMY() - Returns a conventional European format date.

      Example: ? DMY(DATE())
      Returns: 1 January 1991

DOSERROR() - Returns the number of the most recent DOS error when a file
open command or RUN command fails.

DOW() - Returns the number of the day of the week, ranging from 1 to 7,
with 1 representing Sunday.

DTOC() - Converts a date expression to a string expression.

      Example: ? "This is today's date: "+DTOC(DATE())

DTOS() - Converts a date expression to a string expression in the format
YYYYMMDD.

ELAPTIME() - Calculates the different between two time strings in the
format HH:MM:SS; only good for timings under 24 hours.

      Example: ? ELAPTIME("13:22:20","18:30:15")
      Returns: 05:07:55

EMPTY() - Returns .t. if the specified expression contains no data.

      Example: memvar=" "
               @ 5,1 SAY "Enter a character:" GET memvar
               READ
                IF EMPTY(memvar)
                 ? "You didn't enter a letter!"
                ENDIF

EOF() - Returns true if the record pointer is a end-of-file for the active
database.

ERRORLEVEL() - Returns or sets the DOS error level setting.

      Example: ? ERRORLEVEL()
      Returns: the current DOS error level setting

      Example: ERRORLEVEL(3)
               Sets the DOS error level to 3

EXP() - Returns the value of e, raised to the specified power. (E is the
base of natural logarithms, approximately 2.71828.)

      Example: ? EXP(5)
      Returns: 148.41

FCOUNT() - Indicates how many fields are in the current database structure.

FERROR() - Returns the DOS error from the last file operation.

FIELD() - Returns the name of the specified field in the current database.
For example, suppose your database has
three fields, name, rank, serialno:

      Example: ? FIELD(2)
      Returns: rank

FIELDNAME() - Same as FIELD().

FKMAX() - Returns the number of programmable function keys on the computer.

FLOCK() - Returns .t. if it successfully locks the current database.

FOUND() - Returns .t. if LOCATE, CONTINUE, FIND, or SEEK are successful.

GETE() - Returns the contents of the specified DOS environmental variable.

      Example: GETE("CLIPPER")
      Returns: R35;E0 
               [or whatever the clipper environmental variable contains]

HARDCR() - Replaces all soft carriage returns in a string with hard
carriage returns.

      Example: newvar=HARDCR(memovar)

HEADER() - Returns the size, in bytes, of the active database file's
header.

IF() - Evaluates a logical expressioon; if true, returns the first
variable; if not, returns the second.

          Example: ? IF(memvar=3,"THREE","NOT THREE")

IIF() - Same as IF()

INDEXEXT() - Returns NTX or NDX, depending on whether the current
application (in this case, WORKBASE) has been linked with Clipper's
NDX.OBJ. This tells you what kind of index files can be created and used.

INDEXKEY() - Returns the key expression of an active index. If more than
one index is active, use a number to indicate which one to check.

INDEXORD() - Returns the current master index's relative position.

INT() - Returns an integer for the specified numeric argument.

      Example: ? INT(3.2)
      Returns: 3

ISALPHA() - Returns .t. if the first character of the specified string is a
letter.

ISCOLOR() - Returns .t. on a computer with a color graphics card.

ISLOWER() - Returns .t. if the first character of the specified string is a
lowercase letter.

ISPRINTER() - Returns .t. if the current parallel printer port is ready.

ISUPPER() - Returns .t. if the first character of the specified string is
an uppercase letter.

LASTKEY() - Returns the ASCII value of the last key pressed.

LASTREC() - Same as RECCOUNT()

LEFT() - Returns a string of specified length from the left end of a
string.

      Example: ? LEFT("What is this",6)
      Returns: What i

LEN() - Returns the length of a character string.

LENNUM() - Returns the number of digits (including the decimal point) in a
numeric expression.

      Example: ? LENNUM(234.5)
      Returns: 5

LOCK() - Returns .t. if it is successful locking the current record.

LOG() - Returns the natural logarithm of a numeric expression.

LOWER() - Converts a character expression to lowercase.

LTRIM() - Trims all leading blanks from left end of a string.

LUPDATE() - Returns the date on which the current database was last
updated.

MAX() - Returns the larger of two numeric expressions.

      Example: MAX(8,2)
      Returns: 8

MDY() - Returns a conventional American date format.

      Example: ? MDY(DATE())
      Returns: January 1, 1991

MEMOEDIT() - Opens a window for editing character strings or memo fields.

      MEMOEDIT(c1,n1,n2,n3,n4,l1,c2,n5,n6,n7,n8,n9,n10)

C1 is the string or field to be edited.
N1, N2, N3 and N4 are the window coordinates.
L1 allows editing if .t., viewing only if .f.
C2 is the name of a user-defined functions for customizing MEMOEDIT. This
cannot be used in WORKBASE, so a dummy argument can be passed here.
N5 sets the line length.
N6 sets the tab width.
N7 is the initial line position of the cursor within the memo.
N8 is the initial column position of the cursor within the memo.
N9 is the initial row relative to window position.
N10 is the initial column relative to window position.

Not all arguments must be passed; they can be skipped with dummy variables.

MEMOLINE() - Formats a line of text from a memo field or character string.

      MEMOLINE(C,N1,N2)

C is the field to use. N1 is the length of the formatted line. N2 is the
line number to format.

MEMOREAD() - Reads a text file from disk, making it possible to store the
text to a memory variable. Note that the file size is limited to 64K, and
may be smaller depending on how much RAM is available.

MEMORY(0) - Returns the amount of available memory in K bytes.

MEMOTRAN() - Replaces carriage returns with other characters. Hard returns
(CHR13)+CHR(10)) are replaced by semicolons; soft returns (CHR(14)+CHR(10))
are replaced by spaces. You can redefine the replacement characters by
passing them to the function:

      MEMOTRAN(memvar,"!","+")

In this example, hard returns will be replaced by exclamation points and
soft returns by the plus sign.

MEMOWRIT() - Writes a character string to a disk file. Returns .t. if the
write succeeds.

MIN() - Returns the smaller of two numeric expressions.

MLCOUNT() - Counts the number of word-wrapped lines in a formatted
character string or memo field.

      MLCOUNT(C1,N1,N2,L1)

C1 is the field to be counted. N1 is the number of characters per line. N2
is the tab size. L1 toggles word wrap on if .t., off if .f.

MOD() - Returns the modulus -- the remainder from dividing one number by
another.

      Example: ? MOD(11,2)
      Returns: 1

MONTH() - Returns the number value, from 1 to 12, for the month of a date
expression.

NETERR() - Returns .t. if APPEND BLANK or USE fails during a multiuser
operation.

NETNAME() - Returns the computer workstation identification set on an IBM
PC Local Area Network.

NTH - Converts a number to a string with a suffix attached.

      Example: ? NTH(34)             Example: ? NTH(2)
      Returns: 34th                  Returns: 2nd

OS() - Returns the name and version number of the computer's operating
system.

PCOL() - Returns the printer's current column, relative to the margin. If
you have SET MARGIN TO 10, then the current column may be 10, but it will
register as 0.

PCOUNT() - Returns the number of parameters passed to a procedure or
function.

PI() - Returns the value of Pi.

PROW() - Returns the printer's current row position. EJECT sets PROW() to
0.

RAND() - Returns a random whole number in the range 0 - n.

   Example: ? RAND(52)
   Returns: A number in the range 0 - 52

RAT() - Returns the position of the rightmost occurrence of one character
string within another.

      Example: ? RAT("abc","abcdefgabcdefgabcdefg")
      Returns: 15

RECCOUNT() - Returns the total number of records in the active database.
This includes records hidden by filters or marked for deletion. Same as
LASTREC().

RECNO() - Returns the current record number.

RECSIZE() - Returns the record size in the current database.

REPLICATE() - Repeats a character a specified number of times.

      Example: ? REPLICATE("X",10)
      Returns: XXXXXXXXXX

RIGHT() - Returns a string of a specified length from the rightmost end of
a string.

      Example: ? RIGHT("This is a test",6)
      Returns: a test

RLOCK() - Returns .t. if it succeeds in locking the current record. Same as
LOCK().

ROUND() - Rounds a number to the specified number of decimals.

      Example: ? ROUND(37.456,1)             Example: ? ROUND(48.234,0)
      Returns: 37.5                          Returns: 48

ROW() - Returns the row number of the cursor's current position.

RTRIM() - Trims all trailing blanks from the right end of a character
string.

SECONDS() - Returns the current system time as the number of seconds since
midnight.

SECS() - Converts a 24-hour time string to the number of seconds since
midnight.

      Example: ? SECS("12:13:22")
      Returns: 44002

SELECT() - Returns the number of the currently selected work area.

SETCOLOR() - Returns the current color setting or sets screen colors.

      Example: oldcolor=SETCOLOR()
               SETCOLOR("W+/B,B/W")
                ? "This is a message in the new color"
                SETCOLOR(oldcolor)
                ? "This is a message in the old color"

SETPRC() - Changes the value of PROW() and PCOL() without actually moving
the print head.

      Example: SETPRC(newrow,newcol)

SIGN() - Indicates whether a number is negative, positive or zero.

      Example: n = -32             Example: n = 98
                 ? SIGN(n)                    ? SIGN(n)
      Returns: -1                  Returns: 1

SOUNDEX() - Uses a standard algorithm to convert a string to a four-
character code based on a phonetic equivalent (disregarding vowels).

      Examples: ? SOUNDEX("water")                  Returns: W360
                ? SOUNDEX("wittier")                Returns: W360
                ? SOUNDEX("waddah")                 Returns: W300

SPACE() - Returns a character string consisting of the specified number of
spaces.

      Example: ? "X"+SPACE(10)+"Y"
      Returns: X          Y

SQRT() - Returns the square root of a positive number.

STR() - Converts a numeric expression to a string. You can specify the
length of the string and the number of decimal places. Length must allow
for the decimal point as one character.

      Example: ? STR(98.6+37.123,7,2)
      Returns: 135.72

STRTRAN() - Search for occurrences of a string in another string, and
replaces them with a third string.

      memvar=STRTRAN(C1,C2,C3,N1,N2)

C1 is the string to search. C2 is the string to find. C3 is the replacement
for C2. N1 is the first match to replace (default is 1). N2 is the number
of replacements to make (default is all).

STRZERO() - Uses the same syntax as STR(); returns a string with leading
zeroes instead of blank spaces.

STUFF() - Replaces part of a character string with part of another
character string.

      memvar=STUFF(C1,N1,N2,C2)

C1 is the string to partly replace, N1 is the position to start replacing,
N2 is the number of characters to replace, C2 is the replacement string.

      Example: ? STUFF("this is a string",9,1,"not a")
      Returns: this is not a string

SUBSTR() - Extracts a string from within a string, starting at the
specified position, and continuing for the specified length.

      Example: ? SUBSTR("what is it",3,2)
      Returns: at

TIME() - Returns the current system time as a string in the format
HH:SS:MM.

TONE() - Causes the computer's speaker to emit a tone of the specified
frequency and duration.

      Example: ? TONE(40,10)
      Returns: a tone at 40 Hertz lasting 10/18ths of a second.

TRANSFORM() - Formats a numeric or character expression as a string
according the specified PICTURE format.

      Example: ? TRANSFORM(3,"###.##")
      Returns: 3.00

TRIM() - Removes trailing spaces from the right end of a character string.
Same as RTRIM().

TSTRING() - Converts numeric seconds to a 24-hour time string.

TYPE() - Returns the data type of a variable. Enclose the variable in
quotation marks.

      Example: memvar=3
               ? TYPE("memvar")
      Returns: N

C = Character; D = Date; L = Logical; M = Memo; N = Numeric; U - Undefined;
UE = syntax error; UI = invalid function name.

UPDOWN() - Returns a string with the first letter of each word capitalized.

   Example: ? UPDOWN("HERE WE ARE")  Example: ? UPDOWN("what the heck")
   Returns: Here We Are              Returns: What the Heck

Note that words which traditionally are not capitalized when used in titles
will be left in lower case.

UPPER() - Converts a character string to all uppercase.

USED() - Returns .t. if a database file is open in the current work area.

VAL() - Converts character expression to numbers, ignoring all digits to
the right of the first non-numeric character in the string.

      Example: ? VAL("37X42")
      Returns: 37

VERSION() - Returns the Clipper version number under which the current
application was compiled.

YEAR() - Returns the year as a four-digit number from a date expression. 

   WORKBASE also supports Clipper's low-level file functions, FCLOSE(),
FCREATE(), FOPEN(), FREAD(), FREADSTR(), FSEEK(), FWRITE(). These functions
should be used with extreme caution and only by experienced programmers who
fully understand them.
      More commands and functions are in development for future versions.

    PRG INTERPRETER: The current version of WORKBASE includes the second
version of our PRG interpreter. This can be used to execute simple PRGs.
For example, if you have a PRG file called GOOD.PRG, you can enter the
command: DO GOOD
   DO WHILE, FOR... NEXT and IF... ELSEIF... ELSE... ENDIF statements can
be handled, as long as they aren't nested. (You can put one inside another,
but you can't nest more than one of the same kind.)

DO WHILE <something>
   IF <something else>
      FOR x=y TO z
          <more code here>
      NEXT
   ELSEIF <another choice>
      <more code here>
   ENDIF
ENDDO

The above example would be acceptable, but the following one would not:

DO WHILE <something>
   DO WHILE <something else>
      <more code here>
   ENDDO
ENDDO
IF <something>
   <more code here>
ELSE
   IF <something else>
      <more code>
   ENDIF
ENDIF

     The interpreter accepts commands which could normally be entered
at the WORKBASE prompt. It is not intended as a full-featured PRG
interpreter, and is released as a work in progress. Future versions may
increase the sophistication. WORKBASE's primary purpose is not as a PRG
interpreter, but as a handy dot-prompt environment. If you test the PRG
interpreter, we would appreciate hearing your thoughts about it.

     NETWORKS: Although WORKBASE is not specifically designed for network
use, the current version includes some features intended to make it
possible to use the software on a local area network, such as automatic
record locking when editing. If you use this product on a network, we would
like to hear about your experiences.

     TROUBLESHOOTING: WORKBASE has a built-in error-handling system to help
you solve any problems which may arise. If an error occurs, there are three
types of error messages you might see. The first type will appear on
screen, usually just below or just above the dot prompt. In most cases,
this is informing you of a user error, such as entering an invalid command.
This is similar to the error messages you would see in the same
circumstances if you were using a program such as dBASE or FoxBase.
     The second type of error message will appear as a large box on screen,
with text informing you that an error has occurred. An error message will
be displayed. There may be some explanatory text, containing suggestions
for correcting the error or telling you what your next step should be. This
message may be caused by user error, program error, or system error. If it
is possible to resume program operation, you will be instructed to press
<ENTER> to continue. Otherwise, you will be returned to the DOS prompt.
     The third type of error message is more rare, and generally occurs
only when your system has insufficient memory to run the software, or when
there is a problem with the error-handling routine itself. This type of
message appears at the extreme top left of the screen, and is usually a bit
cryptic. At the top right corner there will be a question: "Continue
(Y/N)?" Always answer <N> to this question.
     If you ever receive the second or third type of error message, please
pay careful attention. Make an exact record of the message. If you need
help or get confused, please let us know right away.

     REVIEWERS: If you intend to review this software for publication,
please contact us to make sure you have the most recent version and that
the ordering information supplied to your readers will be accurate. We
would appreciate receiving a tearsheet or copy of any published reviews.
Thank you!

     SUPPORT: This software has been diligently tested, and complete
instructions are contained in this user's manual.
     To contact us by mail, write to R.K. West Consulting, PO Box 8059,
Mission Hills, CA 91346, USA. We appreciate receiving a self-addressed,
stamped envelope with your mailed inquiry.
     Contact us by fax at 818-366-1737. Remember to include a return fax
number.
     Contact us by email at info@rosemarywest.com.
     Visit our WWW home page at http://www.rosemarywest.com
     Support by mail, email, fax and online is FREE. We reserve the right
to limit support to users whose needs ar excessive or who have system
problems or personal difficulties which transcend the scope of the
software.
     For a recorded information message, call 818-363-3966.

     Contact information was up to date as of December 1997.


     THE FUTURE: In order to focus on new development of software for
Windows, we will no longer be updating our older DOS programs. This means
that WorkBase will be phased out of our product line.
     However, we want to give you the opportunity to adapt WorkBase for
yourself. We hate to see such a useful program "die on the vine", and we'd
like our users to have the chance to modify the code to fit their
individual needs.
     Here is what you can purchase:

     The Original Source Code For Workbase: You may use the code in any way
you please, including creating and marketing your own programs using all or
part of the code! The only restriction is that you may not re-sell or
distribute the source code itself. The name of the program is not being
sold, and cannot be used.
     WorkBase was written and compiled in Clipper Summer '87. In addition
to the Clipper libraries, it is linked with the free EMM501.OBJ file, to
allow correct handling of extended memory under DOS 6.0 and newer. For
users who want to use dBase III NDX index files instead of Clipper NTX
index files, the code must be linked with the free NDX.OBJ file. Both these
OBJ files will be included with the source code. The only other library
that was used was FLEX_87.LIB, for FlexFile compatibility. We cannot
distribute this file, but if you are not already using FlexFile, you won't
miss it. We will also include the complete WorkBase manual as a text file
on disk.
     Your purchase gives you the complete and non-exclusive use of the
source code for the program so you can change, update, recompile, extract
pieces of the program, convert it to another language -- you can do
anything you want with the code except resell it. You can sell compiled
programs you make with the code. Because this is a close-out sale for this
program, all sales are final and all the source code is sold as-is and
without technical support of any kind. The sale does not include the use of
the program name.

   SOFTWARE LICENSE AND WARRANTY INFORMATION: See the file VENDINFO.DIZ.
If VENDINFO.DIZ is missing or damaged, contact the author for information.

   EVALUATION: This fully-functioning software is being distributed on a 
trial basis. It gives you the option to "Try Before You Buy". You can try
the program for 30 days before any payment is required.
   Any fee you paid to a disk vendor is simply a distribution fee, and does
not cover the cost of the program itself. Disk vendors are required to
explain this to you. Using the program beyond the author's prescribed 
evaluation period require separate payment to the author. By making payment
to the author you obtain a legal right to continue using the software.

   PAYMENT: When you pay for WORKBASE, you will receive:

   * A copy of the newest version of the program, without any payment
   reminders. * A printed, indexed manual. * A legal license to
   continue using the program. * Technical support by fax, mail, and email.
   * One bonus disk as listed on the registration form. * Notice of
   upgrades, new releases, and new products. * Discounts on upgrades and
   other products. * Other benefits as they become available.
                            WORKBASE ORDER FORM

Your Name: _________________________________________  Please include your
                                                      phone number in case
Address: ___________________________________________  we have a question
                                                      about your order. We
         ___________________________________________  will not call for
                                                      any other reason. We
         ___________________________________________  do not sell our 
                                                      mailing list. Phone
         ___________________________________________  numbers are required
                                                      for credit card
Phone:   ___________________________________________  orders.

_____ Registered versions @ $29.00 each:                 _________________

_____ Workbase source code $250.00 (includes
      registered version)                                _________________

_____ Shipping to Canada $3.00 
      Shipping outside North America $6.00               _________________

Disk size ____3.5" (preferred)  ____5.25"        TOTAL:  _________________

You will receive one FREE bonus disk with your order. Identity of bonus
disks changes from time to time, based on availability.

All prices are in U.S. dollars, checks drawn on and payable through a U.S.
bank. Canadian postal money orders in U.S. dollars are also acceptable. We
regret we cannot process payments drawn on non-U.S. banks. The most con-
venient way for overseas customers to order is by credit card (or U.S.
currency by registered mail).

Tell us where you found this program! ____________________________________

  ________________________________________________________________________

IF PAYING BY CHECK OR MONEY ORDER:           Please, do not send checks
                                             to Public Software Library,
  R.K. West Consulting                       and do not send credit card
  PO Box 8059                                orders to R.K. West.
  Mission Hills CA 91346          
  USA

IF PAYING BY CREDIT CARD:
                                  Phone in USA: 800-242-4775
Public Software  Library          Phone Int'l: +1 713-524-6394
PO Box 35705                      Fax: 713-524-6398
Houston TX 77235                  Email: 71355.470@compuserve.com

These phone numbers are for ORDERS ONLY! The operators cannot answer any
questions about anything! If you need information or help, including
questions about an order you have placed, please contact R.K. West.

___Visa  ___MasterCard  ___Discover  ___American Express

Card Number: _____________________________________  Exp. Date: ____________

Name EXACTLY as shown on card: ____________________________________________

Signature: ________________________________________________________________
 