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

Calling a Rexx from within another Rexx


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

New User


Joined: 22 Apr 2020
Posts: 2
Location: Portugal

PostPosted: Wed Apr 22, 2020 2:45 pm
Reply with quote

Hello,


I'm tring to call a rexx from another rexx.

The exemple:

I have the execution of this REXX member1

X.A.REXX(member1)
This rexx executes a painel and when the PFKEY if pressed "F3" it goes back to the rexx an tests the RC = 8. If the RC = 8 it opens another REXX the member2.

IF RC = 8 THEN DO
ADRESS TSO
EX 'X.A.REXX(member2)'
END

How can i make this work ?
IF RC = 8 THEN DO
ADDRESS TSO
X.A.REXX(member2)
END



Do i need to create a CLIST with the PDS from the rexx that i want to open ?
Back to top
View user's profile Send private message
ManuelPacheco

New User


Joined: 22 Apr 2020
Posts: 2
Location: Portugal

PostPosted: Wed Apr 22, 2020 2:55 pm
Reply with quote

I solve the probem!

IF RC = 8 THEN DO
CALL 'MEMBER2'
END



So easy that i need to jump from a airplane to wakeup! icon_biggrin.gif

I'm new with rexx, but this is the basic for the basics !!


Thank tou anyway icon_biggrin.gif
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2023
Location: USA

PostPosted: Wed Apr 22, 2020 7:18 pm
Reply with quote

RTFM:
TSO/E REXX Reference wrote:
Example:

/* Function is called by FRED( ’data X’, 1, 5 ) */

Fred: Arg string, num1, num2

/* Now: STRING contains ’DATA X’ */
/* NUM1 contains ’1’ */
/* NUM2 contains ’5’ */
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Apr 24, 2020 6:47 am
Reply with quote

This should have worked:
Code:
IF RC = 8 THEN DO
ADRESS TSO
EX 'X.A.REXX(member2)'
END

But you misspelled ADDRESS. And I think any host command should be enclosed in quotes.
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