TBNAME

Returns the table name associated with a handle or the handle associated with a table name.

Type

Dialog Manager service

Format

TBNAME(name | handle var_name)
name | handle
The name or handle for which a handle or name is to be returned. The table name must consist of at least two qualifiers.
var_name

The name of the variable that contains the returned table name or handle.

Return Codes

0
TBNAME completed normally.
20
Severe error; probably, table not open.

Usage Notes®

  1. The table must be opened with a TBOPEN or TBCREATE prior to issuing TBNAME.
  2. If you specify a table name, the table must have been opened or created within the current dialog thread; otherwise, it is not found and an RC=20 is returned.

Example

The following example uses TBNAME to return the name of the table assigned to a particular table handle:

set rc (tbname(&tabhand tabname))

if &rc != 0
  log('Table error on TBNAME, RC=&rc')

See Also

TBCREATE

TBOPEN