Set up a counter, initialized to zero. Then increase the counter
after the inserting option, and do the commit if the counter value is 100, reset the counter to 0 afterwards. Repeat the loop untill all the records be inserted completedly. Note: p.l. commit finally in order to save the last several records which are not being saved yet.
Alternatively, U can use the mod command, but it will impact the performance a bit.