BBjFileInfo::getCurrentKeyNumber

Description

In BBj 6.0 and higher, this method returns the current key number of a BBjFileInfo object.

Syntax

Return Value

Method

int

getCurrentKeyNumber()

Parameters

None.

Return Value

Returns the current key number. If the file does not support key numbers, this method throws an !ERROR=13.

Remarks

None.

Example

rem ' Query basic information about a file

filename$ = "Sample.dat"
erase filename$,err=*next
mkeyed filename$,[1:1:6]+[2:1:3],[3:1:2],0,64
channel = unt
open (channel)filename$
BBjFileInfo! = BBjAPI().getFileSystem().getFileInfo(channel)
print "File Name         : ",BBjFileInfo!.getFilename()
print "File Type         : ",hta(chr(BBjFileInfo!.getFileType()))
print "File Size         :",BBjFileInfo!.getFileSize()
print "Last Modified Date: ",new java.util.Date(BBjFileInfo!.getLastModified())
print "Key Size          :",BBjFileInfo!.getKeySize()
print "Record Size       :",BBjFileInfo!.getRecordSize()
print "Defined Records   :",BBjFileInfo!.getDefinedRecords()
print "Current Records   :",BBjFileInfo!.getCurrentRecords()
print "Current Key Number:",BBjFileInfo!.getCurrentKeyNumber()
end

See Also

BBjAPI

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.