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

Dynamic calling in Rexx not working


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

New User


Joined: 07 Jun 2007
Posts: 15
Location: chennai

PostPosted: Wed Oct 17, 2007 12:00 pm
Reply with quote

Hi,

Could you please help me in performing a Dynamic call in Rexx.

My requirement is as follows:

i will get a value from the user for the variable format_code for instance 10.

Then i have to call a program module TDRXHC10.
The logic im having is as follows:

call_pgm = "TDRXHC" || format_code
call value(strip(call_pgm))

But the call is not working.

Please help me out.
Regards,
Elamaran S
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Oct 17, 2007 12:16 pm
Reply with quote

Quote:
But the call is not working.


A little bit generic, as a starting point, isn' t it ?

If You want to behelped You need to be a little bit more specific.

is the program You a recalling REXX aware?
if not You can only have collateral effecs,
which means carry on some actions based on the input parameters,
the only thing which will passed back and usable by rexx is the return code.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Oct 17, 2007 1:17 pm
Reply with quote

use:
Code:
call_pgm = "TDRXHC" || format_code
interpret 'call 'call_pgm
Back to top
View user's profile Send private message
jameslemo

New User


Joined: 19 Oct 2006
Posts: 1

PostPosted: Wed Oct 17, 2007 4:46 pm
Reply with quote

Instead of using Value and strip function simultaneosly can u try doing it in two steps. Probably that would work.. or else u have to try Interpret.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Oct 17, 2007 8:11 pm
Reply with quote

jameslemo wrote:
Instead of using Value and strip function simultaneosly can u try doing it in two steps. Probably that would work.. or else u have to try Interpret.

this kind of function within a function works very well in rexx.
in fact, it is often recommended to use this way.
Of course, use but do not abuse!
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 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
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top