LTRIM: PROC (INSTRING) RETURNS (CHAR (*) VARYING); /* LTRIM REMOVES PRECEDING BLANKS, IF ANY, FROM A CHARACTER STRING AND RETURNS THE NEW STRING. IF INSTRING IS ALL BLANK, LTRIM RETURNS A NULL STRING. HEATHER SEID -- 2/2/82 */ DCL (INSTRING) CHAR(*) VARYING; DCL OUTPTR PTR; DCL OUTSTRING CHAR (LENGTH(INSTRING)) VARYING BASED (OUTPTR); DCL POS FIXED BIN(31); DCL STOP BIT; DCL (SUBSTR,VERIFY) BUILTIN; ALLOCATE OUTSTRING; /* TRIM PRECEDING BLANKS */ POS = VERIFY (INSTRING, ' '); IF POS = 0 THEN OUTSTRING = ''; ELSE OUTSTRING = SUBSTR (INSTRING,POS); RETURN (OUTSTRING); END LTRIM;