View previous topic :: View next topic
|
Author |
Message |
Ruthran
New User
Joined: 28 Feb 2009 Posts: 3 Location: India
|
|
|
|
Am new to REXX/CLIST, begining with the following code to handle the files. Am facing the problem when executing this code for the second time. it says DATASET IN USE.
Here is my code:
ALLOCATE FILE(SALARIES) DA('<FILENAME>') SHR REU
OPENFILE SALARIES OUTPUT
SET SALARIES=XXYYZZ
PUTFILE SALARIES
END
FREE FILE('<FILENAME>')
CLOSFILE SALARIES
Experts assistance will help me.
Regards, Ruthran |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I would take a good look at the FREE statement in the CLIST or TSO/E manual, easily reached from the sticky at the top of the CLIST & REXX forum
Even looking at your code gives a clue
Code: |
FREE FILE('data set name') |
You specify that you want to free a FILE (DD Name) but specify a datatset name as the parameter. Maybe paying attention to the rules might help you. |
|
Back to top |
|
|
Ruthran
New User
Joined: 28 Feb 2009 Posts: 3 Location: India
|
|
|
|
Found the problem
Coded the "END" in middle of the code triggers this issue..
Thx for the assistance. |
|
Back to top |
|
|
|