RPGIV @ Work

A unique site for RPG and System i Lovers


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 Programs in Free Format Print E-mail
User Rating: / 0
Written by Chamara Withanachchi   

Like subprocedures, program-to-program call statements (in free format) require the use of a program prototype. Program prototypes are the same as subprocedure prototypes.

For this example I have used IDFXCHKC and created a prototype for the IDFXCHKC program.


Define Procedure.

D @CheckCancell   PR                  ExtPgm('IDFXCHKC') 
		D                                9A 
		D                                1A 
		D  P@ABC         S               9A 
		D  p@DEF         S               1A 
You have to define the variable as accept in the External Program (EXTPGM) in my example I have used IDFXCHKC program which required 2 parameters (P@ABC and P@DEF)


Then call the program

			@CheckCancell(P@Draft : p@stat);  
<Previous   Next>