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

Reply via email to