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

240 AppendixB
BASIC/V Intrinsics
BKOPEN
BKOPEN
A call to procedure BKOPEN initiates KSAM file processing.
CALL BKOPEN (
filenum,status,name
[,
access
[,
lock
[,
exclusive
[,
sequence
]]]])
In order to process a KSAM file, it must be opened with a call to the BKOPEN procedure.
BKOPEN initiates processing, and optionally specifies how the file is to be processed. BKOPEN
does not create the file; it must have been created previously.
To open a file means to make it available for processing. You can also specify how the file is
to be accessed (whether for input, output, input/output, or for update), whether dynamic
locking is allowed, whether access to the file can be shared, and whether records written to
the file are to be checked for primary key sequence. Default values are assigned for the
optional parameters. If you want to change the current processing or access method, you
must close the file and then open it again with the parameters set to new values.
Parameters
filenum
A numeric variable whose value identifies the file opened by the call to
BKOPEN. Since the value of
filenum
identifies the file in other CALL
statements, it must not be changed while the file is open. (
Required
parameter
)
status
A four-character string variable to which is returned a code to indicate
whether or not the file was successfully opened and if not, why not. The
first character is 0 if the open is successful, to another value if not.
(
Required parameter
)
name
A string expression containing the name of the KSAM file to be processed.
This name is the actual designator assigned to the file when it was
created, or else it is a back reference to a formal designator specified in a
FILE command, in which case,
name
has the form *
formal
designator
.(
Required parameter
)