Ü  %TRIM

·         It is used to trim the string’s leading and trailing spaces.

 

Example –%trim built-in function in rpgle

 


D FirstName       S             10A   inz ('   John  ')
D LastName        S             15A   inz ('   Cena  ')
D Name            S             25A
 
/FREE
     Name = %trim (FirstName) + ' ' + %trim (LastName); // Name = John Cena
 /END-FREE

 





User Comments:





Copyright © Go4as400.com, 2013-2017. Copyright notice