Guardian Procedure Calls Reference Manual

Syntax for TAL Programmers
CALL KEYPOSITION[X] ( filenum ! i
,key-value ! i
,[ key-specifier ] ! i
,[ length-word ] ! i
,[ positioning-mode ] ); ! i
Parameters
filenum
input
INT:value
is the number of an open file where the positioning is to take place.
key-value
input
(for KEYPOSITION)STRING:ref:*
(for KEYPOSITIONX)STRING .EXT:ref:*
is the address of the buffer in the stack containing the key value (KEYPOSITION) or the address
of the buffer containing the key value (KEYPOSITIONX).
The key-value may be in the user's stack or, if KEYPOSITIONX is used, in an extended data
segment. The key-value may not be in the user's code space.
For KEYPOSITIONX, the key-value address must be relative; it cannot be an absolute address.
If the key-value is in an extended segment, the extended segment must be in use at the time
of the call.
key-specifier
input
INT:value
designates the key field to be used as the access path for the file:
or if omitted, means use the file's primary key as the access path.0
predefined key specifier for an alternate-key field, means use that field as the access
path.
key-specifier
length-word
input
INT:value
contains two values:
compare-length (left byte) specifies, in bytes, the length to use for key comparisons made to decide
when to stop returning records under the generic or exact positioning modes.
<0:7>
key-length (right byte) specifies how many bytes of the key-value are to be searched for in the
file to find the initial position.
<8:15>
If length-word is omitted, compare-length and key-length are defined to be the
length of the key (key-specifier) defined when the file was created. That is, if
key-specifier is omitted or 0, compare-length and key-length are the length
KEYPOSITION[X] Procedures (Superseded by FILE_SETKEY_ Procedure) 751