Lizette, the default DISP for existing datasets is OLD,KEEP, not OLD,DELETE.

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 08, 2005 10:22 AM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Re: 'ALLOCATE' a data set in my TSO/E session

Johnny,

When allocating any dataset under TSO or BATCH I always ensure the DISP
parameter is properly set.

If you just code a DD statement of

        //DD1  DD DSN=datasetname    

Then the default DISP is OLD,DELETE.  That means at job termination the data
set will be deleted.  I will let others on the list address how DFSMS might
change that statement.


So if you are using

        ALLOOCATE DSN(CENTER.UADS) DD(SYSUADS)  

During the time of your TSO session, the CENTER.UADS data set is allocated
with OLD which is an EXCLUSIVE enq and not SHARED.

I would use instead

        ALLOCATE DSN(CENTER.UADS) DD(SYSUADS) SHR REUSE

To make sure the defaults are not used and a data sets is not accidentally
deleted.

I am not sure if the default for ALLOCATE under TSO is OLD,DELETE as well.
If it is, then you also risk accidentally deleting the data set when it is
freed from your TSO session.

The whole point is if you do not specify a DISP parm then the default of OLD
is usually used.  That creates an exclusive ENQ and no one else can use the
file until it is released.

Second, you probably need to review the TSO/E REXX and TSO CLIST manuals.
They have many examples on how to set up CLIST and REXX execs that run in
Batch or TSO.



Lizette Koehler

----------------------------------------------------------------------
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

_
This message and any attachments are intended only for the use of the addressee 
and
may contain information that is privileged and confidential. If the reader of 
the 
message is not the intended recipient or an authorized representative of the
intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication in
error, please notify us immediately by e-mail and delete the message and any
attachments from your system.

----------------------------------------------------------------------
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