RPGIV @ Work

A unique site for RPG and System i Lovers

Welcome!

Hi, this site will provide all what you need in System i and RPG developments.

My Name is Chamara Withanachchi, System i Expert and RPG Developer. And in the field for last 11 years.

I hope you will find lot of valuable information from this site

Calling Sub Procedures from CL Print E-mail
User Rating: / 0
PoorBest 
Written by Chamara Withanachchi   
 

CALLPRC command, which lets you call a subprocedure and pass parameters. CALLPRC is similar to the traditional CALL command we've always had in CL, except that it calls a

procedure and, and you have to bind to that procedure when you build your CL program.

 

Ex :

PGM         
		
		   DCL VAR(&CURREN) TYPE(*CHAR) LEN(3)       
		   DCL VAR(&AMT) TYPE(*DEC)  LEN(14 3)     
		   DCL VAR(&RATE) TYPE(*DEC) LEN(19 9)     
		
		   CALLPRC PRC('GET_RATE') +        
			   PARM((&CURREN *BYREF) +            
					(&AMT *BYREF)) +    
			  RTNVAL(&RATE)  
		
		ENDPGM  
<Previous   Next>