MemCom Reference Manual > MemCom (Old) Fortran77 API > Database Manager Functions > foffdb

Name

foffdb — Get file offset of dataset

Synopsis

subroutine foffdb(handle,name,offset)
integer*4 handle
character*(*) name
integer*4 offset

subroutine foffdb64(handle,name,offset)
integer*4 handle
character*(*) name
integer*8 offset64

Description

foffdb returns the file offset ('file address') of a dataset in integer*4 units ('words'), starting at 'word' address 1. It performs the same operation as function prpdb, except that is only returns the file offset.

[Warning]Warning

(1) For compatibility reasons with MemCom 6, foffdb works with addresses counted in integer*4 words (not bytes) and starting at word count 1. (2) For compatibility reasons with older versions of the F77 API the offset returned by this function is a 32 bit entity (integer*4) and therefore may give wrong results for 64 bit operating system. To remedy this, a 64bit version foffdb64 has been added.

Parameters

handle

Database handle (input). The file handle handle may not exceed the maximum number of simultaneously open databases.

name

Dataset name to be listed (input). name may be contain pattern-matching characters. The string may not exceed the maximum dataset name length.

offset

File offset ('file address') of a dataset in integer*4 units (output) foffdb only. Upon successful completion of the operation, the positive byte offset returned. A negative value or 0 value indicates an error.

offset64

File offset ('file address') of a dataset in integer*4 units (output), foffdb64 only. Upon successful completion of the operation, the positive byte offset returned. A negative value or 0 value indicates an error.