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
 

 

Dynamic calling in Rexx not working

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Dynamic calling in Rexx not working
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Wed Oct 17, 2007 12:16 pm    Post subject: Reply to: Dynamic calling in Rexx not working
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: 1226
Location: Israel

PostPosted: Wed Oct 17, 2007 1:17 pm    Post subject:
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    Post subject: Reply to: Dynamic calling in Rexx not working
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: 1226
Location: Israel

PostPosted: Wed Oct 17, 2007 8:11 pm    Post subject: Re: Reply to: Dynamic calling in Rexx not working
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    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 cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
No new posts Calling procedure with multiple entri... steve-myers PL/I & Assembler 5 Fri Jan 27, 2017 3:33 pm


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