A brief run through some of the primary commands will give you a good, quick feel for SharkBase and make it much easier to get up to speed in your own use of the language. SharkBase can be run from ﬂoppy drives. Only the files SHARK.EXE and SHARK.MSG or SHARKN.CNF are required.
To INSTALL Shark or any of the variants on your hard drive, simply copy the files to a destination folder. We recommend you place it initially in a directory called SHARK. Finally, read the two files called READ.ME and this subsection.
You can print the two files with the PRINT command or as part of the installation process. You are now ready to start:
When SharkBase finishes loading, you will see the cursor on a line that starts with "1 >". To get out of SharkBase, enter
and press RETURN.
The status display shows information about open data ﬁles, until you again see the "1 >" prompt.
When you see the cursor on the line following "1>" you are at the "1 >" prompt and ready to key in commands. Press the ENTER key after each command. Try these commands:
This opens a file (brings it into use) with one record about each SharkBase command and function. If you don’t get an error message, you did fine! All you should see on the screen is another "1 >" prompt, then type:
1> USE# 2 MEMBERS
This is a fictional membership list opened in “User Area 2”. SharkBase allows ten data files to be
opened at one time, each in its own select area. To see what files are open, type:
The status display shows information about open dbf files, anywhere in Shark:
Saturday, September 20, 2013 SharkBase STATUS Rec # File name Indexed by 000001 l.....COMDESC.DBF ← dbf file opened in “User Area 1” 000001 2.....MEMBERS.DBF ← dbf file opened in “User Area 2” 000000 3..... 000000 4..... 000000 5..... 000000 6..... 000000 7..... 000000 8..... 000000 9..... 000000 10..... Program .............. Files in use ......... 2 Memory remaining ..... 22489 High memory remaining. 41600 Line width ........... 79 Left margin .......... O Press <Enter> to continue
The currently-selected data file is marked with a ">" symbol in front of the word "File". STATUS takes more than a single screen, so pressing <Enter> brings up page 2:Name Type Width Contents **Total ** 0 variables... 0 bytes Press
We want to view (i.e.“EDIT”) the member file before we do anything; We should now be at a "2>” prompt:
The EDIT command displays one record at a time.
Take time to study the HELP window. The notation is concise. ^ means the CTRL key. Thus
“^ HOME” means press down the CTRL key and the HOME key together (CTRL ﬁrst, keep it down and then press HOME).
#2 MEMBERS.DBF The HELP window EDIT Record 1
REC: Prev/PgUp Next/PgDn DELETE: Char/Del To end of field/“Y Record/“U
FILE: Top/“Home Bottom/“End MEMO EDIT: Alt-W PAGE: Prev/“K Next/“L
APPEND MODE: Begin/"PgDn Exit/PgUp EXIT: with save/End No save/“Q
CUST NO........ 1044
STREET......... 1256 Williamsberg St.
HOME PHONE..... (301) 848-7652
WORK:PHONE..... (301) 674-5960
Try pressing ^PgDn:
This will add a record and take you into the APPEND mode — the same as EDIT but adds new
records. Try adding a few of your own "members". Press the PgUp key to back up one record and return to edit mode. Press the END key to return to the “2>” prompt:
Now let’s look at the brief command reference.
You now see a screen full of records, one line for each. The order is scrambled on purpose; we’ll
sort it later. For now you want to practice BROWsing - not learn commands.
#1 COMDESC.DBF SharkBase BROWSE Page 1
REC: Prev/PgUp Next PgDn SCROLL: Left/^K Right/^L SCREEN: Up/@E Down/@X
FILE: Top/^Home Bottom ^End MEMO EDIT: @W DELETE: To EOL/^Y Record/^U
APPEND MODE: Begin/^PgDn Exit/PgUp EXIT: With save/End No save/^Q
1 QUIT leave SharkBase
2 IN( reads a character from a sequential file
3 USE opens a data file for use
4 READ( reads a line of a sequential file
5 GET( reads a string from a file
6 SCREen saves and restores screen images in memory
7 RANK( ASCII code for a character
8 ASC( character from an ASCII code
9 CANCel quits current program but stays in VP—Info
10 CHAIn quits current program and jumps to do another
11 READ enter editing of @ GET and TEXT commands
12 DELAY pause for a predetermined time
13 INKEY( waits for and reports on a keystroke
14 INPUt waits for data to be keyed in
15 PRINTER( tests for printer on-line
16 SKIP moves forward or backward through a data file
17 EJECt sends form feed to a printer
The HELP window is almost the same as in EDIT. We have tried to keep the keystrokes the same
for both commands. In fact, you can build many applications with these as your "work horse" commands.
Experiment with the keystrokes. PgUp and PgDn move you between records. The Up and Down
arrows move you between fields of the same record. (so do the TAB and shift TAB keys — a new feature
not shown on the HELP screens).
Press the END key to end the BROWSE session.
We ’re getting serious here! Don’t modify important files without first backing up! A power or
system failure could result in lost data.
We are going to add two new FIELDs to the COMDESC ﬁle. PgDn to a blank field and create a
new ﬁeld called USED. Choose type C (character) and width 1.
Add a second field NOTES, also type C, but width 60. Press the END key. The last blank ﬁeld will
be ignored. Type 3 is OK, so press the enter key and watch the modification occur.