The program call method allows calling program (*PGM) or service program (*SRVPGM). (Not a *MODULE, which is a non-runnable intermediate object).
PgmCall($Program, $Library, $Parameters, $Returnvalue, $options)
Arguments |
Value |
Description |
$Program |
|
Program name to be called |
$Library |
Library name (or blank to use library list) |
Library where the program is located |
$Parameters |
See parameters section |
Program parameters |
$Returnvalue |
|
Program return value parameter definition, to define what sort of value will be returned by a subprocedure or function. |
$options |
An array of options |
A popular option is to provide a service program function name: 'func' => 'myfuncname' Function name is case-sensitive. |
This sample shows how to run an RPG program that has the following parameters:
|
<?php |
|