...
Info | ||
---|---|---|
| ||
The main body of the text is here, but links have not been completed. There are two versions of the Manual as well as the 'on-line' version. |
About Wordmongers Limited
WORDMONGERS LIMITED 1989
The original Wordmongers 32K EPROM had a S/No label that covered the erasing window. |
Downloads
View file | ||
---|---|---|
|
...
|
Wordmongers zBASE
Database suite for Z88
Manual zbman1 v0.02 190888
zBASE v1
View file | ||||
---|---|---|---|---|
|
A Microsoft Word version with thanks to Detlef Obermann,
...
zBASE is a ROM based application package for the Cambridge Computer Z88 portable. It is a database that allows users store information easily.
There are two formats of the manual.
...
Selecting zBASE
zBASE can be started from the INDEX using the cursor bar or can be selected at any time using W. If zBASE has already been used it will appear in the SUSPENDED ACTIVITIES area of the index from which it can be re-selected using the cursor bar.
...
The same is true of the Help screen.
WORDMONGERS LIMITED
View file | ||||
---|---|---|---|---|
|
Database suite for Z88
Manual zbman1 v0.02 190888
zBASE v1
Foreword
Congratulations on choosing zBASE. The Z88 Portable offers a wide range of built-in facilities. With the addition of zBASE, the Z88 comes of age.
...
Anchor | ||||
---|---|---|---|---|
|
96010404 | 96010404 | 96010404 | 96010404 |
QSG5 | 96010404 | QSG7 | QSG8 |
QSG9 | 96010404 | QSG11 | 96010404 |
QSG13 | QSG13.1 | QSG13.2 |
Getting familiar with a new piece of software is often tedious and sometimes daunting. To provide a Quick demonstration to those who are new to zBASE, this Quick start guide is a short tutorial aimed at providing a rapid introduction to the system.
...
Anchor | ||||
---|---|---|---|---|
|
96010404 | |||
Manual conventions | Important basic concepts | Database areas | 96010404 |
Interactive versus Command file |
The Quick Start Guide is designed to be a brief exposure to the major facilities of zBASE. Those new to database languages may find this a very useful starting point.
...
See Manual conventions
Important basic concepts
zBASE is a command driven database language with over 40 commands and functions. This provides a powerful facility for programming the Z88 for data manipulation. To those familiar with dBASE II, the granddaddy database program, there should be a feeling of having seen it all before. Given that imitation is the most sincere form of flattery, these similarities are purely intentional. However, for a variety of reasons, not least of which is a 32K ROM space, not all dBASE II facilities are emulated. Equally, some have been altered in an attempt to improve and to provide a better fit with the Z88.
...
An introduction to databases
The following sections describe the building of a database file and its interrogation. It should be read through to the end. However, computer users are notorious for skipping manual pages. In this case, all the available commands with their syntax are explained in Section B and those wishing to learn by their mistakes are invited to use that section of the manual.
...
How to create a data file
Defining fields, width, type | Creating the file within zBASE | Opening and closing database files | Checking structure |
Having worked out the fields required in the database, the process of creating that file under zBASE starts with PipeDream.
...
}DISPLAY STRUCTURE
Database open in 1: is VIDEO
REF_NUM STRING 3
TITLE STRING 20
TYPE STRING 3
TAPE_NO STRING 3
DURATION STRING 5
RATING STRING 1
42 bytes/rec
Indexing and Index files
...
When used in conjunction with an indexed file, the DISP and LIST commands are very powerful. The FIND command is used to arrive at the first occurrence of the required value, then the DISP or LIST command, with its condition, can be used to show all the records which match, from that point in the file to the end.
Entering data
At curly prompt
APPEND BLANK
...
Amending data (Changing values, deleting records)
At curly prompt
Amending data is the same operation as entering data. The same LET command is used and the new data overwrites the old.
...
See also the PACK.PRG file.
Selection and control
One of the prime functions of a database language is not only to facilitate easy input and amending of data, but also easy retrieval of selected bits of the data.
...
See also SCSIFIND.PRG.
Manipulating data files
COPY TO filename [PD] [FOR <cond>] [DELIMITED] [FOR <cond>] | APPEND FROM filename | COPY TO filename <[STRUC- TURE] / [PD]> | COPY TO <filename> STRUC- TURE |
Data is collected for a variety of reasons. Sometimes its like an antique collection with bits of information collected so long ago that there is no relevance to that data. However, assuming the data is to be used, it must be available in different forms. This is especially true on the Z88 when it will often be used as a temporary home for data to be transferred to another micro.
...
This version of the command will create a new database file with the same structure as the current file. The new file will have no records.
Moving around a file
These commands position the record pointer to the selected record. If the record number is known, the 'GO record number' command is the fastest method of reaching a record.
...
These commands position the pointer to the respective position at the top or bottom of the file. The record to which it is pointed is a live record and is not in front of the beginning of the file nor is it after the end. i.e. GO BOTTOM will go to the last record not to the end of file so EOF() will return FALSE.
ENVIRONMENTAL COMMANDS
-ESC- ON/OFF (v1.3 only)
The switch allows programs to ignore attempts to -ESC- and is activated by typing Set Esc=Off (deactivated by Set Esc=On) in interactive mode or by inserting it to a command line.
...
It is a programmers tool to show what command line is being executed. It is most use when debugging command files. It makes a mess of the screen but displays each command line as it is executed.
Indirect variables
&memvar
In dBASE II, these are referred to as MACROS. These & characters mean that the variable which follows the & is evaluated before being executed. In any command line from the keyboard or a command file, in which an indirect variable is found, the &variable is first replaced by the value it represents. e.g.
...
See section C for a program for printing address labels.
Z88 output facilities
The copy commands explained above provide an opportunity to output to PipeDream. The method described below permits all the screen output to also go to a file or the printer.
...
- The maximum number of records permitted in a zBASE file is 65535.
- The maximum command line length is 255.
- The maximum string variable length is 255. (Memory or field).
- Maximum number of fields per record is 32.
- Max number of nesting of IF/ENDIF loops is 255.
- Max number of nested DO WHILE's is 32
- Max number of nested DO files is 16
- Max area for memory variables is 512 bytes
- Max length of variable name is 8 characters
- Numbers are significant to 9 digits.
- Max number of decimal places is 8.
Precedence of Operators
zBASE does not consider one type of operator any more important than another. All mathematical expressions are evaluated from left to right. The only exception to this rule is that the contents of brackets are evaluated first. Programmers will quickly notice that expressions with brackets are evaluated relatively slowly, and that sorting out the expression will make the program run faster.
...
There will be one record in the VIDSTAR file for each star in the film. So if the film has three stars, the VIDSTAR file will have three records, where the REF_NUM is the same as the REF_NUM of the films record in the VIDEO file, and the STAR field holds the name of one of the three stars. An example will help:
VIDEO FILE RECORD | STARS FILE RECORDS | ||
REF_NUM$ | 12 | REF_NUM$ | STAR$ |
TITLE$ | Trading Places | 12 | Eddie Murphy |
TYPE$ | COM | 12 | Dan Aykroyd |
TAPE_NO$ | 3 | 12 | Jamie Lee Curtis |
DURATION$ | 112 | ||
RATING$ | 5 |
The data for the VIDSTAR file must be entered when the other details of the video are being entered. To alter the program VIDINP.PRG to do this, find the line in the program:
...
Each record of this database will contain one line of the report, which will be loading into, and printed from, PipeDream. This means three databases have to be manipulated:
VIDEO | The main database containing details of the video. |
VIDSTAR | + VIDSTAR.NDX. Holds details of the stars, indexed on reference number so they can be found quickly. |
REP | Contains the lines of the report and is built up by the program. |
The REP file is open from start to finish in area 1, and the other two are opened and closed as necessary in area 2.
...
The phone book from the Quick Start Guide might look like this in PipeDream. It is called PH.DAT and is stored as PLAIN TEXT.
................A | ..............B | ...............C | |
1 | Cambridge | 312216 | Sir Clive |
2 | Rakewell | 630617 | Vic Gerhardi |
3 | UserClub | 68 Well St | Roy |
4 | Scotland Yd | 877 1212 | Insp Bond |
The QSG section has a structure of
...
Editing command files and instantly testing them is
extremely simple. It can be done by using nP to go into
Pipedream, and nW to return to zBASE.
zBASE Pocket Ref. Guide
CONVENTIONS
Lowercase | operator input, usually enclosed in < > brackets. |
UPPERCASE | specific zBASE commands or command words. |
[....] | Optional parts of commands. |
<...> | Operator specified input. |
<exp>... | An expression which can result in either a number or a string. e.g. 5+5, "FRED"+"BLOGGS", a$+"MUMMY". |
<var> ... | A variable, can mean either mvar or fvar. |
<mvar>... | A memory variable, not stored in a database, but in a large buffer in RAM. An mvar is defined as a string if its name ends with a '$', otherwise, it is defined as a number. |
<fvar>... | A field variable, permanently stored in a database. Fields must start with either a 1: or 2: label, depending on the database they are to be taken from. If the label is missing the field will be taken as a mvar. |
<cond>... | A condition which returns the result either TRUE or FALSE. e.g. 10=10 is TRUE, 10=6 is FALSE, "FRED"="BLOGGS" is FALSE. A single number 0 is evaluated as FALSE, any other number is TRUE. |
KEYWORDS
Only the first 4 characters of a keyword are significant.
zBASE commands
* |
adds comments to a command file |
? [<exp>] |
displays the value of an expression. |
# [<exp>] |
sends the value of <exp> expression through the serial port to the printer. |
AT <co-ordinates> SAY <exp> |
displays the value of the <exp> expression at the specified co-ordinates. |
AT <co-ordinates> GET <var> |
formats fields on screen for operator input. |
APPEND BLANK |
adds a blank record to the database in use |
APPEND FROM <filename> [PD]/[DELIMITED] [FOR <exp>] ] |
adds new records to the current database from another database or Pipedream file. |
CLS |
clears the screen. |
CONTINUE |
extension to LOCATE command to move to next match. |
COPY TO <filename> [FOR <cond>] |
creates new database from current one with optional conditional selection. |
COPY TO <filename> [PD] {DELIMITED] [FOR<cond>] |
copies data from current file to new format with optional conditional pull. |
COPY TO <filename> STRUCTURE [DELIMITED] |
creates a database file with same structure as current file, or a Pipedream file of the structure. |
CREATE <file1> FROM <file2> |
creates zBASE file called 'file1' from Pipedream file 'file2' of format FIELD_NAME, with $ if a string field COMMA, WIDTH if its string field. |
DELETE RECORD |
marks current record for deletion. |
DELETE FILE |
removes selected file from directory. |
DISPLAY<[STRUCTURE]/[MEMORY]/[STATUS]> |
shows on screen the selected option related to current use of database, memory variables and files respectively. |
DISPLAY <[ALL] / [FOR <cond>]> <[FIELDS field,field,field]> |
shows data from current file in use [ALL] - shows seven records before pausing. |
DO <command file> |
runs a command file. |
DO WHILE <cond> - ENDDO |
runs the commands enlosed in loop as long as <cond> is TRUE. |
FIND <exp> |
searches fo key field match in indexed file. |
GO [<exp> / <BOTTOM> / <TOP>] |
moves record pointer to <exp>th record or top/bottom. |
IF <cond> - ELSE - ENDIF |
runs the commands after IF if <cond> is TRUE, otherwise runs commands after ELSE. |
INDEX ON <fvar> TO <filename> |
creates an index file in order of fvar. |
LET <var>=<exp> |
establishes a value for a variable. |
LIST [ALL] |
works as DISPLAY without the pause every 8 lines. [ALL] - shows all records without pausing. |
LOCATE FOR <cond> |
moves record pointer to first record in file for which <cond> is TRUE. |
QUIT |
closes all files and zBASE application. |
RECALL RECORD |
removes DELETE mark on a record |
RELEASE <mvar> |
removes specified memory variables. |
RENAME <file1> TO <file2> |
changes name of file. |
RETURN |
stops running current command file and returns control to previous command file or curly prompt. |
SELECT <[1 or 2]> |
opens selected database area. |
SKIP [<exp>] |
moves record pointer <exp> records along. |
USE [<file>] |
closes current file and opens <file> if specified. |
USE file INDEX file |
opens database in current area with index file. |
WAIT |
pauses operation until a key is pressed. |
zBASE Functions
CHR(<exp>) | returns charater with ASCIIcode exp. |
CLI (<exp$) | sends <exp$> to the OZ CLI function for immediate execution. |
DATE() | provides current system date. |
DELETED() | returns 1 or 0 (TRUE / FALSE) to reflect status of current record. |
EOF() | returns 1 or 0 if end of file has been reached or not respectively. |
FILE(<exp$>) | responds with TRUE if file defined by exp does exist. |
INT(<exp>) | returns integer from exp. |
LEN(<exp$>) | shows length of string variable specified. |
LOWER(<exp$>) | turns string into lower case. |
LTRIM(<exp$>) | removes left hand blanks in string exp. |
RAM() | reveals RAM space available on currently selected device. |
RECNO() | returns current record number. |
SET ECHO | toggles echoing of all commands to screen. |
STR | To emulate a STR function use &. } LET A=2.03 } LET A$="&A" } ? "-"+a$+"-" -2.03- |
SUBSTR(<exp1$>, <exp2>,<exp3>) | extracts the sub-string from exp1$ defined as starting at position exp2, of length exp3. |
TIME() | displays system time. |
TRIM(<exp$>) | removes trailing blanks. |
UPPER(<exp$>) | converts string exp$ to upper case. |
VAL(<exp$>) | converts ASCII string to its numeric equivalnet. |
WHERE(<exp1$>, <exp2$>) | shows the starting character position for where exp1$ occurs in exp2$. |
zBASE Commands
Most of the zBASE commands may be used both in the interactive mode at the curly prompt, or in program files or command files. The main exceptions to this rule are that related pairs of commands such as IF/ENDIF and DO WHILE/ENDDO may not be used in the interactive mode.
...
The file shown below, having been saved as PLAIN TEXT, will then be appended onto the end of the database.
................A | ..............B | ...............C | |
1 | Cambridge | 312216 | Sir Clive |
2 | Rakewell | 630617 | Vic Gerhardi |
3 | UserClub | 68 Well St | Roy |
4 | Scotland Yd | 877 1212 | Insp Bond |
The DELIMITED clause means the fields are separated by commas and the records by CR (0Dh) LF (0Ah). This is a common format output by dBase and many spreadsheets.
...
The following file would be appended to the database in use.
................A | ..............B | ...............C | |
1 | Cambridge,312216,Sir Clive | ||
2 | Rakewell,630617,Vic Gerhardi | ||
3 | UserClub,68 Well St,Roy | ||
4 | Scotland Yd,877 1212,Insp Bond |
If the PD and DELIMITED instructions are omitted the file is assumed to be a zBASE file.
...
- One line per field in database.
- No blank lines, and no extra CR at the end of the last field.
- All string field names end in $, followed by a comma and a number indicating the length of the field (1-255).
- Numeric fields have just the name on the line, nothing else.
e.g.
NAME$,25 | NAME is a string field, length 25 |
AGE | AGE is a numeric field |
SCORE$,10<END> | SCORE is a string field, length 10 |
Any stray CRs, or text in the wrong place may cause strange results.
...
If the MEMORY clause if used, the memory variables and their values are listed on screen. e.g.
address1$ | STRING | "54 Moor Road" |
address2$ | STRING | "Linstanton" |
If the STATUS clause is used the machines current status is displayed on screen.
...
} ? WHERE("23","1234")
2
} ? WHERE("HELLO",UPPER("hello world"))
1
} ? WHERE("78","1234")
0
zBASE Programs
The programs listed in this manual are designed to be indications only of the potential of zBASE. They are for users to amend to suit their own purposes and are not intended as complete solutions. They have not been exhaustively tested.
...
Wordmongers retains all copyright in them.
MAIN.PRG | A menu program for database management | |
NEWUN.PRG | Called by MAIN to enter new records. | |
APPEND.PRG | A command file to make data entry easier. | |
APPEND.DEF | A database structure file for use by the APPEND program. | |
PACK.PRG | To remove deleted records from a file | |
PHENT.PRG | Phone book entry program | |
FPROG | Find program for phone book | |
VIDINP.PRG | Input routine for VIDEO file | |
STARINP.PRG | Input for stars in Videos | |
VIDREP.PRG | Report generator for video system | |
VIDREP.DEF | USE REP.DEF FROM STOCK CONTROL SYSTEM | |
Stock Check suite. | See introduction page for this suite. |
MAIN.PRG
* MAIN.PRG - A menu program for database file * management.
* TITLE.PRG
doøwhileø1=1
øcls
øatø2,10øsayø"TheøWordmongersøzBASEøAddressøbook.øByøCøSalvidge."
øatø3,15øsayø"(c)øWordmongersøLtdø1988."
øatø5,10øsayø"(S)earchøforøanøentry.ø(E)nterønewøperson.ø(Q)uit."ø
øatø7,10øsayø"Yourøchoiceøplease"
øletøchoice$="ø"
ødoøwhileøwhere(choice$,"SEQ")=0
øøatø7,30øgetøchoice$
øøletøchoice$=upper(choice$)
øenddo
øiføchoice$="Q"
øøreturn
øendif
øiføchoice$="S"
øødoøfindum.prg
øendif
øiføchoice$="E"
øødoønewun.prg
øendif
enddo
...
Here is a list of the files required to run the system. The files can be obtained by sending a blank 32k eprom to us or downloading the zip file.
File Name | Bytes | Description |
REP.DEF | 128 | Definition of file used in stock report |
SCFETCH.EXE | 512 | CLI File to extract these files from EPROM |
SCOUTPRO.PRG | 1280 | Outputs the Product file in PD format |
SCOUTSUP.PRG | 1280 | Outputs the Supplier file in PD format |
SCPACK.PRG | 768 | Cleans, Packs & Reindexs the Databases |
SCPROD | 384 | The Product database |
SCPROD.DEF | 128 | The Definition of the Product database |
SCPROD.NDX | 128 | The index for the Product database |
SCSIAM.PRG | 1408 | Amend Product |
SCSIBACK.PRG | 640 | Skip back one product |
SCSIDELE.PRG | 512 | Delete a product |
SCSIFIND.PRG | 640 | Find a product |
SCSIINP.PRG | 1920 | Input a product |
SCSIMAIN.PRG | 2176 | Products file maintenance menu |
SCSINEXT.PRG | 384 | Skip forward a product |
SCSIRECA.PRG | 512 | Recall a deleted product |
SCSTART.PRG | 1152 | The main menu |
SCSTKREP.PRG | 2944 | The stock report |
SCSTOCK.PRG | 1920 | Amend stock numbers |
SCSUAM.PRG | 1408 | Amend suppliers |
SCSUFIND.PRG | 768 | Find a supplier |
SCSUINP.PRG | 2048 | Input a supplier |
SCSUMAIN.PRG | 2432 | Suppliers file maintenance menu |
SCSUPP | 384 | The Suppliers Database |
SCSUPP.NDX | 128 | The index file for the supplier file |
SCSUPP.DEF | 128 | The definition of the supplier file |
ZBDEMO.DOC | 4400 | This file |
ZBRUN | 256 | The Autoexec file |
REP.DEF
* REP.DEF
LINES,115
...