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
Contention for PDS after executing Rexx
- Pedro
- Posts: 686
- Joined: Thu Jul 31, 2008 9:59 pm
- Skillset: ISPF
- Referer: google
- Location: Silicon Valley
Re: Contention for PDS after executing Rexx
Use TSO ISRDDN to see your allocations. Perhaps you have the same data set allocated by a different DD name.
Pedro Vera
- Pedro
- Posts: 686
- Joined: Thu Jul 31, 2008 9:59 pm
- Skillset: ISPF
- Referer: google
- Location: Silicon Valley
Re: Contention for PDS after executing Rexx
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
Re: Contention for PDS after executing Rexx
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
***
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
***
Re: Contention for PDS after executing Rexx
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.
- prino
- Posts: 641
- Joined: Wed Mar 11, 2009 12:22 am
- Skillset: PL/I - CICS - DB2 - IDMS - REXX - JCL, most in excess of three decades
- Referer: Google
- Location: Vilnius, Lithuania
- Contact:
Re: Contention for PDS after executing Rexx
(Emphasis added)mvmanish wrote:To overcome this I have to close the LPAR every time I execute the rexx.
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
robert.ah.prins @ the.17+Gb.Google thingy
Re: Contention for PDS after executing Rexx
prino wrote:(Emphasis added)mvmanish wrote:To overcome this I have to close the LPAR every time I execute the rexx.
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

-
- Global moderator
- Posts: 3006
- Joined: Fri Apr 18, 2008 11:25 pm
- Skillset: tso,rexx,assembler,pl/i,storage,mvs,os/390,z/os,
- Referer: www.ibmmainframes.com
Re: Contention for PDS after executing Rexx
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
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
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: Contention for PDS after executing Rexx
Log off TSO and log back on.instead of closing the LPAR do I need to put that in contentionor do you have any better idea..
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.
-
- Similar Topics
- Replies
- Views
- Last post
-
- 7
- 4891
-
by Misha786
View the latest post
Thu May 04, 2023 8:21 am
-
-
Retrieve Subsystem Name executing under
by drowelf » Wed Feb 02, 2022 3:44 am » in Operating Systems - 0
- 1958
-
by drowelf
View the latest post
Wed Feb 02, 2022 3:44 am
-
-
- 1
- 1349
-
by jcdm
View the latest post
Mon Oct 24, 2022 6:10 pm
-
- 12
- 3148
-
by sergeyken
View the latest post
Mon Sep 25, 2023 3:33 am
-
- 3
- 2214
-
by Robledo
View the latest post
Thu Mar 10, 2022 1:03 pm