VMS Help  —  RDML72  Statements  FIRST_FROM, Examples  C Example
    #include <stdio.h>
    DATABASE PERS = FILENAME "PERSONNEL";

    DECLARE_VARIABLE name SAME AS PERS.CURRENT_JOB.LAST_NAME;
    main()
    {
    READY PERS;
    START_TRANSACTION READ_ONLY;

    GET
     name =  FIRST C.LAST_NAME FROM C IN CURRENT_JOB
             WITH C.JOB_CODE = FIRST J.JOB_CODE FROM J IN JOBS
             WITH J.JOB_TITLE = "Company President"
             SORTED BY C.JOB_CODE;
    END_GET;

    printf ("Last name is %s", name);

    COMMIT;
    FINISH;
    }
Close Help