Previous Topic: @ACCEPT BIND ExampleNext Topic: @ACCEPT DBKEY FROM CURRENCY Syntax


@ACCEPT DBKEY FROM CURRENCY—moves the db-key of the current record

The @ACCEPT DBKEY FROM CURRENCY statement moves the db-key of the current record of run unit, record type, set, or area to a specified location in program variable storage. Use the PGINFO option to specify a location in program variable storage where the page information associated with the returned dbkey is moved. Records whose db-key are saved in this manner are available for subsequent direct access by using an @FIND/@OBTAIN DBKEY statement.

Currency

The record must be current of run unit, record type, set, or area before execution of the @ACCEPT DBKEY FROM CURRENCY statement. Currency is maintained but not updated after the statement is executed.

Note: You must establish set currency before using this statement. If no set currency has been established, the DBMS returns 0000 to the ERRSTAT field and -1 to the DB-KEY field.

For more information on page information fields, see @ACCEPT PGINFO.