Variable trimming
Variable trimming means removing leading and trailing blanks from a variable’s contents. Use trimming by appending a slash (/) to the end of a specified variable name. The slash must follow any substring specifications if both are used together.
For example, suppose you want to minimize the length of an ALERT text so it fits on a single line. You want to eliminate the blanks that are padded to variables &IMFOJOB, &IMFJCLAS, and &WORD4. The result is
Trimming can be a useful tool for instring matches that occur when a particular string is contained in another string.
Assume that you want to find out whether the current job is one of 20 jobs whose names are contained in a character string, one following the other and delimited by a blank. This variable is called &TARGETJOB and bears the contents
The current job name is contained in the variable &IMFOJOB (which is always 8 characters long and padded with blanks). For this example, assume the contents of IMFOJOB is JOB2 followed by 4 blanks. By specifying
a match can be determined.
If the trim indicator is omitted, the expression would have evaluated as false because the Rule Processor will try to find the characters JOB2 followed by 4 blanks in the target string.