Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
how to unallocate a dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: how to unallocate a dataset
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Thu Feb 19, 2009 7:19 pm    Post subject: Reply to: how to unallocate a dataset
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    Post subject:
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    Post subject: Reply to: how to unallocate a dataset
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us