PreviousNext
Help > XML Easycom > Calling Programs or Procedures
Calling Programs or Procedures

 With XML Easycom, you can call programs (*PGM) and Procedures from service programs (*SRVPGM).

The prototype tells the system what to call: A Program or a Procedure.

 

RPG or Simplified RPG prototypes:

EXTPGM Keywords tells the system that a Program has to be called. The name of the program is given by the keyword and can be different from the name of the prototype.

EXTPGM(PGM_NAME):

Example:

D CVTNW_PRC       PR                  EXTPGM('CVTNWR')  

CVTNWR is the name of the program to call.

CVTNW_PRC is a virtual name used by PHP script within XML Easycom functions calls.

 

EXTPROC keyword tells the system that a procedure has to be called.
The real name of the procedure is given by the keyword and can be different from the name of the prototype.

EXTPROC(PROC_NAME):

Example:

D CVTNW_PRC       PR                  EXTPROC('CVTNW')  

CVTNW is the real name of the procedure to call in a service program.

CVTNW_PRC is a virtual name used by PHP script within XML Easycom functions calls.

 

When no keyword is used, then a procedure is called, and its name is equal to the virtual name.

Example:

D CVTNW           PR 

CVTNW is the real name of the procedure to call in a service program, and it is also the virtual name used by PHP script within XML Easycom functions calls.

 

PCML prototypes:

 

EntryPoint attribute in <Program> tag will tell the system if a program or a procedure needs to be called.

 

If EntryPoint is specified, it sets the real name of the procedure. Name sets the virtual name used within PHP scripts using XML Easycom.

Example:

<program name="MY_CUST_PRC" entrypoint="CUST_DIM">

 

When EntryPoint attribute is not set, Path attribute sets the real name of the program to call, and optionally its library.

Example:

<program name="qbnrpii" path="/QSYS.lib/QBNRPII.pgm" >

If library is not specified, program is searched in *LIBL.

Standard AS/400 naming can be used (LIBRARY/NAME).