I'm afraid I haven't been following this thread in detail but I see the
discussion has turned to what the DISP operand of the DD statement does.
In case it might be of interest, I'll pass on a "trick" I was told many
years ago which I found very helpful with the sort of test or - as it seems
to be described these days - "sandbox" systems I used to use for research
and education. In other words, as a "trick" it may not meet the strict
requirements of production systems.
What follows is how the technique is described in some lecture notes I have
hung onto. Note that, at the time I wrote these notes, I believe this
"trick" was a "little-known capability". Maybe it's "old hat" today. Also
I've a strong feeling this technique will be torn apart by the gurus here
assembled :-) Talking of gurus, perhaps to spare any blushes, it's as well
I've forgotten the name of the gentleman who passed on this "little-known
capability" to me but I do remember he was on assignment at my education
centre from the Washington Systems Center. Oh - and I did use this technique
wherever I may have needed dump or trace data sets in many typically started
task procedures for those many years over many releases, possibly versions,
of the underlying software.
Having copied the text, I note it doesn't explicitly make the point I wanted
to mention here which is that DISP=MOD doesn't care whether or not the
referenced data set exists already. Thus, with the aid of DISP=MOD, you can
make - expletive deleted - sure that it doesn't exist - and doesn't fail
your started task procedure.
Dump Data Set Suggestion
------------------------
It may be convenient, particularly in a test environment, to be able to
start VTAM under MVS in such a way that the existence or otherwise of the
NCP dump data sets can be tolerated either way when the VTAM, NET, procedure
starts.
This is possible using a little-known capability of the DD-statement DISP
operand first suboperand MOD value.
In addition it must be possible to be able to start the VTAM, NET, procedure
as a multiple-step job.
Starting VTAM as a multiple step job is possible if the program properties
table, PPT, entry for VTAM does
NOT have the system task attribute. The IBM-supplied PPT entry for VTAM in
module/CSECT IEFSDPPT in
SYS1.LINKLIB has the system task attribute. This can be re-specified using
the SCHEDxx member of SYS1.PARMLIB.
The entry for VTAM would then have the form:
--------------------------
| PPT PGMNAME(ISTINM01) |
| KEY(06) |
| NOCANCEL |
| NOPASS |
| NOPREF |
| NOSWAP |
--------------------------
Note: The system task attribute, defined by the keyword SYST, is not
present.
A VTAM, NET, procedure in a system with the above modification may now run
with multiple steps. An example of such a procedure which ensures that the
NCP dump data set is created freshly when the procedure is started and is
not sensitive to whether the data set exists or not, is as follows:
-----------------------------------------------------
| //NET PROC |
| //* |
| //IEFBR14 EXEC PGM=IEFBR14 |
| //NCPDUMP DD DSN=USER.NCPDUMP,DISP=(MOD,DELETE), |
| // VOL=REF=SYS1.PARMLIB,SPACE=(TRK,1) |
| //* |
| //NET EXEC PGM=ISTINM01,TIME=1440,REGION=2048K |
| //STEPLIB DD DSN=SYS1.SSPLIB,DISP=SHR |
| //VTAMLST DD DSN=USER.VTAMLST,DISP=SHR |
| //VTAMLIB DD DSN=USER.VTAMLIB,DISP=SHR |
| // DD DSN=SYS1.VTAMLIB,DISP=SHR |
| //NCPLOAD DD DSN=USER.NCPLOAD,DISP=SHR |
| //NCPDUMP DD DSN=USER.NCPDUMP,DISP=(NEW,KEEP), |
| // VOL=REF=SYS1.PARMLIB,SPACE=(TRK,(1,50),RLSE), |
| // DCB=(RECFM=F,LRECL=512,BLKSIZE=512) |
-----------------------------------------------------
The SPACE operand of the NCPDUMP DD-statement is specified so that only one
track is allocated if no dump is taken and, if a dump is taken and VTAM is
terminated normally, the data set will contain no unused space.
Similar DD-statements may be placed in both job steps if separate MOSS and
CSP dump data sets are required.
Note: Removal of the system task attribute also implies that job step timing
will be used, so TIME=1440 has been added to the EXEC statement for the VTAM
program, ISTINM01.
Chris Mason
----- Original Message -----
From: "Gerhard Adam" <[EMAIL PROTECTED]>
Newsgroups: bit.listserv.ibm-main
To: <[email protected]>
Sent: Thursday, 08 December, 2005 11:47 PM
Subject: Re: 'ALLOCATE' a data set in my TSO/E session
> >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