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

how to free/close output file in rexx


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Vkp321

New User


Joined: 05 Jan 2009
Posts: 56
Location: Dublin

PostPosted: Mon Feb 06, 2012 3:47 pm
Reply with quote

Hi,

I am using a procedure to write file in rexx, providing the file name from calling program.


CRTFILE:
"ALLOC FI(XXOUT) DA('"OUTFILE"') MOD REUSE SPACE(2,2) LRECL("LRL")
BLKSIZE(27998) RECFM(V,B)"

"EXECIO" LOT.0 "DISKW XXOUT (STEM LOT."
"FREE FI(XXOUT)"

Getting the following error

DATA SET ******* NOT FREED, DATA SET IS OPEN
FILE XXOUT NOT FREED, DATA SET IS OPEN

Please let me know your inputs
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Feb 06, 2012 3:57 pm
Reply with quote

check the EXECIO FINIS clause as described starting from
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/Shelves/IKJ4BK90
Back to top
View user's profile Send private message
Vkp321

New User


Joined: 05 Jan 2009
Posts: 56
Location: Dublin

PostPosted: Mon Feb 06, 2012 4:18 pm
Reply with quote

Thank you.

I have used below lines and it is working fine

"EXECIO 0 DISKW XXOUT (FINIS)"
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Mon Feb 06, 2012 8:31 pm
Reply with quote

You could have done it all in 1 command.

"EXECIO" LOT.0 "DISKW XXOUT (STEM LOT. FINIS"
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
Search our Forums:

Back to Top