Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

REXX to find who is using a dataset currently
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: REXX to find who is using a dataset currently
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    Post subject:
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    Post subject:
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    Post subject: Re: REXX to find who is using a dataset currently
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    Post subject: Re: REXX to find who is using a dataset currently
Reply with quote

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

Moderator Team Head


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

PostPosted: Thu Jun 16, 2005 3:57 pm    Post subject: Re: REXX to find who is using a dataset currently
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: 1452
Location: Chicago, IL

PostPosted: Thu Jun 16, 2005 4:16 pm    Post subject: Re: REXX to find who is using a dataset currently
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    Post subject:
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: 1452
Location: Chicago, IL

PostPosted: Thu Sep 01, 2005 5:53 pm    Post subject: Re: REXX to find who is using a dataset currently
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: 464

PostPosted: Thu Sep 01, 2005 6:11 pm    Post subject: Re: REXX to find who is using a dataset currently
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: 1452
Location: Chicago, IL

PostPosted: Thu Sep 01, 2005 6:17 pm    Post subject: Re: REXX to find who is using a dataset currently
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: 464

PostPosted: Thu Sep 01, 2005 6:28 pm    Post subject: Re: REXX to find who is using a dataset currently
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    Post subject:
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: 1452
Location: Chicago, IL

PostPosted: Thu Sep 01, 2005 6:54 pm    Post subject: Re: REXX to find who is using a dataset currently
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    Post subject:
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: 1452
Location: Chicago, IL

PostPosted: Thu Sep 01, 2005 8:03 pm    Post subject: Re: REXX to find who is using a dataset currently
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    Post subject:
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    Post subject: Reply to: REXX to find who is using a dataset currently
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

Site Director


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

PostPosted: Thu Jul 23, 2009 1:23 am    Post subject:
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: 401
Location: Mumbai

PostPosted: Thu Jul 23, 2009 5:00 am    Post subject: Reply to: REXX to find who is using a dataset currently
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to find the first monday of the w... abdulrafi COBOL Programming 10 Fri Nov 25, 2016 3:24 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us