Guardian Procedure Calls Reference Manual
FILE_SETKEY_ Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Returned Value
Considerations
Summary
The FILE_SETKEY_ procedure supersedes the KEYPOSITION[X] Procedures (Superseded by
FILE_SETKEY_ Procedure) (page 750). The FILE_SETKEY_ procedure is 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 FILE_SETPOSITION_ procedure is more
commonly used for positioning by primary key within relative and entry-sequenced files. Unlike
the KEYPOSITION[X] procedures, the FILE_SETKEY_ procedure expects the primary keys for relative
and entry-sequenced files to be 8 bytes long. Thus, this procedure can be used with format 2 files
as well as with other files.
FILE_SETKEY_ 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.
Syntax for C Programmers
#include <cextdecs(FILE_SETKEY_)>
short FILE_SETKEY_ ( short filenum
,char *key-value
,short key-len
,[ short keyspecifier ]
,[ short positioningmode ]
,[ short options ]
,[ short comparelength ] );
Syntax for TAL Programmers
error := FILE_SETKEY_ ( filenum ! i
,key-value:key-value-len ! i:i
,[ keyspecifier ] ! i
,[ positioningmode ] ! i
,[ options ] ! i
,[ comparelength ] ); ! i
Parameters
filenum
input
INT:value
is the number that identifies an open-structured disk file.
506 Guardian Procedure Calls (F)