CALLING A KSAM PROCEDURE [ KSAM/3000 Reference Manual ] MPE/iX 5.0 Documentation
KSAM/3000 Reference Manual
CALLING A KSAM PROCEDURE
The KSAM interface procedures (refer to Table 3-1 for a complete list)
are called using a CALL statement of of the following general form:
CALL "name" USING filetable,status [,parameter[,...] ]
Where:
"name" identifies the procedure to which control is
transferred.
filetable an 8-word table that identifies the file by name and in
which access mode and input-output type are specified,
and to which is returned the file number on open, and a
code identifying the previous operation.
status one word to which a two-character code is returned that
indicates the status of the input/output operation
performed on the file by the called procedure.
parameter one or more parameters, depending on the particular
procedure called, 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 word boundary. In order to assure 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 chronological
order or to access a record by its chronological record number.
(Chronological order is the order in which the data records were
written to the file.)
MPE/iX 5.0 Documentation