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

Way to execute TSO commands in REXX


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

New User


Joined: 17 Aug 2006
Posts: 22
Location: India

PostPosted: Thu Aug 17, 2006 6:22 pm
Reply with quote

Hi all,

Is it possible to submit a set of TSO commands from REXX?

we can submit a JCL from REXX, by queuing the lines of the JCL and write it to a dataset (or datastack) and then we use ?submit? command to, submit the member from REXX.

Is the same way possible in submitting a sequence of TSO commands?
I tried the below code and its not working for me. However there was no syntax error shown while execution.

I am giving the actually code snippet below. Please go thru it and tell me where I went wrong.

All I need to do it is to automate a sequence of commands entered manually in TSO enviornment using REXX

Pls tell me is there some other means of achieve the requirement (I heard we can use a ISPEXEC macro for submitting a set of TSO commands using REXX)


Code:

/******** REXX****************/             
ADDRESS TSO                                 
"ALLOC F(ISFIN) TRACKS SPACE(1) REUSE"     
QUEUE "USERID@DOMAIN.COM"           
QUEUE "++FILE.NAME"                   
QUEUE "END"                                 
"EXECIO" QUEUED() "DISKW ISFIN(FINIS"       
ADDRESS TSO "SENDMAIL"
"EXECIO 0 DISKR ISFIN(FINIS"               
"FREE F(ISFIN)"                             
RETURN                                     


Regards,
Knowledge Hunter
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Aug 17, 2006 6:31 pm
Reply with quote

First of all, SUBMIT is a TSO command, so I think you've already answered your own question. In addition, in your code:

"ALLOC F(ISFIN) TRACKS SPACE(1) REUSE"
ALLOC is a TSO command.

"SENDMAIL"
SENDMAIL is a TSO command.

"FREE F(ISFIN)"
FREE is a TSO command.

You made the statement:
Quote:

I heard we can use a ISPEXEC macro for submitting a set of TSO commands using REXX)

You can use an ISPF EDIT macro to automate any series of ISPF EDIT commands. I don't know what you mean by an "ISPEXEC macro".
Back to top
View user's profile Send private message
Knowledge Hunter

New User


Joined: 17 Aug 2006
Posts: 22
Location: India

PostPosted: Thu Aug 17, 2006 6:44 pm
Reply with quote

Actually i meant ISPF EDIT commands. Sorry for the confusion.Thanks for your quick response superk. icon_smile.gif
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Aug 17, 2006 7:05 pm
Reply with quote

Just want to add something, for the record. ISPF EDIT Macro's can be written in any programming language desired, as documented here in the z/OS V1R7.0 ISPF Edit and Edit Macros manual.

There seems to be some mis-informed folks out there who think that TSO and ISPF dialog functions are only callable from CLIST or REXX. Not true.
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 Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top