Don

> The simple answer:

This is not a topic for people who need "simple answers"!

When I said

>...> DISP=NEW/MOD insists that the member does not exist irrespective of 
whether or not a partitioned data set exists

obviously I was concentrating on the only on first suboperand of the DISP 
operand.

It seems we must take a different perspective according to whether we are 
dealing with the first suboperand or the second and third suboperands - not at 
all "simple"!

> The DISP parameter is for the data set/library and not members.

Apparently not so in the case of the first suboperand.

If a member name is specified, the first suboperand relates to the member and 
appears not to care about the data set. Otherwise why make a fuss about 
whether a member exists or not in a data set that can't be there to contain 
the member - which may or may not be there - if the data set is not supposed 
to exist - in the case of DISP=NEW anyhow. There's something of the 
Cheshire Cat about this!

Here, once again for your delectation, is the first paragraph of the 
section "12.19.8 Disposition of Partitioned Data Sets (PDSs and PDSEs)" from 
the z/OS V1R12 MVS JCL Reference manual:

http://publibz.boulder.ibm.com/cgi-
bin/bookmgr_OS390/BOOKS/IEA2B6A0/12.19.8

<quote>

When you specify DISP=MOD or DISP=NEW for a partitioned data set (PDS) or 
partitioned data set extended (PDSE), and you also specify a member name in 
the DSNAME parameter, the member name must not already exist. If the 
member name already exists, the system terminates the job. 

</quote>

If you can explain this away, I'll accept your "simple" contention also 
regarding 
the first suboperand.

> For example, DSN=MY.LIBRARY(MYMEM),DISP=(OLD,DELETE) deletes the 
library and not just the member.

Assuming you verified your example rather than just composing it in order to 
illustrate your point, it appears that the normal and abnormal termination 
disposition suboperands do indeed apply to the data set irrespective of 
whether or not a member name is specified. I checked the z/OS V1R12 MVS 
JCL Reference manual to try to be sure and there is certainly no mention of 
any variation based on whether or not a member name is specified so I guess 
an actual test would have been superfluous.

http://publibz.boulder.ibm.com/cgi-
bin/bookmgr_OS390/BOOKS/IEA2B6A0/12.19.2.2
http://publibz.boulder.ibm.com/cgi-
bin/bookmgr_OS390/BOOKS/IEA2B6A0/12.19.2.3

Indeed, it's all getting a bit complex and the poor systems programmer who 
tried to delete a member using the DISP second suboperand can be forgiven - 
well by those who were not desperately relying on the partitioned data set, 
that is![1]

-

A modification to my previous post with the diagrams:

In the case of a DISP=NEW data set or dataset(member) - and DISP=MOD if 
the entity has had no existence hitherto - it is an error not to write 
something. This makes my "error or immediate EOF" simply "error". 
An "immediate EOF" would be possible only if the data set - or a member I 
guess - had deliberately been created - "written to" - with 0 records. 
Alternatively I'll be happy to be corrected.

-

Chris Mason

[1] This reminds me of an occasion when I keyed up a SCRATCH statement 
that was supposed to be coded as 

SCRATCH VTOC,VOL=2314=MYVOLM,SYS

After that traumatic event, I resolved always to use the order

SCRATCH VTOC,SYS,VOL=2314=MYVOLM

because it turns out you can't always be sure that where you intended to key 
a comma, a comma actually got keyed!

I remember even better because it was New Year's Eve and the was someone 
from north of the border in the overworked team.


On Sat, 5 Mar 2011 15:12:41 -0500, Don Williams <donb...@gmail.com> 
wrote:

>The simple answer: The DISP parameter is for the data set/library and not
>members.
>
>For example, DSN=MY.LIBRARY(MYMEM),DISP=(OLD,DELETE) deletes the 
library and
>not just the member.
>
>-----Original Message-----
>From: IBM Mainframe Discussion List [mailto:IBM-MAIN@bama.ua.edu] On 
Behalf
>Of Charles Mills
>Sent: Friday, March 04, 2011 3:03 PM
>To: IBM-MAIN@bama.ua.edu
>Subject: Difference between DISP=NEW and MOD for a PDS member?
>
>What is the difference between DISP=NEW and DISP=MOD for a PDS member
>(member name specified on the DD statement)?
>
>Both disallow duplicate member names. Are there any differences? What?
>
>Charles

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

Reply via email to