Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (F)
Guardian Procedure Calls Reference Manual522629-013
5-142
FILE_SETKEY_ Procedure
FILE_SETKEY_ Procedure
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Considerations
Summary
The FILE_SETKEY_ procedure supersedes the KEYPOSITION[X] Procedures
(Superseded by FILE_SETKEY_ Procedure). 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
Syntax for TAL Programmers
#include <cextdecs(FILE_SETKEY_)>
short FILE_SETKEY_ ( short filenum
, char * key-value
, short key-len
, [ short keyspecifier ]
, [ short positioningmode ]
, [ short options ]
, [ short comparelength ] );
error := FILE_SETKEY_ ( filenum ! i
,key-value :key-value-len ! i:i
,[ keyspecifier ] ! i
,[ positioningmode ] ! i
,[ options ] ! i
,[ comparelength ] ); ! i