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 

Detecting Contention in a Rexx exec

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


Joined: 24 Nov 2003
Posts: 40
Topics: 15

PostPosted: Fri Dec 12, 2003 11:26 am    Post subject: Detecting Contention in a Rexx exec Reply with quote

Hi,
I am writing a Rexx exec that will edit a member in a pds. But if that member is being edited by someone else I get a contention message. Is there any way I can prevent the message from being displayed.

I tried using OUTTRAP but it does not seem to be trapping the contention message.

Thanks in advance,
Ranjith
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Fri Dec 12, 2003 3:11 pm    Post subject: Reply with quote

Ranjith,

what do you want to do when the member is in use by someother person? send a different message or open the member in browse/view mode? Here is a simple way to substitute BROWSE when the member is in use.

Code:

/* REXX */       
ADDRESS ISPEXEC
"CONTROL ERRORS RETURN"
"EDIT DATASET('datasetname(membername)')"
If rc = 14 Then,
"BROWSE DATASET('datasetname(membername)')"


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
meetrb
Beginner


Joined: 24 Nov 2003
Posts: 40
Topics: 15

PostPosted: Mon Dec 15, 2003 9:46 am    Post subject: Reply with quote

Thanks for the reply Kolusu.

However my requirement was that I do not want the message to be displayed on the screen. The code I used was in my exec was,

ADDRESS ISPEXEC "EDIT DATASET(memname)

If memname is being edited by another user a contention message is displayed. I want to prevent the message from getting to the user.

Regards,
Ranjith
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Mon Dec 15, 2003 11:58 pm    Post subject: Reply with quote

Well "if rc = 14 then NOP" would do Smile
Back to top
View user's profile Send private message Send e-mail
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Tue Dec 16, 2003 2:35 am    Post subject: Reply with quote

I would like to add that you should place a:

EDREC INIT

before each edit. This will give you edit recovery - if your routine or tso or ... crashes you will reenter the edit where you last pressed enter - otherwise you might lose a lot of data that you entered.
Back to top
View user's profile Send private message Visit poster's website
meetrb
Beginner


Joined: 24 Nov 2003
Posts: 40
Topics: 15

PostPosted: Thu Dec 18, 2003 10:57 pm    Post subject: Reply with quote

Thanks for all the replies.

But I seem to have left my requirement unclear.
The requirement is that in a pds if there are members m1,m2,m3 .....
My routine would open m4 as the next member in the pds. However if another user is editing the member m4 and has not saved it as yet, I will be getting a contention message. I would like to prevent this message from getting to the screen and open up m5 without the user being aware of m4.

Thanks,
Ranjith.
Back to top
View user's profile Send private message
Mike
Beginner


Joined: 03 Dec 2002
Posts: 114
Topics: 0
Location: Sydney, Australia

PostPosted: Sun Dec 21, 2003 5:02 pm    Post subject: Reply with quote

Perhaps, if you were to show us the code that you are using we may be able provide more ueful information.
_________________
Regards,
Mike.
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