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
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1009

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: 2226
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 REXX allocated datasets in JCL CLIST & REXX 9
No new posts getting RC=3650 when invoking REXX wi... CLIST & REXX 7
This topic is locked: you cannot edit posts or make replies. A Rexx who changes date into a JCL?Po... CLIST & REXX 9
No new posts clist to rexx converter CLIST & REXX 2
No new posts How to replace a string dynamically i... CLIST & REXX 16
Search our Forums:

Back to Top