Previous Topic: @ACCEPT DBKEY RELATIVE TO CURRENCY ParametersNext Topic: @ACCEPT DBKEY RELATIVE TO CURRENCY Status Codes


@ACCEPT DBKEY RELATIVE TO CURRENCY Example

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

  1. Traverses the DEPT-EMPLOYEE set
  2. Saves the db-key of the owner record of the OFFICE-EMPLOYEE set
  3. Accesses the owner record of the OFFICE-EMPLOYEE set by using the saved db-key, after further processing has changed currency
    MVC   DEPTID,=CL4'1234'
    
    @FIND CALC,REC='DEPARTMENT'
    
    @FIND NEXT,SET='DEPT-EMPLOYEE'
    
    @ACCEPT DBKEY=SAVDKEY,SETO='OFFICE-EMPLOYEE'
    
    .
    
    .
    
    @OBTAIN DBKEY=SAVEDKEY