1. When are dynamic calls(CALL) preferred to static calls(CALLB & CALLP)?
2. Performance wise which one is faster, CALLB or CALLP ?
3. I know CALLP checks the parameters during compile time and has an advantage over CALLB. But any scenarios where CALLB takes the advantage over CALLP ?
4. Performance wise are the below scenarios right ?
a.CALLP with non EXTPGM is identical to CALLB
b.CALLP with ETXPGM is identical to CALL
Thanks in advance
Anup
Software/Hardware used:
AS400
ASKED:
December 10, 2012 7:28 AM
There is no need for CALL nor CALLB in new programs. CALLP is all that needs to be learned. CALL will call an external program, and it is therefore ‘dynamic’. CALLB will call a bound (‘B’) procedure, and it will be ‘static’. CALLP is ‘Call with Prototype’, and it can be used to call external programs and bound procedures (including late-bound procedures in external service programs) so it can be ‘static’ or ‘dynamic’. Static calls are faster than dynamic. — Tom