Guardian Procedure Calls Reference Manual (G06.25+)
Guardian Procedure Calls (H-K)
Guardian Procedure Calls Reference Manual—522629-013
7-55
KEYPOSITION[X] Procedures
(Superseded by FILE_SETKEY_ Procedure)
KEYPOSITION[X] Procedures
(Superseded by FILE_SETKEY_ Procedure
)
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Condition Code Settings
Considerations
Example
Related Programming Manual
Summary
The KEYPOSITION[X] procedures are used to position by primary or alternate key
within a structured file. However, positioning by primary key is usually done within key-
sequenced files only when using this procedure; the POSITION procedure is more
commonly used for positioning by primary key within relative and entry-sequenced
files.
KEYPOSITION sets the current position, access path, and positioning mode for the
specified file. The current position, access path, and positioning mode define a subset
of the file for subsequent access.
KEYPOSITIONX supports positioning to a primary or alternate key when the key value
resides in a buffer in an extended segment. Only the
key-value parameter is
different for KEYPOSITIONX; all other parameters are the same as for KEYPOSITION.
Syntax for C Programmers
•
The function value returned by KEYPOSITION[X], which indicates the condition
code, can be interpreted by
_status_lt(), _status_eq(), or _status_gt()
(defined in the file
tal.h).
#include <cextdecs(KEYPOSITION)>
_cc_status KEYPOSITION ( short filenum
,char *key-value
,[ short key-specifier ]
,[ short length-word ]
,[ short positioning-mode ] );
#include <cextdecs(KEYPOSITIONX)>
_cc_status KEYPOSITIONX ( short filenum
,const char *key-value
,[ short key-specifier ]
,[ short length-word ]
,[ short positioning-mode ] );