When UNIX is your forte, then recommending a UNIX solution may seem to be the way to go. The OP for this problem knew that GDG's solved his problem but he just didn't understand how and why. Following his lead is the way to go. MVS GDG's provide a natural solution that is preemptive and atomic.It's preemptive in that user's access the (0) generation which is always the current cataloged generation / always available and atomic in that the user's will only see the new version if (or when) it becomes cataloged. If the dataset is deleted before being cataloged, no one ever see's it.
The advantage of GDG's over UNIX RENAME is that we don't risk someone inadvertently specifying an incorrect file name that could potentially delete an important file. GDG's are predominantly used in JCL and they work very well, Use of DISP=(NEW,CATLG,DELETE) deletes when there is an abend otherwise it catalogs the new version instantaneously without interrupting current users. There's no need to rename the dataset. IBM could easily implement IDCAM's ALTER ALIAS to serve this purpose but GDG's have served us so well for so long that we don't really need to be a UNIX variant. Jon Perryman.. ----- Original Message ----- > From: Paul Gilmartin <[email protected]> > To: [email protected] > Cc: > Sent: Friday, October 25, 2013 7:05 AM > Subject: Re: GDG question > > 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: ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
