Returns the physical name of a currently connected database.
Syntax
PDBNAME ( integer-expression|logical-name|alias )
|
-
integer-expression
- If the parameter supplied to PDBNAME is an integer expression, and
there are, for example, three currently connected databases, then PDBNAME(1),
PDBNAME(2), and PDBNAME(3) return their physical names. Also, continuing
the same example of three connected databases, PDBNAME(4), PDBNAME(5),
etc., return the Unknown value (?).
-
logical-name
|
alias
- This form of the PDBNAME function requires a quoted character string or a character
expression as a parameter. If the parameter is the logical name of a connected database
or an alias of a connected database, then the physical name is returned. Otherwise, it
returns the Unknown value (?).
Example
This
procedure finds the physical name of the database that currently
has the DICTDB alias:
r-pdbnam.p
MESSAGE "The current DICTDB is" PDBNAME("DICTDB") + ".db".
|
Notes
The
old DBNAME function has been retained for compatibility and is equivalent
to PDBNAME(1).
See also
ALIAS function, CONNECT statement, CONNECTED function, CREATE ALIAS statement, CREATE CALL statement, DATASERVERS function, DBCODEPAGE function, DBCOLLATION function, DBRESTRICTIONS function, DBTYPE function, DBVERSION function, DELETE ALIAS statement, DISCONNECT statement, FRAME-DB function, LDBNAME function, NUM-DBS function, SDBNAME function