CALLING REXX FROM CLIST

 

CALLING a REXX FROM CLIST and also passing value to rexx

You might be wondering why would you need such a thing. But I can bet its useful when you have a ready to use code in REXX and you want to use in your CLIST application and you dont want to rewrite it all in CLIST.  I have used it a couple of time myself and its really useful.


CLIST CODE:

1.    passing one value 'mainframe'

EX 'USERID.ABC.CLIST(rexxcodename)' 'mainframe'

2.    passing two values 'mainframe wizard'

EX 'USERID.ABC.CLIST(rexxcodename)' 'mainframe wizard'



REXX CODE:

1.    Receiving one value

/* REXX */        
arg parm1         
say 'i m in rexx'
say parm1         


2.    Recieving two values

/* REXX */        
arg parm1 parm2         
say 'i m in rexx'
say parm1    
say parm2