Previous Topic: @ACCEPT DBKEY FROM CURRENCY Status CodesNext Topic: @ACCEPT DBKEY RELATIVE TO CURRENCY—moves the db-key


@ACCEPT DBKEY FROM CURRENCY Example

The following statements illustrate the use of the @ACCEPT DBKEY FROM CURRENCY statement. The program performs the following steps:

  1. Establishes an EMPLOYEE record as current of run unit
  2. Saves its db-key in location SAVEDKEY
  3. Accesses the EMPLOYEE record occurrence by using the saved db-key, after further processing has changed currency
    MVC   EMPID,=CL4'7690'
    
    @FIND CALC,REC='EMPLOYEE'
    
    @ACCEPT DBKEY=SAVEDKEY
    
    .
    
    .
    
    @OBTAIN DBKEY=SAVEDKEY