Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Way to execute TSO commands in REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Way to execute TSO commands in REXX
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

Moderator Team Head


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

PostPosted: Thu Aug 17, 2006 6:31 pm    Post subject: Re: Way to execute TSO commands in REXX
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    Post subject: Re: Way to execute TSO commands in REXX
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

Moderator Team Head


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

PostPosted: Thu Aug 17, 2006 7:05 pm    Post subject: Re: Way to execute TSO commands in REXX
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us