Passing by Value
With a prototyped procedure, you can pass a parameter by value instead of by reference. When a parameter is passed by value, the compiler passes the actual value to the called procedure.
When a parameter is passed by value, the called program or procedure can change the value of the parameter, but the caller will never see the changed value.
To pass a parameter by value, specify the keyword VALUE on the parameter definition in the prototype, as shown in the figures below.
Note: IBM® i program calls require that parameters be passed by
reference. Consequently, you cannot pass a parameter by value to a program.