Enscribe Programmer's Guide
Deleting Records
You perform record deletion by using the FILE_WRITEUPDATE64_, FILE_WRITEUPDATEUNLOCK64_,
WRITEUPDATE or WRITEUPDATEUNLOCK system procedure with a write count of zero. Record
deletion always applies to the current position in a file.
Current Primary-Key Value
A key-sequenced file's current primary-key value is taken from the primary key associated with the
last FILE_READ64_, FILE_READLOCK64_, READ or READLOCK operation or FILE_SETKEY_ or
KEYPOSITION operation by primary key.
After opening a key-sequenced file, but before issuing the first read or FILE_SETKEY_ or
KEYPOSITION call, the current primary-key value is that of the first record in the file.
Access Examples
The access examples throughout the remainder of this section all use the customer record definition:
timillabrucnoigersserddaeman
251441631431430
Byte Offset:
Primary-Key
Field
Alternate-Key
Field RG
The TAL declaration of a customer record is:
LITERAL name^len = 34,
address^len = 100,
region^len = 2;
STRUCT customer^record (*);
BEGIN
STRING cust^name [0:name^len - 1]; ! name
STRING cust^address [0:address^len - 1]; ! address
STRING cust^region [0:region^len - 1]; ! region
! NO = northern
! SO = southern
! EA = eastern
! WE = western
FIXED (2) cust^curbal; ! current balance
FIXED (2) cust^limit; ! credit limit
END;
STRUCT .cust^rec (customer^record);
The contents of the CUSTOMER file are:
Accessing Key-Sequenced Files 87