View previous topic :: View next topic
|
Author |
Message |
Meenu Mohankumar
New User
Joined: 02 Nov 2011 Posts: 2 Location: INDIA
|
|
|
|
I am trying to delete a dataset after completing a particular operation. The name of the dataset is dynamically assigned each time.
For ex.
TEMP = “MY.DATASET.” !! comp
I used the following command to delete the dataset after operation
TSO ADDRESS
“DELETE ‘”TEMP”’” also
TSO ADDRESS
“DELETE ‘TEMP’”
The error was invalid dataset name. Could you please help me with this. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1745 Location: Tirupur, India
|
|
|
|
Maybe try
ADDRESS TSO "DEL '"TEMP"'"
If you still run into errors, run the program with trace & post the error message.
Hope it helps. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
I wish people would learn how to post and how to do the <symptom> collection in order to get proper help.
for a REXX using <pure> TSO environment
ADDRESS TSO is assumed ( it' s a personal preference to always use it )
so a plain command is perfectly valid
the thing I would have liked to see was the whining about a -3 return code from TSO ADDRESS
is there any reason not to trust the system for the message You receive
and wonder why the dataset name is invalid
read the manuals about the proper format of a dataset name |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
And I would ask why the dataset should be deleted using REXX
What's wrong with using plain old simple JCL, if it's defined in the JCL it can be deleted in the JCL |
|
Back to top |
|
|
Meenu Mohankumar
New User
Joined: 02 Nov 2011 Posts: 2 Location: INDIA
|
|
|
|
@enrico-sorichetti
i appreciate your quick reply but i'm pretty sure the "invalid dataset"
is not due to the TSO ADDRESS because thats not how i have implemented in my code. Guess it was a typo here.
@expat
The input dataset is created to hold a program for analysis for which the logic is written in the rexx routine. After the analysis is done and the output is wriiten the input dataset needs to be deleted. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
Quote: |
i appreciate your quick reply but i'm pretty sure the "invalid dataset"
is not due to the TSO ADDRESS because thats not how i have implemented in my code. Guess it was a typo here. |
You misread me !
I never said that the invalid dataset name was due to the "TSO ADDRESS"
invalid dataset name is due to the obvious fact that the dataset name is not according to the rules period
but since You did not care to post how the dataset name You built looks like,
the only reasonable reply is look at the manuals |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
I recommend to you, Meenu:
- That you take vasanthz's suggestion, run the exec with a trace (I normally use TRACE I, although many here prefer TRACE R), and, if the error does not become obvious, post the output here.
- That the output, and any similar materials, be a copy-and-paste from your emulator window, not a screen shot (grossly wasteful of space) or an attachment (which many cannot open and/or download); you will thus avoid embarrassing and misleading mistakes such as typing "TSO ADDRESS" instead of "ADDRESS TSO".
- That as appropriate you enclose things in code tags, thus:
Code: |
This shows the use of code tags. |
which preserves alignment and multiple spaces.
These things will make it easier for us to aid you. |
|
Back to top |
|
|
|