>So, if you do not code a DISP on a DD statement then you will default
to NEW which creates an EXCL enq on the data set if >it is in use by
another function.  Once the function that allocated the file as default
NEW ends, it sets the DELETE bit 
>on the file.  Then when all the other functions that have the file,
free it, it will be deleted.  Which could be days,
>weeks, or months later?

I'm sorry but that simply isn't true.  There is no "delete" bit on a
file.  The way it works is quite simple actually.  When the disposition
is not coded it results in a default of DISP=NEW.  The second and third
parameters will default to the "state the data set was in when the job
started".  In other words, if the data set existed at the beginning of
the job it will continue to exist at the end (unless the DISP is coded
to explicitly instruct ALLOCATION to do otherwise).  Similarly if the
data set didn't exist before the job started it will be deleted at the
end (unless explicitly instructed otherwise).

There is no default condition that would allow an EXISTING data set to
be deleted.  Once a job ends, all disposition conditions are resolved.
The previous examples of an IMS library could not have occurred without
some other factors at play since it is impossible to allocate an
existing data set with a disposition of NEW and end up with it being
deleted.  

Disposition processing requires explicit coding before any action is
taken.

As for "never, ever, no way, should anybody never, ever not use a DISP
even if they want the default of NEW,DELETE", that is also not realistic
since it is done routinely when allocating temporary work files like
SORTWK and SYSUT1, etc. type files.  It clearly doesn't make sense to
code a disposition for a data set that allows the DSNAME to default.

Regards

Adam

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to