C$TRIM
The C$TRIM library routine performs a trim operation on alphanumeric variables.
Note: Since TRIM, TRIML and TRIMR intrinsic functions are available, this routine is deprecated.
Syntax:
 CALL "C$TRIM" USING var
Parameters:
var
PIC X(n)
If var is defined as pic x any length, the trim removes leading and trailing spaces and the variable is resized. If var is defined as pic x(n), the trim only removes leading spaces, the result is the same of a left justification of the variable made by calling C$JUSTIFY. Variables that are not alphanumeric produce undefined effects.
Examples:
Example - Remove leading spaces on a string
*> define str1 as pic x(n)
 
move " Hello COBOL World" to str1
call "c$trim" using str1
*> the first 3 spaces will be removed