The VSAM write error 24 awesome solution

The reason for VSAM write error code 24 is as follows – Invalid key for a VSAM indexed or relative file; attempt to write beyond file boundaries VS COBOL II only: for a WRITE to a relative file, size of relative record number too large for relative key.

Solution: Check the input record length and copy book total record length