Cogito-Ergo-Sum Advanced
 
  Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
  | 
		
			
				 Posted: Thu Dec 08, 2005 9:56 am    Post subject: CREX: Calling subroutines in compiled REXX | 
				     | 
			 
			
				
  | 
			 
			
				Hi,
 
Is there an issue while calling a compiled REXX program from another compiled REXX program using the TSO CALL method?
 
 
The caller (named CALLER):
 
 	  | Code: | 	 		  
 
/***rexx***/                       
 
say 'Hi! I am the caller.'         
 
say 'I will call the callee now.'  
 
"call 'MY.RXLOAD(CALLEE)' PASSENVB"
 
exit                               
 
 | 	  
 
 
The callee (named CALLEE):
 
 	  | Code: | 	 		  
 
/***rexx***/              
 
address tso               
 
say 'Hi! I am the callee.'
 
return                    
 
 | 	  
 
 
When I execute CALLER in batch using EXEC PGM=CALLER, I do not see the SAY from CALLEE.
 
 
After some research, I found that, the calling program need to call the called program just as in case of uncompiled REXX. That is,
 
 
The caller (named CALLER):
 
 	  | Code: | 	 		  
 
/***rexx***/                     
 
say 'Hi! I am the caller.'       
 
say 'I will call the callee now.'
 
call callee                      
 
exit                             
 
 | 	  
 
 
The above code actually called CALLEE and SYSTSPRT had all the outputs.
 
 
Note: There was no difference with and without PASSENVB option in the CALL statement in my first attempt. _________________ ALL opinions are welcome.
 
 
Debugging tip:
 
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth. 
 
-- Sherlock Holmes. | 
			 
		  |