User`s guide

Function 99 also requires that the random record number field of the referenced
FCB specify a value less than the current file size. In addition, if the file is sparse, the
random record field must specify a record in a region of the file where data exists.
Upon return, the Truncate function returns a Directory Code in register A with the
value 0 if the Truncate function is successful, or OFFH, 255 decimal, if the file is not
found or the record number is invalid. Register H is set to zero in both of these
cases. If a physical or extended error is encountered, the Truncate function performs
different actions depending on the BDOS error mode (see Function 45). If the BDOS
error mode is in the default mode, a message identifying the error is displayed at the
console and the program is terminated. Otherwise, the Truncate function returns to
the calling program with register A set to OFFH and register H set to one of the
following physical or extended error codes:
01 Disk I/O error
02 Read-Only disk
03 Read-Only file
04 Invalid drive error
07 File password error
09 ? in filename or filetype field
3-77
BDOS Function Calls CP/M 3 Programmers Guide