View previous topic :: View next topic
|
Author |
Message |
anilsanda
New User
Joined: 07 Jun 2007 Posts: 15 Location: chennai
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
use:
Code: |
call_pgm = "TDRXHC" || format_code
interpret 'call 'call_pgm |
|
|
Back to top |
|
|
jameslemo
New User
Joined: 19 Oct 2006 Posts: 1
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
|