Guardian Procedure Calls Reference Manual
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
NOTE: These procedures are supported for compatibility with previous software and should not
be used for new development.
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
#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 ] );
• 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).
750 Guardian Procedure Calls (H-K)