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

DELETING A DATASET IN REXX


IBM Mainframe Forums -> HomeWorks & Requests
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Meenu Mohankumar

New User


Joined: 02 Nov 2011
Posts: 2
Location: INDIA

PostPosted: Wed Nov 02, 2011 11:21 am
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1693
Location: Tiruppur, India

PostPosted: Wed Nov 02, 2011 11:27 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10801
Location: italy

PostPosted: Wed Nov 02, 2011 2:13 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Nov 02, 2011 2:20 pm
Reply with quote

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
View user's profile Send private message
Meenu Mohankumar

New User


Joined: 02 Nov 2011
Posts: 2
Location: INDIA

PostPosted: Wed Nov 02, 2011 2:27 pm
Reply with quote

@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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10801
Location: italy

PostPosted: Wed Nov 02, 2011 2:32 pm
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Nov 02, 2011 2:42 pm
Reply with quote

I recommend to you, Meenu:

  1. 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.
  2. 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".
  3. 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
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 -> HomeWorks & Requests

 


Similar Topics
Topic Forum Replies
No new posts Tilde Characters Changing to COLONs i... CLIST & REXX 15
No new posts DSN REXX VARBINARY inserts CLIST & REXX 4
No new posts Multiple find/replace on the same dat... DFSORT/ICETOOL 4
No new posts How to modify file content using REXX CLIST & REXX 3
No new posts Same command as on commandline in REX... TSO/ISPF 6
Search our Forums:

Back to Top