In calling a program and passing numeric parameters to that program, RPG programs first move the parameters to packed variables. RPG programs receive any numeric parameters as packed, and then move them to the associated fields. This ensures that the interface for numeric parameter passing is always packed numeric.
COBOL programs pass numeric parameters using the same definition as the field. If the definition is signed numeric (unpacked), COBOL programs pass the parameter in that way. Similarly, COBOL programs receive numeric parameters according to their definition in the model as packed or signed.
When a COBOL program calls an RPG program with numeric parameter passing, a parameter mismatch error occurs if the COBOL program defines one of the parameters as signed numeric (unpacked).
|
Copyright © 2014 CA.
All rights reserved.
|
|