IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

REXX to find who is using a dataset currently


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sangiah

New User


Joined: 10 Jun 2005
Posts: 62

PostPosted: Wed Jun 15, 2005 9:28 am
Reply with quote

Any one has a REXX to find who is using a dataset currently.
Back to top
View user's profile Send private message
jz1b0c

Active User


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

PostPosted: Wed Jun 15, 2005 1:26 pm
Reply with quote

Hi,
There must be a clist already coded for this,

you can try TSO WHOHAS 'abcd.xyz.dataset'

if you are in TSO Command (6 option from primary ISPF)
then simply type WHOHAS 'abcd.xyz.dataset'
Back to top
View user's profile Send private message
MGIndaco

Active User


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

PostPosted: Wed Jun 15, 2005 1:49 pm
Reply with quote

I think that TSO WHOHAS is not a standard of IBM, I tried but for me it doesn't work.
If it's tha same for you try with TSODSN and outtrap the message.
Command is TSO TSODSN 'filename'

P.S.=I can't assure your that this is official...
Back to top
View user's profile Send private message
Zai Cabading

New User


Joined: 11 May 2005
Posts: 7

PostPosted: Thu Jun 16, 2005 2:00 pm
Reply with quote

both TSO WHOHAS and TSO TSODSN works for me... just now that I tried TSO TSODSN...

regards,
zai
Back to top
View user's profile Send private message
sangiah

New User


Joined: 10 Jun 2005
Posts: 62

PostPosted: Thu Jun 16, 2005 3:21 pm
Reply with quote

both did not work for me
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Jun 16, 2005 3:57 pm
Reply with quote

The WHOHAS utility is a shareware program that you should be able to locate from an Internet search. Also, sangiah, the other posts you made in this forum are also shareware programs that you should be able to locate. I'd ask your Systems Programming folks first. Maybe they would know where to find them.

For what it's worth, you can, of course find who is using a dataset by entering HELP when you receive the error message that the dataset is in use. Also, you can always contact one of your operators in the Data Center. This can also be determined by issuing a specific MVS command at the Master Console.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Thu Jun 16, 2005 4:16 pm
Reply with quote

As SUPERK said here....
Quote:
find who is using a dataset by entering HELP


press F1 twice, you'll get the ID of the user using that dataset currently.

Regards,

Priyesh.
Back to top
View user's profile Send private message
MGIndaco

Active User


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

PostPosted: Thu Jun 16, 2005 9:48 pm
Reply with quote

Ok, mystery bypassed through a console command:
Code:
PROC 1 DSN
OPER
D GRS,RES=(*,&DSN)
END
EXIT
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Thu Sep 01, 2005 5:53 pm
Reply with quote

In case of a VSAM dataset pressing F1 twice doesn't work.

How can we know the job/user using VSAM Dataset.

MGIndaco,

How to run this console command you gave below ?

Regards,

Priyesh.
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Thu Sep 01, 2005 6:11 pm
Reply with quote

HI Priyesh,

Quote:
How can we know the job/user using VSAM Dataset.



You can use WHOSGOT infront of VSAM file.

It will give you information regarding who is using your VSAM dataset.

Regards
Rupesh
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Thu Sep 01, 2005 6:17 pm
Reply with quote

That doesnt work for me....

Regards,

Priyesh.
Back to top
View user's profile Send private message
Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 463

PostPosted: Thu Sep 01, 2005 6:28 pm
Reply with quote

Hi Priyesh,

It may be shop dependent. It is working for me.

Regards
Rupesh
Back to top
View user's profile Send private message
MGIndaco

Active User


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

PostPosted: Thu Sep 01, 2005 6:40 pm
Reply with quote

Hi Priyesh.
Put the PROC into a SYSPROC library concatenated or in your library and type EX near the member to execute it.(If you put it in a concatenated library you can also call it with the command TSO xxx <- name of the member given to it)
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Thu Sep 01, 2005 6:54 pm
Reply with quote

Thanks MGIndaco,

I executed it...But was not authorized to use OPERATOR Command.

YOUR INSTALLATION MUST AUTHORIZE USE OF OPERATOR COMMAND

Well, Thanks a lot for the help...

Hit & Trial worked for me.....& I got TSO WHO working fine for me.....

Regards,

Priyesh.
Back to top
View user's profile Send private message
MGIndaco

Active User


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

PostPosted: Thu Sep 01, 2005 7:55 pm
Reply with quote

This is another sample of PROC that does not use OPER:
Code:
PROC 1 DSN                         
CLEAR                             
WRITE &DSN                         
CALL 'SYS1.LINKLIB(GRSDSENQ)'  &DSN
END                               


I hope in this.
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1448
Location: Chicago, IL

PostPosted: Thu Sep 01, 2005 8:03 pm
Reply with quote

We dont have member GRSDSENQ in SYS1.LINKLIB.

MEMBER GRSDSENQ NOT IN DATA SET SYS1.LINKLIB

Regards,

Priyesh.
Back to top
View user's profile Send private message
MGIndaco

Active User


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

PostPosted: Thu Sep 01, 2005 8:22 pm
Reply with quote

Ok, nothing to do...
It's from customizing.
This is not my fortunate day.
icon_wink.gif
Back to top
View user's profile Send private message
sumanth_toom

New User


Joined: 15 Dec 2006
Posts: 6
Location: ..

PostPosted: Wed Jul 22, 2009 7:58 pm
Reply with quote

Use SYSDSN against the PDS or
TSO SYSDSN <file-name>

icon_cool.gif
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Jul 23, 2009 1:23 am
Reply with quote

Hello,

Please be aware that you replied to a topic that has been inactive for almost 4 years. . . icon_confused.gif
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Thu Jul 23, 2009 5:00 am
Reply with quote

and SYSDSN is another local command. One way that will work on all IBM systems (save those in GRS STAR mode), whatever that is) is the QUERYENQ service of ISPF.
Back to top
View user's profile Send private message
sumanth_toom

New User


Joined: 15 Dec 2006
Posts: 6
Location: ..

PostPosted: Thu Jul 23, 2009 2:51 pm
Reply with quote

The idea was to archive/share the information. Just incase someone had the same problem in future ;)
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jul 23, 2009 2:57 pm
Reply with quote

Quote:
The idea was to archive/share the information. Just incase someone had the same problem in future ;)


the suggestion was wrong anyway, SYSDSN is not a command generally available

in the IBM TSO/E world
publib.boulder.ibm.com/infocenter/zos/v1r9/index.jsp?topic=/com.ibm.zos.r9.ikja300/ikj4a37051.htm
Back to top
View user's profile Send private message
sumanth_toom

New User


Joined: 15 Dec 2006
Posts: 6
Location: ..

PostPosted: Thu Jul 23, 2009 4:34 pm
Reply with quote

Well it worked for me in couple of different shops !!
Here is the screenshot of how the output looks like..
(masked the some parts of the output..)


In case of multiple users/jobs using it,,all those are listed here as well !
Back to top
View user's profile Send private message
sumanth_toom

New User


Joined: 15 Dec 2006
Posts: 6
Location: ..

PostPosted: Thu Jul 23, 2009 4:36 pm
Reply with quote

@enrico-sorichetti
I have also used SYSDSN in REXX to find out if the dataset exists or not..
(The link you posted..)..but i am not sure if both are same !! icon_rolleyes.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jul 23, 2009 4:44 pm
Reply with quote

Are you using SYSDSN as a parameter of GRS, as opposed to SYSDSN as a TSO command ?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top