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: 1753
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: 1755
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 Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts User Cancels the job PANDU1 DB2 1 Sat Mar 04, 2017 8:21 pm


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