Previous Topic Next topic Print topic


STEP

Steps to the next, previous, first or last physical record in the file . This operation enables very fast access to a record.

Opcode Operation File Types
90 STEP NEXT WITH NO LOCK L S R I
91 STEP PREVIOUS WITH NO LOCK L S R I
92 STEP FIRST WITH NO LOCK L S R I
93 STEP LAST WITH NO LOCK L S R I
CA STEP NEXT L S R I
CB STEP PREVIOUS L S R I
CC STEP FIRST L S R I
CD STEP LAST L S R I
CE STEP LAST WITH LOCK L S R I
CF STEP LAST WITH KEPT LOCK L S R I
D0 STEP FIRST WITH LOCK L S R I
D1 STEP FIRST WITH KEPT LOCK L S R I
D2 STEP PREVIOUS WITH LOCK L S R I
D3 STEP PREVIOUS WITH KEPT LOCK L S R I
D4 STEP NEXT WITH LOCK L S R I
D5 STEP NEXT WITH KEPT LOCK L S R I

Input Fields

fcd-record-address Pointer to the record area

Output Fields

fcd-file-status File status

Comments

STEP operations are a method of sequentially retrieving records in a relative or indexed file without having to read via a key or relative record number. Generally, this is a faster method of accessing data in the file.

A STEP NEXT operation returns the record that is physically stored immediately after the one that was last retrieved in the file (either by a STEP or READ operation).

A STEP PREVIOUS operation returns the record that is physically stored immediately before the one that was last retrieved in the file (either by a STEP or READ operation).

A STEP FIRST operation returns the record at the beginning of the file.

A STEP LAST operation returns the record at the end of the file.

If you are using relative byte addressing and you have specified that the current record pointer should be updated to the record you have just accessed, STEP operations are relative to this new position.

The relative byte address is returned on every STEP operation, so if you need to update the current record pointer to the record just retrieved, you can use the READ (direct) operation using the address returned.

Note:

The current record pointer is not affected by STEP operations.

Previous Topic Next topic Print topic