create:
    procedure options(main);
    /* create name and address file */

%include 'record.dcl';

    %replace
        true by '1'b,
        false by '0'b;
    dcl
        output file;
    dcl
        filename character(14) varying;
    dcl
        eofile bit(1) static initial(false);

    put list ('Name and Address Creation Program, File Name: ');
    get list (filename);

    open file(output) stream output title(filename);

        do while (^eofile);
        put skip(3) list('Name: ');
        get list(name);
        eofile = (name = 'EOF');
        if ^eofile then
            do;
            /* write prompt strings to console */
            put list('Address: ');
            get list(addr);
            put list('City, State, Zip: ');
            get list(city, state, zip);
            put list('Phone: ');
            get list(phone);

            /* data in memory, write to output file */
            put file(output)
                list(name,addr,city,state,zip,phone);
            put file(output) skip;
            end;
        end;
    put file(output) skip list('EOF');
    put file(output) skip;
    end create;
