VMS Help  —  CRTL  open  Example
        #include <unixio.h>
        #include <fcntl.h>
        #include <stdlib.h>

        main()
        {
            int file,
                stat;
            int flags;

            flags = O_
 RDWR;  /*  Open for read and write,            */
                             /*  with user default file protection,  */
                             /*  with max fixed record size of 2048, */
                             /*  and a block size of 2048 bytes.     */

        file=open("file.dat", flags, 0, "rfm=fix", "mrs=2048", "bls=2048");
            if (file == -1)
                perror("OPEN error"), exit(1);

            close(file);
        }
Close Help