HPlogo 900 Series HP 3000 Computer Systems: MPE/iX Intrinsics Reference Manual > Chapter 4 Command Definitions

FFINDN

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

NM and CM callable.

Positions the logical record pointer to the relative record number according to the key sequence.

NOTE: For KSAM files only.

Syntax

          I16V    DV   I16V

   FFINDN(filenum,number,location);

Parameters

filenum

16-bit signed integer (required)

Passes the file number of the file to be positioned.

number

double by value (required)

Specifies a record number relative to the first logical record in the file. Record numbers start with zero or one depending on the record numbering scheme specified at file creation. The lowest numbered record applies to the record with the lowest value in the specified key field. A negative record number positions the file pointer to the record with the smallest key value.

location

16-bit signed integer by value (required)

Passes the relative byte location in the record of the key to be used. The first byte of the record is considered 1. If location=0, the primary key is used.

Operation Notes

Split stack calls are permitted.

When the relative record number is specified, be sure not to confuse this number with the chronological record number (the number of the record as it is stored in the file). The relative record number is based on the value of a specified key, not its location in a file.

(KSAM/3000) If FFINDN is used to position the pointer before calling another procedure that reads or updates the file in a shared environment, FLOCK must be called before calling FFINDN. After performing the read or update operation, unlock the file. If the file is locked after calling FFINDN, another user can change the pointer position without your program being aware of it.

Condition Codes

CCE (2)

Request granted.

CCG (0)

Request denied. The requested position was beyond the logical end-of-file.

CCL (1)

Request denied. An error occurred.

Related Information

Intrinsics

None

Commands

None

Manuals

Using KSAM XL (32650-90168) and KSAM/3000 Reference Manual (30000-90079)

Feedback to webmaster