BBjOpenFileInfo::getExtracted

Description

In BBj 6.0 and higher, this BBjOpenFileInfo method returns the byte offset in the file that is currently locked by a BBj user. All getExtracted() values would typically be compared to the value of TCB(10) immediately after receiving an !ERROR=0 attempting to access a record in a file to identify the holder of the lock.

Syntax

Return Value

Method

long

getExtracted()

Parameters

None.

Return Value

The byte offset in the file that is currently locked, or -1 if no lock is in effect.

Remarks

None.

Example

rem ' Retrieve information about all files open in the BBjServices session

input "Enter User ID: ",userid$
if userid$ = "" then userid$ = "admin"
input "Enter Password: ",password$
if password$ = "" then password$ = "admin123"
admin! = bbjapi().getAdmin(userid$,password$)
vector! = admin!.getOpenFileInfos()
if vector!.size() then
  for i=0 to vector!.size()-1
    print fill(72,"=")
    info! = vector!.get(i)
    print "File Name: ",info!.getFilename()
    print "  Open ID: ",info!.getIDString()
    print "  User ID: ",info!.getUser()
    print "Host Name: ",info!.getHost()
    print "   Locked: ",fnyesno$(info!.isLocked())
    print "Extracted: ",fnumeric$(info!.getExtracted())
    print " Advisory: ",fnyesno$(info!.isAdvisoryLocking())
    print " Readonly: ",fnyesno$(info!.isReadOnly())
    print "Open Type: ",info!.getOpenTypeString()
  next i
endif
def fnyesno$(boolean)=iff(boolean,"Yes","No")
def fnumeric$(number)=iff(number>=0,str(number),"None")

See Also

BBjAPI

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