home *** CD-ROM | disk | FTP | other *** search
- u
- D A T A T O O L
-
-
- SEARCH FOR TEXT
-
- The search will be done in the
- worksheet including all data, text
- and settings, but not in any other
- item of the main menu. For example:
- you will be able to search for a BASIC
- text sequence stored somewhere in the
- worksheet, but not for a text sequence
- stored in the loading section, or
- somewhere else.
-
- The instruction for searching text is
- limited to 80 characters. Pass over
- will be ignored without error message.
- There is no particular search for
- numbers and ranges, but you can search
- for a number or a part of a number as
- well. Don't search for a certain
- layout, because the search looks at
- numbers the way they are shown in
- input-mode, without care about layout
- setting.
-
- No wildcard characters are available.
- You can only search for the (part)
- text you specify. Letter case is
- significant!
-
- When Search is on, you will move from
- one found subject to another using
- <CRSR left/right>. If you have chosen
- the Replace option, movement is the
- same, but in this case you may press
- <RETURN> in order to replace the text
- found by the text you set as
- replacement and to move on forward.
- If the replacement text is empty, the
- text found will be deleted.
-
- You always have the option to exit
- the search and to stay in the present
- cell by pressing the <BACK-ARROW> key.
-
-
- SORT DATA
-
- First, you have to choose between
- sorting from lower to higher value
- (ascend) or from higher to lower value
- (descend). Secondly, you choose the
- column that will be decisive, whether
- Number or Text type. Then you may
- start.
-
- The system will sort data-rows. If
- there are any other rows (e.g. BASIC,
- Res, Label, Pause) in between, the
- sorting process will not disturb this
- arrangement, but the data-rows will be
- sorted blockwise. Empty rows are
- sorted last, no matter which sort
- order is set. But if a row contains
- something, an empty decisive column
- will be counted as the very lowest
- value.
-
- If you want to sort more then one
- level (represented by several
- columns), you have to sort the lowest
- level first. The sorting routine will
- keep the rank as far as the decisive
- column holds an equivalent value.
-
- Be warned, that sorting a very large
- worksheet will take a good while. You
- can interrupt the process using the
- <STOP> key, without endangering the
- data.
-
-
- LOAD FILES
-
- An important restriction has to be
- told first: Datatool is unable to
- access tape, because memory locations
- for tape access are occupied by the
- system itself.
-
- There are two different ways of
- inputting data from disk. The first
- one is to Load a native "DT" file,
- which was stored as a Datatool file
- before. You just have to key in the
- filename. In case the filename
- consists of spaces at the start or at
- the end, the length of the filename
- can be fixed with quotation marks,
- otherwise overhanging spaces will be
- cut. (If you don't remember the
- filename exactly, press f8, view the
- directory and copy the filename using
- the buffers.) Then press <RETURN> at
- the Okay cell to load a worksheet,
- including all settings in all menu
- items. The system will check if the
- file is valid, and inform you if it
- isn't.
-
- You can also Import data from any
- source on disk. This option simply
- consists of three BASIC code
- sequences. They will be executed in
- order to open a file, to input row
- data, and to close the file. Similar
- to running the worksheet, the opening
- code is executed once, the import row
- code is executed in any data row or
- result row from 1 to 999, unless the
- I/O status changes because the end of
- the file is reached or an error
- occurs. Finally the code for closing
- the file is executed.
-
- Example: You want to import the
- directory of your game disks, in order
- to print the content nicely, to sort
- files by name, to build up a database,
- or anything of that kind.
-
- First, you prepare the worksheet. You
- designate a sequence number for disk
- and file in column A, assigned to
- variable n, numeric type, 6 characters
- width, 2 fixed decimal places. It will
- hold the disk number in the integer
- part, and the file number in the
- decimal places. Variable na$, which
- stores disk and filename, will be in
- column B. Variable bl containing the
- number of blocks goes in column C. And
- finally variable ty$ will show the
- file type in Column D.
-
- After the design of the worksheet is
- settled, you turn towards the code for
- inputting data from disk. This is
- written in the Import section of the
- Load menu.
-
- In the sequence for opening a file,
- you open a channel for reading the
- directory "$" from disk, and fetch the
- first two bytes of the loading address
- without using it.
-
- The main task for importing row data
- uses GOTO statements. Therefore you
- have to number the lines. The lines
- numbered from 2 to 8 concern the way
- already existing data in the worksheet
- are treated. If you want to collect
- more then one directory in the
- worksheet, you have to consider that
- the code for importing rows is called
- from row number 1 to the end of file.
- BASIC line 2 observes the present load
- of the worksheet and counts the
- highest stored disk or file number in
- variable h. If a row is empty,
- variable n will contain zero, and the
- process of inputting the directory can
- start. Otherwise the code sequence is
- aborted in line 4.
-
- Line 6 sets the new disk number to
- the highest number counted until now,
- plus 1 for the new disk. The lines of
- the directory, respectively the file
- numbers on one single disk, are
- counted in variable f, added in the
- two decimal places behind the point of
- variable n. At the first line of the
- directory, containing the disk name, f
- will be zero. The following directory
- entrys will be counted up in BASIC
- line 8.
-
- BASIC lines 10 to 90 are based on the
- program example in the 1541 users
- guide. Line 10 passes two bytes, line
- 20 fetches two bytes containing file
- length. Line 40 builds a numeric value
- using the ASC function with a CHR$(0)
- in variable c$ to prevent an error.
- Line 50 checks if the end of the
- directory is reached. If yes, the
- disk-/file counter is cleared to the
- pure disk number, the string "blocks
- free" is added, and the sequence is
- ended. (You don't have to bother about
- the latter because the changed I/O
- status will stop the repetition of the
- code automatically.) Line 60 waits for
- the opening quotation mark, line 70
- collects the filename into variable
- na$ until the closing quotation mark
- appears. Line 80 passes spaces, line
- 90 collects the file type in variable
- ty$.
-
- This code sequence will be repeated
- while reading entry by entry from the
- directory, and each entry is passed on
- to the worksheet in the form of the
- variables n, na$, bl and ty$, stored
- to a new row each time. If the I/O
- status changes, because the entire
- directory is read, the BASIC-cell for
- closing the file is called. Well, this
- one is easy -- just close the open
- file.
-
- [NOTE]: This example is the Run It for
- this file. This time, after
- the data and program load
- (automatically), Press <F5>,
- scroll down to the bottom [OK], and
- press <RETURN>. (On the 1581 LOADSTAR
- disk, you may have some strange
- results because of the number of files
- in the directory.)
-
-
- After importing a few directories,
- you are free now to process the data
- in any way you like. (Hopefully your
- game disks are not too much, because
- at about roughly 50 disks the memory
- will be filled.)
-
- This example was quite elaborating,
- but it gives an idea of the
- versatility of the input option. You
- can import data from a wordprocessor,
- for example, or you can set up
- temporary files for exchanging data
- between worksheets, using the export
- option described next.
-
- Please keep in mind that importing
- data, unlike loading a native file,
- will not change any existing data in
- the worksheet, until the variable
- assigned to a specific column is
- changed by your import row code. You
- can add data to an existing worksheet
- by inputing from disk any time, but
- you have to be careful concerning the
- handling of variables assigned to
- columns.
-
- FK
-
-
-