Operating System - OpenVMS
1752662 Members
5598 Online
108788 Solutions
New Discussion

Re: Modify backup date and time of file attribute on DEACCESS, not revision date and time and versi

 
allin-in-one
Frequent Advisor

Re: Modify backup date and time of file attribute on DEACCESS, not revision date and time and versi

Thanks for the suggestion.

I tried your suggestions but result is same.

 

Thanks.

H.Becker
Honored Contributor

Re: Modify backup date and time of file attribute on DEACCESS, not revision date and time and versi

As far as I understand, you can't close (IO$_DEACCESS) a file, which was opened (IO$_ACCESS| IO$M_ACCESS) for write access without updating the revision. If you ONLY want to modify the BAKDATE you may want to use just IO$_MODIFY: this works as expected.

 

As mentioned before, Steven's example, vms.c, shows how to do that. As Steve mentioned, (in your example,) use the VMS supplied header files, consider using __NEW_STARLET, check the return status and use/check the iosb.

 

allin-in-one
Frequent Advisor

Re: Modify backup date and time of file attribute on DEACCESS, not revision date and time and versi

Hi,

 

Finally found the solution.

 

The changed code is

 

status = sys$qiow(0, /* Event flag */
DevChan, /* Channel number */
IO$_DEACCESS, /* I/O function */
0, /* NO iosb */
0, &FibDesc,  /* P1 buffer */
&FileName, /* P2 buffer length */
0, 0, qio_bdt, 0);

 

i.e. just adding P1 buffer and P2 buffer to the sys$qiow.

 

 

Thank you all for your help and time.