FPOSITB
The FPOSITB instruction retrieves the beginning position of the current record. This is the same as FPOSIT in ANSI mode. It uses one of the following formats:
|
|
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
file
Required. A previously defined and opened FILE, IFILE, or AFILE definition whose current record's starting position is returned.
sector
Required. A previously defined Numeric Variable in which the current record's starting sector number is returned.
tab
Required. A previously defined Numeric Variable in which the current record starting position within the sector is returned.
offset
Required. A previously defined Numeric Variable in which the current record's starting byte offset from the beginning of the file is returned.
Flags Affected: OVER, ZERO
Note the following:
Format one (1) returns the current sector in {sector} and byte position within the sector in {tab} (compatible with Datapoint's DOS method). The sector number is based upon the defined sector size for the file when it was last opened.
Format two (2) returns the beginning byte position of the current record in {offset}. The result of this format is compatible with the REPOSIT instruction.
The current file position remains unchanged.
If the file position is zero, the ZERO condition flag is set.
If any variable is not large enough to hold the appropriate position, the result is indeterminate and the OVER condition flag is set.
See Also: Example Code, FPOSIT, FPOSITC, REPOSIT, Disk I/O Instructions
![]() |