Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Wordmongers zBASE
Database suite for Z88
Manual zbman1 v0.02 190888
zBASE v1

 

Anchor
tof
tof

zBASE 

Foreword 

Acknowledgement & Thanks Thanks

zBASE Quick start guide 

 SECTION A

zBASE Manual

IntroductionCopyright & Trademark noticesDisclaimerHandling, ROM's & installing the software
 Manual conventionsImportant basic conceptsDatabase areasVariables
Interactive versus Command file   

An introduction to databases

FilesRecordsFieldsData types
Index key fields   

How to create a data file

Defining fields, width, typeCreating the file within zBASEOpening and closing database filesChecking structure

Indexing

To create the index fileUsing FINDAdding data to an indexed fileTech note re INDEX file sizes

Retrieving data

Entering data

At curly promptVariables and Top Bit CharactersUsing command (do) file 

Amending data

At curly promptUsing command filesDeleting data 

Selection and control

At curly promptLOCATE FORLIST [FORDISPLAY [FOR
Using command files   

Manipulating data files

COPY TO filename [PD] [FOR <cond>] [DELIMITED] [FOR <cond>]APPEND FROM filenameCOPY TO filename <[STRUC-
TURE] / [PD]>
 
COPY TO <filename> STRUC-
TURE
Using command filesDeleting dataSelection and controlManipulating data files

Moving around a file

SKIPGO (TO RECORD NUMBER ..) <expression>GO TOP, GO BOTTOM 

ENVIRONMENTAL COMMANDS

-ESC- ON/OFF SET ECHO  

Indirect variables

&memvar&numericvar  

zBASE output to printer port

Z88 output facilities

n+ P n+ S  

System Limits

Precedence of operators

Using multiple databases

Importing files from PD

Using Z88 popdowns

 SECTION B

zBASE Commands

conventionskeywordscommandsfunctions

zBASE Functions

 SECTION C

zBASE Programs

Sample programsStock Control System  

...

zBASE Quick start guide

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.

...

The menu bar should be moved on the APPLICATIONS INDEX until it is highlighting the zBASE application.

Press -ENTER- Image Added to run zBASE.

QSG2

When the } symbol, known as the curly prompt appears, type the word QUIT followed by -ENTER- Image Added. This action ends the use of zBASE. In version 1.2 you need to confirm the return to the APPLICATIONS INDEX, by pressing any key.

This is the only proper way to exit from zBASE. If the -INDEX-Image Added key is used, and the zBASE suspended application is KILLed, open database files will not be properly closed and permanent damage will occur to the data files.

QSG3

The first real job is to create a data file. To do this, the file structure must be defined. This definition is done in PipeDream. Highlight the PipeDream application and press -ENTER- Image Added. This creates a new PipeDream suspended application.

QSG4

Type in the following lines, exactly as shown.

COMP$,15
PHONE$,17
NAME$,20
KEYFIELD$,5

Now press tpress Image AddedFS, followed by the file name, PHBOOK.DEF. Then move the cursor down 4 lines using the ò, to the question, 'Save plain Save plain text'. Enter a Y for YES and hit -ENTER- Image Added.

QSG5

That has created the definition file for a phone book database. Now return to zBASE by pressing npressing Image AddedW.

At the curly prompt (}), type in the command line
}CREATE PH.DBF FROM PHBOOK.DEF

...

Database open in 1: is PH.DBF
COMP STRING 15
PHONE STRING 17
NAME STRING 20
KEYFIELD STRING 5
62 bytes/rec

QSG6

Now create an INDEX file for easy searches.

...

That will establish an index file for use later.

QSG7

Data input

After creating the file, the next step is to enter data. To begin with, the method shown will be the simple way of storing information. QSG13 below sets out two examples of how command files can make such work easier.

You are still in zBASE with the PH.DBF open, as confirmed by DISP STRU and DISP STAT. Type in the following..

}APPEND BLANK -ENTER- Image Added
}LET 1:COMP$="Wordmongers Ltd" -ENTER- Image Added
}LET 1:PHONE$="01296 - 43 78 78" -ENTER- Image Added
}LET 1:NAME$="Henry Webster" -ENTER- Image Added
}LET 1:KEYFIELD$="Wordm" -ENTER- Image Added

It is worth noting that the KEYFIELD is the field to be used for indexing purposes and rapid search capabilities. Therefore it can contain the first five letters of whichever field is to be used, e.g. when a company name is included, the first five letters from the company name could be used. Equally, when it's a personal contact with no company name, the first five letters of the name could be used, e.g.

}APPEND BLANK -ENTER- Image Added
}LET 1:COMP$=" " -ENTER- Image Added
}LET 1:PHONE$="020-7833-1212" -ENTER- Image Added
}LET 1:NAME$="Insp Bond" -ENTER- Image Added
}LET 1:KEYFIELD$="Bond" -ENTER- Image Added
}APPEND BLANK -ENTER- Image Added
}LET 1:COMP$="Short Brothers" -ENTER- Image Added
}LET 1:PHONE$="01494 885555" -ENTER- Image Added
}LET 1:NAME$="Morris Short" -ENTER- Image Added
}LET 1:KEYFIELD$="Short" -ENTER- Image Added

QSG8

With at least a few records entered, a FIND process is required. This may be done directly at the curly prompt, or as for appending, by means of a command file as described in Indirect variables.

The zBASE command to use on an index file is 'FIND'.

To find the entry for Wordmongers, at the curly prompt type

}FIND "Wordm" -ENTER- Image Added
With a small file, the next curly prompt will appear very quickly. As soon as it does, type

}DISPLAY-ENTER-Image Added

The record which has been found will be displayed. If a 0 is displayed it means that no match has been found. Try entering a shorter version of the key field e.g. Wor. If this finds say Wortmongers it reveals a typing error easily corrected by saying

...

Note that only the first FOUR characters of any command need be used.

QSG9

Looking for matches in an UNINDEXED file.

...

While records are actually scrolling onto the screen, an -ESC- Image Added will abandon the search and return to the curly prompt. The record pointer will be at the record to which it was pointing when the -ESC- Image Added was pressed.

NB. -ESC-  Image Added will not work at all if -ESC- Image Added =Off in v1.3 and when the 'Press SPACE Image Added to continue' prompt is on screen. A nifty piece of finger work of a -SPACE- Image Added followed quickly by an -ESC- an Image Added will return control to the curly prompt in v1.2.

The LIST command is the same at the DISPLAY command except it simply scrolls on without stopping every seven lines. Holding down the -SHIFT-Image Added and t keys together will pause the scrolling when using the LIST command.

NB. The -SHIFT- key The Image Added key used must be the one on the left of the keyboard. (No we don't know why either.)

QSG10

To close the file, enter
}USE

To re-open the file type
}USE PH.DBF INDEX PH.NDX -ENTER-

QSG11

To check whether a file is open, type
}DISP STATUS

To check a file structure, enter
}DISP STRUCTURE

QSG12

To return to the Z88 APPLICATIONS INDEX, enter
}QUIT.

NB. IT IS IMPORTANT THAT THE QUIT COMMAND IS USED AS THE METHOD OF CLOSING zBASE. If zBASE is KILLed as a suspended application, loss of data will occur because the files will not be properly closed.

QSG13

zBASE programs - two startup examples.

QSG13.1

An alternative method of entering data is to write a command file that makes it all a bit easier.

From zBASE, press -INDEX- press Image Added leaving zBASE as a suspended application. From the Z88 APPLICATIONS INDEX, go into PipeDream by positioning the cursor over the PipeDream application and pressing -ENTER- Image Added.

Type or load the program labelled PHENT.PRG. Do not use -TAB-Image Added characters. The lines that start with an ASTERISK (*) are comment lines that are ignored by zBASE. They do not have to be typed in at all.

After typing in PHENT.PRG it should now be saved. Press tPress Image AddedFS, enter the filename PHENT.PRGòImage Added 4 lines and enter Y to save the file as PLAIN TEXT.

Back in PipeDream, after the file save, enter nW enter Image AddedW to return to zBASE. When back at the } prompt, type the following

}DO PHENT.PRG -ENTER-Image Added

[If zBASE was QUIT rather than left suspended, the database file with its index must be re-opened before running PHENT.PRG. If this is the case, see QSG9 above for guidance on re-opening the file.]

Records may be added one by one as required using this command file. Note that the keyfield is automatically picking up the company name as the key, if a company name is entered. If not, the first five characters of the contact name are used. In either case, the offered key value need not be accepted. It may be overtyped with whatever content is required. If it is to be accepted, then press -ENTER-Image Added.

Input Rakewell's details.

...

The Keyfield will display Rakew. Hit -ENTER- to Image Added to accept it.

A few more records should be entered to give the database something to get its teeth into.

QSG13.2

FINDing using a command file.

As before for PHENT.PRG, start a new PipeDream document and type or load in the program labelled FPROG.

Save this file using tusing Image AddedFS. Use a filename of say FPROG. Remember it must be saved as PLAIN TEXT.

Return to zBASE either through the Z88 APPLICATIONS INDEX, or by simply pressing npressing Image AddedW.

With the phone book file in use, with its index file, at the curly prompt, type the following

...

This quick start guide has been designed to provide new users with an opportunity to get something out of zBASE quickly. It does not reveal the flexibility available in zBASE nor does it demonstrates the wide potential for this database management program. The rest of the manual does go much further into the commands and functions contained in zBASE. Please take some time to review the rest of the manual and so enjoy the further capabilities of your Z88/zBASE combination.

zBASE Manual

...