trim $variable,[trimCharacter,[,LEFT | RIGHT]]
Where:
$variable | variable containing text to be trimmed. |
trimCharacter | the leading and/or trailing character(s) to trim from $variable. If this parameter contains multiple characters all of the occurrences of these character will be trimmed. If trimCharacter is not specified, then it defaults to a space character. This parameter may be a variable containing the trim character or characters. Enclose trimCharacter in double quotation marks ("") if it contains spaces or commas. |
LEFT | trim leading characters from $variable. If neither LEFT or RIGHT is specified, then both leading and trailing characters are trimmed. |
RIGHT | trim trailing characters from $variable. |
The trim command trims leading and/or trailing characters from a variable.
Example
trim | $Text |
trim | $Text,0,left |
trim | $Text," ", right |
trim | $TEXT,"$ " |
Sample Script
* trim.txt
*
SetVar $Text,"985.2000000"
trim $Text,"0",Right
type $Text
exit
TN3270 Plus is continually being improved. To learn more about the latest enhancements, please review our Version History web page.