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

how to unallocate a dataset


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
JOYEETA PAUL
Currently Banned

New User


Joined: 18 Sep 2008
Posts: 17
Location: bangalore

PostPosted: Thu Feb 19, 2009 7:11 pm
Reply with quote

I used a dataset in my rexx prog like -
DSNAME = TEST.TPLASM.CATLIST
ADDRESS TSO
"ALLOC DD(STAC) DA('"DSNAME"') SHR REUSE"
"EXECIO * DISKR STAC (STEM X. OPEN"
In first part of my prog i am calling this subrtn and it is working fine
but in the 2nd part of my prog if i call this part again it is showing error like-' FILE STAC NOT UNALLOCATED, DATA SET IS OPEN "
so i need to unallocate the dataset and then again should use it.but can anybody tell me how to unallocate a DS in same prog after using it.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Feb 19, 2009 7:19 pm
Reply with quote

the correct sequence ( to avoid all troubles ) is

Code:
ALLOCATE ...

EXECIO ... count ... ( ...     - as many times as needed

... for the last I/O operation
EXECIO ... count ... ( ... FINIS - to close the file, if a regular I/O
... or
EXECIO ... 0 ... ( FINIS - to close the file, on a standalone close

FREE ...
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Thu Feb 19, 2009 7:20 pm
Reply with quote

Because you have REUSE option, it looks like you just need to CLOSE the file after 1st part is completed.
Back to top
View user's profile Send private message
JOYEETA PAUL
Currently Banned

New User


Joined: 18 Sep 2008
Posts: 17
Location: bangalore

PostPosted: Fri Feb 20, 2009 12:14 pm
Reply with quote

thank you so much. i just used that "FINIS" there.now it is working perfectly.
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 Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
Search our Forums:

Back to Top