Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
DELETING A DATASET IN REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests
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    Post subject: DELETING A DATASET IN REXX
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: 1522
Location: Chennai

PostPosted: Wed Nov 02, 2011 11:27 am    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Wed Nov 02, 2011 2:13 pm    Post subject: Reply to: DELETING A DATASET IN REXX
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: 8593
Location: Back in jolly old England

PostPosted: Wed Nov 02, 2011 2:20 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Wed Nov 02, 2011 2:32 pm    Post subject: Reply to: DELETING A DATASET IN REXX
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: 1777
Location: Bloomington, IL

PostPosted: Wed Nov 02, 2011 2:42 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us