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

178 AppendixA
COBOL Intrinsics
Filetable Parameter
that further define operations to be performed on the file.
The first two parameters,
filetable
and
status
, are included in every KSAM procedure
call except CKERROR; other parameters may be specified depending on the particular
procedure. If a parameter is included in the procedure format, then it must be included in
the procedure call. All parameters are required.
Another characteristic of KSAM procedure call parameters is that they must always start
on a halfword boundary. In order to ensure this, the parameters should be defined in the
WORKING-STORAGE SECTION as 01 record items, 77 level elementary items, or else
the SYNCHRONIZED clause should be included in their definition.
A literal value cannot be used as a parameter to these procedures. Any value assigned to a
data item used as a parameter is passed to the procedure, but a literal value causes an
error.
Depending on the procedure, certain data items may be assigned values as a result of
executing the procedure.
NOTE
There are no COBOL procedures to read a KSAM file in physical order or to
access a record by its physical record number. (Physical order is the order in
which the data records were written to the file.)
Filetable Parameter
The first parameter in every KSAM procedure call must be
filetable
, a table describing
the file and its access. This table is defined in the WORKING-STORAGE SECTION of the
COBOL program. It requires eight halfwords as illustrated in Figure A-1.
Figure A-1. Filetable Structure
filenumber
A number identifying the file returned by the CKOPEN