Alan forgot to mention one restriction: with a DIRC, only one user can get
R/W access at a given time.  And, the benefit: a DIRC can be placed in a
dataspace.

As for the trick to update a few files in one atomic operation: you had it
almost right, except that COPYFILE has no NOUPDIRT option, but that isn't
needed.  The use of temp files and the RENAMEs with NOUPDIRT that care of
that.

With SFS however, RENAME does not honor the NOUPDIRT option.

I never tried but you can use the CSL routine DMSFILEC, it has a NOCOMMIT
option.  At the end of the DMSFILEC calls, you then call DMSCOMM to commit
all copy operations (or DMSROLLB if you change your mind).  There is also a
DMSRENAM CSL routine, (with a NOCOMMIT option) but that is no longer
required thanks to DMSFILEC NOCOMMIT.

2011/3/22 Les Koehler <vmr...@tampabay.rr.com>

> So with FILE CONTROL you can't replace co-dependent files in one atomic
> operation, as one would do with the 'copyfile two-step' (love that phrase!)?
>
> Les
>
>
> Alan Altmark wrote:
>
>> On Monday, 03/21/2011 at 10:54 EDT, Les Koehler <vmr...@tampabay.rr.com>
>> wrote:
>>
>>> Does FILE CONTROL thus have the same exposure to a file being changed
>>>
>> 'under the
>>
>>> covers' as a minidisk has, possibly causing an error for the other
>>>
>> users?
>>
>>> Is there something similar to the minidisk trick of:
>>>
>>> copyfile new1 version a pseudo1 name k (noupdir
>>> copyfile new2 version a pseudo2 name k (noupdir
>>> rename old1 version k save1 version k (noupdir
>>> rename old2 version k save2 version k (noupdir
>>> rename pseudo1 name k old1 version k (noupdir
>>> rename pseudo2 name k old2 version k
>>>
>>> (hope I got that right!) to avoid impacting other users?
>>>
>>
>> You never get ERROR 3 READING FILE with SFS and you don't use the
>> "copyfile twostep" with SFS.  You just change the files.  If someone
>> accesses the directory while you're updating, then they will see changed
>> files on for files that are closed when they access it.  In that respect,
>> DIRCONTROL directories are better than minidisks.
>>
>> FILECONTROL directories reveal file changes immediately.  I.e. you can
>> open a file and see one set of content, then close and re-open and see
>> something new.  But you never see a mix and you never see the file while it
>> is open and being written to - you see the old version.  And if you erase a
>> file in a FILECONTROL directory, all authorizations are lost.
>>
>> Alan Altmark
>>
>> z/VM and Linux on System z Consultant
>> IBM System Lab Services and Training 
>> ibm.com/systems/services/labservicesoffice: 607.429.3323
>> mobile; 607.321.7556
>> alan_altm...@us.ibm.com
>> IBM Endicott
>>
>>


-- 
Kris Buelens,
IBM Belgium, VM customer support

Reply via email to