MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Checking whether a Dataset is already in Use

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Tue Feb 18, 2003 8:29 am    Post subject: Checking whether a Dataset is already in Use Reply with quote

In my Rexx Program, I want to check whether a dataset is already opened in edit mode. I know that we can do this by looking at the return code of the "ISPEXEC EDIT" command, But I would like to know whether is there any other way / command to find this even before I use the EDIT Command.

Please suggest.
Phantom,
Back to top
View user's profile Send private message
DaveyC
Moderator


Joined: 02 Dec 2002
Posts: 151
Topics: 3
Location: Perth, Western Australia

PostPosted: Tue Feb 18, 2003 8:52 am    Post subject: Reply with quote

I don't see why using EDIT is a bad idea. You can "SETMSG MSG(ISRZ002)" to set the in use message and get the list of users who are using it for extended help.

You could use Doug Nadels QueryEnq REXX or roll your own GQSCAN program, but I would stick to EDIT for a neat solution and let ISPF do the work for you.
_________________
Dave Crayford
Back to top
View user's profile Send private message Send e-mail
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Tue Feb 18, 2003 9:43 am    Post subject: Reply with quote

DaveyC,

The SETMSG Command is working fine. It says "Member In Use" in a POPUP Window. But how to get the list of users who are using it.


Please advise.

Thanks for your help.
Phantom
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Tue Feb 18, 2003 6:21 pm    Post subject: Reply with quote

See the ISPF services book for the QUERYENQ service. I'd suggest a review of the services book in general.
Back to top
View user's profile Send private message Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Wed Feb 19, 2003 3:54 am    Post subject: Reply with quote

DaveyC,

I had few problems using the SETMSG Command. Here is the piece of code that I'm executing.

Code:


"ISPEXEC REMPOP"                                         
"ISPEXEC SELECT PGM(ISPOPF) PARM(ON)"                   

 DATA_SET_NAME = "'"INDIRNAM"("INMEMBER")'"       

"ISPEXEC EDIT DATASET("DATA_SET_NAME")" 
"ISPEXEC SETMSG MSG(ISRZ002) MSGLOC(INMEMBER)"     

"ISPEXEC ADDPOP ROW(0) COLUMN(0)"           
"ISPEXEC SELECT PGM(ISPOPF) PARM(OFF)"     
"ISPEXEC DISPLAY PANEL(EZY1000P)"


The problem I have is that, If a particular member is being edited by someone else, The ISRZ002 message is displayed on the screen below the "INMEMBER" (Panel Field) field. Then when I enter a different Member and press enter, the member is displayed in edit mode and when I press END function key, I get back my Panel but the Error message is still displayed on the screen. Is it because the screen is not refreshed properly or is the error message is displayed again. ?

Please advise,
Phantom,
Back to top
View user's profile Send private message
DaveyC
Moderator


Joined: 02 Dec 2002
Posts: 151
Topics: 3
Location: Perth, Western Australia

PostPosted: Wed Feb 19, 2003 4:01 am    Post subject: Reply with quote

hmmm, have you considered checking the return code from EDIT? Or is this a trick question...
_________________
Dave Crayford
Back to top
View user's profile Send private message Send e-mail
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Wed Feb 19, 2003 4:04 am    Post subject: Reply with quote

This is the first time I'm using SETMSG command. I want to know the details about it.

Please explain me about the problem I'm facing.

Thanks
Phantom
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Feb 19, 2003 6:25 pm    Post subject: Reply with quote

First, you have to understand what the message ISRZ002 is used for. It displays the variables set by a service that gets a return code greater than 8. You've made no provision for what happens when the data set is NOT in use (like adding MACRO(CANCEL) or similar), hence you get into the editor. Then, since you are not checking the return code from EDIT, you can't be sure the variables used for ISRZ002 are even valid. Also, starting the editor is a very expensive way to go about solving this problem. QUERYENQ should be significantly faster.

Again, searching the books can be very helpful for these types of problems. Start anywhere in the MVS library and search for keywords, service names, message numbers, etc. Don't bother with the search function at ibm.com. It is worthless.
Back to top
View user's profile Send private message Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Wed Feb 19, 2003 11:03 pm    Post subject: Reply with quote

Thank you semigeezer. I'm looking at the documents that you have sent as link.

Thanks,
Phantom
Back to top
View user's profile Send private message
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Thu Feb 20, 2003 9:15 am    Post subject: Reply with quote

A link to some gqscan code like Dave referred to...
http://www.mainframeweek.com/journals/show.php/0057/3
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group