IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Data set is allocated to another job or user


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Seppe

New User


Joined: 01 Apr 2009
Posts: 33
Location: Rome - Italy

PostPosted: Wed Aug 03, 2016 4:31 pm
Reply with quote

Hi all,
I have a problem with my new rexx...

I copy two pd member from a lib to another;
After i remane the two member;
After I modify the two member with MACRO;
At this point is all OK!

At end my REXX submit the first member contained a job.
At this point is all OK!

The last exec of the job submitted is the submit of second member.
At thie point the first job returns RC 12 (DATA SET IS ALLOCATED TO ANOTHER JOB OR USER)

This is the code:

ADDRESS TSO
"ALLOC FI(SYSUEXEC) DA("LIBSPU") SHR REU"
"ALTLIB ACT USER(EXEC)"
ADDRESS ISPEXEC
"LMINIT DATAID(SPU) DATASET("LIBSPU") ENQ(SHRW)"
"LMINIT DATAID(REX) DATASET("LIBREX") ENQ(SHRW)"
"LMCOPY FROMID("SPU") TODATAID("REX") FROMMEM("EXPORT") REPLACE"
"LMCOPY FROMID("SPU") TODATAID("REX") FROMMEM("IMPORT") REPLACE"
"LMINIT DATAID(REX) DATASET("LIBREX") ENQ(EXCLU)"
"LMOPEN DATAID("REX") OPTION(OUTPUT)"
"LMMDEL DATAID("REX") MEMBER("RENEXP")"
"LMMDEL DATAID("REX") MEMBER("RENIMP")"
"LMMREN DATAID("REX") MEMBER("EXPORT") NEWNAME("RENEXP")"
"LMMREN DATAID("REX") MEMBER("IMPORT") NEWNAME("RENIMP")"
"VPUT (FIN) SHARED"
"VPUT (AMB) SHARED"
"EDIT DATASET("LIBREX"("RENEXP")) MACRO("RIBALTAM")"
"EDIT DATASET("LIBREX"("RENIMP")) MACRO("RIBALTAM")"
ADDRESS TSO
JOB="'"LIBREX"("RENEXP")'"
"SUBMIT " JOB

I think I must go out the dataset... How???
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Aug 03, 2016 7:22 pm
Reply with quote

I do not see invocations of LMCLOSE and LMFREE.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Aug 05, 2016 7:22 pm
Reply with quote

I also do not see the use of code tags so I am not going to bother to confirm, or otherwise, Akatsukami's response.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts Check data with Exception Table DB2 0
No new posts Allocated cylinders of a dataset DB2 12
Search our Forums:

Back to Top