The RENAME and ERASE commands are indeed "atomic operations".
You can't even issue a RENAME or ERASE when the current workunit has
uncommited work.  Then you can get around by getting a new workunit, making
it the default, etc.  There is no *need* to use other than the deafult
workunit with DMSFILEC or DMSRENAM if you can afford committing all work
that is pending in that workunit.

Some other thing when using SFS: if you'd use the sequence COPY into
tempfile, followed by a RENAME to install a new version of "MY FILE" note
then that the auhtories granted to the orignal "MY FILE" or not copied to
the new version of "MY FILE".  That pleads to use DMSFILEC with REPLACE.

2011/3/22 Alan Altmark <alan_altm...@us.ibm.com>

> On Tuesday, 03/22/2011 at 12:18 EDT, Les Koehler <vmr...@tampabay.rr.com>
> wrote:
> > 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!)?
>
> Yes, you can (and in DIRECTORY CONTROL directories, too), but you need to
> become familiar with workunits, DMSGETWU, DMSPUSWU and DMSPOPWU.  See the
> discussion of workunits in Chapter 12 of the CMS Application Dev. Guide.
>
> If memory serves, you get a new workunit, push it on the stack, do all
> your file updates, then pop the workunit.  But it's been a long time. Just
> don't expect RENAME and ERASE to obey the rules.  I think they are atomic
> operations.
>
> Alan Altmark
>
> z/VM and Linux on System z Consultant
> IBM System Lab Services and Training
> ibm.com/systems/services/labservices
> office: 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