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
 

 

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: 10210
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 FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts dataset copy question - REPRO or some... atulxp TSO/ISPF 2 Wed Aug 03, 2016 10:56 pm
No new posts FTOPEN TEMP is failing due to dataset... mbenaud TSO/ISPF 7 Thu Jul 28, 2016 4:28 pm


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