Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_28.ADF » F/+HINT14

F/+HINT14

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn ADFS disks » Electron_User_Group » EUG_28.ADF
Filename: F/+HINT14
Read OK:
File size: 15FC bytes
Load address: 48204556
Exec address: 31544E49
File contents
Nearly all the calls to alter an index file are made through one routine,
with a reason code: ISAM.

ISAM uses some workspace in the language workspace area.  If you're not
using the index system, the utility can use this workspace for its own
purposes.     

ADJVAL          Routine to adjust values of different key types.
CCRTIX          Create an index file.  
GETIXN          Return index name for a given field number. 
IDXSCH          Search for an index, given a field name. 
ISAM            General entry point to ISAM package.



ADJVAL

This routine is called before sending a key to ISAM for an operation.  It
adjusts the value of number and date fields into "index format", ready for
ISAM.

If you give it a date value to adjust, it will check the validity of the
date as it is processing the value.  An error code is returned if a problem
is found with the date; in this case the value left in the buffer will be
legal, but will be an incorrect conversion from the date that you supplied.

On entry:       X               has field number of field being adjusted.
                LINBUF          has field value to be adjusted, delimited
                                with an end of field marker.

On exit:        LINBUF          contains adjusted field value.
                CS              error was found in date value.


CRTIX

CRTIX is used to create a new index file.  You must supply the name of the
file, and the number of bytes of disk space that you wish to reserve for the
file.  If a file with the name that you have exists already, it will be
overwritten.

The maximum amount of space that you can reserve is 65535 bytes.

On entry:       FBLOCK          has filename of file that you wish to create,
                                with PREFIX already inserted.
                A               contains keysize of file.
                X               contains low byte of number of bytes to 
                                reserve.
                Y               contains high byte of number of bytes to
                                reserve.

On exit:        VC              file created OK.
                VS              error occurred; error code in A.


GETIXN

GETIXN extracts the name of the index for a particular field from the format
file, and places it in FBLOCK, with the index prefix automatically inserted.

On entry:       X               contains the field number of the field for
                                which you require the index name.

On exit:        CC              no error; name is in FBLOCK with prefix.
                CS              error occurred; error code is in A.


IDXSCH

Given a field name specification (which may include the wildcards "?" and
"*"), IDXSCH looks for a field with this name, and checks whether this field
has an index switched on.

On entry:       LWORK           contains field name to search for, which may
                                contain wildcards.
                A               contains field number of field to start
                                searching from.

On exit:        CC              field found OK; X contains number of field
                                found.
                CS              no field found; error code in A.


ISAM

ISAM is the routine that you call to perform operations on an index file. 
The reason code of the operation you wish to perform is loaded into A.  A
summary of reason code values is given at the end in table 4.

All calls to ISAM update the Carry and Overflow flags.  The carry flag
indicates whether an "internal" error occurred - such as "No key found". 
The Overflow flag indicates when a filing system error occurred - such as
"Disk fault".  A list of internal ISAM errors is given in table 5.  Note
that you can't call the error reporting routine REPERL with an internal ISAM
error code; the internal code is only for checking within a program.

Key values are passed to ISAM in LINBUFl 4 byte pointer values are passed in
REG1.  ISAM can handle a maximum of nine indexes open at one time.  The
maximum size of a key is 105 bytes.

Indexed sequential files have the two features that you can locate a
particular key by giving its value, and that you can also read up and down
the index in key order.  ISAM works by having a "position".  Certain calls
set the file "position", some move the position up and down, and some calls
destroy the position altogether.  The "Search" call sets the file position;
the "Next" and "Previous" calls move the position, and the "Insert" and
"Delete" calls destroy the position.

If you execute a "Next", or a "Previous" call on an index file with no
position, the index is said to be set at the beginning.

The A, X and Y registers are all undefined after a call to ISAM.

Reason code     Effect

A=ISMFLO        Tell ISAM that file is open.

                Before you make this call, you should have opened the file
                with the filing system.  This call just informs ISAM that
                you have opened the file, and tells it to reverse some
                workspace for the file.

                On entry:       Y       contains handle of already opened
                                        file, as returned by the filing
                                        system.
                On exit:                The file position is reset.
                                VS      file already open; internal error
                                        code in A.
                                CS      internal error occurred; internal
                                        error code in A.

00000000  4e 65 61 72 6c 79 20 61  6c 6c 20 74 68 65 20 63  |Nearly all the c|
00000010  61 6c 6c 73 20 74 6f 20  61 6c 74 65 72 20 61 6e  |alls to alter an|
00000020  20 69 6e 64 65 78 20 66  69 6c 65 20 61 72 65 20  | index file are |
00000030  6d 61 64 65 20 74 68 72  6f 75 67 68 20 6f 6e 65  |made through one|
00000040  20 72 6f 75 74 69 6e 65  2c 0d 77 69 74 68 20 61  | routine,.with a|
00000050  20 72 65 61 73 6f 6e 20  63 6f 64 65 3a 20 49 53  | reason code: IS|
00000060  41 4d 2e 0d 0d 49 53 41  4d 20 75 73 65 73 20 73  |AM...ISAM uses s|
00000070  6f 6d 65 20 77 6f 72 6b  73 70 61 63 65 20 69 6e  |ome workspace in|
00000080  20 74 68 65 20 6c 61 6e  67 75 61 67 65 20 77 6f  | the language wo|
00000090  72 6b 73 70 61 63 65 20  61 72 65 61 2e 20 20 49  |rkspace area.  I|
000000a0  66 20 79 6f 75 27 72 65  20 6e 6f 74 0d 75 73 69  |f you're not.usi|
000000b0  6e 67 20 74 68 65 20 69  6e 64 65 78 20 73 79 73  |ng the index sys|
000000c0  74 65 6d 2c 20 74 68 65  20 75 74 69 6c 69 74 79  |tem, the utility|
000000d0  20 63 61 6e 20 75 73 65  20 74 68 69 73 20 77 6f  | can use this wo|
000000e0  72 6b 73 70 61 63 65 20  66 6f 72 20 69 74 73 20  |rkspace for its |
000000f0  6f 77 6e 0d 70 75 72 70  6f 73 65 73 2e 20 20 20  |own.purposes.   |
00000100  20 20 0d 0d 41 44 4a 56  41 4c 20 20 20 20 20 20  |  ..ADJVAL      |
00000110  20 20 20 20 52 6f 75 74  69 6e 65 20 74 6f 20 61  |    Routine to a|
00000120  64 6a 75 73 74 20 76 61  6c 75 65 73 20 6f 66 20  |djust values of |
00000130  64 69 66 66 65 72 65 6e  74 20 6b 65 79 20 74 79  |different key ty|
00000140  70 65 73 2e 0d 43 43 52  54 49 58 20 20 20 20 20  |pes..CCRTIX     |
00000150  20 20 20 20 20 43 72 65  61 74 65 20 61 6e 20 69  |     Create an i|
00000160  6e 64 65 78 20 66 69 6c  65 2e 20 20 0d 47 45 54  |ndex file.  .GET|
00000170  49 58 4e 20 20 20 20 20  20 20 20 20 20 52 65 74  |IXN          Ret|
00000180  75 72 6e 20 69 6e 64 65  78 20 6e 61 6d 65 20 66  |urn index name f|
00000190  6f 72 20 61 20 67 69 76  65 6e 20 66 69 65 6c 64  |or a given field|
000001a0  20 6e 75 6d 62 65 72 2e  20 0d 49 44 58 53 43 48  | number. .IDXSCH|
000001b0  20 20 20 20 20 20 20 20  20 20 53 65 61 72 63 68  |          Search|
000001c0  20 66 6f 72 20 61 6e 20  69 6e 64 65 78 2c 20 67  | for an index, g|
000001d0  69 76 65 6e 20 61 20 66  69 65 6c 64 20 6e 61 6d  |iven a field nam|
000001e0  65 2e 20 0d 49 53 41 4d  20 20 20 20 20 20 20 20  |e. .ISAM        |
000001f0  20 20 20 20 47 65 6e 65  72 61 6c 20 65 6e 74 72  |    General entr|
00000200  79 20 70 6f 69 6e 74 20  74 6f 20 49 53 41 4d 20  |y point to ISAM |
00000210  70 61 63 6b 61 67 65 2e  0d 0d 0d 0d 41 44 4a 56  |package.....ADJV|
00000220  41 4c 0d 0d 54 68 69 73  20 72 6f 75 74 69 6e 65  |AL..This routine|
00000230  20 69 73 20 63 61 6c 6c  65 64 20 62 65 66 6f 72  | is called befor|
00000240  65 20 73 65 6e 64 69 6e  67 20 61 20 6b 65 79 20  |e sending a key |
00000250  74 6f 20 49 53 41 4d 20  66 6f 72 20 61 6e 20 6f  |to ISAM for an o|
00000260  70 65 72 61 74 69 6f 6e  2e 20 20 49 74 0d 61 64  |peration.  It.ad|
00000270  6a 75 73 74 73 20 74 68  65 20 76 61 6c 75 65 20  |justs the value |
00000280  6f 66 20 6e 75 6d 62 65  72 20 61 6e 64 20 64 61  |of number and da|
00000290  74 65 20 66 69 65 6c 64  73 20 69 6e 74 6f 20 22  |te fields into "|
000002a0  69 6e 64 65 78 20 66 6f  72 6d 61 74 22 2c 20 72  |index format", r|
000002b0  65 61 64 79 20 66 6f 72  0d 49 53 41 4d 2e 0d 0d  |eady for.ISAM...|
000002c0  49 66 20 79 6f 75 20 67  69 76 65 20 69 74 20 61  |If you give it a|
000002d0  20 64 61 74 65 20 76 61  6c 75 65 20 74 6f 20 61  | date value to a|
000002e0  64 6a 75 73 74 2c 20 69  74 20 77 69 6c 6c 20 63  |djust, it will c|
000002f0  68 65 63 6b 20 74 68 65  20 76 61 6c 69 64 69 74  |heck the validit|
00000300  79 20 6f 66 20 74 68 65  0d 64 61 74 65 20 61 73  |y of the.date as|
00000310  20 69 74 20 69 73 20 70  72 6f 63 65 73 73 69 6e  | it is processin|
00000320  67 20 74 68 65 20 76 61  6c 75 65 2e 20 20 41 6e  |g the value.  An|
00000330  20 65 72 72 6f 72 20 63  6f 64 65 20 69 73 20 72  | error code is r|
00000340  65 74 75 72 6e 65 64 20  69 66 20 61 20 70 72 6f  |eturned if a pro|
00000350  62 6c 65 6d 0d 69 73 20  66 6f 75 6e 64 20 77 69  |blem.is found wi|
00000360  74 68 20 74 68 65 20 64  61 74 65 3b 20 69 6e 20  |th the date; in |
00000370  74 68 69 73 20 63 61 73  65 20 74 68 65 20 76 61  |this case the va|
00000380  6c 75 65 20 6c 65 66 74  20 69 6e 20 74 68 65 20  |lue left in the |
00000390  62 75 66 66 65 72 20 77  69 6c 6c 20 62 65 0d 6c  |buffer will be.l|
000003a0  65 67 61 6c 2c 20 62 75  74 20 77 69 6c 6c 20 62  |egal, but will b|
000003b0  65 20 61 6e 20 69 6e 63  6f 72 72 65 63 74 20 63  |e an incorrect c|
000003c0  6f 6e 76 65 72 73 69 6f  6e 20 66 72 6f 6d 20 74  |onversion from t|
000003d0  68 65 20 64 61 74 65 20  74 68 61 74 20 79 6f 75  |he date that you|
000003e0  20 73 75 70 70 6c 69 65  64 2e 0d 0d 4f 6e 20 65  | supplied...On e|
000003f0  6e 74 72 79 3a 20 20 20  20 20 20 20 58 20 20 20  |ntry:       X   |
00000400  20 20 20 20 20 20 20 20  20 20 20 20 68 61 73 20  |            has |
00000410  66 69 65 6c 64 20 6e 75  6d 62 65 72 20 6f 66 20  |field number of |
00000420  66 69 65 6c 64 20 62 65  69 6e 67 20 61 64 6a 75  |field being adju|
00000430  73 74 65 64 2e 0d 20 20  20 20 20 20 20 20 20 20  |sted..          |
00000440  20 20 20 20 20 20 4c 49  4e 42 55 46 20 20 20 20  |      LINBUF    |
00000450  20 20 20 20 20 20 68 61  73 20 66 69 65 6c 64 20  |      has field |
00000460  76 61 6c 75 65 20 74 6f  20 62 65 20 61 64 6a 75  |value to be adju|
00000470  73 74 65 64 2c 20 64 65  6c 69 6d 69 74 65 64 0d  |sted, delimited.|
00000480  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
000004a0  77 69 74 68 20 61 6e 20  65 6e 64 20 6f 66 20 66  |with an end of f|
000004b0  69 65 6c 64 20 6d 61 72  6b 65 72 2e 0d 0d 4f 6e  |ield marker...On|
000004c0  20 65 78 69 74 3a 20 20  20 20 20 20 20 20 4c 49  | exit:        LI|
000004d0  4e 42 55 46 20 20 20 20  20 20 20 20 20 20 63 6f  |NBUF          co|
000004e0  6e 74 61 69 6e 73 20 61  64 6a 75 73 74 65 64 20  |ntains adjusted |
000004f0  66 69 65 6c 64 20 76 61  6c 75 65 2e 0d 20 20 20  |field value..   |
00000500  20 20 20 20 20 20 20 20  20 20 20 20 20 43 53 20  |             CS |
00000510  20 20 20 20 20 20 20 20  20 20 20 20 20 65 72 72  |             err|
00000520  6f 72 20 77 61 73 20 66  6f 75 6e 64 20 69 6e 20  |or was found in |
00000530  64 61 74 65 20 76 61 6c  75 65 2e 0d 0d 0d 43 52  |date value....CR|
00000540  54 49 58 0d 0d 43 52 54  49 58 20 69 73 20 75 73  |TIX..CRTIX is us|
00000550  65 64 20 74 6f 20 63 72  65 61 74 65 20 61 20 6e  |ed to create a n|
00000560  65 77 20 69 6e 64 65 78  20 66 69 6c 65 2e 20 20  |ew index file.  |
00000570  59 6f 75 20 6d 75 73 74  20 73 75 70 70 6c 79 20  |You must supply |
00000580  74 68 65 20 6e 61 6d 65  20 6f 66 20 74 68 65 0d  |the name of the.|
00000590  66 69 6c 65 2c 20 61 6e  64 20 74 68 65 20 6e 75  |file, and the nu|
000005a0  6d 62 65 72 20 6f 66 20  62 79 74 65 73 20 6f 66  |mber of bytes of|
000005b0  20 64 69 73 6b 20 73 70  61 63 65 20 74 68 61 74  | disk space that|
000005c0  20 79 6f 75 20 77 69 73  68 20 74 6f 20 72 65 73  | you wish to res|
000005d0  65 72 76 65 20 66 6f 72  20 74 68 65 0d 66 69 6c  |erve for the.fil|
000005e0  65 2e 20 20 49 66 20 61  20 66 69 6c 65 20 77 69  |e.  If a file wi|
000005f0  74 68 20 74 68 65 20 6e  61 6d 65 20 74 68 61 74  |th the name that|
00000600  20 79 6f 75 20 68 61 76  65 20 65 78 69 73 74 73  | you have exists|
00000610  20 61 6c 72 65 61 64 79  2c 20 69 74 20 77 69 6c  | already, it wil|
00000620  6c 20 62 65 0d 6f 76 65  72 77 72 69 74 74 65 6e  |l be.overwritten|
00000630  2e 0d 0d 54 68 65 20 6d  61 78 69 6d 75 6d 20 61  |...The maximum a|
00000640  6d 6f 75 6e 74 20 6f 66  20 73 70 61 63 65 20 74  |mount of space t|
00000650  68 61 74 20 79 6f 75 20  63 61 6e 20 72 65 73 65  |hat you can rese|
00000660  72 76 65 20 69 73 20 36  35 35 33 35 20 62 79 74  |rve is 65535 byt|
00000670  65 73 2e 0d 0d 4f 6e 20  65 6e 74 72 79 3a 20 20  |es...On entry:  |
00000680  20 20 20 20 20 46 42 4c  4f 43 4b 20 20 20 20 20  |     FBLOCK     |
00000690  20 20 20 20 20 68 61 73  20 66 69 6c 65 6e 61 6d  |     has filenam|
000006a0  65 20 6f 66 20 66 69 6c  65 20 74 68 61 74 20 79  |e of file that y|
000006b0  6f 75 20 77 69 73 68 20  74 6f 20 63 72 65 61 74  |ou wish to creat|
000006c0  65 2c 0d 20 20 20 20 20  20 20 20 20 20 20 20 20  |e,.             |
000006d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000006e0  20 20 20 77 69 74 68 20  50 52 45 46 49 58 20 61  |   with PREFIX a|
000006f0  6c 72 65 61 64 79 20 69  6e 73 65 72 74 65 64 2e  |lready inserted.|
00000700  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00000710  20 41 20 20 20 20 20 20  20 20 20 20 20 20 20 20  | A              |
00000720  20 63 6f 6e 74 61 69 6e  73 20 6b 65 79 73 69 7a  | contains keysiz|
00000730  65 20 6f 66 20 66 69 6c  65 2e 0d 20 20 20 20 20  |e of file..     |
00000740  20 20 20 20 20 20 20 20  20 20 20 58 20 20 20 20  |           X    |
00000750  20 20 20 20 20 20 20 20  20 20 20 63 6f 6e 74 61  |           conta|
00000760  69 6e 73 20 6c 6f 77 20  62 79 74 65 20 6f 66 20  |ins low byte of |
00000770  6e 75 6d 62 65 72 20 6f  66 20 62 79 74 65 73 20  |number of bytes |
00000780  74 6f 20 0d 20 20 20 20  20 20 20 20 20 20 20 20  |to .            |
00000790  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000007a0  20 20 20 20 72 65 73 65  72 76 65 2e 0d 20 20 20  |    reserve..   |
000007b0  20 20 20 20 20 20 20 20  20 20 20 20 20 59 20 20  |             Y  |
000007c0  20 20 20 20 20 20 20 20  20 20 20 20 20 63 6f 6e  |             con|
000007d0  74 61 69 6e 73 20 68 69  67 68 20 62 79 74 65 20  |tains high byte |
000007e0  6f 66 20 6e 75 6d 62 65  72 20 6f 66 20 62 79 74  |of number of byt|
000007f0  65 73 20 74 6f 0d 20 20  20 20 20 20 20 20 20 20  |es to.          |
00000800  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000810  20 20 20 20 20 20 72 65  73 65 72 76 65 2e 0d 0d  |      reserve...|
00000820  4f 6e 20 65 78 69 74 3a  20 20 20 20 20 20 20 20  |On exit:        |
00000830  56 43 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |VC              |
00000840  66 69 6c 65 20 63 72 65  61 74 65 64 20 4f 4b 2e  |file created OK.|
00000850  0d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |.               |
00000860  20 56 53 20 20 20 20 20  20 20 20 20 20 20 20 20  | VS             |
00000870  20 65 72 72 6f 72 20 6f  63 63 75 72 72 65 64 3b  | error occurred;|
00000880  20 65 72 72 6f 72 20 63  6f 64 65 20 69 6e 20 41  | error code in A|
00000890  2e 0d 0d 0d 47 45 54 49  58 4e 0d 0d 47 45 54 49  |....GETIXN..GETI|
000008a0  58 4e 20 65 78 74 72 61  63 74 73 20 74 68 65 20  |XN extracts the |
000008b0  6e 61 6d 65 20 6f 66 20  74 68 65 20 69 6e 64 65  |name of the inde|
000008c0  78 20 66 6f 72 20 61 20  70 61 72 74 69 63 75 6c  |x for a particul|
000008d0  61 72 20 66 69 65 6c 64  20 66 72 6f 6d 20 74 68  |ar field from th|
000008e0  65 20 66 6f 72 6d 61 74  0d 66 69 6c 65 2c 20 61  |e format.file, a|
000008f0  6e 64 20 70 6c 61 63 65  73 20 69 74 20 69 6e 20  |nd places it in |
00000900  46 42 4c 4f 43 4b 2c 20  77 69 74 68 20 74 68 65  |FBLOCK, with the|
00000910  20 69 6e 64 65 78 20 70  72 65 66 69 78 20 61 75  | index prefix au|
00000920  74 6f 6d 61 74 69 63 61  6c 6c 79 20 69 6e 73 65  |tomatically inse|
00000930  72 74 65 64 2e 0d 0d 4f  6e 20 65 6e 74 72 79 3a  |rted...On entry:|
00000940  20 20 20 20 20 20 20 58  20 20 20 20 20 20 20 20  |       X        |
00000950  20 20 20 20 20 20 20 63  6f 6e 74 61 69 6e 73 20  |       contains |
00000960  74 68 65 20 66 69 65 6c  64 20 6e 75 6d 62 65 72  |the field number|
00000970  20 6f 66 20 74 68 65 20  66 69 65 6c 64 20 66 6f  | of the field fo|
00000980  72 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |r.              |
00000990  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000009a0  20 20 77 68 69 63 68 20  79 6f 75 20 72 65 71 75  |  which you requ|
000009b0  69 72 65 20 74 68 65 20  69 6e 64 65 78 20 6e 61  |ire the index na|
000009c0  6d 65 2e 0d 0d 4f 6e 20  65 78 69 74 3a 20 20 20  |me...On exit:   |
000009d0  20 20 20 20 20 43 43 20  20 20 20 20 20 20 20 20  |     CC         |
000009e0  20 20 20 20 20 6e 6f 20  65 72 72 6f 72 3b 20 6e  |     no error; n|
000009f0  61 6d 65 20 69 73 20 69  6e 20 46 42 4c 4f 43 4b  |ame is in FBLOCK|
00000a00  20 77 69 74 68 20 70 72  65 66 69 78 2e 0d 20 20  | with prefix..  |
00000a10  20 20 20 20 20 20 20 20  20 20 20 20 20 20 43 53  |              CS|
00000a20  20 20 20 20 20 20 20 20  20 20 20 20 20 20 65 72  |              er|
00000a30  72 6f 72 20 6f 63 63 75  72 72 65 64 3b 20 65 72  |ror occurred; er|
00000a40  72 6f 72 20 63 6f 64 65  20 69 73 20 69 6e 20 41  |ror code is in A|
00000a50  2e 0d 0d 0d 49 44 58 53  43 48 0d 0d 47 69 76 65  |....IDXSCH..Give|
00000a60  6e 20 61 20 66 69 65 6c  64 20 6e 61 6d 65 20 73  |n a field name s|
00000a70  70 65 63 69 66 69 63 61  74 69 6f 6e 20 28 77 68  |pecification (wh|
00000a80  69 63 68 20 6d 61 79 20  69 6e 63 6c 75 64 65 20  |ich may include |
00000a90  74 68 65 20 77 69 6c 64  63 61 72 64 73 20 22 3f  |the wildcards "?|
00000aa0  22 20 61 6e 64 0d 22 2a  22 29 2c 20 49 44 58 53  |" and."*"), IDXS|
00000ab0  43 48 20 6c 6f 6f 6b 73  20 66 6f 72 20 61 20 66  |CH looks for a f|
00000ac0  69 65 6c 64 20 77 69 74  68 20 74 68 69 73 20 6e  |ield with this n|
00000ad0  61 6d 65 2c 20 61 6e 64  20 63 68 65 63 6b 73 20  |ame, and checks |
00000ae0  77 68 65 74 68 65 72 20  74 68 69 73 20 66 69 65  |whether this fie|
00000af0  6c 64 0d 68 61 73 20 61  6e 20 69 6e 64 65 78 20  |ld.has an index |
00000b00  73 77 69 74 63 68 65 64  20 6f 6e 2e 0d 0d 4f 6e  |switched on...On|
00000b10  20 65 6e 74 72 79 3a 20  20 20 20 20 20 20 4c 57  | entry:       LW|
00000b20  4f 52 4b 20 20 20 20 20  20 20 20 20 20 20 63 6f  |ORK           co|
00000b30  6e 74 61 69 6e 73 20 66  69 65 6c 64 20 6e 61 6d  |ntains field nam|
00000b40  65 20 74 6f 20 73 65 61  72 63 68 20 66 6f 72 2c  |e to search for,|
00000b50  20 77 68 69 63 68 20 6d  61 79 0d 20 20 20 20 20  | which may.     |
00000b60  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000b70  20 20 20 20 20 20 20 20  20 20 20 63 6f 6e 74 61  |           conta|
00000b80  69 6e 20 77 69 6c 64 63  61 72 64 73 2e 0d 20 20  |in wildcards..  |
00000b90  20 20 20 20 20 20 20 20  20 20 20 20 20 20 41 20  |              A |
00000ba0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 63 6f  |              co|
00000bb0  6e 74 61 69 6e 73 20 66  69 65 6c 64 20 6e 75 6d  |ntains field num|
00000bc0  62 65 72 20 6f 66 20 66  69 65 6c 64 20 74 6f 20  |ber of field to |
00000bd0  73 74 61 72 74 0d 20 20  20 20 20 20 20 20 20 20  |start.          |
00000be0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000bf0  20 20 20 20 20 20 73 65  61 72 63 68 69 6e 67 20  |      searching |
00000c00  66 72 6f 6d 2e 0d 0d 4f  6e 20 65 78 69 74 3a 20  |from...On exit: |
00000c10  20 20 20 20 20 20 20 43  43 20 20 20 20 20 20 20  |       CC       |
00000c20  20 20 20 20 20 20 20 66  69 65 6c 64 20 66 6f 75  |       field fou|
00000c30  6e 64 20 4f 4b 3b 20 58  20 63 6f 6e 74 61 69 6e  |nd OK; X contain|
00000c40  73 20 6e 75 6d 62 65 72  20 6f 66 20 66 69 65 6c  |s number of fiel|
00000c50  64 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |d.              |
00000c60  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000c70  20 20 66 6f 75 6e 64 2e  0d 20 20 20 20 20 20 20  |  found..       |
00000c80  20 20 20 20 20 20 20 20  20 43 53 20 20 20 20 20  |         CS     |
00000c90  20 20 20 20 20 20 20 20  20 6e 6f 20 66 69 65 6c  |         no fiel|
00000ca0  64 20 66 6f 75 6e 64 3b  20 65 72 72 6f 72 20 63  |d found; error c|
00000cb0  6f 64 65 20 69 6e 20 41  2e 0d 0d 0d 49 53 41 4d  |ode in A....ISAM|
00000cc0  0d 0d 49 53 41 4d 20 69  73 20 74 68 65 20 72 6f  |..ISAM is the ro|
00000cd0  75 74 69 6e 65 20 74 68  61 74 20 79 6f 75 20 63  |utine that you c|
00000ce0  61 6c 6c 20 74 6f 20 70  65 72 66 6f 72 6d 20 6f  |all to perform o|
00000cf0  70 65 72 61 74 69 6f 6e  73 20 6f 6e 20 61 6e 20  |perations on an |
00000d00  69 6e 64 65 78 20 66 69  6c 65 2e 20 0d 54 68 65  |index file. .The|
00000d10  20 72 65 61 73 6f 6e 20  63 6f 64 65 20 6f 66 20  | reason code of |
00000d20  74 68 65 20 6f 70 65 72  61 74 69 6f 6e 20 79 6f  |the operation yo|
00000d30  75 20 77 69 73 68 20 74  6f 20 70 65 72 66 6f 72  |u wish to perfor|
00000d40  6d 20 69 73 20 6c 6f 61  64 65 64 20 69 6e 74 6f  |m is loaded into|
00000d50  20 41 2e 20 20 41 0d 73  75 6d 6d 61 72 79 20 6f  | A.  A.summary o|
00000d60  66 20 72 65 61 73 6f 6e  20 63 6f 64 65 20 76 61  |f reason code va|
00000d70  6c 75 65 73 20 69 73 20  67 69 76 65 6e 20 61 74  |lues is given at|
00000d80  20 74 68 65 20 65 6e 64  20 69 6e 20 74 61 62 6c  | the end in tabl|
00000d90  65 20 34 2e 0d 0d 41 6c  6c 20 63 61 6c 6c 73 20  |e 4...All calls |
00000da0  74 6f 20 49 53 41 4d 20  75 70 64 61 74 65 20 74  |to ISAM update t|
00000db0  68 65 20 43 61 72 72 79  20 61 6e 64 20 4f 76 65  |he Carry and Ove|
00000dc0  72 66 6c 6f 77 20 66 6c  61 67 73 2e 20 20 54 68  |rflow flags.  Th|
00000dd0  65 20 63 61 72 72 79 20  66 6c 61 67 0d 69 6e 64  |e carry flag.ind|
00000de0  69 63 61 74 65 73 20 77  68 65 74 68 65 72 20 61  |icates whether a|
00000df0  6e 20 22 69 6e 74 65 72  6e 61 6c 22 20 65 72 72  |n "internal" err|
00000e00  6f 72 20 6f 63 63 75 72  72 65 64 20 2d 20 73 75  |or occurred - su|
00000e10  63 68 20 61 73 20 22 4e  6f 20 6b 65 79 20 66 6f  |ch as "No key fo|
00000e20  75 6e 64 22 2e 20 0d 54  68 65 20 4f 76 65 72 66  |und". .The Overf|
00000e30  6c 6f 77 20 66 6c 61 67  20 69 6e 64 69 63 61 74  |low flag indicat|
00000e40  65 73 20 77 68 65 6e 20  61 20 66 69 6c 69 6e 67  |es when a filing|
00000e50  20 73 79 73 74 65 6d 20  65 72 72 6f 72 20 6f 63  | system error oc|
00000e60  63 75 72 72 65 64 20 2d  20 73 75 63 68 20 61 73  |curred - such as|
00000e70  0d 22 44 69 73 6b 20 66  61 75 6c 74 22 2e 20 20  |."Disk fault".  |
00000e80  41 20 6c 69 73 74 20 6f  66 20 69 6e 74 65 72 6e  |A list of intern|
00000e90  61 6c 20 49 53 41 4d 20  65 72 72 6f 72 73 20 69  |al ISAM errors i|
00000ea0  73 20 67 69 76 65 6e 20  69 6e 20 74 61 62 6c 65  |s given in table|
00000eb0  20 35 2e 20 20 4e 6f 74  65 0d 74 68 61 74 20 79  | 5.  Note.that y|
00000ec0  6f 75 20 63 61 6e 27 74  20 63 61 6c 6c 20 74 68  |ou can't call th|
00000ed0  65 20 65 72 72 6f 72 20  72 65 70 6f 72 74 69 6e  |e error reportin|
00000ee0  67 20 72 6f 75 74 69 6e  65 20 52 45 50 45 52 4c  |g routine REPERL|
00000ef0  20 77 69 74 68 20 61 6e  20 69 6e 74 65 72 6e 61  | with an interna|
00000f00  6c 20 49 53 41 4d 0d 65  72 72 6f 72 20 63 6f 64  |l ISAM.error cod|
00000f10  65 3b 20 74 68 65 20 69  6e 74 65 72 6e 61 6c 20  |e; the internal |
00000f20  63 6f 64 65 20 69 73 20  6f 6e 6c 79 20 66 6f 72  |code is only for|
00000f30  20 63 68 65 63 6b 69 6e  67 20 77 69 74 68 69 6e  | checking within|
00000f40  20 61 20 70 72 6f 67 72  61 6d 2e 0d 0d 4b 65 79  | a program...Key|
00000f50  20 76 61 6c 75 65 73 20  61 72 65 20 70 61 73 73  | values are pass|
00000f60  65 64 20 74 6f 20 49 53  41 4d 20 69 6e 20 4c 49  |ed to ISAM in LI|
00000f70  4e 42 55 46 6c 20 34 20  62 79 74 65 20 70 6f 69  |NBUFl 4 byte poi|
00000f80  6e 74 65 72 20 76 61 6c  75 65 73 20 61 72 65 20  |nter values are |
00000f90  70 61 73 73 65 64 20 69  6e 0d 52 45 47 31 2e 20  |passed in.REG1. |
00000fa0  20 49 53 41 4d 20 63 61  6e 20 68 61 6e 64 6c 65  | ISAM can handle|
00000fb0  20 61 20 6d 61 78 69 6d  75 6d 20 6f 66 20 6e 69  | a maximum of ni|
00000fc0  6e 65 20 69 6e 64 65 78  65 73 20 6f 70 65 6e 20  |ne indexes open |
00000fd0  61 74 20 6f 6e 65 20 74  69 6d 65 2e 20 20 54 68  |at one time.  Th|
00000fe0  65 0d 6d 61 78 69 6d 75  6d 20 73 69 7a 65 20 6f  |e.maximum size o|
00000ff0  66 20 61 20 6b 65 79 20  69 73 20 31 30 35 20 62  |f a key is 105 b|
00001000  79 74 65 73 2e 0d 0d 49  6e 64 65 78 65 64 20 73  |ytes...Indexed s|
00001010  65 71 75 65 6e 74 69 61  6c 20 66 69 6c 65 73 20  |equential files |
00001020  68 61 76 65 20 74 68 65  20 74 77 6f 20 66 65 61  |have the two fea|
00001030  74 75 72 65 73 20 74 68  61 74 20 79 6f 75 20 63  |tures that you c|
00001040  61 6e 20 6c 6f 63 61 74  65 20 61 0d 70 61 72 74  |an locate a.part|
00001050  69 63 75 6c 61 72 20 6b  65 79 20 62 79 20 67 69  |icular key by gi|
00001060  76 69 6e 67 20 69 74 73  20 76 61 6c 75 65 2c 20  |ving its value, |
00001070  61 6e 64 20 74 68 61 74  20 79 6f 75 20 63 61 6e  |and that you can|
00001080  20 61 6c 73 6f 20 72 65  61 64 20 75 70 20 61 6e  | also read up an|
00001090  64 20 64 6f 77 6e 0d 74  68 65 20 69 6e 64 65 78  |d down.the index|
000010a0  20 69 6e 20 6b 65 79 20  6f 72 64 65 72 2e 20 20  | in key order.  |
000010b0  49 53 41 4d 20 77 6f 72  6b 73 20 62 79 20 68 61  |ISAM works by ha|
000010c0  76 69 6e 67 20 61 20 22  70 6f 73 69 74 69 6f 6e  |ving a "position|
000010d0  22 2e 20 20 43 65 72 74  61 69 6e 20 63 61 6c 6c  |".  Certain call|
000010e0  73 0d 73 65 74 20 74 68  65 20 66 69 6c 65 20 22  |s.set the file "|
000010f0  70 6f 73 69 74 69 6f 6e  22 2c 20 73 6f 6d 65 20  |position", some |
00001100  6d 6f 76 65 20 74 68 65  20 70 6f 73 69 74 69 6f  |move the positio|
00001110  6e 20 75 70 20 61 6e 64  20 64 6f 77 6e 2c 20 61  |n up and down, a|
00001120  6e 64 20 73 6f 6d 65 20  63 61 6c 6c 73 0d 64 65  |nd some calls.de|
00001130  73 74 72 6f 79 20 74 68  65 20 70 6f 73 69 74 69  |stroy the positi|
00001140  6f 6e 20 61 6c 74 6f 67  65 74 68 65 72 2e 20 20  |on altogether.  |
00001150  54 68 65 20 22 53 65 61  72 63 68 22 20 63 61 6c  |The "Search" cal|
00001160  6c 20 73 65 74 73 20 74  68 65 20 66 69 6c 65 20  |l sets the file |
00001170  70 6f 73 69 74 69 6f 6e  3b 0d 74 68 65 20 22 4e  |position;.the "N|
00001180  65 78 74 22 20 61 6e 64  20 22 50 72 65 76 69 6f  |ext" and "Previo|
00001190  75 73 22 20 63 61 6c 6c  73 20 6d 6f 76 65 20 74  |us" calls move t|
000011a0  68 65 20 70 6f 73 69 74  69 6f 6e 2c 20 61 6e 64  |he position, and|
000011b0  20 74 68 65 20 22 49 6e  73 65 72 74 22 20 61 6e  | the "Insert" an|
000011c0  64 0d 22 44 65 6c 65 74  65 22 20 63 61 6c 6c 73  |d."Delete" calls|
000011d0  20 64 65 73 74 72 6f 79  20 74 68 65 20 70 6f 73  | destroy the pos|
000011e0  69 74 69 6f 6e 2e 0d 0d  49 66 20 79 6f 75 20 65  |ition...If you e|
000011f0  78 65 63 75 74 65 20 61  20 22 4e 65 78 74 22 2c  |xecute a "Next",|
00001200  20 6f 72 20 61 20 22 50  72 65 76 69 6f 75 73 22  | or a "Previous"|
00001210  20 63 61 6c 6c 20 6f 6e  20 61 6e 20 69 6e 64 65  | call on an inde|
00001220  78 20 66 69 6c 65 20 77  69 74 68 20 6e 6f 0d 70  |x file with no.p|
00001230  6f 73 69 74 69 6f 6e 2c  20 74 68 65 20 69 6e 64  |osition, the ind|
00001240  65 78 20 69 73 20 73 61  69 64 20 74 6f 20 62 65  |ex is said to be|
00001250  20 73 65 74 20 61 74 20  74 68 65 20 62 65 67 69  | set at the begi|
00001260  6e 6e 69 6e 67 2e 0d 0d  54 68 65 20 41 2c 20 58  |nning...The A, X|
00001270  20 61 6e 64 20 59 20 72  65 67 69 73 74 65 72 73  | and Y registers|
00001280  20 61 72 65 20 61 6c 6c  20 75 6e 64 65 66 69 6e  | are all undefin|
00001290  65 64 20 61 66 74 65 72  20 61 20 63 61 6c 6c 20  |ed after a call |
000012a0  74 6f 20 49 53 41 4d 2e  0d 0d 52 65 61 73 6f 6e  |to ISAM...Reason|
000012b0  20 63 6f 64 65 20 20 20  20 20 45 66 66 65 63 74  | code     Effect|
000012c0  0d 0d 41 3d 49 53 4d 46  4c 4f 20 20 20 20 20 20  |..A=ISMFLO      |
000012d0  20 20 54 65 6c 6c 20 49  53 41 4d 20 74 68 61 74  |  Tell ISAM that|
000012e0  20 66 69 6c 65 20 69 73  20 6f 70 65 6e 2e 0d 0d  | file is open...|
000012f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001300  42 65 66 6f 72 65 20 79  6f 75 20 6d 61 6b 65 20  |Before you make |
00001310  74 68 69 73 20 63 61 6c  6c 2c 20 79 6f 75 20 73  |this call, you s|
00001320  68 6f 75 6c 64 20 68 61  76 65 20 6f 70 65 6e 65  |hould have opene|
00001330  64 20 74 68 65 20 66 69  6c 65 0d 20 20 20 20 20  |d the file.     |
00001340  20 20 20 20 20 20 20 20  20 20 20 77 69 74 68 20  |           with |
00001350  74 68 65 20 66 69 6c 69  6e 67 20 73 79 73 74 65  |the filing syste|
00001360  6d 2e 20 20 54 68 69 73  20 63 61 6c 6c 20 6a 75  |m.  This call ju|
00001370  73 74 20 69 6e 66 6f 72  6d 73 20 49 53 41 4d 20  |st informs ISAM |
00001380  74 68 61 74 0d 20 20 20  20 20 20 20 20 20 20 20  |that.           |
00001390  20 20 20 20 20 79 6f 75  20 68 61 76 65 20 6f 70  |     you have op|
000013a0  65 6e 65 64 20 74 68 65  20 66 69 6c 65 2c 20 61  |ened the file, a|
000013b0  6e 64 20 74 65 6c 6c 73  20 69 74 20 74 6f 20 72  |nd tells it to r|
000013c0  65 76 65 72 73 65 20 73  6f 6d 65 0d 20 20 20 20  |everse some.    |
000013d0  20 20 20 20 20 20 20 20  20 20 20 20 77 6f 72 6b  |            work|
000013e0  73 70 61 63 65 20 66 6f  72 20 74 68 65 20 66 69  |space for the fi|
000013f0  6c 65 2e 0d 0d 20 20 20  20 20 20 20 20 20 20 20  |le...           |
00001400  20 20 20 20 20 4f 6e 20  65 6e 74 72 79 3a 20 20  |     On entry:  |
00001410  20 20 20 20 20 59 20 20  20 20 20 20 20 63 6f 6e  |     Y       con|
00001420  74 61 69 6e 73 20 68 61  6e 64 6c 65 20 6f 66 20  |tains handle of |
00001430  61 6c 72 65 61 64 79 20  6f 70 65 6e 65 64 0d 20  |already opened. |
00001440  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00001460  20 20 20 20 20 20 20 66  69 6c 65 2c 20 61 73 20  |       file, as |
00001470  72 65 74 75 72 6e 65 64  20 62 79 20 74 68 65 20  |returned by the |
00001480  66 69 6c 69 6e 67 0d 20  20 20 20 20 20 20 20 20  |filing.         |
00001490  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000014a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 73  |               s|
000014b0  79 73 74 65 6d 2e 0d 20  20 20 20 20 20 20 20 20  |ystem..         |
000014c0  20 20 20 20 20 20 20 4f  6e 20 65 78 69 74 3a 20  |       On exit: |
000014d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 54  |               T|
000014e0  68 65 20 66 69 6c 65 20  70 6f 73 69 74 69 6f 6e  |he file position|
000014f0  20 69 73 20 72 65 73 65  74 2e 0d 20 20 20 20 20  | is reset..     |
00001500  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001510  20 20 20 20 20 20 20 20  20 20 20 56 53 20 20 20  |           VS   |
00001520  20 20 20 66 69 6c 65 20  61 6c 72 65 61 64 79 20  |   file already |
00001530  6f 70 65 6e 3b 20 69 6e  74 65 72 6e 61 6c 20 65  |open; internal e|
00001540  72 72 6f 72 0d 20 20 20  20 20 20 20 20 20 20 20  |rror.           |
00001550  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001560  20 20 20 20 20 20 20 20  20 20 20 20 20 63 6f 64  |             cod|
00001570  65 20 69 6e 20 41 2e 0d  20 20 20 20 20 20 20 20  |e in A..        |
00001580  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001590  20 20 20 20 20 20 20 20  43 53 20 20 20 20 20 20  |        CS      |
000015a0  69 6e 74 65 72 6e 61 6c  20 65 72 72 6f 72 20 6f  |internal error o|
000015b0  63 63 75 72 72 65 64 3b  20 69 6e 74 65 72 6e 61  |ccurred; interna|
000015c0  6c 0d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |l.              |
000015d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000015e0  20 20 20 20 20 20 20 20  20 20 65 72 72 6f 72 20  |          error |
000015f0  63 6f 64 65 20 69 6e 20  41 2e 0d 0d              |code in A...|
000015fc
F/+HINT14.m0
F/+HINT14.m1
F/+HINT14.m2
F/+HINT14.m4
F/+HINT14.m5