All right. I’m probably the last QL user to work with the ARCHIVE/QLDB data base program. The “problem” with ARCHIVE is that the HELP files really don’t “help” you with the program’s syntax. Until you know, you don’t know. And, you really can’t “fake it” the way you can with the other three Psion business programs. ARCHIVE’s syntax is very specific.
CREATE, END CREATE. Are we playing God with the Universe? If you’ve gotten far enough to see the blank, central window (i.e., the “void”) with a red DOS-like prompt in a lower COMMAND WINDOW, you already know that you can’t just begin typing in any of the “words” seen in the PROMPTs window at the top of the screen at the COMMAND LINE. You have to know exactly what-and-how you want to define ALL the FIELDs before you start to work, otherwise you’re only going to have trouble later on when the time comes to fill in your RECORDs. Perfection counts.
The following, alternate method for setting up an ARCHIVE data base should give all novices a better (i.e., EASIER) idea of what is going on. Those who consider themselves to be “power users” may wish to take note as they may not be aware of know this flexible method for CREATing a data base’s structure.
First, forget everything you’ve heard about a data base being like a set of file cards. You just cannot scribble-and-erase here, there, or anywhere. We may be better prepared if we think of a data base’s format as being akin to a governmental form (i.e., “Rigid”).
Unlike a word processor where you can twiddle-and-tweak with ideas for paragraphs, all the FIELDs of a data base must be pre-DEFined before you begin putting in any of the RECORDs.
Power users too familiar with setting up their data bases are probably saying: “Big deal!” But, a computer is supposed to make things easier. Why should one first need to consolidate (m)any randomly jotted notes onto a single sheet of paper prior to beginning to ensure that everything that must be included is? It would be better if any data base could be constructed on-the-fly.
Now, consider your data base as being a matrix. Uh oh! You may recall that calculus was a prerequisite for the course on matrices. Don’t worry. We’ve all seen examples of matrices since we were in grade school. The “multiplication table” and the “mileage between cities” chart(s) are common examples of matrices. In a meaningful matrix, the data in the middle of the grid can be correlated to the labels of the ‘X’ or ‘Y’ axis. For the data base, the ‘X axis’ represents the FIELDs, and the ‘Y axis’ represents the RECORDs.
Because of the structure of the Psion programs, you can first set up your data base in ABACUS by constructing a valid matrix and then IMPORTing it into ARCHIVE. For some of you, a light should have gone on in your head. For the rest, read on.
Just LOAD the ABACUS/QLSS spread sheet program into your QL and start typing in the label names for items you think you may want to track in your data base. Use the following example as a model, beginning in CELL ‘A1’.
A ! B ! C ! D ! 1 Star RtAccnsn declintn magnitude 2 Achernar 1h 35m S 57 35 1 3 Acrux 12h 22m S 62 42 1 4 Agena
All the CELLs are “text” with the exception of ‘D2’ & ‘D3’ which are “numerical” values.
While you can change the names in the columns after you’ve input all the FIELD label names, some foresight helps (corrections can be made by adding columns and inserting the forgotten, or misplaced, label in the correct column). The better organized you are, the quicker the entire process will be.
Depending on the RECORDs, you may wish to do the bulk of input from the matrix. This is especially applicable if you are still using microdrives for storage as this will circumvent repeated media access during initial data INPUT.
After setting up the matrix’s framework, you may decide that you would rather sub-divide “declination” into two parts:
A ! B ! C ! D ! E ! 1 Star RtAccnsn dclH dclD magnitude 2 Achernar 1h 35m S 57 35 1 3 Acrux 12h 22m S 62 42 1 4 Agena 13h 58m S 60 2 1 5 Aldebaran 4h 31m N 16 22 1 6 Altair 19h 47m N 8 40 1 7 Antares 16h 25m S 26 16 1 8 Arcturus 14h 12m N 19 32 0 9 Betelgeuse 5h 51m N 7 23 1 10 Canopus 6h 22m S 52 39 -1 11 Capella 5h 11m N 45 55 1 12 Deneb 20h 39m N 45 1 1 13 Fomalhaut 22h 53m S 29 59 1 14 Pollux 7h 30m N 32 2 1 15 Procyon 7h 37m N 5 20 0 16 Regulus 10h 4m N 12 18 1 17 Rigel 5h 11m S 8 16 0 18 Sirius 6h 42m S 16 37 -1.6 19 Spica 13h 21m S 10 47 1 20 Vega 18h 34m N 38 43 0
This was done by using:
<F3> (g)rid
(i)nsert
(c)olumn, at C
to insert a ‘column C’. The labels, as well as data, in columns ‘C’ & ‘D’ are then amended to suit your current specifications.
All right. You’ve gotten this much done. Now what? Simply follow the standard EXPORT sequence:
<F3> (F)iles
(E)xport
<ENTER> (for data)
range (<ENTER> for default)
(c)olumns
to ___ (e.g., 'STARdata').
Note: the default ‘_exp’ extension is automatically added to the EXPORTed file by the ABACUS program.
So, now that you’ve created an IMPORT/EXPORT file you’ll want to switch to ARCHIVE. But, before you QUIT ABACUS, SAVE the file as an ‘_aba’ file. Go through the SAVE sequence and call the file ‘STARdata(_aba)’.
Now, QUIT the ABACUS program and LOAD ARCHIVE. Then type:
Import "flp2_STARdata_exp" to "STARdata"
<ENTER>
The QL will CREATE the file on your default medium. When the cursor returns, type:
display <ENTER>
and [ta-DAH!], you should see your newly created data base file (see below):
Logical name : main Star$ : Achernar RtAccnsn$ : 1 h 35 m. dclH$ : S dclD$ : 57 35 magnitude : 1
Now type: next <ENTER>
and, you should see the second record (i.e., “Acrux”). If you type:
last <ENTER>
You should see the last record which you typed in (in this example: “Vega”). Now, if you type:
DIR "mdv2_" <ENTER>
you will get a DIRectory of your data disk. You should see files named:
'STARdata_exp' 'STARdata_aba' 'STARdata_dbf'
If you ever need to add more FIELDs to your data base (eg., “comment1$”), either go back to the original ‘nnnn_aba’, or EXPORT the current ‘nnnn_dbf’ to ‘nnnn_imp’ (where ‘nnnn_ext’ is the name of the appropriate file).
From here on, using ARCHIVE is pretty straight forward. To add new data, type “alter” to enter the correct mode for ‘ALTERing’ (amending) the RECORDs in the data base.
Remember to CLOSE the RECORD file before turning off your QL (ARCHIVE automatically CLOSEs the current file when you QUIT the program).
HAPPY TRAILS, AND COMPUTING, TO YOU. . .