A simple function that finds the length of a string. Define a variable i to hold the stringlength number.
DATA len TYPE i. len = strlen( field ). WRITE: 'The length of the field is', len. ULINE.