Gas may be caused by the food you eat that is not being digested. Try a tablespoon of apple cider vinegar taken by mouth followed by water, just before you eat. This may help digest your food properly.
Gas once formed in the G. I. track will move alongwith the movement of the intestine. So you cannnot stop moving it. It is good that it moves and passes through as flatulence. You can minimise the gas production by reducing carbohydrates in the food and also by regular exersice.