You can call the system program QZDFMDB2and pass it one parameter with an executable SQL string. In this case, the SQL string is a call to your stored procedure:
CALL PGM(QZDFMDB2) PARM('CALL PROCEDURE (''XYZ'', ''ABC'')')
To replace in your values, use the PARM variable:
DCL VAR(&CALL) TYPE(*CHAR) LEN(200)
CHGVAR VAR(&CALL)
VALUE('CALL PROCEDURE (''' *CAT &PARM1 *TCAT ''', ''' *CAT &PARM2 *TCAT ''')')
CALL PGM(QZDFMDB2) PARM(&CALL)
source
share