I am calling this pgm from command prompt...
You might run a STRCMTCTL LCKLVL(*CHG) command before calling your program. After the program ends, run a COMMIT or a ROLLBACK command depending on whether the program ended properly or failed. And finally, run ENDCMTCTL to stop commitment control.
You might create a basic CL program to wrap the new commands around a CALL to your program.
You might also recreate your program with parameters that specify commitment control or SET OPTIONS for commitment control in the embedded SQL.
You can handle commitment control outside your program or have it be built into it. It could depend on what the overall commitment control environment is on your system.
Note that commitment control requires journaled files. I haven't tried it, but you might use the STRCMTCTL DFTJRN() parameter to assign a journal temporarily.