View previous topic :: View next topic |
Author |
Message |
Phantom Data Mgmt Moderator
![Data Mgmt Moderator Data Mgmt Moderator](images/ranks/Phantom.jpg)
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Tue Feb 18, 2003 8:29 am Post subject: Checking whether a Dataset is already in Use |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
DaveyC Moderator
![](images/avatars/gallery/starwars/swars041.gif)
Joined: 02 Dec 2002 Posts: 151 Topics: 3 Location: Perth, Western Australia
|
Posted: Tue Feb 18, 2003 8:52 am Post subject: |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
Phantom Data Mgmt Moderator
![Data Mgmt Moderator Data Mgmt Moderator](images/ranks/Phantom.jpg)
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Tue Feb 18, 2003 9:43 am Post subject: |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue Feb 18, 2003 6:21 pm Post subject: |
|
|
See the ISPF services book for the QUERYENQ service. I'd suggest a review of the services book in general. |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Phantom Data Mgmt Moderator
![Data Mgmt Moderator Data Mgmt Moderator](images/ranks/Phantom.jpg)
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Wed Feb 19, 2003 3:54 am Post subject: |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
DaveyC Moderator
![](images/avatars/gallery/starwars/swars041.gif)
Joined: 02 Dec 2002 Posts: 151 Topics: 3 Location: Perth, Western Australia
|
Posted: Wed Feb 19, 2003 4:01 am Post subject: |
|
|
hmmm, have you considered checking the return code from EDIT? Or is this a trick question... _________________ Dave Crayford |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
Phantom Data Mgmt Moderator
![Data Mgmt Moderator Data Mgmt Moderator](images/ranks/Phantom.jpg)
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Wed Feb 19, 2003 4:04 am Post subject: |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Wed Feb 19, 2003 6:25 pm Post subject: |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
Phantom Data Mgmt Moderator
![Data Mgmt Moderator Data Mgmt Moderator](images/ranks/Phantom.jpg)
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Wed Feb 19, 2003 11:03 pm Post subject: |
|
|
Thank you semigeezer. I'm looking at the documents that you have sent as link.
Thanks,
Phantom |
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
taltyman JCL Forum Moderator
![JCL Forum Moderator JCL Forum Moderator](images/ranks/homer8.gif)
Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
|
|
Back to top |
|
![](templates/subSilver/images/spacer.gif) |
|
|