Using KSAM/XL and KSAM 64 (32650-90886)

227
B BASIC/V Intrinsics
The BASIC/V interpreter and compiler require special intrinsics to access existing KSAM
files. The following intrinsics were developed for these BASIC/V programs.
NOTE
These intrinsics are provided to allow BASIC/V programs to run in
compatibility mode. Do not use these intrinsics when writing new programs
in other languages or when porting BASIC/V programs. If you are porting to
Business BASIC/XL, use the standard file intrinsics discussed in this manual.
Overview
KSAM files are accessed from BASIC/V programs through calls to a set of input/output
procedures. These procedures allow you to open, write records to, read records from,
update and delete records, position, lock, unlock, and close KSAM files.
A KSAM file must already exist before it can be accessed from a BASIC/V program. The
BASIC/V procedures for accessing KSAM files do not provide a means to create a KSAM
file.
The BASIC/V procedures to access KSAM files perform input/output activities differently
from the BASIC/V input/output commands. The KSAM procedures read and write records
in their entirety. Once part of a record has been read or written by one of the KSAM file
access procedures, the entire record has, in actuality, been read or written. A subsequent
call will access another record.
Character substrings are expressions when used in the BASIC/V KSAM procedures. As
such, no values can be returned to them. A copy of the substring is passed as the actual
parameter.