CALL "C$TRIM" USING var |
var | PIC X(n) | If var is defined as pic x any length, the variable may be resized. If var is defined as pic x(n), the variable is not resized and the trimmed text is left aligned in the variable area. Variables that are not alphanumeric produce undefined effects. |
*> define str1 as pic x(n) move " Hello COBOL World" to str1 call "c$trim" using str1 *> the first 3 spaces will be removed |