added function to check actual record length

added function to check actual record length