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
 

 

getting FILE IN USE error while creating a new DS in REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
rajat_gupta

New User


Joined: 05 Apr 2007
Posts: 15
Location: india

PostPosted: Mon Apr 09, 2007 12:26 pm    Post subject: getting FILE IN USE error while creating a new DS in REXX
Reply with quote

Hi I am copying an existing DS attributes to create a new DS.
But it is showing file in use for the old one.

/* thru this i am getting the name of an existing DS
"ISPEXEC LMDINIT LISTID(DSLIST) LEVEL(&HLQ)"
"ISPEXEC LMDLIST LISTID(&DSLIST)",
"DATASET(DSNVAR) OPTION(LIST) STATS(YES)"
TEMP=DSNVAR

/* thru it i am copying those attributes to create a new DS
"ALLOC DA('"TEMP"') F(DATAIN) SHR REUSE"
"ALLOC DA('"NEWHLQ"') F(DATAOUT) LIKE('"TEMP"') NEW"


If anyone has an idea ,as to how solve this problem then pls help me ASAP.
Back to top
View user's profile Send private message

prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Mon Apr 09, 2007 12:42 pm    Post subject:
Reply with quote

I am not very familiar with REXX but try freeing the DSNVAR before creating the new one
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 09, 2007 1:07 pm    Post subject:
Reply with quote

Perhaps another job has the file DISP=OLD
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Apr 09, 2007 11:40 pm    Post subject:
Reply with quote

Hello,

I suspect that if you are trying to copy the dataset, you need 2 different names. . . .
Back to top
View user's profile Send private message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 160
Location: Toronto, Canada

PostPosted: Tue Apr 10, 2007 3:03 am    Post subject:
Reply with quote

TRY THE FOLLOWING BY replacing the datasets with your one


/* REXX */

HLQ = "JZ1B0C.JCLLIB"
"ISPEXEC LMDINIT LISTID(DSLIST) LEVEL(&HLQ)"
"ISPEXEC LMDLIST LISTID(&DSLIST)",
"DATASET(DSNVAR) OPTION(LIST) STATS(YES)"
"ISPEXEC LMDFREE LISTID(&DSLIST)"
TEMP=DSNVAR
say temp
NEWHLQ="JZ1B0C.JCLLIB.NEW"
"ALLOC DA('"TEMP"') F(DATAIN) SHR REUSE"
"ALLOC DA('"NEWHLQ"') F(DATAOUT) LIKE('"TEMP"') NEW"

EXIT
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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am


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