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: 4649
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: 4649
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
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am


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