For arbitrary data set names, no way to do it with any built-in data set
controls.
The easiest way to do this in a Unix/Linux environment would be to
design the application to use a unique directory name that contains all
4 files and use the convention that when you want to delete the
"primary" data set that you do it by deleting the directory and all its
contents to delete the 4 related files together. The MVS data set
counterpart to this would be to design the naming convention for these
files so they have a common unique set of high-level qualifiers, so that
a utility deleting all data sets with that specific set of high-level
qualifiers would delete all related data sets together. Alternatively,
if the naming conventions would allow a REXX script to deduce the names
of all related data sets from the primary data set name, you could use a
REXX script to delete all the related pieces.
If you have no control over the data set names chosen so the names
themselves don't indicate the connection, there still has to be some
process that knows the data sets are related. That process could
perhaps create a "control" data set (say "a.a.delete" for the example
given) which contains directives for some utility (IDCAMS, DFDSS, etc)
to delete all four data sets at the same time, and whatever process
needs to delete the main data set would have to follow the convention of
using that "delete" data set with the appropriate utility to delete all
4 data sets and then delete the "delete" control data set.
Those would seem to be the simplest approaches to achieve the required
result. Things get more complex if you give someone the power to
directly delete the primary data set by itself and they refuse to follow
the required conventions to manage the data sets. There are possibly
ways (program-controlled dataset access) that RACF could be used to
restrict the ability to delete a data set unless the intended utility is
being used.
Any way you choose do it will require setting up conventions that
everyone creating/deleting these data sets will be required to follow.
Good data set naming conventions are the simplest solution and also make
it simple to eyeball violations of deletion policies and perform some
kind of automated cleanup.
J.C. Ewing
On 12/28/21 15:15, Seymour J Metz wrote:
I'm not aware of any way to do that for either legacy datasets or for paths
(Unix files). However, it should be possible to put together a subsytem with
that sort of behavior for datasets handled by the subsystem.
--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
________________________________________
From: IBM Mainframe Discussion List [[email protected]] on behalf of
PINION, RICHARD W. [[email protected]]
Sent: Tuesday, December 28, 2021 4:10 PM
To: [email protected]
Subject: Link between datasets
I'm going to ask what many of you may consider a foolish question. Please be
kind in
your criticism. Let's say I have 4 datasets, a.a, b.b, c.c, and d.d. Is there
any way to
define a relationship between a.a to b.b, a.a to c.c , and a.a to d.d? What I
would like
to happen, if a.a is deleted, b.b, c.c, and d.d would be deleted.
Confidentiality notice:
This e-mail message, including any attachments, may contain legally privileged
and/or confidential information. If you are not the intended recipient(s), or
the employee or agent responsible for delivery of this message to the intended
recipient(s), you are hereby notified that any dissemination, distribution, or
copying of this e-mail message is strictly prohibited. If you have received
this message in error, please immediately notify the sender and delete this
e-mail message from your computer.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
--
Joel C. Ewing
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN