You have stated that you took a 6-month break (not leave); therefore, you cannot claim continuity of employment. No company will allow a 6-month break (other than maternity leave); they will definitely provide you with a fresh appointment. You should check your employee code number after rejoining and also confirm whether you have withdrawn your PF accumulations or not. The only confusing thing is why your company has not paid your gratuity for 9 years.
Always provide full details when posing a query, such as designation, date of joining, salary, etc.
Regards, Suresh