DTRHELP.HLB  —  Functions  FN$FORMAT_DBKEY, 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>
Close Help