home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Share Gallery 1
/
share_gal_1.zip
/
share_gal_1
/
DB
/
DB009B.ZIP
/
1.ZIP
/
3!!_TUT.DOC
< prev
next >
Wrap
Text File
|
1989-09-29
|
113KB
|
2,834 lines
1 on 1 = 3!! TUTORIAL
---------------------
1. GETTING STARTED
2. OPENING MENU
3. X DOS
4. ADMINISTRATION
5. Command MODE
6. DOCUMENTATION
7. MENU MODE
7.1. HELP WINDOW
7.2. INFORMATION WINDOW
7.3. HELP
7.3.1. HELP BROWSE MODE
7.3.2. HELP MENU MODE
7.4. MOVING AROUND AND CHOOSING MENU ITEMS
7.4.1. UP AND DOWN IN LEVEL 2 MENUS
7.4.2. MOVING TO NEXT LEVEL 2 MENU
7.4.3. USING LETTERS TO CHANGE MENUS
7.4.4. CHOOSING MENU ITEMS
7.4.5. LEAVING LEVEL 3 AND 4 MENUS
7.5. CREATING A DATABASE
7.6. CREATING A PICTURE OF THE CURRENT ENVIRONMENT
7.7. QUITTING MENU MODE
7.8. RESTORING A SAVED PICTURE
7.9. APPENDING DATA TO A DATABASE
7.10. EDITING A MEMO FIELD
1
7.11. CURRENT RECORD DISPLAY ON SCREEN
7.12. SPECIAL KEYS TO MOVE AROUND THE DATABASE
7.13. INDEXING YOUR DATABASE
7.14. REPORTING
7.15. POSITION TOP OF DATABASE
7.16. OUTPUT TO DIFFERENT DEVICES
7.17. EJECTING TO A NEW PAGE
7.18. SEEKING
7.19. EDITING
7.20. CREATE PICTURE
7.21. CLEARING DATABASES
7.22. RESTORE A PICTURE
7.23. NAME A DATABASE
7.24. CREATE A FILTER
7.25. CREATE A REPORT CONTROL FILE
7.26. RUNNING A REPORT
7.27. MODIFY A REPORT CONTROL FILE
7.28. RUNNING A REPORT
7.29. REMOVING A FILTER
7.30. CREATE AN INDEX
7.31. RUNNING A REPORT
7.32. NAME A DATABASE
7.33. DISPLAY
7.34. ORDER
7.35. SPECIAL SEEK KEY
7.36. SPECIAL BROWSE KEY
2
7.37. MACROS
7.38. CREATE A MACRO
7.39. CREATE A RELATION
7.40. MODIFY A RELATION
7.41. REPORTING RELATED FILES
7.42. COPYING DATABASES
7.43. SORT A DATABASE
7.44. CHANGING POSITION IN THE DATABASE
7.45. BROWSE MODE
7.46. REPLACE
7.47. DELETE
7.48. PACK
7.49. RECALL
7.50. STRUCTURE
7.51. CHANGING DIRECTORIES
7.52. COPYING FILES
7.53. SET
7.54. MODIFYING PROGRAMS
7.55. MODIFY FORMAT
3
1 on 1 = 3!! TUTORIAL
---------------------
On the following pages is a tutorial for learning how to use
1 on 1 = 3!!. The conventions used are:
1. Categories are numbered and their descriptions are
centered and underline. You do not type in any of
this.
2. What you type in always appears on the left hand side
of the page and a description of what is happening
appears on the right hand side of the page. As we go
further into the tutorial we will put more keystrokes
on the left at one time. Take time to observe what
each keystroke does. We have had to split up the input
at times into multiple lines to fit it on the left.
You do not, I repeat do not press {Enter} to get a new
line just because the data you are inputing appears on
a new line. The only time you do press {Enter} is when
you see {Enter} on the left of the page.
3. Special characters are described within {} just like we
did with {Enter} above. When you see this you type in
the special character itself and not the {} or the
description enclosed in the {}.
4. At times you will have to press two keys at once. An
example of this is {Ctrl {End}}. In this case you
would hold down the Ctrl key just like you would the
shift key when you want upper case and while still
holding down the Ctrl key press the key marked {End}.
5. In some cases you have a choice of different input. In
these cases your options will be separated by '|'. As
an example:
M{Enter} |
C{Enter} means you can either put in 'M' followed by {Enter} or
'C' followed by {Enter}. You do not do both.
6. {any key} means just that. Press any key.
After you are taught how to create a database in the Menu
Mode, you will be taught how you can take a picture of the
current environment. This will allow you to take a picture at
any time, leave 1 on 1 = 3!! to do something else, come back to
the menu mode, restore the picture and continue in the tutorial
where you left off.
4
If someone has already used the tutorial or you are going
through it for a second time, when creating files you will be
warned that the 'File already exists, do you want to delete
(Y/N)'. Just answer 'Y'.
1. GETTING STARTED
---------------
You will have to position yourself so that you
are on the same drive as the \3!! directory.
Mine is on the C drive so that is where I am
going. You go to the drive your \3!! directory
is on.
C:{Enter} You will be position on the correct drive.
CD\3!!{Enter} You will change directories to the one that
contains the 1 on 1 = 3!! programs and files.
3!!{Enter} This is how you start 1 on 1 = 3!!. You will
see the 1 on 1 = 3!! opening message and then
you will get the Opening Menu. 'Menu mode' will
be highlighted.
2. OPENING MENU
------------
{Down Arrow} The light bar will move down one. 'Command
mode' will now be highlighted. If this does not
happen check if your {Num Lock} key is on. If
it is turn it off.
{Down Arrow} The light bar will again move down one.
'Administration' will be highlighted.
{Up Arrow} The light bar will move up one. 'Command mode'
will be highlighted.
{Down Arrow}
{Down Arrow} The light bar will move down two. 'X DOS' will
be highlighted.
3. X DOS
-----
{Enter} This is one way to choose a menu item. You use
the arrows to move to the one you want and then
you type the {Enter} key. We have just chosen
'X DOS'. You will see what directory you are in
and then the prompt '3!!'. We can now enter
DOS commands. We can do any we want as long as
5
there is enough memory left to execute that
command.
DIR{Enter} You will get a directory of the \3!! directory.
DIR 3*{Enter} You will get a directory of all files that
start with '3'.
{Up Arrow} You will see '3!! DIR 3*'. Using the {Up
Arrow} will retrieve for you previous commands
that you have put in. there is a memory for 50
commands.
{Up Arrow} You will see '3!! DIR'. This is the previous
command.
{Right Arrow}
{Right Arrow}
{Right Arrow}
{Right Arrow}
I* You will see the cursor move to the right each
time you press the {Right Arrow}. You can edit
previous command lines. See EDITING LINES in
the help mode for an explanation of how to edit
lines.
{Enter} The command will now be executed. You will get
a directory of all files that start with 'I'.
{Enter} Pressing {Enter} on a blank line in 'X DOS'
returns you to the Opening Menu. 'Menu mode'
will be highlighted.
4. ADMINISTRATION
--------------
A This is the second method of choosing menu
items. You press the first letter of the menu
description. You have just chosen
'Administration'. You will see 'Enter M for
monochrome, C for color'. This is where you
tell 1 on 1 = 3!! whether you have a monochrome
or a color monitor. I have a monochrome monitor
so I am going to enter 'M'. You enter the
correct one for your monitor.
M{Enter} |
C{Enter} You will now see, Enter R for read only, U for
update. What this is allowing you to do is
determine what updating capabilities a user of
the program will have. If you enter 'R' this
will mean that users will not be able to update
6
databases. Anytime they try to execute a command
that allows updating of databases they will be
informed that updating is not allowed. The
users will not be allowed to use the command
mode. If you enter 'U' then the users will be
allowed to use all the commands in 1 on 1 = 3!!.
We are going to enter 'U' because part of the
tutorial is showing how to update. If you want
yours to be read only you can come back latter
and change it.
U{Enter} You will be returned to the opening menu with
'Menu mode' highlighted.
5. Command MODE
------------
C You have just chosen 'Command mode'. You will
again see '3!!' but this time you are in the 1
on 1 = 3!! Command Mode. Here you can enter any
dBASE commands that you want or you can execute
your dBASE programs using the 'DO' command.
DIR{Enter} You will get a directory of the databases in
\3!!. You will again get the prompt '3!!'.
DISPLAY STATUS
{Enter} You will get the current status. You will be
prompted to 'press any key to continue' when
the page fills up.
{any key} You will get the next page of status
information and the message again 'press any key
to continue'
{any key} You will get the last of the status information
and then the prompt '3!!'
{Up Arrow} '3!! DISPLAY STATUS' will be displayed. Just
like in the X DOS Mode, while in the Command
Mode your commands will be saved. By using the
{Up Arrow} you may retrieve previous commands.
{Up Arrow} '3!! DIR' will now be displayed.
{Right Arrow}
{Right Arrow}
{Right Arrow}
{Right Arrow}
*.FOX{Enter} Again just like in the X DOS Mode you can edit
your commands and then execute them. See
EDITING LINES in the Help Mode.
7
QUIT | RETURN
{Enter} You may get out of the Command Mode by using
either the QUIT or the RETURN commands. You will
be returned to the Opening Menu with 'Menu mode'
highlighted.
6. DOCUMENTATION
-------------
{Up Arrow}
{Up Arrow} You can go either way. 'Documentation' should
now be highlighted.
{Enter} You have just chosen 'Documentation'. You will
get a new menu. 'Index' will be highlighted.
This is where you print out your documentation
from. If you were to choose 'Index' you would
be asked to enter the number of spaces to
indent. This is different for each printer. I
suggest you try 5 to start. We are not going to
do this now.
{Down Arrow} 'Help' will be highlighted.
{Enter} Choosing 'Help' allows us to print out the
documentation. You will be asked for the start
page. If you do not have a printer attached
enter 0 for the starting page number.
2{Enter} We are going to start from page 2. If you want
the full document enter 1. Again if you do not
have a printer, enter a 0. You will be asked
'Enter the end page'. If you do not have a
printer enter 0. If you want the full document
enter 999.
4{Enter} We asked it for pages 2 through 4. If you want
the whole document put in pages 1 through 999.
You will now be asked to 'Enter the number of
spaces to indent'. Again this depends on your
printer. Try a few pages at different settings.
5{Enter} We have indented ours 5 spaces. The pages you
chose will now print. After it finishes
printing you will be returned to the
Documentation menu with 'Index' highlighted.
Q 'Quit' returns you to the opening Menu with
'Menu mode' highlighted.
8
7. MENU MODE
---------
M We have chosen the 'Menu mode'. We could of
done the same thing by pressing the {Enter} key
because 'Menu mode' was highlighted. It will
now take from 10 to 40 seconds to load the menu
control file. You will then be presented with a
number of menu choices across the top of the
screen. 'Name' will be highlighted. On the
bottom of the screen is a box with information
in it. It will say 'Welcome! ...'. This box is
your Help Window. You will see as we go through
the different menu items that this will change
to describe the current menu item.
7.1. HELP WINDOW
-----------
{Enter} Just like in the Opening Menu, pressing {Enter}
on an menu item will choose that item. What you
should now see is the 'Name' pull down menu with
the first item, 'Database' highlighted. Also
notice that the Help Window at the bottom of the
screen has changed to an explanation of naming a
database to correspond to the currently
highlighted menu item. If there is a
corresponding dBASE type command for the
current menu item, the syntax for that command
will be the first thing you see in the help
window. It will then go on to explain the
command and how to use it.
7.2. INFORMATION WINDOW
------------------
{F4} Notice that pressing the {F4} removes the Help
Window and puts in its place an Information
Window. This contains a lot of information that
will be filled in as you use the program.
{F4} Now the bottom of the screen is blank except for
a double line in the middle and a one line
explanation of the current menu item. Latter
when we have an active database, the current
record will show in this window.
{F4} Now we get a list of the special keys we can use
while we are in this menu. Let's leave this
screen on for a while since we will be using
these special keys.
9
7.3. HELP
----
7.3.1. HELP BROWSE MODE
----------------
{F1} One of the keys described on the bottom of the
screen is the {F1} key. Next to it says Help.
The {F1} key is your key to help. You will
notice that you now have the same information on
your screen that was in the Help Window before
we started switching the screens. You are now
in the Help Browse Mode. If there is more
information on this command you can get it by
pressing {Page Down}.
{Page Down} You get another page of information on naming a
database.
{Page Down} And then some more. You will notice that this
topic ends and you get the next one. We have
used our browse mode to let you browse through
the help file. It is really an on line book.
{Page Up} You can go back to previous pages. Try using
the {Up Arrow} and {Down Arrow} to scroll a line
at a time.
7.3.2. HELP MENU MODE
--------------
{Esc} The {Esc} gets you out of the Help Browse Mode
and puts you in the Help Menu Mode. You will
see on your screen a list of topics you can
choose to get further information about.
{Right Arrow} The light bar moves to the right one topic.
{Down Arrow} The light bar moves down one topic. Try using
the four arrow keys. Try the {Home} and {End}
keys.
R The light bar moves to the next topic that
begins with the letter 'R'.
R Again the light bar moves to the next topic
that begins with the letter 'R'.
{Enter} This is the way you choose a topic. You move
the light bar to the one you want and then press
{Enter}. Sound familiar. You should now be
back in the help browse mode for the topic you
10
have chosen. Again you could browse around
using the {Page Down} and {Page Up} keys.
{Esc} You are returned to the Help Menu Mode. If you
wanted you could choose another topic to look
at. We are going to move on now. If you want,
stay here and look up some of the topics. HELP
is a good one to start with. Also please come
back here as we are going though the tutorial
for further explanations about what the current
menu item we are using.
{Esc} Pressing {Esc} while the help menu is on the
screen will return you to where you called for
help. We are back at 'Name' 'Database'.
7.4. MOVING AROUND AND CHOOSING MENU ITEMS
-------------------------------------
7.4.1. UP AND DOWN IN LEVEL 2 MENUS
----------------------------
{Down Arrow} The top line of topics, Name, Create, Modify,
etc. are considered level 1 menu items. The
menu we are now in is considered a level 2 menu
item. Just like in the opening menu the {Down
Arrow} will move the light bar down one item.
{Up Arrow} And the {Up Arrow} will move the light bar up
one item.
7.4.2. MOVING TO NEXT LEVEL 2 MENU
---------------------------
{Right Arrow} The {Right Arrow} closes the current pull down
menu, moves to the next one to the right, opens
that one and positions on the first menu item.
{Right Arrow} Again we move over one pull down menu to the
right.
{Left Arrow} The {Left Arrow} closes the current pull down
menu, moves to the next one to the left, opens
that one and positions on the first menu item.
7.4.3. USING LETTERS TO CHANGE MENUS
-----------------------------
E Pressing a letter that matches one of the
letters on the top menu causes the current pull
down menu to close and the one corresponding to
the letter you pressed to be opened. You should
11
now be in the 'Extra' menu with 'Command mode'
highlighted. It does not matter whether you use
upper or lower case. 'e' would of done the same
thing.
{Down Arrow}
{Down Arrow} 'Directory' should now be highlighted.
7.4.4. CHOOSING MENU ITEMS
-------------------
{Enter} Again we can choose a menu item by pressing
{Enter} while it is highlighted. You now get
another pull down menu with choices of what kind
of directory you want.
{Enter} This is a level 3 menu. We chose to get a
directory of databases.
{any key} You are returned back to the menu.
2 All pull down menus are numbered. You may
choose a menu item by pressing the corresponding
number. We have chosen '*.IDX'
{any key}
0 0, that is zero not the letter O, You are
prompted to put in the mask for the directory
you want.
*.fox{Enter} We get a list of all files with the extension
'.fox'.
{any key}
7.4.5. LEAVING LEVEL 3 AND 4 MENUS
---------------------------
{Right Arrow} |
{Left Arrow} |
{Esc} Notice on the bottom of the screen, 3 keys are
marked 'Previous menu'. In order to get out of
a level 3 or level 4 menu without executing the
command or option that is highlighted you have 3
choices, {Right Arrow}, {Left Arrow} or {Esc}.
Press one of those 3.
12
7.5. CREATING A DATABASE
-------------------
C We jump over to the 'Create' pull down menu.
1 We choose 'Database'. Again we could have just
typed {Enter}. You will get a screen with the
names of files across the top and the cursor
will be positioned on the bottom line. You will
see this screen when executing many different
commands. In this case what it wants is the
name of the database we are going to create.
MAIL{Enter} We have named ours 'MAIL'. If there is another
database by this name we would get a warning
message and have a chance to change our mind.
If we don't then the old database would be
deleted. You will get a screen with a help box
on the top explaining the different editing keys
you can use. If you don't see this help box try
pressing the {F1} key. Below that you will see
columns marked field name, type, width, and dec.
Number 1 will be highlighted. This is where you
enter information about the different fields
that make up your database.
FIRST_NAME Field name is where you give a name to each
field. The name must start with an alpha
character. It can be up to 10 characters long
and contain alphabetic, numeric and underline
characters. If you fill up all 10 characters as
we did here, the computer will beep at you and
go on to the next field.
{Enter} Since FIRST_NAME is a character field we choose
the default by pressing {Enter}.
15{Enter} We enter 15 for the number of characters to
allocate for this field. The computer skips
over dec which is number of decimal places
which doesn't apply to character type fields and
goes to line 2.
LAST_NAME
{Enter} Since we did not fill up the field we had to
press {Enter} at the end. We have split up name
into two fields so we can do sorts and look ups
on the last name.
{Enter} Again we choose the default, character.
13
20{Enter} We allocate 20 characters for the last name.
ADDRESS1{Enter}
{Enter}
30{Enter} We create an address field that is 30
characters wide.
ADDRESS2{Enter}
{Enter}
30{Enter} We have found that it is good to have at least 2
address lines. Some times you need a c/o line
or the address actually takes up two lines.
CITY{Enter}
{Enter}
20{Enter} We set up city with 20 characters. How large to
make any of the fields comes with experience and
knowing your data. Don't worry if you make a
field too large or too small, it's easy to
change latter on.
STATE{Enter}
{Enter}
2{Enter}
ZIP{Enter}
{Enter}
10{Enter} That takes care of the name and address.
PHONE{Enter}
{Enter}
12{Enter} Even though phone is made up of numbers we put
it in a character field because it isn't
numbers we will do any math on.
BIRTH{Enter}
{Space Bar} Pressing the {Space Bar} in the type field
causes the description to change from
'Character' to 'Numeric'.
{Space Bar} Pressing it again you get date.
{Enter} Since that is the type of field we are creating
we press {Enter} to select it. Notice what
happened. The width column got the number 8 and
we went down to the next field. All dates take
8 characters.
SALARY{Enter}N Typing 'N' in the type column is another way of
choosing numeric. You go right to the width
field.
10{Enter} We make the salary field 10 characters wide.
14
This time it stops in the 'dec' column. It
wants to know how many digits after the decimal
place we want to keep.
2{Enter} We tell it two decimal places.
CUSTOMER{Enter}
L For our customer field we put a type of 'L'.
This is a logical field. It means you can only
keep T for True or F for false in it. It
defaults to 1 character wide. We are going to
use it to note if this person is a customer or
not.
NOTES{Enter}
M For NOTES we create a memo field. This
defaults to 10 characters. This is not how
many characters we can store in the NOTES
field. In a memo type field you can store up to
64,000 characters.
{Ctrl {End}} Remember to hold the {Ctrl} key like a shift key
and at the same time press {End}. We tell the
computer that is all the fields we want to
define. The computer says 'Press ENTER to
confirm. Any other key to resume.'
{Enter} We are finished for now. The computer creates
the database and asks if we want to enter data
now.
7.6. CREATING A PICTURE OF THE CURRENT ENVIRONMENT
--------------------------------------------
N{F3} No, we'll do it using the append command latter.
We're back out to the menu. The {F3} key
switches the what is displayed at the bottom of
the screen in the opposite direction from the
{F4} key. Press the {F3} key until the
Information Window with the word Database in the
upper left hand corner is on the screen. Notice
how it tells us the name of the current master
database. We will now use Create Picture to
save information about the current environment.
This will allow you to then go out of
1 on 1 = 3!! at any time by creating a picture
of the environment before you leave. Then when
you come back into the Menu Mode you can recover
that environment and continue the tutorial from
that point on.
C4 We choose create picture. We are asked for the
15
name of the output file.
PLACE{Enter} We name the picture PLACE. Now lets get out of
1 on 1 = 3!!.
7.7. QUITTING MENU MODE
------------------
Q We are now at the 'Quit' menu. Just doing this
does not get us out of the Menu Mode. You now
have to choose 'Quit' by hitting {Enter} or
pressing '1'.
1 We are now back to the opening menu.
Q Now we are all the way out of 1 on 1 = 3!!. If
you want take a break now and come back to the
tutorial latter. Any time you do take a break
you should follow the sequence starting with
create a picture.
3!!{Enter}
{Enter}{Enter} We're going on. We should be in menu mode with
the Name menu pulled down.
7.8. RESTORING A SAVED PICTURE
-------------------------
5 We choose Name Picture. And the system asked
for the name of the picture file we want to
restore.
{Up arrow}P The {Up Arrow} should highlight the first file
at the top of the screen. Pressing 'P' should
move the highlight to the 'PLACE' file.
{Enter} We choose the PLACE file and are returned to the
main menu.
{F4} The information window should be on your screen.
It should tell you the master database is
MAIL.DBF and the picture file is PLACE.PIC. We
are back where we were when we saved the
picture.
7.9. APPENDING DATA TO A DATABASE
----------------------------
U2 Let's jump over to the 'Update' menu and choose
'Append'. We get a screen with a Help Box on
16
top telling us the editing keys we can use.
Again if you do not see the Help Box press the
{F1} key. Down the left side we see the field
names we have just entered and to the right of
them a place to enter data.
Frank{Enter}
Rogers{Enter} That's me. I always like to try and get my
names and addresses in upper and lower case.
It's harder to type but looks better when you
put it on a label or merge it with a letter.
I on I Computer
Solutions, Inc{Enter}
26 Finchwood Dr.
{Enter} You could leave a place for company name and
title in your database. What we have is just a
sample. When you fill up a field like I did
with my company name it will automatically go
to the next field if you have set confirm off.
The default is that confirm is on so you have to
put in the {Enter} key even when you fill up a
field.
Trumbull{Enter}
CT{Enter}
06611{Enter}
203-375-0914{Enter}
04/22/44{Enter} Now that you know my birthday you can send me a
card.
1000000{Enter} I'm allowed to dream a little, aren't I.
F{Enter} You may not have to put the enter in when you
fill up a field like this if you have set
confirm off.
{Ctrl
{Page Down}} We are now at the NOTES field. This is a
special type of field called a memo field. By
pressing {Ctrl {Page Down}} we go into the edit
mode of this field. At the top of the page is a
help box with the editing keys we can use. If
you do not see the help box try pressing {F1}.
We can put anything we want in here. Its just
like a word processor.
17
7.10. EDITING A MEMO FIELD
--------------------
The quick brown
fox{Left Arrow}
{Left Arrow}
{Left Arrow} Notice how the cursor moves backwards under each
letter. These special keys we are using now
work for input anywhere in 1 on 1 = 3!!.
{Del}{Del}{Del} The delete key deletes the character above the
cursor. The 'fox' should be gone now.
hat{Back Space}
{Back Space}
{Back Space} The {Back Space} key is the one on the right
side of the top line that has a large left arrow
on it. It is used to delete the character
before the cursor.
cat{Left Arrow}
{Left Arrow}
{Left Arrow}
Rat Notice how we type over the letters that were
there before.
{Left Arrow}
{Left Arrow}
{Left Arrow}
{Ins}large {Home}
{Home}{End}{End}
{End} The {Ins} key changes it so that anything we
type in will now be inserted. Pressing it again
would switch back to overwrite. The {Home} and
{End} keys are used to skip from one word to
another. Below is one of the few places in the
tutorial where you get to type things that are
on the right of the page. Type it in just as I
have it. Do not use the {Enter} key until the
end.
went to find the circus to make his fortune in this world. But
it wasn't to be. On the way he met an even larger brown cat. A
hungry brown cat.
{Enter} Notice how it automatically wraps the line as
you get near the right hand margin. Notice when
you did put in the {Enter} that it made a '<'
mark on the right hand margin. You only use the
{Enter} at the end of paragraphs.
{Up Arrow}{Up Arrow}
18
{Down Arrow} You can use all four arrow keys to move around.
You should now be on the beginning of the second
line.
{Ctrl N} {Ctrl End} insert a new line.
{Back Space}
{Del You can delete paragraph markers just like any
other letter.
{Ctrl K}B {Ctrl K}B reformats the current paragraph.
{Ctrl K}F Notice on the top line how the word 'Find?' came
out. This is how we search for strings.
large{Enter} The cursor stops right before the word 'large'.
{Ctrl K}L {Ctrl k}L finds the next occurrence of our
search string.
{Ctrl K}L We get a message '** Not found **'.
{Ctrl T} This deletes the next word.
smaller {Page Down}
{Enter}And the rat
ate the cat.
{Enter}{Page Up} {Page Down} and {Page Up} move you a whole page
of data if you have that much.
Go ahead and type something in while I do some
more myself. Practice is the only way to learn.
Try out all the keys. You really can't hurt
anything.
This person has the potential of becoming one of our best
customers. Someone should be contacting him every month. Tell
hi}+m how good his product 1 on 1 = 3!! is and don't forget to
send a card on his birthday.{Enter}
{Enter}
12/12/87{Enter}
Had a good talk with Frank. I think we got him.{Enter}
OK, I'm back. I hope you played around while I
typed. It's the only way to learn. Notice I
did not press {Enter} at the end of each line.
That's done automatically for you. Only press
{Enter} when you want to start a new paragraph.
{Ctrl {Page Up}} |
{Ctrl W} Save what you have just put into the memo
field. If you didn't want to save it you would
19
press {Esc}. Notice there are two ways to save
you memo information.
{Enter} Since that was the last field you will get a
new record that is blank. Why don't you
continue and enter a couple of records on your
own. It will make the rest of the exercises
more meaningful. Try to get at least 5 records
in.
{Esc} Do this when you get a new blank record after
you have put in your last record. This will
bring you back to the main menu.
7.11. CURRENT RECORD DISPLAY ON SCREEN
--------------------------------
{F4} The screen on the bottom changes so that the
current record is showing. Notice the record
number on the left. I know you have at least 5
records. It should be the record number of the
last record since you were appending. The
system keeps a record pointer to the last record
you did anything with.
7.12. SPECIAL KEYS TO MOVE AROUND THE DATABASE
----------------------------------------
{Home} While you are on any menu item {Home} moves the
record pointer to the first record. You do not
have to have the record showing on the bottom of
the screen either. The same thing will work if
you have any of the other screens showing.
{+}{+} {+} moves the record pointer ahead one record at
a time.
{-}{-} {-} move the record pointer back one record at a
time. If you do it real fast you will not see
the second record.
{End} {End} moves you to the end of the database.
These four keys can be used any time you are on
any menu item. Of course you also need an
active database.
7.13. INDEXING YOUR DATABASE
----------------------
A1 Let's put our database in order so it's easier
to work with. We're going to index it.
Indexing is creating a separate file that keeps
20
information on the order of the database based
on a field or a combination of fields. You will
get a familiar, I hope, screen that is asking
for the name you want to give your index file.
MAIL{Enter} I named my MAIL. You will now get a screen
that looks some what the same except there are
field names across the top of the screen
instead of file names. You will be seeing this
type of screen with other commands so let's
explore how it can be used. What it is asking
for is what fields do we want to index on. We
could just type in the field names we want but
there is an easier way.
{Up Arrow} Pressing the {Up Arrow} highlights the first
field name. Does this look familiar? Remember
when we were in the Help Menu? Go ahead and
play with the arrow keys.
L This should move you to the LAST_NAME field
since that is the only one that starts with
'L'.
L That doesn't seem to do anything because there
are no more field names that start with 'L'. If
there was then the light bar would move.
{Enter} We have selected LAST_NAME since that was the
one that was highlighted. Notice how it writes
it out on the bottom line for us.
+ We are going to make an expression by combining
LAST_NAME with FIRST_NAME. The '+' is the
operator for concatenating two fields.
{Up Arrow} That moves us back up to select another field.
F{Enter} We select FIRST_NAME. Notice how it puts it on
the end of the line at the bottom of the
screen.
{Enter} We tell the computer that our expression is
ready and the computer creates the index file.
{F3} You should now have the formation Window on the
bottom of the screen. If you don't keep
pressing the {F3} until you get it. Notice it
tells you what the current database and index
files are. It also has other useful
information. Lets leave the Information Window
on for a while.
21
7.14. REPORTING
---------
R We go over to the 'Report' menu.
5 We pick 'Sum'. We get another pull down menu
with choices on it. Notice that the Information
Window at the bottom of the screen has changed
also. When this menu is on the screen it will
give you information about what choices you
currently have active.
1 We tell it to go ahead and execute the current
command. You will be told how many records are
summed and given a total for the salary field.
Sum only works on numeric fields. If your
database doesn't have any numeric fields you
will get an error message if you execute this
command.
{any key}
61 This time we get an average of all salaries.
{any key}
11 You will get a list of all the fields in the
database except the memo fields. Notice the way
the data wraps around to fit everything.
{any key}
121 We are going to build a field list with
selected fields. We have seen this screen
before.
{Up Arrow} This moves the light bar to the first field.
{Enter} We select this field. The computer lists it on
the bottom line and then highlights the next
field. This should be LAST_NAME.
{Enter} We want this field also. This time the
computer puts a comma after the last field on
the bottom line and the a space followed by the
field we have just chosen. It then moves the
light bar to the next field.
P{Enter} The next field we want is PHONE.
C{Enter} And then customer.
{Esc} That is all the fields we want. Pressing {Esc}
22
puts the cursor on the bottom line. We didn't
have to enter this data the way we did. We
could have typed it all on the bottom line if we
wanted to.
{Enter} This enters this as the current list and
returns us to the menu. Notice how it now tells
you what choices you have made on the bottom of
the screen.
1 Execute the list command. Notice how we now get
the fields we have selected.
{any key}
51 We now try to sum our fields. You will get an
error message that it is 'Not a numeric
expression'. If you create a field list for
summing or averaging you can only have numeric
fields in it else you will get an error message.
{any key}
{any key}
133 We are going to specify which records and in
this case we specifying Next. We are asked to
enter the number of records.
3{Enter} We say 3 records.
1 We execute the list command. If there are 3
records left including the current record to the
end of the database we will get 3 records
listed. If not we will get how records there
are. If we are positioned at the end of the
database we will not get any records.
{any key}
11 Keep doing this until you do not get any
records listed.
{any key}
7.15. POSITION TOP OF DATABASE
------------------------
P5 Go over to the 'Position' menu and choose
'Top'. This is another way to get to the start
of the database. We could of used the {Home}
key.
R11 Go back to the 'Report' menu and execute 'List'
again. You will get the first 3 records if you
have put in a least 3 records.
23
{any key}
7.16. OUTPUT TO DIFFERENT DEVICES
---------------------------
8 'Output' gives you a chance to send your output
to any device you want. If you will look at the
Information Window you will notice that only the
screen is turned on. If you have a printer turn
on output to the printer by pressing 3.
3 Turns on output to the printer.
5 Selects output to a file. You get the familiar
file selection screen.
MAIL{Enter} I select an output file of 'MAIL'. If you have
noticed I have used the same name for the
database, the index and now the output file.
The reason we can do this is that 1 on 1 = 3!!
appends a different extension for each different
type of file. If a file by that name does exist
we will get a warning and a chance to change our
mind. Now look at the Information Window. It
tells you what devices we are going to print to
and the name of the output file.
{Esc} Leave the output menu.
11 Print a list to all the devices.
{any key}
131 We now specify all records.
4 We want to select records based on some
selection criteria. We get our Field Selection
screen. Lets pick everyone with a salary
greater then $75,000. We could type SALARY >
75000 right on the bottom line but we're lazy.
{Up Arrow}
sS{Enter} The first 's' gets us STATE. The second 'S'
gets us SALARY. Notice it does not matter if
the 's' is upper or lower case. The computer
has entered SALARY on the bottom line.
> 75000{Enter} We put in the rest of the formula. Do not put
commas in your numbers when entering them.
1 Again we execute the 'List' command. This time
we only get those people who have a salary
24
greater then $75,000.
{any key}
7.17. EJECTING TO A NEW PAGE
----------------------
9 If your printer is on it will go to a new top of
page.
846
{Left Arrow} Turn off output to the printer and to the file.
7.18. SEEKING
-------
P1 We are going to look for a record based on our
index. We invoke the 'Seek' command. The
computer asks us to enter the key to look up.
Rog{Enter} We enter part of the name we are looking for.
The computer will find the first name that
starts with 'Rog'. If there is a 'Roggs' and a
'Rogers' it will stop at 'Rogers'. If it does
not find any name that starts with 'Rog' we will
get an error message. Since we did not get any
message the computer found someone.
7.19. EDITING
-------
U1 We now go back to the 'Update' menu and pick
'Edit'. Notice we get the same choices as we
did for 'List', 'Sum' and 'Average'. If you get
the Information Window on the screen by using
{F4} you will find that the same field list and
selection rules are in effect. Those rules did
not affect the 'Seek' command so we may not find
the person that 'Seek' did.
1 We execute 'Edit'. Unless Frank Rogers was the
first person in your file you will not have him
on the screen. The reason for this is that we
have specified All records. This means that
Edit will start with the first record that meets
the selection criteria.
{Page Down} Use {Page Down} until you come to the record
with the infamous Frank Rogers. We want to
change the salary and that is not part of the
list.
25
{Esc}13521 First we specify which records to be the
default. For Edit this is the current record.
Then we go into build a field list. This time
we start with a list on the bottom of the
screen.
{Up Arrow}SS{Enter}
{Esc}{Enter}1 We add salary to our list and then exit and
execute edit again.
{Down Arrow}
{Down Arrow}
{Down Arrow}
{Down Arrow} Four {Down Arrow}'s bring me to the salary
field.
35000{Enter} I take a little cut in pay.
{Esc} If you are already out of the Edit Mode ignore
this {Esc}.
R11 We do our list again and I am no longer on it.
{any key}
7.20. CREATE PICTURE
--------------
C4 Using the 'Create' 'Picture' we can save a snap
shot of which databases, indexes and other
information are in effect at this moment. That
way we can latter load that snapshot and be
right back where we started. We get our screen
that is asking us for a file name.
MAIL75{Enter} We use the name MAIL75 to indicate it's
association with the MAIL database and that we
have a selection at $75,000. You can create
your naming conventions anyway you want for
files. You are allowed up to 8 characters.
7.21. CLEARING DATABASES
------------------
N1 We have gone into 'Name' 'Database'. We get our
familiar screen for entering file names.
{Enter} We press {Enter} without naming a file. This is
the way you clear out all databases, and
options. If you will use {F4} to look at the
26
Information Window you will see nothing is
defined.
7.22. RESTORE A PICTURE
-----------------
5 We are already in the 'Name' menu. We select
'Picture'. We get our Select File Screen. This
time we want to pick an existing file. And
there it is on the top of the screen.
{Up Arrow}M Moves the light bar to the first file. In my
case 'M' move the highlight right to
'MAIL75.PIC' which is the one I want. If you
have other files then move the light bar to this
one.
{Enter} Choose that file. You will notice from the
Information Window that the MAIL index and
database have been restored.
R1 Going to 'Report' 'List' we see that which
records, field list and selection rules have
been restored.
1 We execute the 'List' command just to see that
the same thing happens as before.
{any key}
7.23. NAME A DATABASE
---------------
N1 We do 'Name' 'Database'. We get our File
Selection Screen with a list of databases on
top.
{Up Arrow} The first database is highlighted. We move to
the file 'MAIL.DBF'
M You can move their the way I do by pressing 'M'
or you can use your arrow keys.
{Enter} I select this file. I get another File
Selection Screen. This time it is asking me
for the #1 index file. Since I want to access
my records by last name..
{Up Arrow}
M{Enter} I choose the file MAIL.IDX and now it's asking
me for INDEX #2. You can have up to 7 index
files for one database active at one time. We
27
do not have any more for this one at this time.
{Enter} {Enter} on a blank line tells the computer
there is no more index files for this database.
We end up back at the menu. You will notice
that the options we had in effect before for
this file will be gone. Every time you 'Name' a
'Database' all option are cleared.
7.24. CREATE A FILTER
---------------
C3 We now choose 'Create' 'Filter'. A filter
looks just like the rules we used in 'Specify
selection rules'. The difference is that these
rules affect all commands where 'Specify
selection rules' only affect some commands.
When a filter is in effect it will seem like the
current database only contains records that pass
the filter test. For example if under choices
you specified next 2 records it would mean the
next 2 records that pass the filter test. Again
we have our File Selection Screen.
MAILU60{Enter} The file name I give it is MAILU60 to signify
salaries under $60,000. Now I get my Field
Selection Screen.
SALARY <
60000{Enter} I decide to type the whole thing myself.
Notice the Information Window now shows this
filter in effect.
R11 I execute a listing. You should at least get my
name. Remember we cut my salary.
{any key}
7.25. CREATE A REPORT CONTROL FILE
----------------------------
C5 We pick 'Create' 'Report'. We are asked for a
name for our report.
MAIL{Enter} Our favorite name. We now get a screen we have
not seen before. At the top there is a list of
fields in our database. We are positioned in a
large rectangle with the words 'Page heading:'
above us.
{F1} We now have a Help Box on the top of the screen
28
with editing characters we can use instead of
the list of field names.
{F1} We get our list of field names back.
MAILING{Enter}
LIST{Enter}
{Enter}
{Enter} This box contains 4 lines and it if for the
report heading. What ever we put in here will
be centered above our report.
{Enter}
1{Enter}
{Enter}
{Enter} We leave the page width at 80, change the left
margin to 1, leave the right margin as 0 and
leave the lines/page at 58.
{Enter}
N{Enter}
Y{Enter}
{Enter} We do not want double spaced, we do not want to
page eject before printing, we do want page
eject after printing and we do not want plain
page. Plain page means that page numbers and
the date are suppressed and the page heading is
only printed on the first page. We should now
be on a new page with it asking for 'Group on
expression'
CUSTOMER{Enter} This means we want to group by customers and
non-customers. It now wants to know the
description we want when we get a different
group.
CUSTOMER
BREAK{Enter} You will see this at the top of each group.
{Enter}{Enter} We do not want a summary only and we do not
want to page eject after each group.
{Enter}{Enter} We do not want to sub-group within this group.
We now get a new page. This is the page for
describing what information we want in each
column. You can put in a field name or an
expression.
TRIM(FIRST_NAME)+' '+
TRIM(LAST_NAME){Enter} You can use all the dBASE type
functions to create expressions.
29
30{Enter} We change the default width to 30. If when the
report is created the name is bigger then 30
characters it will wrap to the next line.
{Enter}{Enter}{Enter}
NAME{Enter} You get 4 lines for the column headings. If the
expression is alphabetic it will be left
justified. You will notice that a layout of the
report is created right above the 'Contents'
box.
STATE{Enter}{Enter}
{Enter}{Enter}{Enter}
STATE{Enter} The next field I put in is STATE. I leave the
default width of 2 and then enter a column
heading of STATE. We then go to a new page.
{Page UP} Lets go back to the page with STATE on it for a
minute. You will notice that the width has been
changed to 5 even though we left the default of
2 in. What has happened is it has been changed
to fit the column heading STATE we put in.
{Page Down} Moving right along.
PHONE{Enter}{Enter}
{Enter}{Enter}{Enter}
PHONE{Enter}
SALARY{Enter}{Enter}
0{Enter}{Enter} We decide we do not want any decimal places in
reporting SALARY and that we do want to total on
this field. Numeric fields get their column
headings right justified.
{Enter}{Enter}{Enter}
SALARY{Enter}
{Ctrl {Home}} After putting in SALARY we decide we really
wanted CUSTOMER to be the first item on our
report. {Ctrl {Home}} brings up a menu that
allows you to jump to different parts of the
report definition.
F This gets us to the first column. We could of
used a number of {Page Up}'s to get here also.
{Ctrl N} {Ctrl N} is used to insert columns.
CUSTOMER{Enter}{Enter}
{Enter}{Enter}{Enter}
CUS.{Enter} CUSTOMER is now inserted.
{Ctrl {Home}}S We call up the menu again and issue a 'S' for
30
save. We are back to the menu.
7.26. RUNNING A REPORT
----------------
R31 We execute the 'Report' command. It is asking
for the name of the control file. Since we just
created it notice it already has the name on the
bottom line.
{Enter} We press {Enter} to start the report. What is
this? 'ERROR IN COMMAND' 'Improper data type in
group expression.' I don't think it likes to
have logical field for grouping on. Let's go
back and fix it.
{any key}
{any key}
7.27. MODIFY A REPORT CONTROL FILE
----------------------------
M4 'Modify' 'Report'. We are asked for the name of
the file. Again the correct on is already on
the bottom line.
{Enter} We get the same opening screen as when we
created the report except this time our data is
there.
{Page Down} This will get us to the Group on screen.
IIF(CUSTOMER,
'YES','NO') We use the dBASE IIF function to convert this
expression to 'YES' if CUSTOMER is true and to
'NO' if CUSTOMER is false. This starts to show
the power of 1 on 1 = 3!! but it also shows that
it takes quite a bit of learning to harness all
that power. Let's change what's printed on the
report also.
{Enter}{Enter}
{Enter}{Enter}
{Enter}{Enter}
IIF(CUSTOMER,
'A CUSTOMER',
'NOT A CUSTOMER')
{Enter}
{Ctrl {End}} Another way to save a report control file.
Let's try our report.
31
7.28. RUNNING A REPORT
----------------
R31{Enter} And there's are report. There is a good chance
you are getting too many breaks on CUSTOMER.
That's because if you are going to break on a
field you should have your database ordered by
that field. First lets get rid of the filter so
we have all of our records.
7.29. REMOVING A FILTER
-----------------
{any key}
N4{Enter}Naming a blank filter file removes the active filter.
7.30. CREATE AN INDEX
---------------
A1customer
{Enter} We name our index file customer.
CUSTOMER{Enter} We index on the CUSTOMER field.
7.31. RUNNING A REPORT
----------------
R31{Enter} This time our report will be organized
correctly. First we will get a group that
aren't customers and then we will get a group
that is customers. The salary should be totaled
for each group and there is a final total.
{any key}
7.32. NAME A DATABASE
---------------
N1{Up Arrow}S
{Enter} As a present to you we have included a database
with the states and their postal abbreviations.
You have picked the database STATE and it should
now be asking for the first index file.
STATE{Enter} We pick the index named STATE. This is ordered
by the state name. You are now being asked for
another index file.
STATECD{Enter} This index file orders the database by the
postal code. You are now being asked for the
third index file. You can index a file with up
to seven indexes. We only have two.
32
{Enter} We tell the computer that's all the indexes by
hitting {Enter} with no index file. You will
notice in the Information Window that the two
indexes are shown.
7.33. DISPLAY
-------
R21 We go to the Report menu and choose Display.
Notice how you only get one state. That is the
default for the Display command.
{any key}
{Enter}3
{Enter}1 This time we specify All. Notice how the list
stops after the page fills up. This is another
difference between List and Display. Also
notice how our list is ordered by state name.
When you have more then one index, the first
index you enter becomes the primary index and
that is the order the data will be accessed in.
7.34. ORDER
-----
{any key}{any key}
{any key}A3 We have now moved over to the Arrange menu and
picked Order. The computer should be asking us
to enter the order number. This is a way to
tell the computer to use one of the other index
files we have specified as the primary index.
2{Enter}R11 We tell it to make the second index the primary
index. We then go back over to the Report menu
and List. If you looked real fast you will have
noticed that the listing came out in order by
postal abbreviation.
{any key}
7.35. SPECIAL SEEK KEY
----------------
{F4}... Press {F4} until you have a window at the bottom
of the screen with '[Alt U]' in the upper left
hand corner. This is a list of special keys you
can use to execute some of the commands from any
where in the menu with one keystroke.
{Alt S} This is one of those special keys you can press
any time you are at a menu item. This one does
33
the same thing as the Position Seek command.
It should be asking you to enter the key to look
up.
NY{Enter} Since we have set Order to the second index
which is based on the two character postal
abbreviation, we can now look up records based
on that abbreviation. If you don't have the
Record Window on the bottom of the screen, press
{F3} until you get it. Did we find the New York
record? Try out your state.
7.36. SPECIAL BROWSE KEY
------------------
{Alt Z}1 Another special key. You will of gone into the
Browse mode. This one does not allow updating
but does allow you to look through your whole
database. We will browse through the Browse
mode a little latter.
{Esc}{F5} Another way to get into the browse mode. This
one allows updating. You can tell I think the
Browse mode is pretty good. You can get into it
four different ways.
{Esc}A3
0{Enter}R11 This time we went over to the arrange menu and
changed the order to 0. This is telling the
computer not to use any index in accessing the
database. When the listing comes out it will be
in the order that the records are in the
database. We keep on coming back and listing
or displaying our file. Let me show you a short
cut that you can use here and anywhere that
repeat the same sequence of characters over and
over again.
7.37. MACROS
------
{any key}{F2} Your screen should of gone blank except for the
message Enter Macro Key, F2 to End. What we
going to do is redefine one of the keys on the
keyboard so it will play back a set of keys that
we record. What the computer wants right now is
which key we want to redefine.
{F9} We are going to redefine the {F9} key. You will
now get the message, Enter Your Macro, F2 to
End. Before we came in here we went through
the scenario of what we wanted to do. We wrote
34
those keys down.
{Esc}{Esc}{Esc}
{Esc}{Esc}
R1311 Why the 5 {Esc}s? We may want to invoke this
macro from anywhere. The one restriction is you
must be at a menu item. Since we could be at a
level 4 menu when we invoke it or a level 2,
the 5 {Esc}s force us to be at a level 1 menu
each time before the rest of the macro is
invoked. R gets us to the Report menu. 1 will
choose list. 3 will choose Specify which
records, 1 will choose All, and 1 will Execute
the List command.
{F2} {F2} ends the definition of this key. You again
get the message Enter Macro Key, F2 to End. We
could define another macro at this point if we
wanted to.
{F2} That is the only one we will define this time.
You should be back to the menu item where you
called macro from.
{F9} If all went well you should of gotten a List of
the database. Let's save the handy macro.
7.38. CREATE A MACRO
--------------
{any key}
C7LIST{Enter} We have named this macro LIST. You can now call
it back at any time by using the Name Macro
menu. Let's get our MAIL database back again.
7.39. CREATE A RELATION
-----------------
N1MAIL{Enter}
MAIL{Enter}
{Enter} We have used the Name Database to get our MAIL
database and our MAIL index. Now let's create a
relation between our MAIL database and the STATE
database.
C2MAIL{Enter} We choose Create Relation. Of course we name
our relation MAIL. Now we get a screen with the
fields from our MAIL database and we are asked
to enter the key expression. What the computer
is looking for is what field of data from this
database can it use to look up the state in the
STATE database.
35
{Up Arrow}S
{Enter} This should of selected the field STATE and put
it on the bottom line.
{Enter} Since this is the full expression we choose it
by hitting {Enter}. We are now asked for the
related database name.
{Up Arrow)S
{Enter} This should choose the STATE database. We are
now asked for the related index file name. This
means, what index for the STATE database can I
use to look up the 2 character state code.
STATECD{Enter} We choose STATECD. You could use the {Up Arrow}
and then move to STATECD and {Enter} to do the
same thing. You will now get a screen that
describes any relationships in effect. The key
field should be STATE, the related database file
should be STATE.DBF, the related index file
should be STATECD.IDX. Down on the bottom of
the screen you should see: Enter number to
change, 0 to save, 2 to add a relation. If you
wanted to modify a relation you would enter that
relations number. You would then be able to
change any of the 3 fields. To remove a
relation you just put in a blank key field name.
Let's add another relation.
2{Enter} Notice we again get our screen with field names.
The difference this time is that the fields from
the state database are also listed. You can
tell which ones are from the state database
because they are preceded by 'STATE->'.
{Up Arrow}CCC Notice that although code from the STATE
database is preceded by the alias 'STATE->', the
computer still matches on the field name.
{Enter}{Enter} We choose STATE->CODE. This goes down to the
bottom line and we pick it as our expression.
3!!_MENU{Enter}
3!!_MENU{Enter} We don't really have another database to relate
to but we can use this as an example. Notice
the information about our new relationship.
Also notice on the bottom line that it now says
3 to add a relation.
0{Enter}E9 We save our relationship and go over to Extra
and do a Status. We can see here what files we
36
are using and what relationships are set.
{any key} Notice the database in workarea (select area) 9.
This is the database that the Help System uses.
7.40. MODIFY A RELATION
-----------------
{any key}
{any key}M2
{Enter} This time we go to Modify Relation. We choose
the relation name MAIL. We now have the screen
that shows the relations.
2{Enter} We are going to modify the second relationship.
You will have the screen with the field names on
it. On the bottom line will be STATE->CODE.
{Ctrl Y} Hold the Ctrl key and press Y at the same time.
STATE->CODE should disappear from the last line.
{Enter} Putting in a blank key expression is how you
delete relations. The second relation should be
gone from the screen.
7.41. REPORTING RELATED FILES
-----------------------
0{Enter}R121 We save this relationship and go to Report
Specify fields. We now have a choice of fields
from both database.
{Up Arrow}
{Enter}{Enter}
SSS{Enter}{Esc} We choose FIRST_NAME, LAST_NAME, STATE->STATE
{Enter}1 We get a listing. Notice how the full state
name appears.
7.42. COPYING DATABASES
-----------------
{any key}
A5{Enter} Now we will make a copy of our database. Notice
you have the same choices as for list. We have
already specified certain fields. The computer
is looking for the name of the new database we
are going to copy to.
MAIL1{Enter} We choose MAIL1. The computer executes the
Copy command. Let's save a picture of our
environment and go and look at that file.
37
{any key}
C4MAIL1{Enter}
N1MAIL1{Enter}
{Enter}{F9} Remember the {F9} macro. You should have a list
of the database. It should look just like our
last list from the MAIL database. Let's bring
back our picture and try a sort.
7.43. SORT A DATABASE
---------------
{any key}
N5MAIL1{Enter}
A4{Enter} The computer wants to know what field you want
to sort on.
STATE->STATE
{Enter} We are going to sort on the full state name from
the related STATE file. We get a message enter
A ascending, d Descending.
A{Enter} We put in A for ascending. Now it want to know
if we want to ignore case. It means do we want
to sort on all upper case or do we want to
separate by upper and lower case.
Y{Enter} We want it all sorted on upper case. Now it is
asking us for another sort field.
zip{Enter}
a{Enter}Y{Enter} We sort on zip within state. Again it is
looking for a sort field.
{Enter} Now it wants to know the name of the new file.
MAILSORT{Enter} And it goes ahead and sorts it. Now lets turn
our index off and see what the different
position commands do. You will be familiar with
some of them because they do the same things as
some of the special keys.
{any key}
7.44. CHANGING POSITION IN THE DATABASE
---------------------------------
A30{Enter}
P5 We go over to a\Arrange and set Order to 0. Then
we go to Position and choose Top. Make sure the
Record Widow is on at the bottom of the screen.
If it's not use the {F4} to get it on. Notice
38
that the current record is now number 1.
6 When we pick Bottom the current record becomes
equal to the number of records.
72{Enter} When we do a Goto we are asked to Enter the
record number. We choose 2. Notice at the
bottom we are now at record 2. The Goto command
is not affected by indexes. The same thing
would of happen if we had an index. It would
of gone to record 2.
41{Enter} When we pick skip we are asked to enter the
number of records to skip. We skip one so we
are now at record 3.
4-2{Enter} You can skip both ways. We asked it to go back
two records so we should now be at record number
1.
2 The Locate command is used to find a record that
meets a test. You must specify selection rules
to use it. It is up to you whether you set any
of the other options.
4 We pick Set selection rules. We are asked as
before to enter the rules we want.
STATE='CT'
{Enter} This should find all records with a state of
'CT'.
1 We execute the Locate command. If we don't get
an error message it means it has found a record
that fits our rules. Notice what record it
stopped at.
3 We use the Continue command to find the next
record that meets the Locate rules. If it does
not find any more that meet the rules you will
get a message. Keep on pressing 3 until you get
the message that no more records are found. The
Browse command under Position does not allow
updating. Let's go over to Update to use the
browse there.
7.45. BROWSE MODE
-----------
U31 Since the last thing that we did positioned us
at the end of the database you should be in the
39
Browse mode positioned at the end of the
database.
{Page Up} You should now be at the top of the database
with all your records showing unless you were
really ambitious and typed in many records. If
so page up until you get to the start of the
database.
Bill{Ctrl Y}
{Enter}Jones
{Ctrl Y}{Enter}
{Ctrl Y}{Enter} Notice when you do the {Ctrl Y} the rest of the
field is erased. In the ADDRESS1 field the
whole field is erased. When you hit the {Enter}
in the ADDRESS1 field the cursor goes down to
the ADDRESS1 field of the next record. Where
did the rest of the record go? We have to use
panning to get to it.
{Ctrl {Right Arrow}}
{Ctrl {Right Arrow}}
Depending on what will fit on the screen,
panning will bring up more fields from the
record. You should now have ADDRESS1 and
ADDRESS2 on the screen.
{Ctrl {Right Arrow}}
{Ctrl {Right Arrow}}
You should now have all the fields from CITY
through CUSTOMER on the screen. The cursor
should be on CITY.
{End}{End} {End} moves you to the next field.
{Up Arrow} This moves you to the same field in the previous
record.
{Home} This moves you to the previous field.
{Ctrl {Left Arrow}}
This pans you to the left.
{Ctrl {Left Arrow}}
{Ctrl {Left Arrow}}
{Ctrl {Left Arrow}}
{Ctrl {Left Arrow}}
Let's pan all the way to the left until
FIRST_NAME is on the screen again.
{Ctrl {Home}} This pops up a menu at the top of the screen.
The first four work exactly the same as the
40
commands in our Position menu. fiNd works the
same as Seek. You pick these by typing the
capital letter in each command or moving the
lite bar and pressing {Enter}.
L2{Enter} We have chosen Lock and entered 2 for the number
of fields. What this does is lock the current
left most 2 fields on the screen so that no
matter how you pan they will remain on the
screen.
{Ctrl {Right Arrow}}
{Ctrl {Right Arrow}}
{Ctrl {Right Arrow}}
Try it out. Notice how FIRST_NAME and LAST_NAME
remain on the screen.
{Ctrl {Home}}F
STATE{Enter} This time when we call up the menu we ask for
Freeze and enter STATE for the field. Now the
cursor should be in the STATE field and only the
state field should be highlighted where before
the whole line was highlighted.
{Enter} The cursor goes to the next line and remains in
the STATE field. That what Freeze does. It
freezes the field you can enter data into. This
works great when you have a lot of changes to
one field in the database.
{Esc}321 We go out of Browse and then right back and
choose Build a field list and Fields. This is a
different field list then you got with the other
commands. Notice you only have fields from the
master database. You cannot browse through more
then one database at a time.
{Up Arrow}{Enter}
{Enter}{Enter}
C{Enter}{Enter}
B{Enter}
{Esc}{Enter}
310{Enter} We choose the full name, ADDRESS1, CITY, STATE,
and BIRTH. Exit the Field Selection Mode,
choose Width and enter 10 for the maximum size
of browse field. What this means is the largest
field will only take up 10 characters on the
screen.
1 Now when we Execute Browse we can see more
fields. Even if the whole field does not appear
we can still update it.
41
Frank{Enter}
Frankensteinwiches
{Enter} Notice the way the field scrolls to allow you to
put in data. Look at the highlighted bar at the
bottom of the screen. To the right of the one
with Rec in it are two more columns. They are
blank except if you have insert on. Then the
second from the right has Ins in it.
{Ctrl U} Now look at the second column from the right in
the highlighted bar on the bottom. It should
have 'Del' in it. What we have done is mark
this record for deletion.
{Ctrl U}{Ctrl U} This keeps on turning deletion on and off. It
should now be on.
{Esc}31 We used {Esc} to get out of Browse and then came
right back in. Notice that the changes we made
to the first record did not take. This is a
common mistake. If you make changes to a record
and {Esc} out before you go to another record,
those changes will not be recorded.
{Page Down}
{Page Down}
{Down Arrow} If you go past the end of the file you will be
asked 'Add new records?(Y/N)' If you want you
can add new records in the Browse Mode
N{Esc}3 Just a quick explanation of the other options in
the Browse mode. Lock is the same Lock you got
when you used the menu within Browse. Follow
determines whether the cursor will follow a
record when you change part of the index
expression. Append determines whether you can
append to the database using browse. Modify
determines whether you can update during browse.
The Browse under Position is set to No modify.
7.46. REPLACE
-------
{Esc}4631 This time we choose Replace. Again as in many
commands you can specify different options. The
field list option has no effect on this command.
We clear out the old options and then set
records to All. The default if we don't do this
is the current record.
1 We Execute the command and it asks us to enter
42
the field to replace.
CITY{Enter} Let's move everyone. It now asks for the
expression to replace with. Read about
expressions in the Help Documentation. Simply
it means for here we have to enclose our
character strings in quotes.
'Trumbull'{Enter} And it asks for another field.
STATE{Enter}
"CT"{Enter} It doesn't matter which quote you use as long as
you use the same one on both ends.
BIRTH{Enter}
CTOD('04/22/44')
{Enter} We have to convert our character dates to dBASE
dates.
{Enter} Just {Enter} in response to the field request
gets the command to execute.
31{Page Up} Checking it out in the Browse mode. Every one
now lives in Trumbull CT and has a birthday of
4/22/44.
7.47. DELETE
------
{Esc}5311 Delete is used to mark records for deletion. It
does not actually delete the records from the
database. We have specified all records. If
you do not specify the default is only the
current record.
7.48. PACK
----
7 Pack is the command that removes all records
marked for deletion from the database. You will
be told how many records are marked and asked if
you want to display them.
Y{Enter} We get a display of the records to be deleted.
In this case it is all the records.
{any key}
N{Enter} We are asked if we really want to delete these
records. We change our minds and say no.
7.49. RECALL
------
43
61 Recall removes the delete mark from records.
Since we have already specified all it will be
done for the whole database. The default just
like for Delete is the current record.
7 Now when we do a pack we are told that there
were no records marked for deletion.
{any key}
7.50. STRUCTURE
---------
E8 Structure gives you a description of the current
database.
7.51. CHANGING DIRECTORIES
--------------------
{any key}
4\{Enter}39 Change directory will allow you to change to
another directory and make that the current
directory. The only one I'm sure you have is
'\' so I have gone there and done a full
directory.
{any key}{Esc}
4\3!!{Enter} And back to \3!!.
7.52. COPYING FILES
-------------
6 We choose copy. We get a full listing of all
the files in \311.
{Up Arrow}P Keep on pressing 'P' until PLACE.PIC is
highlighted.
{Enter}
PLACE1.PIC
{Enter} We name the new file PLACE1.PIC. We now have
two identical files. Rename works the same way
except you only end up with one file by the new
name. Erase deletes the file you choose.
Command mode is the same Command mode as in the
opening menu except you cannot execute dBASE
type programs from there. You can execute
programs that have been compiled with FoxBASE+.
Execute DOS is also the same as the one you
execute from the main menu. The difference is
you will have less memory to work with. If you
44
only have 512K you may not be able to use this
command.
7.53. SET
---
S Set allows you to set a number of different
options.
7 More gives you even more Set options. Read
about them in the Help Manual and in your dBASE
books.
7.54. MODIFYING PROGRAMS
------------------
{Esc}
M7 Modify Program asks you for the name of your
program.
MAIL{Enter} It will automatically add the extension '.PRG'
to the file name. It will also delete any file
by that name with the extension of '.FOX' or
'.III'. We are put in the file edit mode. This
edit mode follows the same rules that were used
in editing a memo field. Using {F1} you can
toggle a help screen at the top of the page on
and off. This help screen will tell you the
different editing keys you can use.
SET TALK OFF
{Ctrl W} This saves our work. {Ctrl {Page Up} would of
done the same thing. Modify a file works the
same way but it assumes a '.TXT' extension and
does not automatically delete any files.
Modify Database, Filter, and Label work the same
way that the corresponding Create commands did
except you start out with data.
7.55. MODIFY FORMAT
-------------
8MAIL{Enter} We are going to create a screen format to use
with the Edit and Append commands. To do this
we have to use some Dbase commands. The '@ <x
location>, <y location> SAY <character string>'
will print the character string at the x,y
location we specify. The '@ <x location>, <y
location> GET <field name>' will allow a place
on the screen for inputing information into the
database field. Type in the following just as I
have it.
45
@ 2,4 SAY 'ENTER FIRST NAME'
@ 2,25 GET FIRST_NAME
@ 4,4 SAY 'ENTER LAST NAME'
@ 4,25 GET LAST_NAME
{Ctrl W} This will save our format and bring us back to
the menu.
{Alt 1} This will bring up the first menu, the Name
menu. There is a chance that if you do not have
enough memory left that you will have a problem
with this.
6MAIL{Enter} We choose the MAIL format file.
{Esc} This returns us to the previous menu.
{Home}{Alt E} First we use the special key to get to the start
of the database. Then we use another special
key to invoke the Edit mode. Notice how we now
only have the two fields and they are on a
formatted screen.
{Esc}8{Enter} We go back into the Modify Format.
{Page Down}{End}
{End}{End} Move to the end of the listing and type in what
I have below.
@ 6,4 SAY 'ENTER ADDRESS 1'
@ 6,25 GET ADDRESS1
@ 8,4 SAY 'ENTER ADDRESS 2'
@ 8,25 GET 'ADDRESS2'
{Cntrl W}
{Alt E} If you have typed just what I put in you will
get the following error message:
ERROR IN COMMAND
Syntax error.
@ 8,25 GET 'ADDRESS2'
press any key to continue...
The problem in this case is that be have quotes
around the field name. I wanted you to see what
type of error message you would get if you made a
mistake in your coding.
46
{any key}
8{Enter} Go down and remove the quotes from around the
ADDRESS2 FIELD on the GET command line. then go
to the end of the listing and continue with what
I have below.
@ 10,4 SAY 'ENTER CITY/ST/ZIP'
@ 10,25 GET CITY
@ 10,48 GET STATE
@ 10,53 GET ZIP
@ 12,4 SAY 'ENTER PHONE'
@ 12,25 GET PHONE PICTURE '999-999-9999'
@ 14,4 SAY 'ENTER BIRTHDAY'
@ 14,25 GET BIRTH PICTURE '@D'
@ 16,4 SAY 'ENTER SALARY'
@ 16,25 GET SALARY VALID SALARY > 10000 .AND. SALARY < 100000
@ 18,4 SAY 'IS THIS A CUSTOMER'
@ 18,25 GET CUSTOMER
A number of comments. After GET PHONE we have
PICTURE '999-999-9999'. This means that on input
numbers will be expected and the '-' characters
will be put in automatically. After GET BIRTH we
have PICTURE '@D'. This will format the input
screen to accept a date. Lastly after GET SALARY
we have VALID SALARY > 10000 .AND. SALARY <
100000. The valid clause allows you to check
that input meets specified criteria.
There is much more to setting up format files but
I will leave this to a good book on dBASE.
{Ctrl W}
{Alt A} {Alt A} is another special character you can use
to execute the append command from anywhere in
the menu system. Go ahead and input some more
records. Try to put in some salaries below
10,000 or over 100000.
{Esc}
Well that is the end of our journey together. I say this over
and over in each document but one more time will not hurt.
Please write and tell us how we could make this tutorial better.
The experiences of someone who knew nothing or very little about
databases would be very helpful to us. Where did you get lost?
What was confusing? Which parts did you find good? Answers to
these questions can help us make a better product for you.
Thank you.
47
**********************************************************
*
* (c) COPYRIGHT 1987 I on I Computer Solutions, Inc.
* All Rights Reserved
*
**********************************************************
dBASE III and dBASE III PLUS are trademarks of Ashton-Tate.
FoxBASE+ is a trademark of Fox Software.
48