Contention for PDS after executing Rexx



IBM's Command List programming language & Restructured Extended Executor

Contention for PDS after executing Rexx

Postby mvmanish » Fri Feb 03, 2017 10:49 pm

Hi,


I am running rexx to change few parameters in a JCL. Once Rexx completes execution I am ending with Contention issue for that particular PDS. To overcome this I have to close the LPAR every time I execute the rexx. Below is the code which I am using to free the PDS

"ALLOC DA('"MEMBER"') F(MDDOUT1) OLD REU"
"EXECIO * DISKW MDDOUT1 (STEM RECO. FINIS)"
DROP RECO.
IF RC = 0 THEN DO
"FREE F(MDDOUT1)"
END
ELSE DO
SAY "ERROR WHILE WRITING "MDDOUT1" RC = " RC
SAY "TERMINATING..."
"FREE F(MDDOUT1)"
END
mvmanish
 
Posts: 10
Joined: Fri Mar 11, 2016 1:25 am
Has thanked: 1 time
Been thanked: 0 time

Re: Contention for PDS after executing Rexx

Postby Pedro » Fri Feb 03, 2017 10:52 pm

Show us a trace.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: Contention for PDS after executing Rexx

Postby Pedro » Fri Feb 03, 2017 10:55 pm

Use TSO ISRDDN to see your allocations. Perhaps you have the same data set allocated by a different DD name.
Pedro Vera

These users thanked the author Pedro for the post:
mvmanish (Sat Feb 04, 2017 5:03 am)
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: Contention for PDS after executing Rexx

Postby Pedro » Fri Feb 03, 2017 11:03 pm

I predict that your EXECIO does not work correctly for some reason and you so you still have the file open and the FREE will not free open files.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: Contention for PDS after executing Rexx

Postby mvmanish » Fri Feb 03, 2017 11:09 pm

Hi Pedro,

Thanks for your reply.... Below is the trace part of Rexx. Also I can see PDS is allocated for 2 DD names

------------------------------------------------
242 *-* "ALLOC DA('"MEMBER"') F(MDDOUT1) OLD REU"
>>> "ALLOC DA('TEST.REXX.PDS(MEMNAME)') F(MDDOUT1
) OLD REU"
IRX0100I +++ Interactive trace. TRACE OFF to end debug, ENTER to continue. +++


243 *-* "EXECIO * DISKW MDDOUT1 (STEM RECO. FINIS)"
>>> "EXECIO * DISKW MDDOUT1 (STEM RECO. FINIS)"

244 *-* DROP RECO.

245 *-* IF RC = 0
>>> "1"

*-* THEN
*-* DO

246 *-* "FREE F(MDDOUT1)"
>>> "FREE F(MDDOUT1)"

247 *-* END
253 *-* REPT = REPT +1
>>> "2"

254 *-* END
143 *-* DO until REPT > CNUM
>>> "1"
255 *-* RETURN
***
mvmanish
 
Posts: 10
Joined: Fri Mar 11, 2016 1:25 am
Has thanked: 1 time
Been thanked: 0 time

Re: Contention for PDS after executing Rexx

Postby mvmanish » Fri Feb 03, 2017 11:11 pm

Pedro wrote:I predict that your EXECIO does not work correctly for some reason and you so you still have the file open and the FREE will not free open files.




If I execute the same rexx for some other PDS. it is working fine.
mvmanish
 
Posts: 10
Joined: Fri Mar 11, 2016 1:25 am
Has thanked: 1 time
Been thanked: 0 time

Re: Contention for PDS after executing Rexx

Postby prino » Sat Feb 04, 2017 1:02 am

mvmanish wrote:To overcome this I have to close the LPAR every time I execute the rexx.
(Emphasis added)

Sheesh... they let a person like you close an LPAR and and re-IPL it because you cannot free a dataset?

This is incompetence taken to a new level, even on a beginners forum...
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 640
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

Re: Contention for PDS after executing Rexx

Postby mvmanish » Sat Feb 04, 2017 1:19 am

prino wrote:
mvmanish wrote:To overcome this I have to close the LPAR every time I execute the rexx.
(Emphasis added)

Sheesh... they let a person like you close an LPAR and and re-IPL it because you cannot free a dataset?

This is incompetence taken to a new level, even on a beginners forum...



Okay.. then if you have a solution for that... provide it... as I stated my problem clearly that the rexx is not working only for 1 particular PDS.. instead of closing the LPAR do I need to put that in contention :x or do you have any better idea..
mvmanish
 
Posts: 10
Joined: Fri Mar 11, 2016 1:25 am
Has thanked: 1 time
Been thanked: 0 time

Re: Contention for PDS after executing Rexx

Postby enrico-sorichetti » Sat Feb 04, 2017 1:33 am

who else is using that dataset ?
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3002
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Contention for PDS after executing Rexx

Postby Robert Sample » Sat Feb 04, 2017 1:47 am

instead of closing the LPAR do I need to put that in contention :x or do you have any better idea..
Log off TSO and log back on.
If you have console access, cancel your TSO user id.

Doing an IPL of the LPAR should be the LAST resort if nothing else works -- NOT a normal operation.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Next

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post