HELPLIB.HLB  —  RDML72  Statements  Trans Handle, Examples  C Example
    #include <stdio.h>
    DATABASE PERS = FILENAME "PERSONNEL";

    extern void pad_string();

    main()
    {
    int EMP_UPDATE = 0;

    READY PERS;
    START_TRANSACTION (TRANSACTION_HANDLE EMP_UPDATE) READ_WRITE;

    FOR (TRANSACTION_HANDLE EMP_UPDATE) E IN EMPLOYEES
       WITH E.EMPLOYEE_ID = "00178"
          MODIFY E USING
             pad_string("Brannon", E.LAST_NAME, sizeof(E.LAST_NAME));
          END_MODIFY;
    END_FOR;

    COMMIT(TRANSACTION_HANDLE EMP_UPDATE);
    FINISH;
    }
Close Help