Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Data set is allocated to another job or user

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Data set is allocated to another job or user
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: 1755
Location: Bloomington, IL

PostPosted: Wed Aug 03, 2016 7:22 pm    Post subject:
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: 1788
Location: UK

PostPosted: Fri Aug 05, 2016 7:22 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Release quantity that was allocated v... Auryn JCL & VSAM 5 Thu May 18, 2017 6:02 pm
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us