DTRHELP.HLB  —  Functions  FN$FORMAT_DBKEY
       Returns a character string containing the dbkey of the readied
       relational domain, table, or view.

1  –  Input

       A string containing the dbkey in its binary format.

2  –  Output

       The character string of the dbkey. This function assumes that the
       dbkey is internally structured as an array of elementary dbkeys
       and that each elementary dbkey is 8 bytes long.

3  –  Example

       In the following example the variable VAR prints the dbkey of
       each record in the relational view C in their string format. The
       length of the dbkeys in this view is 16 bytes (8 bytes by the
       number of tables in the view).

       DTR> DECLARE VAR PIC X(80).;
       DTR> FOR C BEGIN
       CON> VAR = FN$LASTREC_DBKEY("C");
       CON> PRINT -
       CON> FN$FORMAT_DBKEY(FN$STR_EXTRACT(VAR,1,FN$DBKEY_LENGTH("C")))
       CON> END;

                 FN$FORMAT
                   DBKEY

       39:512:0 40:518:0
       39:512:1 40:518:0
       39:512:2 40:518:0
       39:512:3 40:518:0
       DTR>

4  –  Usage Note

       This function has been implemented for Oracle Rdb dbkeys only.
Close Help