I want to dynamically use version_limit option from my C program when I am creating the file and directory. Just like the commands,
1. CREATE/DIRECTORY/VERSION_LIMIT=5 [JOHN.DOE.MYDIR]
2. SET FILE /VERSION_LIMIT=5 filename.c
Is it possible ? Can you explain with an example ?
Thanks in advance
Sandeep
(9885) Creating directories with Version Limits?
(9885) Creating directories with Version Limits?
Last edited by marty.stu on Thu Aug 18, 2022 10:09 am, edited 1 time in total.
Re: (9885) Creating directories with Version Limits?
See LIBRTL routine LIB$CREATE_DIR
Your "SET FILE/VERSION" is redundant as the setting on the directory will do what you want.
Code: Select all
LIB$CREATE_DIR device-directory-spec [,owner-UIC]
[,protection-enable] [,protection-value] [,maximum-versions]
[,relative-volume-number] [,initial-allocation]
...
maximum-versions
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.
Last edited by marty.stu on Thu Aug 18, 2022 10:10 am, edited 2 times in total.