VMS Help  —  RDML72  Statements  DB Handle, Examples
    The following program segments demonstrate how to use a database
    handle in a READY statement. These segments declare a COMPILETIME
    database and ready it. Because a RUNTIME database is not
    explicitly declared, the programs use the COMPILETIME database
    at runtime also.

1  –  C Example

    #include <stdio.h>
    DATABASE PERS = FILENAME "PERSONNEL";

    main ()
    {
    READY PERS;
    START_TRANSACTION READ_ONLY;

    /* perform some database actions */

    COMMIT;
    FINISH PERS;
    }

2  –  Pascal Example

    program dbhandle (input,output);
    DATABASE PERS = FILENAME 'PERSONNEL';

    begin
    READY PERS;
    START_TRANSACTION READ_ONLY;

    {* perform some actions on the database *}

    COMMIT;
    FINISH PERS;
    end.
Close Help