/* display _userstatus VST for tablemove, indexmove, idxfix, idxcompact, idxanalys */
def var vName as char format "x(12)".
def var vFound as log.
repeat :
vFound = NO.
for each _userstatus where _userstatus-operation <> ? :
vFound = YES.
/* FIND INFO ABOUT THE PROCESS */
find first _connect no-lock where _connect-usr = _userstatus-userid.
/* FIND INFO ABOUT THE OBJECT */
case _userstatus-objecttype :
when 1 then do:
find _file no-lock where _file-number = _userstatus-objectid.
vName = _file-name.
end.
when 2 then do:
find _index no-lock where _idx-num = _userstatus-objectid
no-error.
vName = if available _index then _index-name else "No Index".
end.
otherwise vName = "".
end.
display
_userstatus-operation label "Operation" format "x(13)"
_userstatus-userid label "Usr#" format ">>>9"
_connect-name format "x(10)"
_userstatus-objectid label "Obj#" format "->>>9"
(if _userstatus-objecttype = 1
then "T" else "I") label "" format "!"
vName label "Object"
_userstatus-state label "Phase" format ">>9"
_userstatus-counter label "Counter"
_userstatus-target label "Target"
with no-box.
end. /* for each */