Home | Web Design | Programming | Fairlight CMI | Soap Box | Downloads | Links | Biography | About... | Site Map |
![]() |
![]() |
CA-Clipper Internal Operations |
CA-Clipper![]() |
Opportunities | Tips and Tricks | Networking | Internal Errors | Source Code | CA-VO |
![]() ![]() CA-CLIPPER NETWORKING |
USE <file> (exclusive off)
![]() ![]() 1) open file 2) read file header 3) fill buffer: if index: a) open index file b) lock index file c) search index file for 'top' of index d) read indicated record into buffer e) unlock index file if no index: a) read first record into buffer |
![]() |
SEEK/FIND
![]() ![]() 1) if 'hot' flag set, flush buffer 2) lock index file 3) search index file for specified key if found: a) read record into buffer if not found: a) set record pointer to lastrec()+1 b) set end of file flag c) store spaces into record buffer 4) unlock index file SKIP 0 ![]() ![]() 1) if 'hot' flag set, flush buffer SKIP n ![]() ![]() 1) if 'hot' flag set, flush buffer 2) lock index file 3) search for next index entry if found: a) read record into buffer if not found: a) set record pointer to lastrec()+1 b) set end of file flag c) store spaces into record buffer 4) unlock index file GOTO n ![]() ![]() 1) if 'hot' flag set, flush buffer if not past eof: a) set new record pointer b) read record into buffer if past eof: a) set record pointer to lastrec()+1 b) store spaces into record buffer RLOCK()/FLOCK() ![]() ![]() 1) if 'hot' flag set, flush buffer 2) issue lock request to server if successful: a) read record into buffer if not successful: a) exit APPEND BLANK ![]() ![]() 1) if 'hot' flag set, flush buffer 2) lock header 3) calculate new record number based on file size 4) issue record lock request to server if successful: a) set record pointer to lastrec()+1 b) write out spaces to new record c) store spaces into record buffer d) set 'hot' buffer flag 5) unlock header REPLACE ![]() ![]() 1) search symbol table for field name 2) move data into record buffer 3) set 'hot' buffer flag GET (to database field) ![]() ![]() 1) set 'hot' buffer flag if any data key pressed STORE ![]() ![]() 1) search symbol table for field name 2) move data from record buffer to memory variable UNLOCK ![]() ![]() 1) if 'hot' buffer flag set a) lock index file b) (re)write index entry c) unlock index file d) write record buffer e) reset 'hot' buffer flag (clear) 2) unlock record COMMIT ![]() ![]() 1) if 'hot' buffer flag set a) lock index file b) (re)write index entry c) unlock index file d) write record buffer e) reset 'hot' buffer flag (clear) f) repeat a-e for all select areas g) issue DOS function 68h (ignored prior to DOS 3.3) Memo field STORE ![]() ![]() 1) lock memo file 2) move to memo record number (from DBF) 3) read (next) 512 byte memo block into a buffer 4) repeat step 3 until ^Z found in buffer 5) reread entire memo field in one block Memo field REPLACE (new field) ![]() ![]() 1) lock memo file 2) move to eof 3) write out new entry 4) replace pointer in DBF Memo field REPLACE ![]() ![]() 1) lock memo file if replacement field length < 512 bytes: a) write block back to original field if replacement field length => 512 bytes: a) write ^Z to start of original (old) entry b) move to eof c) write out new entry d) adjust pointer in DBF 2) unlock memo file Flushing the buffer ![]() ![]() 1) lock index file 2) (re)write index entry 3) unlock index file 4) write record buffer 5) reset 'hot' buffer flag (clear) Summary ![]() ![]() The 'hot' buffer flag is set by:
|
Home | Web Design | Programming | Fairlight CMI | Soap Box | Downloads | Links | Biography | About... | Site Map |
![]() |
![]() |
Send comments about this site to Greg at
gregh@ghservices.com All pages copyright © 1996-1999 GH Services Created 1997/06/09 Last updated 1999/09/30 All trademarks contained herein are the property of their respective owners |