Home Shark Introduction Shark Reference Guide Purchase Menu ☰



2. Learning the Basics

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 floppy drives. Only the files SHARK.EXE and SHARK.MSG or SHARKN.CNF are required.

To INSTALL Shark or any of the variants on a DOS system, 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.

When running Shark on a Windows emulator, you will still load the Shark files into the same directory. However, you will also have an adjacent vDOS emulator directory with the vDOS files VDOS.EXE, AUTOEXEC.TXT, and CONFIG.TXT. The vDOS AUTOEXEC file will contain a line which calls the SHARKNET.EXE file in the Shark directory. In other words, when you run VDOS.EXE, it loads anhd runs Shark automatically. It's that simple!

Enter:

C>SHARK

in a DOS system. However, with the vDOS emulator, Shark will already be running as soon as you run VDOS.EXE

In either environment, when SharkBase finishes loading, you will see the cursor on a line that starts with "1>". To get out of SharkBase, enter

1>QUIT

and press RETURN.

C>cd \SHARK\DEMOPRGS
C>SHARK

The status display shows information about open data files, 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:

USE COMDESC

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:

l>STATUS

The status display shows information about open dbf files, anywhere in Shark:

Saturday, September 20, 2013 SharkBase STATUS
Rec #           File name    Indexed by
000001   >File l...COMDESC.DBF    ← dbf file opened in “User Area 1” (Currently selected)
000001    File 2...MEMBERS.DBF    ← dbf file opened in “User Area 2”
000000    File 3...
000000    File 4...
000000    File 5...
000000    File 6...
000000    File 7...
000000    File 8...
000000    File 9...
000000    File 10...

Program .............. 				Files in use ......... 2
Memory remaining ..... 22489 		High memory remaining. 41600
Line width ........... 79 			Left margin .......... O

Press <Enter> to continue

There are two dbf (data) files open in this session. 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:

Next, type "SELECT 2":

l>SELECT 2

The prompt changes to "2" and you will see a "2>” prompt. Since we want to view (i.e.“EDIT”) the member file before we do anything, so we type "EDIT":

2>EDIT

The EDIT command displays one record at a time. Take time to study the HELP window at the top of the edit screen. The notation is concise. "^" means the CTRL key. Thus "^ HOME" means press down the CTRL key and the HOME key together (CTRL first, keep it down and then press HOME).


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, then enter "SELECT 1"


2>SELECT 1

Now let’s look at the brief command reference.


l>BROWSE

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.

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.

1>MODIFY

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 file. PgDn to a blank field and create a new field 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 field will be ignored. Type 3 is OK, so press the ENTER key and watch the modification occur.

Now go back to BROWSE. The order should have improved. Of course, you could modify the file again and add a new field to distinguish between commands and functions, index on a combination of fields, etc. Meanwhile, let's go back to the command line and run one of the demo programs:

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


COMMAND DESC

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.

l>MODIFY

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 file. PgDn to a blank field and create a

new field 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 field will

be ignored. Type 3 is OK, so press the enter key and watch the modification occur.