On Thu, 12 Jul 2018 09:40:50 +1000, Andrew Rowley wrote:
>
>On a unix system, you can open a file for writing and another process
>can delete it while you have it open and create a new file with the same
>name. The file you are writing disappears when you close it. 
>
That's a sort of LUW isolation, a facility that has come relatively recently to
z/OS in PDSE members.  For better or for worse, however you view it.
Is it any worse than if the processes operated sequentially; no overlap.
Second guy wins.  Conscientious  second guy will create the file with
O_EXCL.  If you don't trust the second guy, lock him out with RACF profile
or file permissions.

If I want to be very nondisruptive I write to a temp name and rename at
the end.  This guarantees that no other job sees the update in transit.
UNIX rename() is preemptive: it quietly replaces any older file with the
same name; and atomic: no process will perceive an instant when the file
appears not to exist.  I wish I could get the same behavior from IDCAMS
RENAME.

>    ... This sort
>of thing is considered bad on z/OS. Sure, that's a function of z/OS
>enqueues etc., but JCL is the (relatively) easy to use interface to
>allocation.

On Thu, 12 Jul 2018 09:49:41 +1000, Andrew Rowley wrote:
>
>This works OK except when it doesn't. I recently encountered a problem
>where the command implicitly sourced /etc/profile. Which meant that
>things broke when /etc/profile changed the value of the environment
>variable.
> 
That sounds like a "Don't do that!"  Don't do that.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to