Can the president be in jail and still keep his job

No, if the President is in jail, it is highly unlikely that they could keep their job. In most countries, including the United States, the President can be impeached or removed from office if they are found guilty of a serious crime. It would be up to the legal process and the country's laws to determine the President's fate if they were to be imprisoned.