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

FTOPEN TEMP is failing due to dataset is OPEN


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mbenaud

New User


Joined: 15 Jun 2009
Posts: 4
Location: Glasgow - Scotland - UK

PostPosted: Thu Jul 28, 2016 4:28 pm
Reply with quote

This is my first post but I have been reading this forum for years.
I generally get all my issues fixed, but this one is confusing me.
I use a panel to enter TWS applications so I can clone them to another name for many environments. The REXX after using the panel submits a job using the following piece of code
Code:
DO                                         
  ADDRESS ISPEXEC                           
  "FTOPEN TEMP"                             
  "FTINCL TWSCLONE"                         
  "FTCLOSE"                                 
  "VGET (ZTEMPF) SHARED"                   
  dmy = OUTTRAP('resp.')                   
    ADDRESS TSO; "SUBMIT '" || ZTEMPF || "'"
  dmy = OUTTRAP('OFF')                     
  SAY jobMsg()                             
END

But I am getting the following (an my second run - it works the first time)
Code:
    23 *-*   ADDRESS ISPEXEC                                             
    24 *-*   "FTOPEN TEMP"                                               
       >L>     "FTOPEN TEMP"                                             
ISPF system data set allocation error - press Enter to continue.         
Temporary control card data set cannot be allocated.                     
Data set 'MBENTLE.DEVA.SPFTEMP1.CNTL' in use by another user, try later.
  ISPF102 No work file            -/-Work file not open.                 
Even if I delete said SPFTEMP1 file
the output in SDSF at the top reads
Code:

IEF403I TWSCLO02 - STARTED - TIME=15.54.19                 
IEC331I 042-006(040B0425),TWSCLO02,STEP010 ,SCRT,IGG0CLH0   
IEC331I VOL,TSOD92,NAME,RGILMOU.DEVA.SPFTEMP1.CNTL         
IGD17060I DELETE/RENAME FAILED BECAUSE DATA SET IS OPEN  282
ON VOLUME TSOD92                                           
DATA SET IS RGILMOU.DEVA.SPFTEMP1.CNTL                     


It doesn't make sense ?? Any idea's
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jul 28, 2016 5:23 pm
Reply with quote

Have you tried "FTCLOSE TEMP" ???

I must admit that I always allocate and use ISPFILE for file tailoring
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Thu Jul 28, 2016 5:54 pm
Reply with quote

Does the job that you submitted use ISPF services? If so, it might be holding SPFTEMP1.CNTL
Back to top
View user's profile Send private message
mbenaud

New User


Joined: 15 Jun 2009
Posts: 4
Location: Glasgow - Scotland - UK

PostPosted: Thu Jul 28, 2016 7:22 pm
Reply with quote

Cheers expat but
Code:
ISPS105 Invalid keyword         -/-'TEMP' is not a valid keyword for this service.

Cheers don.Leahy - The only ISPF it seems uses is the FT* File tailoring stuff - most of it is rexx
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Jul 28, 2016 9:24 pm
Reply with quote

Logoff then logon again.

Show us the traces of both the first time you run it and the second time. I do not think the first FTCLOSE worked.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Jul 28, 2016 9:36 pm
Reply with quote

Also, issue TSO PROFILE MSGID before running the exec.

You did not show us the contents of TWSCLONE... does it refer to DEVA.SPFTEMP1.CNTL?

What prefix do you use? MBENTLE or RGILMOU?
Back to top
View user's profile Send private message
mbenaud

New User


Joined: 15 Jun 2009
Posts: 4
Location: Glasgow - Scotland - UK

PostPosted: Fri Jul 29, 2016 3:59 pm
Reply with quote

We have tried logging on and off, and Both MBENTLE and RGILMOU are doing the same jobs and it works once then not the secon time
I will get traces of the 1st and second run - when we run it laters
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Sat Jul 30, 2016 3:58 pm
Reply with quote

Your submitted job complains about rename or delete failure, why is the job allocating your temp file? If that job is still in the system then it could explain why the dataset is held.
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Calling an Open C library function in... CICS 1
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top