HP OpenVMS Systems

ask the wizard
Content starts here

Creating directories with Version Limits?

» close window

The Question is:

I want to dynamically use version_limit option from my C program when I am
 creating the file and directory. Just like the commands,
2. SET FILE /VERSION_LIMIT=5 filename.c
Is it possible ? Can you explain with an example ?
Thanks in advance

The Answer is :

    LIB$CREATE_DIR device-directory-spec [,owner-UIC]
        [,protection-enable] [,protection-value] [,maximum-versions]
        [,relative-volume-number] [,initial-allocation]
    OpenVMS usage:  word_unsigned
    type:  word (unsigned)
    access:  read only
    mechanism: by reference
    Maximum number of versions allowed for files created in the newly
    created directories. The maximum-versions argument is the address of an
    unsigned word containing the value of the maximum number of versions.
    The maximum-versions argument is optional. The default is the parent
    directory's default version limit. If maximum-versions is zero, the
    maximum number of versions is not limited.
    Your "SET FILE/VERSION" is redundant as the setting on the directory
    will do what you want.

answer written or last revised on ( 21-OCT-2004 )

» close window