Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
To know whether any Particular Dataset is in use or not

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
nallapureddy

New User


Joined: 27 Jul 2005
Posts: 18

PostPosted: Tue Aug 02, 2005 3:44 pm    Post subject: To know whether any Particular Dataset is in use or not
Reply with quote

Is there any Command in CLIST or REXX to know whether any Particular Dataset is in use or not?

Nallapureddy
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Tue Aug 02, 2005 6:22 pm    Post subject: Re: Help needed
Reply with quote

No.
Back to top
View user's profile Send private message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Fri Aug 05, 2005 10:35 am    Post subject:
Reply with quote

Hi Nallapureddy,
if I have understood correctly...

This will work for you..

TSO WHOHAS 'YOUR.DATASET.NAME' this command is going to tell you
if any job/or user holding 'YOUR.DATASET.NAME'
Back to top
View user's profile Send private message
bluebird

Active User


Joined: 03 Feb 2004
Posts: 127

PostPosted: Wed Aug 17, 2005 6:56 pm    Post subject:
Reply with quote

also if you are trying to edit a sequential ds and somebody is already editing it
you'll get a dataset in use msg . press F1 and you will have a list of users enqueueing your ds.
Back to top
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Tue Aug 23, 2005 2:29 pm    Post subject:
Reply with quote

I think that this can be useful:
http://ibmmainframes.com/viewtopic.php?t=3619
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 205
Location: Bangalore

PostPosted: Wed Apr 25, 2007 3:08 pm    Post subject: Re: To know whether any Particular Dataset is in use or not
Reply with quote

I know how to do it in ISPF.


Step1-> TSO ISRDDN or go to option 6 in ISPF.
Step2-> In that give ENQ in the command Line, a screen will popup
Step3-> infront of Minor name prefix option, Enter Dataset name (See the screen shot. )
Step4-> Hit enter
You get the list of all jobs currently using the dataset.


hope it helps.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Apr 25, 2007 10:31 pm    Post subject:
Reply with quote

Hello,

Most of those suggestions are how to find "who" has the dataset.

The original question is
Quote:
Is there any Command in CLIST or REXX to know whether any Particular Dataset is in use or not?


I may be mis-understanding, but the posted question appears to want to do this in code - not after getting an "in use" message from tso/ispf. . .
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Thu Apr 26, 2007 12:54 am    Post subject:
Reply with quote

This is how I would do it:
1. Write REXX exec to capture the dataset name;
2. Invoke edit-macro internally, using the EDIT service;
3. Capture and interpret the return code from the edit-macro.
4. Display a message.

O.
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 205
Location: Bangalore

PostPosted: Fri Apr 27, 2007 12:36 pm    Post subject: Re: To know whether any Particular Dataset is in use or not
Reply with quote

Use REXX built-in function SYSDSN to find whether the dataset is available for your use.

eg; x = SYSDSN("'proj5.rexx.exec'")
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Fri Apr 27, 2007 8:09 pm    Post subject:
Reply with quote

ARG FILENAME

FILECODE = SYSDSN("'"FILENAME"'")

IF FILECODE = 'OK'
THEN DO
RTRNCODE = 8
END
ELSE DO
RTRNCODE = 0
END
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10308
Location: italy

PostPosted: Sat Apr 28, 2007 8:42 pm    Post subject:
Reply with quote

A few remarks

The poster wants to know how to find out if a dataset is in use..
>> if somebody else has it allocated

WHOHAS is certainly a local tool

SYSDSN will only return info on the dataset existance

a trick that could be used is to
allocate it with disposition OLD in order to get exclusive control on it,
if the allocation fails then it is in use, to find out about users holding it
then other tools are needed.

regards

e.s
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Mon Apr 30, 2007 10:53 pm    Post subject:
Reply with quote

enrico-sorichetti

you need to read up on SYSDSN as it will tell you if the dataset
is in use.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10308
Location: italy

PostPosted: Tue May 01, 2007 12:37 am    Post subject: Re: To know whether any Particular Dataset is in use or not
Reply with quote

Quote:


UNAVAILABLE DATASET /* another user has an exclusive ENQ
on the specified data set */


The OP asked for dataset in use, not exclusive enq only
Back to top
View user's profile Send private message
TizMe

New User


Joined: 05 Jan 2006
Posts: 72

PostPosted: Tue May 01, 2007 7:40 am    Post subject:
Reply with quote

ISPEXEC QUERYENQ is described in the ISPF Services Guide.

It will tell you if a dataset is in use.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us