Gil,

I wonder if said "observant user" would notice a file name which started
with a period, followed by the characters "newversion-of', another period,
then the original file name?

E.g.

PUT updated-file .newversion-of.static-name
RENAME .newversion-of.static-name static-name




On Fri, Oct 25, 2013 at 9:05 AM, Paul Gilmartin <[email protected]>wrote:

> On Thu, 24 Oct 2013 21:25:50 -0700, Phil Smith wrote:
> >
> >But the data is also shared across tasks, so we don't want a window where
> it's half-written and some task tries to read it.
> >
> UNIX files provide the natural solution to such a requirement
> in that the UNIX rename() is preemptive and atomic:
>
> o Preemptive in that rename() replaces any previously existing
>   file (directory entry, actually) having the new name.
>
> o Atomic in that the operation is serialized by the kernel so
>   that no other process doing a search for the file can encounter
>   a window during which the file is not found.
>
> There ought to be a Requirement to provide a similar facility
> in IDCAMS.  PDSE does very similarly for PDSE members.
> Can you use PDSE members?
>
> I regularly make use of this using FTP, actually, to install
> updated versions of certain files:
>
>     PUT updated-file tempname
>     RENAME tempname static-name
>
> A couple times an observant user has spotted the tempname
> file while the operation was progress and asked me to
> explain its existence.  But he never had to deal with an
> incomplete file.
>
> -- gil
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>



-- 
This is clearly another case of too many mad scientists, and not enough
hunchbacks.

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to