Re: want to read a dataset in use

2008-07-09 Thread J R
I believe dataset ENQs have *always* been done against real dsnames.  
Aliases can't be used to bypass data integrity.  
 
 
 Date: Wed, 9 Jul 2008 00:31:34 -0400
 From: [EMAIL PROTECTED]
 Subject: Re: want to read a dataset in use
 To: IBM-MAIN@BAMA.UA.EDU
 
 Thinking outside the box, what happens if I define an ALIAS for the 
 top level index (INDEX2 as an alias of INDEX1) or the full dataset 
 name (INDEX.FILE2 as an alias of INDEX.FILE1) and try to access via 
 the alias'ed name. Will it spot the duplicate usage or do the ENQ on 
 the Alias'ed name and thus allow me o get away with it? Also, if I am 
 APF authorized, I can allocate the dataset bypassing the ENQ and thus 
 open it to use to write a duplicate/cloned copy which can then be 
 scanned in lieu of the original.
 
 
 
 
_
It’s a talkathon – but it’s not just talk.
http://www.imtalkathon.com/?source=EML_WLH_Talkathon_JustTalk
--
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



Re: want to read a dataset in use

2008-07-09 Thread Paul Gilmartin
On Wed, 9 Jul 2008 00:31:34 -0400, Robert A. Rosenberg wrote:

Thinking outside the box, what happens if I define an ALIAS for the
top level index (INDEX2 as an alias of INDEX1) or the full dataset
name (INDEX.FILE2 as an alias of INDEX.FILE1) and try to access via
the alias'ed name. Will it spot the duplicate usage or do the ENQ on
the Alias'ed name and thus allow me o get away with it? Also, if I am

Empirically, the initiator ENQs on the alias name at the beginning
of the job, and attempts to allocate (thus ENQ) on the real name
at the beginning of the step.  If the latter does not succeed
immediately, it does not wait for it to become available, but fails
with a JCL error.

... Also, if I am
APF authorized, I can allocate the dataset bypassing the ENQ and thus
open it to use to write a duplicate/cloned copy which can then be
scanned in lieu of the original.

Sounds like it's not Shmuel's dog.  OTOH, z/OS Unix files work great.

-- gil

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



Re: want to read a dataset in use

2008-07-08 Thread al chu
Hi

Thanks everyone for the responses
I think I should have been more specific.
What I want to do is, to increase the dataset(QSAM) size. Records are
written to the dataset by the 3rd step (CICS). 

The dataset is browsed by many programmers using ISPF while the job(CICS) is
running, so I don't like to change the name.(The records browsed by ISPF may
be missing some records due to buffer not flushed - it's acceptable) 
I don't like to delete/define the dataset while CICS is down. 
So I added some steps in front of the CICS step to delete and allocate with
larger size  so that next CICS recycle can use the increased dataset with
the same dataset name. Obviously it didn't work with the message 'dataset in
use' when tried to browse the dataset from ISPF.

Any suggestion?  Thanks in advance.

Al

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Al Chu
Sent: Thursday, 3 July 2008 5:20 PM
To: IBM-MAIN@BAMA.UA.EDU
Subject: want to read a dataset in use

Hi

I am not a sysprog nor an expert. 
I want to read a dataset(seq) which is created by JCL DISP=(NEW,) of a long 
running job while the job is running. When i try to browse the dataset using

ISPF, I have 'dataset in use' msg.
I tried to rename the dataset using IDCAMS ALTER in the next step after the 
creation step and tried to read the renamed dataset, but still no good.
The last step is the long running step which writes some records in the 
dataset.

Is it possible? am i wasting time?
Thanks in advance

Al

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

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



Re: want to read a dataset in use

2008-07-08 Thread Skip Robinson
The problem seems to be that any reference to a data set in JCL with an
'exclusive' disposition (new, old, mod) will render the data set
inaccessible outside that job until it finishes. I haven't experimented,
but I would think that creating the data set dynamically would work. For
example, run a TSO TMP step

//CREATEDS EXEC PGM=IKJEFT1B
//SYSTSPRT DD SYSOUT=whatever
//SYSTSIN  DD whatever

either with individual TSO commands (delete, allocate, etc.) or with a Rexx
containing those commands. I'm pretty sure that the data set will be
accessible because the job's initial TIOT will not have an entry for it.

.
.
JO.Skip Robinson
Southern California Edison Company
Electric Dragon Team Paddler
SHARE MVS Program Co-Manager
626-302-7535 Office
323-715-0595 Mobile
[EMAIL PROTECTED]


   
 al chu
 [EMAIL PROTECTED] 
 ET.COM.AU To 
 Sent by: IBM  IBM-MAIN@BAMA.UA.EDU
 Mainframe  cc 
 Discussion List   
 [EMAIL PROTECTED] Subject 
 .EDU Re: want to read a dataset in use   
   
   
 07/08/2008 01:14  
 AM
   
   
 Please respond to 
   IBM Mainframe   
  Discussion List  
 [EMAIL PROTECTED] 
   .EDU   
   
   




Hi

Thanks everyone for the responses
I think I should have been more specific.
What I want to do is, to increase the dataset(QSAM) size. Records are
written to the dataset by the 3rd step (CICS).

The dataset is browsed by many programmers using ISPF while the job(CICS)
is
running, so I don't like to change the name.(The records browsed by ISPF
may
be missing some records due to buffer not flushed - it's acceptable)
I don't like to delete/define the dataset while CICS is down.
So I added some steps in front of the CICS step to delete and allocate with
larger size  so that next CICS recycle can use the increased dataset with
the same dataset name. Obviously it didn't work with the message 'dataset
in
use' when tried to browse the dataset from ISPF.

Any suggestion?  Thanks in advance.

Al

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



Re: want to read a dataset in use

2008-07-08 Thread Paul Gilmartin
On Tue, 8 Jul 2008 13:05:03 -0700, Skip Robinson wrote:

The problem seems to be that any reference to a data set in JCL with an
'exclusive' disposition (new, old, mod) will render the data set
inaccessible outside that job until it finishes. I haven't experimented,

My understanding is, no, not until the job finishes, but only
through the last step that has any JCL reference to the data
set (new, old, mod, shr).

but I would think that creating the data set dynamically would work. For
example, run a TSO TMP step

//CREATEDS EXEC PGM=IKJEFT1B
//SYSTSPRT DD SYSOUT=whatever
//SYSTSIN  DD whatever

either with individual TSO commands (delete, allocate, etc.) or with a Rexx
containing those commands. I'm pretty sure that the data set will be
accessible because the job's initial TIOT will not have an entry for it.

But beware, if in a subsequent step your JCL references that
data set, even with DISP=SHR, the job's inial TIOT will have an
entry for it, and creating the data set dynamically will upgrade
the ENQ to EXC, and the data set will remain inaccessible
outside that job until that later step finishes.

(Or so I've been told.)

-- gil

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



Re: want to read a dataset in use

2008-07-08 Thread Robert A. Rosenberg
At 19:13 -0500 on 07/08/2008, Paul Gilmartin wrote about Re: want to 
read a dataset in use:


But beware, if in a subsequent step your JCL references that
data set, even with DISP=SHR, the job's inial TIOT will have an
entry for it, and creating the data set dynamically will upgrade
the ENQ to EXC, and the data set will remain inaccessible
outside that job until that later step finishes.

(Or so I've been told.)

-- gil


Thinking outside the box, what happens if I define an ALIAS for the 
top level index (INDEX2 as an alias of INDEX1) or the full dataset 
name (INDEX.FILE2 as an alias of INDEX.FILE1) and try to access via 
the alias'ed name. Will it spot the duplicate usage or do the ENQ on 
the Alias'ed name and thus allow me o get away with it? Also, if I am 
APF authorized, I can allocate the dataset bypassing the ENQ and thus 
open it to use to write a duplicate/cloned copy which can then be 
scanned in lieu of the original.


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



want to read a dataset in use

2008-07-03 Thread Al Chu
Hi

I am not a sysprog nor an expert. 
I want to read a dataset(seq) which is created by JCL DISP=(NEW,) of a long 
running job while the job is running. When i try to browse the dataset using 
ISPF, I have 'dataset in use' msg.
I tried to rename the dataset using IDCAMS ALTER in the next step after the 
creation step and tried to read the renamed dataset, but still no good.
The last step is the long running step which writes some records in the 
dataset.

Is it possible? am i wasting time?
Thanks in advance

Al

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



Re: want to read a dataset in use

2008-07-03 Thread Vernooy, C.P. - SPLXM


Al Chu [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 Hi
 
 I am not a sysprog nor an expert. 
 I want to read a dataset(seq) which is created by JCL DISP=(NEW,) of a
long 
 running job while the job is running. When i try to browse the dataset
using 
 ISPF, I have 'dataset in use' msg.
 I tried to rename the dataset using IDCAMS ALTER in the next step
after the 
 creation step and tried to read the renamed dataset, but still no
good.
 The last step is the long running step which writes some records in
the 
 dataset.
 
 Is it possible? am i wasting time?
 Thanks in advance
 
 Al

This is not possible. The job has the dataset exclusive and this really
means it has the dataset exlusively.

There an other way, that might be usable for you: If the job can write
to SYSOUT i.s.o. a dataset, you can read the output it has produced with
SDSF while the job is running.

Kees.
**
For information, services and offers, please visit our web site:
http://www.klm.com. This e-mail and any attachment may contain
confidential and privileged material intended for the addressee
only. If you are not the addressee, you are notified that no part
of the e-mail or any attachment may be disclosed, copied or
distributed, and that any other action related to this e-mail or
attachment is strictly prohibited, and may be unlawful. If you have
received this e-mail by error, please notify the sender immediately
by return e-mail, and delete this message. 

Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries
and/or its employees shall not be liable for the incorrect or
incomplete transmission of this e-mail or any attachments, nor
responsible for any delay in receipt.
Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal
Dutch Airlines) is registered in Amstelveen, The Netherlands, with
registered number 33014286 
**

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



Re: want to read a dataset in use

2008-07-03 Thread Binyamin Dissen
On Thu, 3 Jul 2008 02:20:08 -0500 Al Chu [EMAIL PROTECTED] wrote:

:I am not a sysprog nor an expert. 
:I want to read a dataset(seq) which is created by JCL DISP=(NEW,) of a long 
:running job while the job is running. When i try to browse the dataset using 
:ISPF, I have 'dataset in use' msg.
:I tried to rename the dataset using IDCAMS ALTER in the next step after the 
:creation step and tried to read the renamed dataset, but still no good.
:The last step is the long running step which writes some records in the 
:dataset.

:Is it possible? am i wasting time?

It is possible, but will take some work.

If it is acceptable to just read the records that have been firmed to dasd,
you can write an APF program to read the DSCB and build a DEB that maps it.
Then you can use QSAM, but expect possible I/O errors at the end.

If you need to see records that are still in storage you will need to SRB
over.

Whether or not it is wasting time is a matter of opinion.

If you want to read in between, where you attempted the rename, you can copy
it instead and see the records from the first step.

--
Binyamin Dissen [EMAIL PROTECTED]
http://www.dissensoftware.com

Director, Dissen Software, Bar  Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

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



Re: want to read a dataset in use

2008-07-03 Thread Vernooy, C.P. - SPLXM


Binyamin Dissen [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 On Thu, 3 Jul 2008 02:20:08 -0500 Al Chu [EMAIL PROTECTED]
wrote:
 
 :I am not a sysprog nor an expert. 
 :I want to read a dataset(seq) which is created by JCL DISP=(NEW,) of
a long 
 :running job while the job is running. When i try to browse the
dataset using 
 :ISPF, I have 'dataset in use' msg.
 :I tried to rename the dataset using IDCAMS ALTER in the next step
after the 
 :creation step and tried to read the renamed dataset, but still no
good.
 :The last step is the long running step which writes some records in
the 
 :dataset.
 
 :Is it possible? am i wasting time?
 
 It is possible, but will take some work.
 
 If it is acceptable to just read the records that have been firmed to
dasd,
 you can write an APF program to read the DSCB and build a DEB that
maps it.
 Then you can use QSAM, but expect possible I/O errors at the end.
 
 If you need to see records that are still in storage you will need to
SRB
 over.
 
 Whether or not it is wasting time is a matter of opinion.
 
 If you want to read in between, where you attempted the rename, you
can copy
 it instead and see the records from the first step.
 
 --
 Binyamin Dissen [EMAIL PROTECTED]

Binyamin,
I thought about a similar answer, but with his opening sentence in mind,
I thought it was neither wise, nor useful to him.

Kees.
**
For information, services and offers, please visit our web site:
http://www.klm.com. This e-mail and any attachment may contain
confidential and privileged material intended for the addressee
only. If you are not the addressee, you are notified that no part
of the e-mail or any attachment may be disclosed, copied or
distributed, and that any other action related to this e-mail or
attachment is strictly prohibited, and may be unlawful. If you have
received this e-mail by error, please notify the sender immediately
by return e-mail, and delete this message. 

Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries
and/or its employees shall not be liable for the incorrect or
incomplete transmission of this e-mail or any attachments, nor
responsible for any delay in receipt.
Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal
Dutch Airlines) is registered in Amstelveen, The Netherlands, with
registered number 33014286 
**

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



Re: want to read a dataset in use

2008-07-03 Thread Paul Gilmartin
On Thu, 3 Jul 2008 09:24:44 +0200, Vernooy, C.P. - SPLXM wrote:

Al Chu wrote in message
news:[EMAIL PROTECTED]...
 Hi

 I am not a sysprog nor an expert.
 I want to read a dataset(seq) which is created by JCL DISP=(NEW,) of a
long
 running job while the job is running. When i try to browse the dataset
using
 ISPF, I have 'dataset in use' msg.
 I tried to rename the dataset using IDCAMS ALTER in the next step
after the
 creation step and tried to read the renamed dataset, but still no
good.
 The last step is the long running step which writes some records in
the
 dataset.

If that last step allocates the data set DISP=SHR, with the new
name assigned by IDCAMS ALTER, I don't understand why it can't
be read concurrently by other jobs.  I don't believe ALTER leaves
a persistent ENQ on the data set name.

This is not possible. The job has the dataset exclusive and this really
means it has the dataset exlusively.

There an other way, that might be usable for you: If the job can write
to SYSOUT i.s.o. a dataset, you can read the output it has produced with
SDSF while the job is running.

Same would be possible with a UNIX file (HFS or zFS), and access would
be more generally possible than via SDSF.

Or, preallocate the data set in a separate job, and allocate it only
DISP=SHR in the long running job.

Or, wrap your long running step in a Rexx exec which allocates the data
set dynamically SHR.  The exclusive ENQ will be freed after the last
step which mentions the data set name in JCL.

-- gil

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



Re: want to read a dataset in use

2008-07-03 Thread Jack Kelly
I don't understand, if you can rename the dataset in a second step, why 
you can't browse it after the first step. I just ran a test and created a 
dsn, with catalog as the disposition, and a second 'wait' step. I could 
read and delete the dsn from the first step while the job was in the 
'wait' second step.

Jack Kelly
202-502-2390 (Office)

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



Re: want to read a dataset in use

2008-07-03 Thread Steve Comstock

Jack Kelly wrote:
I don't understand, if you can rename the dataset in a second step, why 
you can't browse it after the first step. I just ran a test and created a 
dsn, with catalog as the disposition, and a second 'wait' step. I could 
read and delete the dsn from the first step while the job was in the 
'wait' second step.


Huh? How could this be? You sound like you're running the first and
second steps at the same time. Something's wacky here.



Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

  z/OS Application development made easier
* Our classes include
   + How things work
   + Programming examples with realistic applications
   + Starter / skeleton code
   + Complete working programs
   + Useful utilities and subroutines
   + Tips and techniques

== Check out the Trainer's Friend Store to purchase z/OS  ==
== application developer toolkits. Sample code in four==
== programming languages, JCL to Assemble or compile, ==
== bind and test. ==
==   http://www.trainersfriend.com/TTFStore/index.html==

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



Re: want to read a dataset in use

2008-07-03 Thread Paul Gilmartin
On Thu, 3 Jul 2008 09:23:31 -0400, Jack Kelly wrote:

I don't understand, if you can rename the dataset in a second step, why
you can't browse it after the first step. I just ran a test and created a
dsn, with catalog as the disposition, and a second 'wait' step. I could
read and delete the dsn from the first step while the job was in the
'wait' second step.

Ah, but I suspect that the OP had a DD statement for the data set in
the second step, and that you didn't.

-- gil

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



Re: want to read a dataset in use

2008-07-03 Thread Steve Comstock

Steve Comstock wrote:

Jack Kelly wrote:
I don't understand, if you can rename the dataset in a second step, 
why you can't browse it after the first step. I just ran a test and 
created a dsn, with catalog as the disposition, and a second 'wait' 
step. I could read and delete the dsn from the first step while the 
job was in the 'wait' second step.


Huh? How could this be? You sound like you're running the first and
second steps at the same time. Something's wacky here.



Oh, wait, I see what you mean. Perhaps:

I could read and delete the dsn created in the first step while the
job was in the second step.

?

Or did you mean you could read and delete the dsn created in
the first step from ISPF, while the job was in the second step?




Kind regards,

-Steve Comstock
The Trainer's Friend, Inc.

303-393-8716
http://www.trainersfriend.com

  z/OS Application development made easier
* Our classes include
   + How things work
   + Programming examples with realistic applications
   + Starter / skeleton code
   + Complete working programs
   + Useful utilities and subroutines
   + Tips and techniques

== Check out the Trainer's Friend Store to purchase z/OS  ==
== application developer toolkits. Sample code in four==
== programming languages, JCL to Assemble or compile, ==
== bind and test. ==
==   http://www.trainersfriend.com/TTFStore/index.html==

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



Re: want to read a dataset in use

2008-07-03 Thread Craddock, Chris
 I want to read a dataset(seq) which is created by JCL DISP=(NEW,) of a
 long
 running job while the job is running. When i try to browse the dataset
 using
 ISPF, I have 'dataset in use' msg.
 I tried to rename the dataset using IDCAMS ALTER in the next step
after
 the
 creation step and tried to read the renamed dataset, but still no
good.
 The last step is the long running step which writes some records in
the
 dataset.
 
 Is it possible? am i wasting time?

[CLC] Have you tried specifying FREE=CLOSE on the DD statement for
the dataset?

CC

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



Re: want to read a dataset in use

2008-07-03 Thread Paul Gilmartin
On Thu, 3 Jul 2008 09:39:04 -0400, Craddock, Chris wrote:

[CLC] Have you tried specifying FREE=CLOSE on the DD statement for
the dataset?

I believe that while FREE=CLOSE may free the DDNAME for the current
step, the ENQ remains in effect through the current step until the
end of the last subsequent step containing a DD statement for the
data set name.

-- gil

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



Re: want to read a dataset in use

2008-07-03 Thread Walt Farrell
On Thu, 3 Jul 2008 09:23:31 -0400, Jack Kelly [EMAIL PROTECTED]
wrote:

I don't understand, if you can rename the dataset in a second step, why
you can't browse it after the first step. I just ran a test and created a
dsn, with catalog as the disposition, and a second 'wait' step. I could
read and delete the dsn from the first step while the job was in the
'wait' second step.

To have a comparable test you would need a 3rd step that referenced that
same data set (or a DD for that data set in the 2nd step).  With your simple
two-step approach, the system dropped the ENQ after the first step because
no later step needed it.

-- 
  Walt

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



Re: want to read a dataset in use

2008-07-03 Thread Jack Kelly
snip
To have a comparable test you would need a 3rd step that referenced that
same data set (or a DD for that data set in the 2nd step).  With your 
simple
two-step approach, the system dropped the ENQ after the first step because
no later step needed it.
unsnip

That's the part that I missed or missed that thread. I assumed that if the 
dsn was able to be renamed in step 2, it wasn't used in further steps. 
This is what I attempted to imply with 'with catalog as the disposition'. 
Obviously I didn't do too well.

Jack Kelly
202-502-2390 (Office)

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



Re: want to read a dataset in use

2008-07-03 Thread Lizette Koehler
Have you tried adding FREE=CLOSE to the dataset?
The FREE parameter indicates when MVS is to free the resource(s)  
allocated to this DD statement.  The resource(s) can be device(s),
volume(s), or data set(s).
  
FREE=CLOSE is ignored when:   
  
-   The data set is a member of a concatenated group. 
  
-   The task using the data set abnormally terminates.
  
-   The data set is referenced by another DD statement in the same or 
subsequent step.  

Lizette



snip
To have a comparable test you would need a 3rd step that referenced that
same data set (or a DD for that data set in the 2nd step).  With your 
simple
two-step approach, the system dropped the ENQ after the first step because
no later step needed it.


That's the part that I missed or missed that thread. I assumed that if the 
dsn was able to be renamed in step 2, it wasn't used in further steps. 
This is what I attempted to imply with 'with catalog as the disposition'. 
Obviously I didn't do too well.

unsnip

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



Re: want to read a dataset in use

2008-07-03 Thread J R
 FREE=CLOSE is ignored when: 
 ...
 - The data set is referenced by another DD statement in the same or 
 subsequent step. 
 
 
That's the problem, the OP has a third long-running 
step that references the same dataset.  
 
 
 Date: Thu, 3 Jul 2008 11:46:32 -0400
 From: [EMAIL PROTECTED]
 Subject: Re: want to read a dataset in use
 To: IBM-MAIN@BAMA.UA.EDU
 
 Have you tried adding FREE=CLOSE to the dataset?
 The FREE parameter indicates when MVS is to free the resource(s) 
 allocated to this DD statement. The resource(s) can be device(s), 
 volume(s), or data set(s). 
 
 FREE=CLOSE is ignored when: 
 
 - The data set is a member of a concatenated group. 
 
 - The task using the data set abnormally terminates. 
 
 - The data set is referenced by another DD statement in the same or 
 subsequent step. 
 
 Lizette
 
 
 
_
Don't get caught with egg on your face. Play chicktionary!
http://club.live.com/chicktionary.aspx?icid=chick_wlhmtextlink1_feb
--
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



Re: want to read a dataset in use

2008-07-03 Thread Howard Brazee
On 3 Jul 2008 09:15:52 -0700, [EMAIL PROTECTED] (J R) wrote:

 
That's the problem, the OP has a third long-running 
step that references the same dataset.  

Is there any problem in referencing copies of the dataset then?

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



Re: want to read a dataset in use

2008-07-03 Thread (IBM Mainframe Discussion List)
A similar question was asked a few months ago.  Check the archives for  more 
ideas.
 
Bill  Fairchild
Rocket Software



**Gas prices getting you down? Search AOL Autos for 
fuel-efficient used cars.  
(http://autos.aol.com/used?ncid=aolaut000507)

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



Re: want to read a dataset in use

2008-07-03 Thread Paul Gilmartin
On Thu, 3 Jul 2008 11:10:45 -0400, Jack Kelly wrote:

That's the part that I missed or missed that thread. I assumed that if the
dsn was able to be renamed in step 2, it wasn't used in further steps.
This is what I attempted to imply with 'with catalog as the disposition'.
Obviously I didn't do too well.

You and J R both hint at an interesting question.  If I have:

//STEP1
//SYSUT2  DD  DISP=NEW,DSN=OLD.NAME

//STEP2   EXEC PGM=IDCAML
  ALTER OLD.NAME NEW.NAME

//STEP3
//SYSUT2  DD  DISP=SHR,DSN=NEW.NAME

... Will the ENQ be SHR in STEP3, or will IDCAMS upgrade the SHR
ENQ issued by the initiator to EXC in order to perform the rename?
My only direct experience is that DEFINE/DELETE ALIAS requires no
ENQ on the alias name; I nave no information on the related name.

-- gil

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